]> code.delx.au - gnu-emacs/commitdiff
Merge changes from emacs-23 branch
authorChong Yidong <cyd@stupidchicken.com>
Sun, 2 Jan 2011 20:31:19 +0000 (15:31 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 2 Jan 2011 20:31:19 +0000 (15:31 -0500)
43 files changed:
1  2 
admin/ChangeLog
doc/emacs/ChangeLog
doc/emacs/frames.texi
doc/emacs/maintaining.texi
doc/emacs/rmail.texi
doc/lispref/ChangeLog
doc/lispref/modes.texi
doc/man/ChangeLog
etc/ChangeLog
etc/NEWS.23
lib-src/ChangeLog
lib-src/ebrowse.c
lib-src/etags.c
lisp/ChangeLog
lisp/emulation/edt-mapper.el
lisp/eshell/em-hist.el
lisp/files.el
lisp/help-fns.el
lisp/isearch.el
lisp/mail/binhex.el
lisp/mail/mail-utils.el
lisp/mail/rmail.el
lisp/mail/rmailmm.el
lisp/term/w32-win.el
lisp/textmodes/rst.el
lisp/time.el
lisp/version.el
nextstep/ChangeLog
nextstep/Cocoa/Emacs.base/Contents/Info.plist
nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings
nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist
nt/ChangeLog
nt/INSTALL
nt/README.W32
nt/configure.bat
src/.gdbinit
src/ChangeLog
src/fileio.c
src/image.c
src/keyboard.c
src/window.c
src/xdisp.c
src/xterm.c

diff --combined admin/ChangeLog
index 601f577523bec18a4defeaead3c6c95c03bc284d,de3fc5f52d383553bec929f62654105ae95076c5..1314438a10aa4e639cd3489ec08daca457718adb
 -2010-12-31  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * nt/README.W32: Update the information about PNG support libraries.
+       (Bug#7716)
 +2010-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * bzrmerge.el: New file to help merge branches while skipping
 +      some revisions (e.g. from emacs-23 to trunk).
 +
 +2010-12-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * CPP-DEFINES (EXPLICIT_SIGN_EXTEND): Remove.
 +
 +2010-10-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * notes/nextstep: Move here from ../nextstep/DEV-NOTES.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * admin.el (set-version): Add doc/emacs/emacsver.texi.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * admin.el (set-version): No need to act on doc/ files any more.
 +
 +      * quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove b2m.
 +
 +2010-09-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * unidata/BidiMirroring.txt: Update from
 +      http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d2.txt
 +
 +      * unidata/UnicodeData.txt: Update from
 +      http://www.unicode.org/Public/6.0.0/ucd/UnicodeData-6.0.0d7.txt
 +
 +2010-08-09  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * CPP-DEFINES (WORDS_BIG_ENDIAN): Remove.
 +
 +2010-08-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * MAINTAINERS: Rename src/unexec.c => src/unexcoff.c.
 +
 +2010-07-24  Christoph Scholtes  <cschol2112@gmail.com>
 +
 +      * admin.el: Write version number to nt/makefile.w32-in.
 +      * nt/makedist.bat: Remove; replaced with `zipdist.bat'
 +      in the nt/ directory.
 +      * nt/README.W32: Relocate to nt/ directory.
 +
 +2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * CPP-DEFINES (HAVE_INDEX, HAVE_RINDEX): Remove.
 +
 +2010-07-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * MAINTAINERS: Update my responsibilities.
 +
 +2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
 +      (GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
 +      Remove.
 +
 +2010-06-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * unidata/bidimirror.awk: New file.
 +
 +      * unidata/BidiMirroring.txt: New file from
 +      http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d1.txt.
 +
 +      * unidata/Makefile.in: (../../src/bidimirror.h): New target.
 +      (all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
 +
 +      * unidata/makefile.w32-in (../../src/bidimirror.h): New target.
 +      (all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
 +
 +      * unidata/biditype.awk: New file.
 +
 +      * unidata/Makefile.in (../../src/biditype.h): New target.
 +
 +      * unidata/makefile.w32-in (../../src/biditype.h): New target.
 +
 +2010-06-09  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * unidata/UnicodeData.txt: Update from
 +      http://www.unicode.org/Public/6.0.0/ucd/UnicodeData-6.0.0d5.txt
 +
 +2010-05-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * quick-install-emacs (AVOID): No more Makefile.c files.
 +
 +      * notes/cpp: Remove file.
 +
 +2010-05-15  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * admin.el (set-version, set-copyright): Update emacs.c instead of
 +      version.el.
 +
 +      * make-tarball.txt: Update filename list in step 6.
 +
 +      * quick-install-emacs: Scan emacs.c instead of version.el for
 +      version string.
 +
  2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
  
        * Version 23.2 released.
  
 +2010-04-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * CPP-DEFINES (__DJGPP__, __GO32__): Remove, no longer used.
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
 +2010-03-10  Miles Bader  <miles@gnu.org>
 +
 +      * quick-install-emacs: Use more portable shell syntax.
 +
 +      * quick-install-emacs: (AVOID): Be more picky about files we avoid
 +      installing.
 +
  2010-02-14  Juanma Barranquero  <lekktu@gmail.com>
  
        * quick-install-emacs (PRUNED): Fix typo in message.
  
        * charsets/mapconv: Handle UNICODE2.
  
 -      * charsets/Makefile (CJK): Include CP932-2BYTE.map
 +      * charsets/Makefile (CJK): Include CP932-2BYTE.map.
        (CP932-2BYTE.map): New target.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
  2004-08-28  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * FOR-RELEASE (Indications): Remove entry about GTK and geometry,
 +      * FOR-RELEASE (Indications): Remove entry about GTK and geometry
        (now behaves as well as other ports).
  
  2004-06-28  Jan Djärv  <jan.h.d@swipnet.se>
diff --combined doc/emacs/ChangeLog
index ba2156bd745abd01ff8e8df1c97bd0e11149235f,dcd7eba7d1023600a2b5e8fdf8f3b3aec765133f..3b751584f6b6a569dd0be132a3a7f1ab88a824fc
@@@ -1,33 -1,48 +1,59 @@@
 -2010-12-30  Chong Yidong  <cyd@stupidchicken.com>
++2011-01-02  Chong Yidong  <cyd@stupidchicken.com>
+       * rmail.texi (Rmail Display): Edit for grammar and conciseness.
 -2010-12-27  Kenichi Handa  <handa@m17n.org>
++2011-01-02  Kenichi Handa  <handa@m17n.org>
+       * rmail.texi (Rmail Display): Describe new features of Rmail in Info.
 -2010-12-25  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * frames.texi (Cut and Paste): Modify the section's name and text:
+       don't mix "cut/paste" with "kill/yank".
+       (Cut/Paste Other App): Describe the per-session emulation of PRIMARY.
+       (Bug#7702)
+       * trouble.texi (Checklist): Mention debug-on-quit.  (Bug#7667)
 -2010-12-18  Glenn Morris  <rgm@gnu.org>
++2011-01-02  Glenn Morris  <rgm@gnu.org>
+       * maintaining.texi: Move inclusion of emerge after EDE, so that it
+       matches its position in the menu.  (Bug#7674)
 -2010-12-14  Glenn Morris  <rgm@gnu.org>
++2011-01-02  Glenn Morris  <rgm@gnu.org>
+       * trouble.texi (Checklist): Mention not replying via news either.
 -2010-12-11  Eli Zaretskii  <eliz@gnu.org>
 +2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * misc.texi (Document View): Update DocView section with newly
 +      supported document formats.
 +
 +2010-12-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * killing.texi: Resection the Info version to conform to the
 +      printed manual, to avoid making sections on Accumulating Text, CUA
 +      and Rectangles into full chapters.
 +
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * custom.texi (Init Syntax): Add index entries for "character syntax".
        (Bug#7576)
  
 -2010-12-11  Karel Klíč  <kklic@redhat.com>
 +2010-12-13  Karel Klíč  <kklic@redhat.com>
  
        * text.texi (HTML Mode): Small fixes.  (Bug#7607)
  
 -2010-12-10  Glenn Morris  <rgm@gnu.org>
 +2010-12-13  Glenn Morris  <rgm@gnu.org>
  
        * trouble.texi (Checklist): Fix typo in newsgroup name.
  
 -2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
        * search.texi (Word Search): Note that the lazy highlight always
        matches to whole words (Bug#7470).
  
 -2010-12-04  Eli Zaretskii  <eliz@gnu.org>
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * display.texi (Optional Mode Line): Make the description of
        load-average more accurate.
        (Windows Startup): New node.  Move the stuff about the current
        directory from "Windows HOME".
  
 -2010-11-23  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 +2010-11-27  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
  
        * maintaining.texi (VC With A Locking VCS, VC Directory Commands):
        * vc1-xtra.texi (Customizing VC, General VC Options): Small fixes.
  
 -2010-11-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * maintaining.texi (Version Control Systems): Fix repeated sentence.
        Suggested by Štěpán Němec.
  
 -2010-11-20  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * maintaining.texi (Version Control): Say "commit", not "check in".
        (Version Control Systems): Simplify descriptions.
  
        * emacs.texi (Top): Update node listing.
  
 -2010-11-06  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * rmail.texi (Rmail Coding): Characters with no fonts are not
 +      necessarily displayed as empty boxes.
 +
 +      * mule.texi (Language Environments, Fontsets): Characters with no
 +      fonts are not necessarily displayed as empty boxes.
 +
 +      * display.texi (Text Display): Document display of glyphless
 +      characters.
 +
 +2010-11-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * basic.texi (Position Info): Add M-x count-words-region.
 +
 +2010-11-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * msdog.texi (ls in Lisp): Update for ls-lisp changes.
 +
 +2010-11-09  Eli Zaretskii  <eliz@gnu.org>
  
        * msdog.texi (Windows HOME): Add information regarding startup
        directory when invoking Emacs from a desktop shortcut.  (bug#7300)
  
 +2010-10-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (MAKEINFO): Add explicit -I$srcdir.
 +
 +      * Makefile.in (.texi.dvi): Remove unnecessary suffix rule.
 +      (DVIPS): New variable.
 +      (.PHONY): Add html, ps.
 +      (html, emacs.html, ps, emacs.ps, emacs-xtra.ps): New targets.
 +      (clean): Delete html, ps files.
 +
 +2010-10-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (EMACSSOURCES): Add emacsver.texi.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (VPATH): Remove.
 +      (infodir): Make it absolute.
 +      (mkinfodir, $(infodir)/emacs, infoclean): No need to cd $srcdir.
 +
 +      * Makefile.in (dist): Anchor regexps.
 +
 +      * Makefile.in (EMACSSOURCES): Put emacs.texi first.
 +      ($(infodir)/emacs, emacs.dvi, emacs.pdf, emacs-xtra.dvi)
 +      (emacs-xtra.pdf): Use $<.
 +
 +      * Makefile.in (infoclean): Remove harmless, long-standing error.
 +
 +      * Makefile.in ($(infodir)): Delete rule.
 +      (mkinfodir): New.
 +      ($(infodir)/emacs): Use $mkinfodir instead of infodir.
 +
 +      * Makefile.in (distclean): Do not delete emacsver.texi.
 +      (dist): Remove reference to emacsver.texi.in.
 +      * emacsver.texi: New file, replacing emacsver.texi.in.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacsver.texi.in: New file.
 +      * emacs.texi: Set EMACSVER by including emacsver.texi.
 +      * Makefile.in (distclean): Delete emacsver.texi.
 +      (dist): Copy emacsver.texi.
 +      (EMACSSOURCES): Add emacsver.texi.
 +
 +      * ack.texi (Acknowledgments): No more b2m.c.
 +
 +      * Makefile.in (.PHONY): Declare info, dvi, pdf, dist.
 +      (emacs): Remove rule.
 +      (dist): No need to deal with the emacs rule any more.
 +
 +2010-10-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (version): New, set by configure.
 +      (clean): Delete dist tar file.
 +      (dist): Use version in tar name.
 +
 +2010-10-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (EMACS_XTRA): Add the main source file.
 +      (emacs-xtra.dvi, emacs-xtra.pdf): Remove explicit emacs-xtra.texi.
 +      (mostlyclean): No core files, reorder other files.
 +      (clean): Delete specific dvi and pdf files.
 +      (infoclean, dist): New rules.
 +      (maintainer-clean): Use infoclean.
 +      ($(infodir)): Add parallel build workaround.
 +
 +2010-10-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (SHELL): Set it.
 +      (INFO_TARGETS, DVI_TARGETS): Remove variables.
 +      (info, dvi): Replace above variables with their expansions.
 +      (info): Move mkdir from here...
 +      ($(infodir)/emacs): ... to here (for parallel builds).
 +      (pdf): New target.
 +      ($(infodir)/emacs): Pass -o option to makeinfo.
 +      (.PHONY): Declare clean rules.
 +      (maintainer-clean): Delete dvi and pdf files.
 +      Guard against cd failures.  Use a more restrictive delete.
 +
 +2010-10-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * misc.texi (Shell Mode): Remove reference to old function name.
 +
 +2010-09-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * maintaining.texi (VC Mode Line): Mention all the possible VC status
 +      indicator characters.
 +
 +2010-09-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (top_srcdir): Remove unused variable.
 +
  2010-09-14  Glenn Morris  <rgm@gnu.org>
  
        * cal-xtra.texi (Fancy Diary Display): Emphasize that sort should be
        * calendar.texi (Appointments): Also updated when a diary include file
        is saved.
  
 -2010-09-12  Glenn Morris  <rgm@gnu.org>
 +2010-09-14  Glenn Morris  <rgm@gnu.org>
  
        * trouble.texi (Bugs): Update the section intro.
        (Known Problems): New section.
        (Sending Patches): Bug fixes are best as responses to existing bugs.
        * emacs.texi (Known Problems): Add menu entry for new section.
  
 -2010-09-04  Chong Yidong  <cyd@stupidchicken.com>
 +2010-09-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * xresources.texi: Untabify.
 +
 +2010-09-06  Chong Yidong  <cyd@stupidchicken.com>
  
        * dired.texi (Dired Enter): Minor doc fix (Bug#6982).
  
 -2010-09-02  Glenn Morris  <rgm@gnu.org>
 +2010-09-06  Glenn Morris  <rgm@gnu.org>
  
        * misc.texi (Saving Emacs Sessions): Mention desktop-path.  (Bug#6948)
  
 +2010-09-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * frames.texi (Cut/Paste Other App): Remove vut-buffer text.
 +
  2010-08-21  Glenn Morris  <rgm@gnu.org>
  
        * misc.texi (Amusements): Mention bubbles and animate.
  
 +2010-07-31  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.texi (Visiting): Add more index entries for
 +      large-file-warning-threshold.
 +
 +2010-07-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * frames.texi (Tool Bars): Add doc for tool-bar-position.
 +
  2010-06-23  Glenn Morris  <rgm@gnu.org>
  
        * abbrevs.texi, basic.texi, buffers.texi, building.texi, calendar.texi:
  
        * basic.texi (Inserting Text): Fix typo.
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +2010-06-10  Glenn Morris  <rgm@gnu.org>
  
 -      * Version 23.2 released.
 +      * ack.texi (Acknowledgments):
 +      * emacs.texi (Acknowledgments): Update for notifications.el.
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +2010-05-31  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * dired.texi (Operating on Files): Mention encryption commands
 +      (Bug#6315).
 +
 +2010-05-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * basic.texi (Moving Point): Update due to renaming of commands bound
 +      to arrows.  Document bidi-aware behavior of C-<right> and C-<left>.
 +
 +2010-05-18  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * display.texi (Fringes): Document reversal of fringe arrows for R2L
 +      paragraphs.
 +      (Line Truncation): Fix wording for bidi display.
 +
 +      * basic.texi (Moving Point): Document bidi-aware behavior of the arrow
 +      keys.
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
  
        * building.texi (GDB Graphical Interface): Remove misleading comparison
        to an IDE (Bug#6128).
  
 -2010-05-03  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 +2010-05-08  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
  
        * programs.texi (Man Page):
        * misc.texi (Invoking emacsclient):
        * mini.texi (Repetition):
        * mark.texi (Setting Mark): Fix typos.
  
 -2010-04-25  Chong Yidong  <cyd@stupidchicken.com>
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
  
        * misc.texi (Printing): Document htmlfontify-buffer.
  
 -2010-04-21  Glenn Morris  <rgm@gnu.org>
 +2010-05-08  Glenn Morris  <rgm@gnu.org>
  
        * calendar.texi (Displaying the Diary, Format of Diary File):
        Fix external cross-references for TeX format output.
  
 +2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-05-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * cmdargs.texi (Initial Options): Mention --chdir.
 +
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * frames.texi (Tool Bars): Add tool-bar-style.
 +
 +2010-04-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * ack.texi, emacs.texi (Acknowledgments): Add SELinux support.
 +
  2010-04-18  Chong Yidong  <cyd@stupidchicken.com>
  
        * programs.texi (Semantic): New node.
  
        * misc.texi (Gnus): Use the `C-h i' keybinding for info.
  
 -2010-04-16  Glenn Morris  <rgm@gnu.org>
 +2010-04-18  Glenn Morris  <rgm@gnu.org>
  
        * emacs.texi (Acknowledgments): Remove duplicate.
  
        * maintaining.texi (VC Directory Commands): Mention stashes and shelves.
  
 -2010-04-15  Glenn Morris  <rgm@gnu.org>
 +2010-04-18  Glenn Morris  <rgm@gnu.org>
  
        * dired.texi (Misc Dired Features): Mention VC diff and log.
        * maintaining.texi (Old Revisions, VC Change Log):
        * custom.texi (Specifying File Variables, Directory Variables):
        Document new commands for manipulating local variable lists.
  
 -2010-04-09  Glenn Morris  <rgm@gnu.org>
 +2010-04-18  Glenn Morris  <rgm@gnu.org>
  
        * trouble.texi (Contributing): Add cindex entry.
        Mention etc/CONTRIBUTE.
  
 -2010-04-06  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-18  Chong Yidong  <cyd@stupidchicken.com>
  
        * mark.texi (Persistent Mark): Copyedits.  Replace undo example with
        query-replace (Bug#5774).
  
 +2010-04-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * ack.texi, emacs.texi (Acknowledgments): Update for Org changes.
 +
 +2010-04-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xresources.texi (Lucid Resources): Mention faceName for dialogs.
 +
 +2010-04-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
 +
  2010-03-30  Eli Zaretskii  <eliz@gnu.org>
  
        * mule.texi (Input Methods): Mention "C-x 8 RET" and add a
        * basic.texi (Inserting Text): Add an index entry for "C-x 8 RET".
        Mention completion provided by `ucs-insert'.
  
 -2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
  
        * sending.texi (Sending Mail): Note variables that may need
        customizing.
        (Mail Sending): Expand discussion of send-mail-function.
  
 -2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
  
        Document Message mode as the default mail mode.
  
  
        * emacs.texi (Top): Fix xrefs.
  
 -2010-03-25  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
  
        * maintaining.texi (VC With A Merging VCS): C-x v v now creates a
        repository if there is none.
        * misc.texi (Navigation): Document doc-view-continuous.
        (Shell Ring): Document new M-r binding.  M-s is no longer bound.
  
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * search.texi (Other Repeating Search): Remove line that `occur'
 +      can not handle multiline matches.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * mule.texi (International): Mention support of bidirectional editing.
 +      (Bidirectional Editing): New section.
 +
 +2010-03-28  Nick Roberts  <nickrob@snap.net.nz>
 +
 +      * emacs.texi (Top): Update node names to those in building.texi.
 +
 +2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
 +
 +      doc/emacs/building.texi: Describe restored GDB/MI fuctionality removed by 2009-12-29T07:15:34Z!nickrob@snap.net.nz.
 +      doc/emacs/emacs.texi: Update node names for building.texi.
 +
  2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * ack.texi (Acknowledgments):
        * xresources.texi (Table of Resources):
        * mule.texi (Defining Fontsets, Charsets): Update xrefs.
  
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
  2010-03-06  Chong Yidong  <cyd@stupidchicken.com>
  
        * custom.texi (Init Examples): Add xref to Locals.
  
  2009-06-23  Miles Bader  <miles@gnu.org>
  
 -      * display.texi (Scrolling): Document `recenter-redisplay'
 +      * display.texi (Scrolling): Document `recenter-redisplay'.
        (Temporary Face Changes): Document `text-scale-set'.
  
  2009-06-21  Chong Yidong  <cyd@stupidchicken.com>
        (Fortran Columns): Mention font-locking.
        (Fortran Abbrev): Word syntax not relevant with new-style abbrev.
  
 -2008-08-23  Johan Bockgard  <bojohan@muon>
 +2008-08-23  Johan Bockgård  <bojohan@muon>
  
        * basic.texi (Moving Point): Fix <prior>/<next> confusion.
  
  2005-03-05  Juri Linkov  <juri@jurta.org>
  
        * cmdargs.texi (Emacs Invocation): Add cindex
 -      "invocation (command line arguments)"
 +      "invocation (command line arguments)".
        (Misc X): Add -nbc, --no-blinking-cursor.
  
  2005-03-04  Ulf Jasper  <ulf.jasper@web.de>
  
  ;; Local Variables:
  ;; coding: utf-8
 -;; fill-column: 79
  ;; End:
  
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
  
    You should have received a copy of the GNU General Public License
    along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 -
diff --combined doc/emacs/frames.texi
index df4f0beff9e5414598827518c1c04a6f284e96a1,f935305628b702c2cead829180f11ab4f26b55d6..0ecf6f68d8c6fc352aa00bc1db6d354409121ddc
@@@ -58,10 -58,10 +58,10 @@@ so that you can use many of the feature
  @end menu
  
  @node Cut and Paste
- @section Killing and Yanking on Graphical Displays
+ @section Cutting and Pasting on Graphical Displays
  
-   This section describes commands for selecting a region, killing, and
yanking using the mouse.
+   This section describes commands for selecting a region, cutting, and
pasting using the mouse.
  
  @menu
  * Mouse Commands::      Moving, cutting, and pasting, with the mouse.
@@@ -248,6 -248,14 +248,14 @@@ has no ``memory'': each time you save s
  selection, either in Emacs or in another X application, the previous
  contents of the primary selection are lost.
  
+ @cindex MS-Windows, and primary selection
+   MS-Windows provides no primary selection, but Emacs emulates it
+ within a single Emacs session, by storing the selected text
+ internally.  Therefore, all the features and commands related to the
+ primary selection work on Windows as they do on X, for cutting and
+ pasting within the same session, but not across Emacs sessions or with
+ other applications.
    Whenever you kill some text using a command such as @kbd{C-w}
  (@code{kill-region}), or copy it into the kill ring using a command
  such as @kbd{M-w} (@code{kill-ring-save}), that text is also saved in
@@@ -273,6 -281,15 +281,6 @@@ the kill ring.  This prevents you from 
  at the risk of large memory consumption if other applications generate
  large selections.
  
 -@cindex cut buffer
 -@vindex x-cut-buffer-max
 -  Whenever Emacs saves some text to the primary selection, it may also
 -save it to the @dfn{cut buffer}.  The cut buffer is an obsolete
 -predecessor to the primary selection; most modern applications do not
 -use it.  Saving text to the cut buffer is slow and inefficient, so
 -Emacs only does it if the text is shorter than the value of
 -@code{x-cut-buffer-max} (20000 characters by default).
 -
    You can yank the primary selection into Emacs using the usual yank
  commands, such as @kbd{C-y} (@code{yank}) and @kbd{Mouse-2}
  (@code{mouse-yank-at-click}).  These commands actually check the
@@@ -1254,19 -1271,6 +1262,19 @@@ bar uses monochrome icons (PBM or XBM f
    You can turn display of tool bars on or off with @kbd{M-x
  tool-bar-mode} or by customizing the option @code{tool-bar-mode}.
  
 +@vindex tool-bar-style
 +@cindex Tool Bar style
 +  When Emacs is compiled with GTK+ support, tool bars can have text and images.
 +Customize @code{tool-bar-style} to select style.  The default style is
 +the same as for the desktop in the Gnome case.  If no default is found,
 +the tool bar uses just images.
 +
 +@cindex Tool Bar position
 +  You can also control the placement of the tool bar for the GTK+ tool bar
 +with the frame parameter @code{tool-bar-position}.
 +For a detailed description of frame parameters and customization,
 +see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}.
 +
  @node Dialog Boxes
  @section Using Dialog Boxes
  @cindex dialog boxes
index 8442586ab27aba18e0c2afe7f260e933f3b8f011,733336774eb13d16c35a2e1cd82608358d44848b..6ae4cf2dd36044b4781c1db8e1e5989664f0f7cd
@@@ -360,7 -360,6 +360,7 @@@ change, and later use the @kbd{C-x v a
  
  @node VC Mode Line
  @subsection Version Control and the Mode Line
 +@cindex VC, mode line indicator
  
    When you visit a file that is under version control, Emacs indicates
  this on the mode line.  For example, @samp{Bzr-1223} says that Bazaar
@@@ -369,17 -368,10 +369,17 @@@ is used for that file, and the current 
    The character between the back-end name and the revision ID
  indicates the status of the work file.  In a merge-based version
  control system, a @samp{-} character indicates that the work file is
 -unmodified, and @samp{:} indicates that it has been modified.  In a
 -lock-based system, @samp{-} indicates an unlocked file, and @samp{:} a
 -locked file; if the file is locked by another user (for instance,
 -@samp{jim}), that is displayed as @samp{RCS:jim:1.3}.
 +unmodified, and @samp{:} indicates that it has been modified.
 +@samp{!} indicates that the file contains conflicts as result of a
 +recent merge operation (@pxref{Merging}), or that the file was removed
 +from the version control.  Finally, @samp{?}  means that the file is
 +under version control, but is missing from the working tree.
 +
 +  In a lock-based system, @samp{-} indicates an unlocked file, and
 +@samp{:} a locked file; if the file is locked by another user (for
 +instance, @samp{jim}), that is displayed as @samp{RCS:jim:1.3}.
 +@samp{@@} means that the file was locally added, but not yet committed
 +to the master repository.
  
    On a graphical display, you can move the mouse over this mode line
  indicator to pop up a ``tool-tip'', which displays a more verbose
@@@ -2354,7 -2346,4 +2354,3 @@@ the target should be built
  @ifnottex
  @include emerge-xtra.texi
  @end ifnottex
--
- @ignore
-    arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
- @end ignore
diff --combined doc/emacs/rmail.texi
index ddf68e62bbf7091bbbd2b4fa29ec984baf22a08f,9952043fb4d9635fb21cc401bf39f1b5432bdce9..1477a6959c23e0e36f973dd4c17aefe6e9e122c0
@@@ -1101,57 -1101,90 +1101,90 @@@ buffer before sorting it
  @node Rmail Display
  @section Display of Messages
  
-   Rmail reformats the header of each message before displaying it for
- the first time.  Reformatting hides uninteresting header fields to
- reduce clutter.  You can use the @kbd{t} command to show the entire
- header or to repeat the header reformatting operation.
+   This section describes how Rmail displays mail headers,
+ @acronym{MIME} sections and attachments, and URLs.
  
  @table @kbd
  @item t
  Toggle display of complete header (@code{rmail-toggle-header}).
  @end table
  
- @vindex rmail-ignored-headers
- @vindex rmail-nonignored-headers
-   Reformatting the header involves deleting most header fields, on the
- grounds that they are not interesting.  The variable
- @code{rmail-ignored-headers} holds a regular expression that specifies
- which header fields to hide in this way---if it matches the beginning
- of a header field, that whole field is hidden.  However, the variable
- @code{rmail-nonignored-headers} provides a further override: a header
- matching that regular expression is shown even if it matches
- @code{rmail-ignored-headers} too.
- @vindex rmail-displayed-headers
-   As an alternative to the previous two variables, you can set
- @code{rmail-displayed-headers} instead.  If non-@code{nil}, this should
- be a regular expression specifying which headers to display.
  @kindex t @r{(Rmail)}
  @findex rmail-toggle-header
-   To see the complete, original header, use the @kbd{t} command
- (@code{rmail-toggle-header}).  This discards the reformatted headers of
- the current message and displays it with the original header.  Repeating
- @kbd{t} reformats the message again, which shows only the interesting
- headers according to the current values of the above variables.
- Selecting the message again also reformats it if necessary.
+   Before displaying each message for the first time, Rmail reformats
+ its header, hiding uninteresting header fields to reduce clutter.  The
+ @kbd{t} (@code{rmail-toggle-header}) command toggles this, switching
+ between showing the reformatted header fields and showing the
+ complete, original header.  With a positive prefix argument, the
+ command shows the reformatted header; with a zero or negative prefix
+ argument, it shows the full header.  Selecting the message again also
+ reformats it if necessary.
  
-   When the @kbd{t} command has a prefix argument, a positive argument
- means to show the reformatted header, and a zero or negative argument
- means to show the full header.
+ @vindex rmail-ignored-headers
+ @vindex rmail-displayed-headers
+ @vindex rmail-nonignored-headers
+   The variable @code{rmail-ignored-headers} holds a regular expression
+ specifying the header fields to hide; any matching header line will be
+ hidden.  The variable @code{rmail-nonignored-headers} overrides this:
+ any header field matching that regular expression is shown even if it
+ matches @code{rmail-ignored-headers} too.  The variable
+ @code{rmail-displayed-headers} is an alternative to these two
+ variables; if non-@code{nil}, this should be a regular expression
+ specifying which headers to display (the default is @code{nil}).
  
  @vindex rmail-highlighted-headers
    Rmail highlights certain header fields that are especially
  interesting---by default, the @samp{From} and @samp{Subject} fields.
- The variable @code{rmail-highlighted-headers} holds a regular expression
- that specifies the header fields to highlight; if it matches the
- beginning of a header field, that whole field is highlighted.  To turn
- off this feature, set @code{rmail-highlighted-headers} to @code{nil}.
- Customize the face @code{rmail-highlight} to adjust the style of the
- highlighting.
+ This highlighting uses the @code{rmail-highlight} face.  The variable
+ @code{rmail-highlighted-headers} holds a regular expression specifying
+ the header fields to highlight; if it matches the beginning of a
+ header field, that whole field is highlighted.  To disable this
+ feature, set @code{rmail-highlighted-headers} to @code{nil}.
+ @cindex MIME messages (Rmail)
+ @vindex rmail-enable-mime
+   By default, Rmail automatically decodes @acronym{MIME} (Multipurpose
+ Internet Mail Extensions) messages.  If the message contains multiple
+ parts (@acronym{MIME} entities), each part is represented by a tagline
+ in the Rmail buffer.  The tagline summarizes the part's depth, index,
+ and type, and may also contain a button for handling it, e.g. saving
+ it to a file or displaying it as an image in the Rmail buffer.
+ @table @kbd
+ @findex rmail-mime-toggle-hidden
+ @item @key{RET}
+ Hide or show the @acronym{MIME} part at point
+ (@code{rmail-mime-toggle-hidden}).
  
-   You can highlight and activate URLs in incoming messages using
- Goto Address mode:
+ @findex rmail-mime-next-item
+ @item @key{TAB}
+ Move point to the next @acronym{MIME} part
+ (@code{rmail-mime-next-item}).
+ @findex rmail-mime-previous-item
+ @item @key{BackTab}
+ Move point to the previous @acronym{MIME} part
+ (@code{rmail-mime-previous-item}).
+ @findex rmail-mime
+ @item v
+ @kindex v @r{(Rmail)}
+ Toggle between @acronym{MIME} display and raw message
+ (@code{rmail-mime}).
+ @end table
+   The @kbd{v} (@code{rmail-mime}) command toggles between the default
+ @acronym{MIME} display described above, and a ``raw'' display showing
+ the undecoded @acronym{MIME} data.  With a prefix argument, this
+ command toggles the display of only an entity at point.
+   To prevent Rmail from handling MIME decoded messages, change the
+ variable @code{rmail-enable-mime} to @code{nil}.  When this is the
+ case, the @kbd{v} (@code{rmail-mime}) command instead creates a
+ temporary buffer to display the current @acronym{MIME} message.
+   You can highlight and activate URLs in the Rmail buffer using Goto
+ Address mode:
  
  @c FIXME goto-addr.el commentary says to use goto-address instead.
  @smallexample
@@@ -1163,13 -1196,6 +1196,6 @@@ Then you can browse these URLs by click
  (or @kbd{Mouse-1} quickly) or by moving to one and typing @kbd{C-c
  @key{RET}}.  @xref{Goto Address mode, Activating URLs, Activating URLs}.
  
- @cindex MIME messages (Rmail)
- @findex rmail-mime
- @kindex v @r{(Rmail)}
-   The @kbd{v} (@code{rmail-mime}) command creates a temporary buffer
- displaying the current MIME message.  By default, it displays plain text
- and multipart messages, and offers buttons to save attachments.
  @node Rmail Coding
  @section Rmail and Coding Systems
  
@@@ -1192,8 -1218,7 +1218,8 @@@ specification, or because the specifica
  example, a misconfigured mailer could send a message with a
  @samp{charset=iso-8859-1} header when the message is actually encoded
  in @code{koi8-r}.  When you see the message text garbled, or some of
 -its characters displayed as empty boxes, this may have happened.
 +its characters displayed as hex codes or empty boxes, this may have
 +happened.
  
  @findex rmail-redecode-body
    You can correct the problem by decoding the message again using the
diff --combined doc/lispref/ChangeLog
index 157c8580b9c19d586f396952c77ae418996baac8,155e6b005e4720e85c310aa4ac97bce37e5866de..7307d7fab4fafc59ef4797075c715d9f7f6bb085
@@@ -1,11 -1,13 +1,20 @@@
 -2010-12-25  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * modes.texi (Emulating Mode Line): Fix last change.
 -2010-12-18  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * modes.texi (Emulating Mode Line): Update documentation of
+       format-mode-line according to changes that fixed bug #7587.
 -2010-12-11  Eli Zaretskii  <eliz@gnu.org>
 +2010-12-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * modes.texi (Derived Modes): Mention prog-mode.
 +
 +      * keymaps.texi (Simple Menu Items, Extended Menu Items): Remove mention
 +      of the key-binding-data cache since we don't use it any more.
 +
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * processes.texi (Shell Arguments):
        * strings.texi (Creating Strings): Don't mention "shell commands";
        * processes.texi (Shell Arguments): Fix documentation of
        `split-string-and-unquote'.  Add indexing.  (Bug#7563)
  
 -2010-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-12-13  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * modes.texi (Auto-Indentation): New section to document SMIE.
        (Major Mode Conventions):
        * text.texi (Mode-Specific Indent): Refer to it.
  
 -2010-12-04  Eli Zaretskii  <eliz@gnu.org>
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * display.texi (Other Display Specs): Document left-fringe and
        right-fringe display specs.
  
 -2010-12-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-12-13  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * backups.texi (Making Backups):
        * modes.texi (Example Major Modes): Use recommended coding style.
        (Major Mode Basics, Derived Modes): Encourge more strongly use of
        define-derived-mode.  Mention completion-at-point-functions.
  
 -2010-11-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
        * nonascii.texi (Converting Representations):
        Document byte-to-string.
  
 +2010-12-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * buffers.texi (Modification Time):
 +      verify-visited-file-modtime now defaults to the current buffer.
 +
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * nonascii.texi (Converting Representations): Document byte-to-string.
 +
        * strings.texi (Creating Strings): Don't mention semi-obsolete
        function char-to-string.
        (String Conversion): Shorten discussion of semi-obsolete function
@@@ -59,7 -52,7 +68,7 @@@
        * functions.texi (Mapping Functions): Use string instead of
        char-to-string in examples.
  
 -2010-11-20  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * text.texi (Kill Functions, Kill Functions)
        (Low-Level Kill Ring, Low-Level Kill Ring): Remove obsolete
        * variables.texi (Defining Variables): Change "pi" example to
        "float-pi".
  
 -2010-11-12  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * commands.texi (Click Events): Document the values of X, Y and
 +      COL, ROW in the event's position, when the click is on the header
 +      or mode line, on the fringes, or in the margins.
 +
 +2010-11-17  Eli Zaretskii  <eliz@gnu.org>
  
        * customize.texi (Composite Types): Lower-case index entry.
  
        * loading.texi (How Programs Do Loading):
        Document load-file-name.  (Bug#7346)
  
 -2010-11-10  Glenn Morris  <rgm@gnu.org>
 +2010-11-17  Glenn Morris  <rgm@gnu.org>
  
        * text.texi (Kill Functions, Low-Level Kill Ring): Small fixes.
  
 -2010-10-27  Glenn Morris  <rgm@gnu.org>
 +2010-11-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * display.texi (Usual Display): Characters with no fonts are not
 +      necessarily displayed as empty boxes.
 +
 +2010-10-31  Glenn Morris  <rgm@gnu.org>
  
        * maps.texi (Standard Keymaps): Update File menu description.
  
 -2010-10-22  Eli Zaretskii  <eliz@gnu.org>
 +2010-10-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (elisp.dvi, elisp.pdf): Also include $emacsdir.
 +
 +2010-10-24  Eli Zaretskii  <eliz@gnu.org>
  
        * display.texi (Window Systems): Deprecate use of window-system as
        a predicate.
  
 -2010-09-05  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +2010-10-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * help.texi (Documentation Basics): Remove mentions of digest-doc and
 +      sorted-doc.
 +
 +2010-10-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * os.texi (Dynamic Libraries): New node, with slightly modified
 +      text deleted from "Image Formats".
 +      (System Interface): Add @menu entry for "Dynamic Libraries".
 +
 +      * display.texi (Image Formats): Remove description of
 +      image-library-alist.  (Renamed in 2010-10-13T14:50:06Z!lekktu@gmail.com.)
 +
 +2010-10-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * book-spine.texinfo: Rename to book-spine.texi.
 +
 +2010-10-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (MAKEINFO): Add explicit -I$srcdir.
 +
 +      * Makefile.in (DVIPS): New variable.
 +      (.PHONY): Add html, ps.
 +      (html, elisp.html, ps, elisp.ps): New targets.
 +      (clean): Delete html, ps files.
 +      ($(infodir)/elisp): Remove unnecessary includes.
 +
 +2010-10-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (emacsdir): New variable.
 +      (srcs): Add emacsver.texi.
 +      ($(infodir)/elisp, elisp.dvi): Add -I$(emacsdir).
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (VPATH): Remove.
 +      (infodir): Make it absolute.
 +      (mkinfodir, $(infodir)/elisp, infoclean): No need to cd $srcdir.
 +
 +      * Makefile.in (dist): Anchor regexps.
 +
 +      * Makefile.in (srcs): Put elisp.texi first.
 +      ($(infodir)/elisp, elisp.dvi, elisp.pdf): Use $<.
 +
 +      * Makefile.in (infoclean): Remove harmless, long-standing error.
 +
 +      * Makefile.in ($(infodir)): Delete rule.
 +      (mkinfodir): New.
 +      ($(infodir)/elisp): Use $mkinfodir instead of infodir.
 +
 +      * Makefile.in (dist): Remove reference to emacsver.texi.in.
 +      Also copy emacsver.texi, and edit $emacsdir.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (emacsdir): New variable.
 +      (MAKEINFO): Add -I $emacsdir.
 +      (dist): Copy emacsver.texi.
 +      (srcs): Add emacsver.texi.
 +
 +      * book-spine.texinfo, elisp.texi, vol2.texi, vol1.texi:
 +      Set EMACSVER by including emacsver.texi.
 +
 +      * Makefile.in (.PHONY): Declare info, dvi, pdf, dist.
 +
 +2010-10-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (version): New, set by configure.
 +      (clean): Delete dist tar file.
 +      (dist): Use version in tar name.
 +
 +2010-10-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in: Rearrange to more closely resemble doc/emacs/Makefile.
 +      (INSTALL_INFO): Remove unused variable.
 +      (mostlyclean, infoclean, dist): New rules.
 +      (clean): Delete dvi and pdf files.
 +      (maintainer-clean): Remove elisp.oaux, use infoclean.
 +      ($(infodir)): Add parallel build workaround.
 +
 +2010-10-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (dvi, pdf, $(infodir)): New targets.
 +      ($(infodir)/elisp): Ensure target directory exists.  Use $@.
 +      Fix -I typo.
 +      (clean): No 'make.out' or 'core' files.
 +      (.PHONY): Declare clean rules.
 +      (maintainer-clean): Delete pdf file.  Guard against cd failures.
 +
 +2010-10-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * files.texi (File Name Components): Remove ignored section about
 +      deleted variable directory-sep-char.
 +
 +2010-10-03  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * files.texi (Magic File Names): New defopt
 +      remote-file-name-inhibit-cache.
 +
 +2010-10-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * os.texi (Killing Emacs): Hook now runs in batch mode.
 +
 +2010-09-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * text.texi (Special Properties): Clarify when modification-hooks run.
 +
 +2010-09-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * syntax.texi (Syntax Flags): Document new `c' flag.
 +
 +2010-09-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * display.texi (ImageMagick Images): General cleanup.
 +
 +2010-09-06  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
  
        * files.texi (Directory Names): Use \` rather than ^.
  
 +2010-09-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * text.texi (Low-Level Kill Ring):
 +      * frames.texi (Window System Selections): Remove cut buffer
 +      documentation.
 +
 +2010-08-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * display.texi (Fringe Size/Pos): Add a cross-reference to "Layout
 +      Parameters", where the default fringe width is described.
 +
 +      * frames.texi (Window Frame Parameters, Basic Parameters)
 +      (Position Parameters, Layout Parameters, Management Parameters)
 +      (Cursor Parameters, Font and Color Parameters): Add indexing for
 +      frame parameters.  (Bug#6929)
 +
 +2010-08-25  Tom Tromey  <tromey@redhat.com>
 +
 +      * vol2.texi (Top): Update.
 +      * vol1.texi (Top): Update.
 +      * tips.texi (Library Headers): Mention Package-Version and
 +      Package-Requires.
 +      * package.texi: New file.
 +      * os.texi (System Interface): Update pointers.
 +      * elisp.texi (Top): Link to new nodes.  Include package.texi.
 +      * anti.texi (Antinews): Update pointers.
 +
 +2010-08-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * processes.texi (Filter Functions): Fix last change.
 +
 +2010-08-24  Markus Triska  <triska@gmx.at>
 +
 +      * processes.texi (Filter Functions): Use `buffer-live-p' instead
 +      of `buffer-name' in the main text as well as in the example
 +      (Bug#3098).
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * nonascii.texi (Text Representations):
 +      * loading.texi (Loading Non-ASCII):
 +      * compile.texi (Byte Compilation): Don't mention obsolete
 +      --unibyte command-line argument.
 +
  2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
  
        * modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
  
 -2010-08-19  Chong Yidong  <cyd@stupidchicken.com>
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
  
        * objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878).
  
 -2010-08-02  Christoph  <cschol2112@googlemail.com>
 +2010-08-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * commands.texi (Misc Events): Add cross-references to where
 +      POSITION of a mouse event is described in detail.
 +
 +2010-08-08  Christoph  <cschol2112@googlemail.com>
  
        * control.texi (Handling Errors) <error-message-string>: Fix arg name.
  
 -2010-07-29  Juanma Barranquero  <lekktu@gmail.com>
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
  
        * modes.texi (Defining Minor Modes): Use C-backspace, not C-delete.
        Suggested by Štěpán Němec <stepnem@gmail.com>.
  
 -2010-07-28  Juanma Barranquero  <lekktu@gmail.com>
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
  
        * minibuf.texi (High-Level Completion): Document args of
        `read-buffer-function' (bug#5625).
  
 +2010-07-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * frames.texi (Layout Parameters): Add doc for tool-bar-position.
 +
 +2010-07-29  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * processes.texi (Process Information): Explain process property
 +      `remote-tty'.
 +
  2010-07-27  Juanma Barranquero  <lekktu@gmail.com>
  
        * modes.texi (Defining Minor Modes): Use C-delete in examples,
        instead of "\C-\^?" (bug#6334).
  
 -2010-07-21  Juanma Barranquero  <lekktu@gmail.com>
 -
        * text.texi (Special Properties): Fix typo.
  
 +2010-07-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * internals.texi (Writing Emacs Primitives): Adapt to ANSI C
 +      calling sequences, which are now the standard.
 +
  2010-06-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * text.texi (Undo): Clarify command loop behavior (Bug#2433).
  
  2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * errors.texi (Standard Errors): Remove unnecessary markup
 -      (Bug#6461).
 +      * errors.texi (Standard Errors): Remove unnecessary markup (Bug#6461).
  
  2010-06-02  Chong Yidong  <cyd@stupidchicken.com>
  
        * minibuf.texi (Basic Completion): Document completion-boundaries.
        (Programmed Completion): Document the new fourth method for boundaries.
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +2010-05-22  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * Version 23.2 released.
 +      * display.texi (Image Cache): Update documentation about image caching.
  
 -2010-05-03  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 +2010-05-08  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
  
        * windows.texi (Textual Scrolling):
        * tips.texi (Coding Conventions):
        * loading.texi (Where Defined):
        * edebug.texi (Instrumenting): Fix typos.
  
 -2010-04-25  Chong Yidong  <cyd@stupidchicken.com>
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
  
        * keymaps.texi (Menu Bar): Document :advertised-binding property.
  
  
        * elisp.texi (Top): Update node description.
  
 +2010-05-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * nonascii.texi (Character Properties):
 +      Document unicode-category-table.  Add an index entry for Unicode
 +      general category.
 +
 +2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-04-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * locals.texi (Standard Buffer-Local Variables):
 +      Remove @ignore'd reference to `direction-reversed'.
 +
  2010-04-14  Juri Linkov  <juri@jurta.org>
  
        Fix @deffn without category.
  
        * frames.texi (Cursor Parameters): Fix typo.  (Bug#5760)
  
 -2010-03-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * processes.texi (Network Processes): Document seqpacket type.
  
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * os.texi (System Environment): Do not mention lynxos.
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
  2010-03-06  Chong Yidong  <cyd@stupidchicken.com>
  
        * objects.texi (Integer Type): Take note of the read syntax
  2005-02-05  Eli Zaretskii  <eliz@gnu.org>
  
        * frames.texi (Color Names): Add pointer to the X docs about RGB
 -      color specifications.  Improve indexing
 +      color specifications.  Improve indexing.
        (Text Terminal Colors): Replace the description of RGB values by
        an xref to "Color Names".
  
        * minibuf.texi (Reading File Names): read-file-name has new
        arg PREDICATE.  New function read-directory-name.
  
 -      * macros.texi (Defining Macros): Give definition of `declare'
 +      * macros.texi (Defining Macros): Give definition of `declare'.
        (Indenting Macros): New node.
  
        * frames.texi (Parameter Access): Add modify-all-frames-parameters.
        * numbers.texi (Integer Basics): Add most-positive-fixnum,
        most-negative-fixnum.
  
 -      * compile.texi (Byte Compilation): Explain no-byte-compile
 +      * compile.texi (Byte Compilation): Explain no-byte-compile.
        (Compiler Errors): New node.
  
        * os.texi (User Identification): user-uid, user-real-uid
  
  ;; Local Variables:
  ;; coding: utf-8
 -;; add-log-time-zone-rule: t
  ;; End:
  
 -    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 -      2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 +  Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 +    2007, 2008, 2009, 2010  Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
  
    You should have received a copy of the GNU General Public License
    along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 -
 -;;; arch-tag: 985ae0ce-df29-475b-b3f8-4bbcbf6f7fda
diff --combined doc/lispref/modes.texi
index 0f66ebeb6b159de7d5a175f9db1e5aa973da9da1,ad7a3a5037ed5edb2fb9c767f5f90d5067823707..f7e164d98794536c6126b6a6c99b8eb425684946
@@@ -744,8 -744,7 +744,8 @@@ documentation of the major mode
    The recommended way to define a new major mode is to derive it
  from an existing one using @code{define-derived-mode}.  If there is no
  closely related mode, you can inherit from @code{text-mode},
 -@code{special-mode}, or in the worst case @code{fundamental-mode}.
 +@code{special-mode}, @code{prog-mode}, or in the worst case
 +@code{fundamental-mode}.
  
  @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{}
  This macro defines @var{variant} as a major mode command, using
@@@ -2112,29 -2111,38 +2112,38 @@@ the text that would appear in a mode li
  based on a certain mode-line specification.
  
  @defun format-mode-line format &optional face window buffer
- This function formats a line of text according to @var{format} as if
- it were generating the mode line for @var{window}, but instead of
- displaying the text in the mode line or the header line, it returns
- the text as a string.  The argument @var{window} defaults to the
- selected window.  If @var{buffer} is non-@code{nil}, all the
- information used is taken from @var{buffer}; by default, it comes from
- @var{window}'s buffer.
+ This function formats a line of text according to @var{format} as if it
+ were generating the mode line for @var{window}, but it also returns the
+ text as a string.  The argument @var{window} defaults to the selected
+ window.  If @var{buffer} is non-@code{nil}, all the information used is
+ taken from @var{buffer}; by default, it comes from @var{window}'s
+ buffer.
  
  The value string normally has text properties that correspond to the
- faces, keymaps, etc., that the mode line would have.  And any character
- for which no @code{face} property is specified gets a default
- value which is usually @var{face}.  (If @var{face} is @code{t},
that stands for either @code{mode-line} if @var{window} is selected,
+ faces, keymaps, etc., that the mode line would have.  Any character for
+ which no @code{face} property is specified by @var{format} gets a
+ default value determined by @var{face}.  If @var{face} is @code{t}, that
+ stands for either @code{mode-line} if @var{window} is selected,
  otherwise @code{mode-line-inactive}.  If @var{face} is @code{nil} or
- omitted, that stands for no face property.)
+ omitted, that stands for the default face.  If @var{face} is an integer,
+ the value returned by this function will have no text properties.
  
- However, if @var{face} is an integer, the value has no text properties.
+ You can also specify other valid faces as the value of @var{face}.
+ If specified, that face provides the @code{face} property for characters
+ whose face is not specified by @var{format}.
+ Note that using @code{mode-line}, @code{mode-line-inactive}, or
+ @code{header-line} as @var{face} will actually redisplay the mode line
+ or the header line, respectively, using the current definitions of the
+ corresponding face, in addition to returning the formatted string.
+ (Other faces do not cause redisplay.)
  
  For example, @code{(format-mode-line header-line-format)} returns the
  text that would appear in the selected window's header line (@code{""}
  if it has no header line).  @code{(format-mode-line header-line-format
  'header-line)} returns the same text, with each character
- carrying the face that it will have in the header line itself.
+ carrying the face that it will have in the header line itself, and also
+ redraws the header line.
  @end defun
  
  @node Imenu
@@@ -3334,9 -3342,8 +3343,9 @@@ transpose the two arguments of a @code{
  the precedence rules of the language.
  
  Calling `smie-setup' is also sufficient to make TAB indentation work in
 -the expected way, and provides some commands that you can bind in the
 -major mode keymap.
 +the expected way, extends @code{blink-matching-paren} to apply to
 +elements like @code{begin...end}, and provides some commands that you
 +can bind in the major mode keymap.
  
  @deffn Command smie-close-block
  This command closes the most recently opened (and not yet closed) block.
@@@ -3784,16 -3791,23 +3793,16 @@@ block)
  Here is an example of an indentation function:
  
  @example
 -(eval-when-compile (require 'cl))       ;For the `case' macro.
  (defun sample-smie-rules (kind token)
 -  (case kind
 -    (:elem (case token
 -             (basic sample-indent-basic)))
 -    (:after
 -     (cond
 -      ((equal token ",") (smie-rule-separator kind))
 -      ((equal token ":=") sample-indent-basic)))
 -    (:before
 -     (cond
 -      ((equal token ",") (smie-rule-separator kind))
 -      ((member token '("begin" "(" "@{"))
 -       (if (smie-rule-hanging-p) (smie-rule-parent)))
 -      ((equal token "if")
 -       (and (not (smie-rule-bolp)) (smie-rule-prev-p "else")
 -            (smie-rule-parent)))))))
 +  (pcase (cons kind token)
 +    (`(:elem . basic) sample-indent-basic)
 +    (`(,_ . ",") (smie-rule-separator kind))
 +    (`(:after . ":=") sample-indent-basic)
 +    (`(:before . ,(or `"begin" `"(" `"@{")))
 +     (if (smie-rule-hanging-p) (smie-rule-parent)))
 +    (`(:before . "if")
 +     (and (not (smie-rule-bolp)) (smie-rule-prev-p "else")
 +          (smie-rule-parent)))))
  @end example
  
  @noindent
@@@ -3808,10 -3822,10 +3817,10 @@@ setting @code{smie-indent-basic}.  The 
  is discouraged.
  
  @item
 -The two (identical) rules for the token @code{","} make SMIE try to be
 -more clever when the comma separator is placed at the beginning of
 -lines.  It tries to outdent the separator so as to align the code after
 -the comma; for example:
 +The rule for the token @code{","} make SMIE try to be more clever when
 +the comma separator is placed at the beginning of lines.  It tries to
 +outdent the separator so as to align the code after the comma; for
 +example:
  
  @example
  x = longfunctionname (
diff --combined doc/man/ChangeLog
index f2810be7f97eb07772880530b1798cec737114f5,fa1d594825cf94d3ff56a5f218110118c15c177b..55e38e33a0a6a3bbd33ab1468fd33c40fa79d272
@@@ -1,19 -1,15 +1,23 @@@
 -2010-12-29  Jari Aalto  <jari.aalto@cante.net>  (tiny change)
++2011-01-02  Jari Aalto  <jari.aalto@cante.net>  (tiny change)
+       * emacsclient.1: Arrange options alphabetically (Bug#7620).
 -2010-10-10  Glenn Morris  <rgm@gnu.org>
 +2010-10-12  Glenn Morris  <rgm@gnu.org>
  
        * emacs.1: Small fixes.
  
 -2010-10-09  Ulrich Mueller  <ulm@gentoo.org>
 +2010-10-12  Ulrich Mueller  <ulm@gentoo.org>
  
        * emacs.1: Update license description.
  
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * b2m.1: Remove file.
 +
 +2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
 +
 +      * etags.1: xz compression is now supported.
 +
  2010-08-26  Sven Joachim  <svenjoac@gmx.de>
  
        * emacs.1: Mention "maximized" value for the "fullscreen" X resource.
  
        * Version 23.2 released.
  
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
  2010-01-09  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * emacs.1: Copyedits.  Update options -Q, -mm and --daemon.  Remove
 -      deprecated --unibyte option.
 +      * emacs.1: Copyedits.  Update options -Q, -mm and --daemon.
 +      Remove deprecated --unibyte option.
  
  2009-06-21  Chong Yidong  <cyd@stupidchicken.com>
  
diff --combined etc/ChangeLog
index ebd613ddfe84686345a521ea153fe16fae0a3580,f55026aa20578dcd7df4a206c20eff110b36a238..3e21a4fd2cbece702e4ad0c3b15cbde9fcaf3889
 -2010-12-24  Kenichi Handa  <handa@m17n.org>
++2011-01-02  Kenichi Handa  <handa@m17n.org>
 -      * NEWS: Describe the changes for rmail's MIME handling.
++      * NEWS.23: Describe the changes for rmail's MIME handling.
 -2010-12-04  W. Martin Borgert <debacle@debian.org>  (tiny change)
 +2010-12-18  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * images/separator.xpm: Tweak colors.
 +
 +2010-12-14  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * NEWS: Mention new Tramp method "ksu".
 +
 +2010-12-13  W. Martin Borgert <debacle@debian.org>  (tiny change)
  
        * schema/schemas.xml: Add DocBook (Bug#7491).
  
 -2010-11-21  Ulrich Mueller  <ulm@gentoo.org>
 +2010-12-11  Carsten Dominik  <carsten.dominik@gmail.com>
 +
 +      * refcards/orgcard.tex: Cleanup.
 +
 +2010-11-27  Ulrich Mueller  <ulm@gentoo.org>
  
        * HELLO: Add ancient Greek (Bug#7418).
  
 -2010-10-20  Richard Stallman  <rms@gnu.org>
 +2010-11-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * NEWS: Document display of glyphless characters.
 +
 +2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 +
 +      * refcards/orgcard.tex: Add new Babel key sequences.
 +
 +2010-10-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * images/README: Add (un)checked.xpm
 +      * images/checked.xpm, images/unchecked.xpm: Add copyright.
 +
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * images/checked.xpm:
 +      * images/unchecked.xpm: New images.
 +
 +2010-10-24  Richard Stallman  <rms@gnu.org>
  
        * DISTRIB: Update donation section.
  
 -2010-10-20  Glenn Morris  <rgm@gnu.org>
 +2010-10-24  Glenn Morris  <rgm@gnu.org>
  
        * DISTRIB: Small updates.
  
 -2010-10-12  Juanma Barranquero  <lekktu@gmail.com>
 +2010-10-19  Julien Danjou  <julien@danjou.info>
 +
 +      * tutorials/TUTORIAL: Don't mention mode-line end dashes.
 +
 +2010-10-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * themes: New directory for custom theme files, moved from lisp/.
 +
 +2010-10-14  Juanma Barranquero  <lekktu@gmail.com>
  
        * tutorials/TUTORIAL.es: Fix typos.
  
 +2010-10-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * NEWS: Mention `dynamic-library-alist'.
 +
 +2010-10-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * NEXTSTEP: New file, extracted from ../nextstep/{AUTHORS,README}.
 +
 +2010-10-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * TODO: Merge ../nextstep/FOR-RELEASE into this file.
 +
 +      * BABYL: Remove file.
 +
  2010-09-21  Eric Ludlam  <zappo@gnu.org>
  
        * srecode/java.srt: Make NAME be a prompt.
  
 +2010-09-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * NEWS: Some Tramp methods are discontinued.
 +
 +2010-09-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs.bash, emacs.csh, ms-kermit: Remove obsolete files (use
 +      emacsclient -a instead of the first two).
 +
 +2010-09-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * NEWS: Mention the new libxml2 functions.
 +
 +2010-08-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * HELLO: Change designation sequences for Arabic text.
 +
 +2010-08-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * NEWS: dbus.el supports alternative buses.
 +
  2010-08-22  Alex Harsanyi  <harsanyi@mac.com>  (tiny change)
  
        * emacs3.py: Import imp module and use it (Bug#5756).
  
 -2010-07-27  Ken Brown  <kbrown@cornell.edu>
 +2010-08-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * tutorials/TUTORIAL.he: Use MAQAF instead of hyphen where appropriate.
 +      Fix a few typos.
 +
 +2010-08-08  Ken Brown  <kbrown@cornell.edu>
  
        * PROBLEMS: Mention problem with Cygwin 1.5.19.
  
 +2010-08-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * NEWS: Mention the Hebrew translation.
 +
 +      * tutorials/TUTORIAL.he: Don't use acronyms.
 +
 +2010-08-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * AUTHORS: Rename unexec.o => unexcoff.o.
 +      * PROBLEMS: Rename unexec.o => unexcoff.o.
 +
 +2010-07-31  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * tutorials/TUTORIAL.he: New file.
 +
 +      * tutorials/TUTORIAL.translators: Add TUTORIAL.he.
 +
 +2010-07-24  Christoph Scholtes  <cschol2112@gmail.com>
 +
 +      * NEWS: Document new --distfiles configure.bat option and
 +      `dist' make target on Windows.
 +
 +2010-07-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * PROBLEMS: Add note about use of backslashes in Windows paths.
 +
 +2010-07-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * NEWS: Mention --enable-checking is now supported on Windows.
 +
 +2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 +
 +      * refcards/orgcard.tex: Remove the key for the TODO sparse tree
 +      and add the new key.  Document new keys for image and entity
 +      display.  Document the Org Babel keys.
 +
  2010-06-19  Ken Brown  <kbrown@cornell.edu>
  
        * PROBLEMS: Update Cygwin GCC information.  (Bug#6458)
  
        * tutorials/TUTORIAL.bg, tutorials/TUTORIAL.es: Fix typos.
  
 -2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-06-09  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * NEWS: Add sections for Emacs-23.3.
 +      * NEWS: Add notifications.el.
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +2010-05-28  Glenn Morris  <rgm@gnu.org>
  
 -      * Version 23.2 released.
 +      * MACHINES: Remove some old information no longer of relevance.
 +      Switch to outline-mode.
 +
 +2010-05-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * PROBLEMS: Remove old information no longer of relevance.
 +
 +2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * NEWS: Add sections for Emacs-23.3.
  
 -2010-04-27  Chong Yidong  <cyd@stupidchicken.com>
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
  
        * PROBLEMS: Document gcc-4.5 bug (Bug#6031).
  
 -2010-04-23  Kenichi Handa  <handa@m17n.org>
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
  
        * HELLO: Adjust Burmese for Unicode 5.2 encoding.
  
 -2010-04-04  Francesc Rocher  <rocher@member.fsf.org>
 +2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * HELLO: Reorder Arabic greetings into logical order (they were
 +      mistakenly changed to visual order by the 2010-03-28 change).
 +
 +2010-04-18  Francesc Rocher  <rocher@member.fsf.org>
  
        * MORE.STUFF: Add a new entry for QWE.
  
 -2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * HELLO (Mathematics): Prefer Unicode charset.
 +
 +2010-03-30  Chong Yidong  <cyd@stupidchicken.com>
  
        * images/icons/hicolor/scalable/apps/emacs.svg: Put preamble after
        svg tag (Bug#5790).
  
 -2010-03-27  Eli Zaretskii  <eliz@gnu.org>
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
  
        * PROBLEMS: Mention problems on MS-Windows with incompatible
        regex.h headers.
  
 -2010-03-15  Francesc Rocher  <rocher@member.fsf.org>
 +2010-03-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * HELLO: Reorder Arabic and Hebrew into logical order, and
 +      insert RLM before the opening paren, to make the display more
 +      reasonable.  Add setting for bidi-display-reordering in the local
 +      variables section.
 +      * NEWS: Mention initial support for bidirectional editing.
 +
 +2010-03-24  Francesc Rocher  <rocher@member.fsf.org>
  
        * MORE.STUFF: Remove CEDET entry, now distributed as part of Emacs.
  
 +2010-03-22  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * gnus/gnus-setup.ast: Add finish links to the top nodes.
 +
 +      * gnus/news-server.ast: Add some trivial validation.
 +
 +2010-03-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * NEWS: Add secrets.el.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * images/custom/down.xpm, images/custom/right.xpm: Update images
 +      to increase contrast on bright backgrounds.
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
  2010-03-06  Glenn Morris  <rgm@gnu.org>
  
        * srecode/default.srt (COPYRIGHT): Update template copyright to GPLv3+.
  2006-11-05  Slawomir Nowaczyk  <slawek@cs.lth.se>
  
        * emacs.py (eargs): Provide eldoc message for builtin types.
 -        Make sure eargs always outputs sentinel, to avoid Emacs freeze.
 +      Make sure eargs always outputs sentinel, to avoid Emacs freeze.
  
  2006-10-22  Chong Yidong  <cyd@stupidchicken.com>
  
  
        * NEWS: Mention the thumbs.el package.
  
 -2004-08-14  Eric Hanchrow  <offby1@blarg.net>  (tiny change)
 +2004-08-14  Eric Hanchrow  <offby1@blarg.net>
  
        * TUTORIAL.es: Replace actual whitespace with the magic string
        that causes help-with-tutorial to automatically insert the correct
  1990-01-19  David Lawrence  (tale@cocoa-puffs)
  
        * timer.c, getdate.y (new files) and Makefile:
 -        Sub-process support for run-at-time in timer.el.
 -        Doesn't yet work correctly for USG.
 +      Sub-process support for run-at-time in timer.el.
 +      Doesn't yet work correctly for USG.
  
  1990-01-10  Jim Kingdon  (kingdon@pogo)
  
        * etags.c: Changes for VMS.
        Always define ETAGS on VMS.
        Define macros GOOD and BAD for success and failure exit codes.
 -      (begtk, intk): Allow `$' in identifiers
 +      (begtk, intk): Allow `$' in identifiers.
        (main): Don't support -B, -F or -u on VMS.
        Alternate loop for scanning filename arguments.
        (system): Delete definition of this function.
  
  ;; Local Variables:
  ;; coding: utf-8
 -;; add-log-time-zone-rule: t
  ;; End:
  
 -    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001
 -      2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 -      Free Software Foundation, Inc.
 +  Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
 +    2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 +    Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
  
    You should have received a copy of the GNU General Public License
    along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 -
 -;;; arch-tag: 094f3a51-bd72-44d0-8fac-2ac242c6c5b1
diff --combined etc/NEWS.23
index 0608286e6d593291f1433f36caddfa330f552c85,0000000000000000000000000000000000000000..3b10a6d281512c76cc1bdfeebca2744700855f74
mode 100644,000000..100644
--- /dev/null
@@@ -1,2496 -1,0 +1,2517 @@@
 +GNU Emacs NEWS -- history of user-visible changes.
 +
 +Copyright (C) 2007, 2008, 2009, 2010 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 23.
 +
 +See files 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 23.3
 +
 +* Startup Changes in Emacs 23.3
 +
 +* Changes in Emacs 23.3
 +
 +\f
 +* Editing Changes in Emacs 23.3
 +
 +\f
 +* Changes in Specialized Modes and Packages in Emacs 23.3
 +
 +---
 +** The appt-add command takes an optional argument for the warning time.
 +This can be used in place of the default appt-message-warning-time.
 +
 +---
 +** You can allow inferior Python processes to load modules from the
 +current directory by setting `python-remove-cwd-from-path' to nil.
 +
 +** VC and related modes
 +
 +*** New VC command `vc-log-incoming', bound to `C-x v I'.
 +This shows a log of changes to be received with a pull operation.
 +For Git, this runs "git fetch" to make the necessary data available
 +locally; this requires version 1.7 or newer.
 +
 +*** New VC command `vc-log-outgoing', bound to `C-x v O'.
 +This shows a log of changes to be sent in the next commit.
 +
 +*** New VC command vc-find-conflicted-file.
 +
 ++++
 +*** The 'g' key in VC diff, log, log-incoming and log-outgoing buffers
 +reruns the corresponding VC command to compute an up to date version
 +of the buffer.
 +
 +*** vc-dir for Bzr supports viewing shelve contents and shelving snapshots.
 +
 ++++
 +*** Special markup can be added to log-edit buffers.
 +You can add headers specifying additional information to be supplied
 +to the version control system.  For example:
 +
 +  Author: J. R. Hacker <jrh@example.com>
 +  Fixes: 4204
 +  Actual text of log entry...
 +
 +Bazaar recognizes the headers "Author", "Date" and "Fixes".
 +Git, Mercurial, and Monotone recognize "Author" and "Date".
 +Any unknown header is left as is in the message, so it is not lost.
 +
++** Rmail
++
++*** The default value of `rmail-enable-mime' is now t.  Rmail decodes
++MIME contents automatically.  You can customize the variable
++`rmail-enable-mime' back to `nil' to disable this automatic MIME
++decoding.
++
++*** The command `rmail-mime' change the displaying of a MIME message
++between decoded presentation form and raw data if `rmail-enable-mime'
++is non-nil.  And, with prefix argument, it change only the displaying
++of the MIME entity at point.
++
++*** The new command `rmail-mime-next-item' (bound to TAB) moves point
++to the next item of MIME message.
++
++*** The new command `rmail-mime-previous-item' (bound to backtab) moves
++point to the previous item of MIME message.
++
++*** The new command `rmail-mime-toggle-hidden' (RET) hide or show the
++body of the MIME entity at point.
++
 +** Obsolete packages
 +
 ++++
 +*** lmenu.el and cl-compat.el are now obsolete.
 +
 +\f
 +* New Modes and Packages in Emacs 23.3
 +
 +** smie.el is a generic navigation and indentation engine.
 +It takes a simple BNF description of the grammar, and provides both
 +sexp-style navigation (jumping over begin..end pairs) as well as
 +indentation, which can be adjusted via ad-hoc indentation rules.
 +
 +\f
 +* Incompatible Lisp Changes in Emacs 23.3
 +
 +** posn-col-row now excludes the header line from the row count
 +If the frame has a header line, posn-col-row will count row numbers
 +starting from the first line of text below the header line.
 +
 +\f
 +* Lisp changes in Emacs 23.3
 +
 ++++
 +** `e' and `pi' are now called `float-e' and `float-pi'.
 +  The old names are obsolete.
 +
 ++++
 +** The use of unintern without an obarray arg is now obsolete.
 +
 +---
 +** The function `princ-list' is now obsolete.
 +
 ++++
 +** The yank-handler argument to kill-region and friends is now obsolete.
 +
 ++++
 +** New function byte-to-string, like char-to-string but for bytes.
 +
 +\f
 +* Changes in Emacs 23.3 on non-free operating systems
 +
 ++++
 +** The nextstep port can have different modifiers for the left and right
 +alt/option key by customizing the value for ns-right-alternate-modifier.
 +
 +\f
 +* Installation Changes in Emacs 23.2
 +
 +** New configure options for Emacs developers.
 +These are not new features; only the configure flags are new.
 +
 +*** --enable-profiling builds Emacs with profiling enabled.
 +This might not work on all platforms.
 +
 +*** --enable-checking[=OPTIONS] builds emacs with extra runtime checks.
 +
 +** `make install' now consistently ignores umask, creating a
 +world-readable install.
 +
 +** Emacs compiles with Gconf support, if it is detected.
 +Use the configure option --without-gconf to disable this.
 +This is used by the `font-use-system-font' feature (see below).
 +
 +* Startup Changes in Emacs 23.2
 +
 +** The command-line option -Q (--quick) also inhibits loading X resources.
 +However, if Emacs is compiled with the Lucid or Motif toolkit, X
 +resource settings for the graphical widgets are still applied.
 +On Windows, the -Q option causes Emacs to ignore Registry settings,
 +but environment variables set on the Registry are still honored.
 +
 +*** The new variable `inhibit-x-resources' shows whether X resources
 +were loaded.
 +
 +** New command-line option -mm (--maximized) maximizes the initial frame.
 +
 +* Changes in Emacs 23.2
 +
 +** The maximum size of buffers (and the largest fixnum) is doubled.
 +On typical 32bit systems, buffers can now be up to 512MB.
 +
 +** The default value of `trash-directory' is now nil.
 +This means that `move-file-to-trash' trashes files according to
 +freedesktop.org specifications, the same method used by the Gnome,
 +KDE, and XFCE desktops.  (This change has no effect on Windows, which
 +uses `system-move-file-to-trash' for trashing.)
 +
 +** The pointer now becomes invisible when typing.
 +Customize `make-pointer-invisible' to disable this feature.
 +
 +** Font changes
 +
 +*** Emacs can use the system default monospaced font in Gnome.
 +To enable this feature, set `font-use-system-font' to non-nil (it is
 +nil by default).  If the system default changes, Emacs changes also.
 +This feature requires Gconf support, which is automatically included
 +at compile-time if configure detects the gconf libraries (you can
 +disable this with the configure option --without-gconf).
 +
 +*** On X11, Emacs reacts to Xft changes made by configuration tools,
 +via the XSETTINGS mechanism.  This includes antialias, hinting,
 +hintstyle, RGBA, DPI and lcdfilter changes.
 +
 +** Killing a buffer with a running process now asks for confirmation.
 +To remove this query, remove `process-kill-buffer-query-function' from
 +`kill-buffer-query-functions', or set the appropriate process flag
 +with `set-process-query-on-exit-flag'.
 +
 +** File-local variable changes
 +
 +*** Specifying a minor mode as a local variables enables that mode,
 +unconditionally.  The previous behavior, toggling the mode, was
 +neither reliable nor generally desirable.
 +
 +*** There are new commands for adding and removing file-local variables:
 +`add-file-local-variable', `delete-file-local-variable',
 +`add-file-local-variable-prop-line', and
 +`delete-file-local-variable-prop-line'.
 +
 +*** There are new commands for adding and removing directory-local variables,
 +and copying them to and from file-local variable lists:
 +`add-dir-local-variable', `delete-dir-local-variable',
 +`copy-dir-locals-to-file-locals',
 +`copy-dir-locals-to-file-locals-prop-line' and
 +`copy-file-locals-to-dir-locals'.
 +
 +** Internationalization changes
 +
 +*** Unibyte sessions are now considered obsolete.
 +This refers to the EMACS_UNIBYTE environment variable as well as the
 +--unibyte, --multibyte, --no-multibyte, and --no-unibyte command line
 +arguments.  Customizing enable-multibyte-characters and setting
 +default-enable-multibyte-characters are also deprecated.
 +
 +*** New coding system `utf-8-hfs'.
 +This is suitable for default-file-name-coding-system on Mac OS X; see
 +international/ucs-normalize.el.
 +
 +** Function arguments in *Help* buffers are now shown in upper-case.
 +Customize `help-downcase-arguments' to t to show them in lower-case.
 +
 +** New command `async-shell-command', bound globally to `M-&'.
 +This executes the command asynchronously, similar to calling `M-!' and
 +manually adding an ampersand to the end of the command.  With `M-&',
 +you don't need the ampersand.  The output appears in the buffer
 +`*Async Shell Command*'.
 +
 +** When running in a new enough xterm (newer than version 242), Emacs
 +asks xterm what the background color is and it sets up faces
 +accordingly for a dark background if needed (the current default is to
 +consider the background light).
 +
 +\f
 +* Editing Changes in Emacs 23.2
 +
 +** Kill-ring and selection changes
 +
 +*** If `select-active-regions' is t, any active region automatically
 +becomes the primary selection (for interaction with other window
 +applications).  If you enable this, you might want to bind
 +`mouse-yank-primary' to Mouse-2.
 +
 +*** When `save-interprogram-paste-before-kill' is non-nil, the kill
 +commands save the interprogram-paste selection into the kill ring
 +before doing anything else.  This avoids losing the selection.
 +
 +*** When `kill-do-not-save-duplicates' is non-nil, identical
 +subsequent kills are not duplicated in the `kill-ring'.
 +
 +** Completion changes
 +
 +*** The new command `completion-at-point' provides mode-sensitive completion.
 +
 +*** tab-always-indent set to `complete' lets TAB do completion as well.
 +
 +*** The new completion-style `initials' is available.
 +For instance, this can complete M-x lch to list-command-history.
 +
 +*** The new variable `completions-format' determines how completions
 +are displayed in the *Completions* buffer.  If you set it to
 +`vertical', completions are sorted vertically in columns.
 +
 +** The default value of `blink-matching-paren-distance' is increased.
 +
 +** M-n provides more default values in the minibuffer for commands
 +that read file names.  These include the file name at point (when ffap
 +is loaded without ffap-bindings), the file name on the current line
 +(in Dired buffers), and the directory names of adjacent Dired windows
 +(for Dired commands that operate on several directories, such as copy,
 +rename, or diff).
 +
 +** M-r is bound to the new `move-to-window-line-top-bottom'.
 +This moves point to the window center, top and bottom on successive
 +invocations, in the same spirit as the C-l (recenter-top-bottom)
 +command.
 +
 +** The new variable `recenter-positions' determines the default
 +cycling order of C-l (`recenter-top-bottom').
 +
 +** The abbrevs file is now a file named abbrev_defs in
 +user-emacs-directory; but the old location, ~/.abbrev_defs, is used if
 +that file exists.
 +
 +\f
 +* Changes in Specialized Modes and Packages in Emacs 23.2
 +
 +** The bookmark menu has a narrowing search via bookmark-bmenu-search.
 +
 +** Calc
 +
 +*** The Calc settings file is now a file named calc.el in
 +user-emacs-directory; but the old location, ~/.calc.el, is used if
 +that file exists.
 +
 +*** Graphing commands (`g f' etc.) now work on MS-Windows, if you have
 +the native Windows port of Gnuplot version 3.8 or later installed.
 +
 +** Calendar and diary
 +
 +*** Fancy diary display is now the default.
 +If you prefer the simple display, customize `diary-display-function'.
 +
 +*** The diary's fancy display now enables view-mode.
 +
 +*** The command `calendar-current-date' accepts an optional argument
 +giving an offset from today.
 +
 +** Desktop
 +
 +*** The default value for `desktop-buffers-not-to-save' is nil.
 +This means Desktop will try restoring all buffers, when you restart
 +your Emacs session.  Also, `desktop-buffers-not-to-save' is only
 +effective for buffers that have no associated file.  If you want to
 +exempt buffers that do correspond to files, customize the value of
 +`desktop-files-not-to-save' instead.
 +
 +** Dired
 +
 +*** The new variable `dired-auto-revert-buffer', if non-nil, causes
 +Dired buffers to be reverted automatically on revisiting them.
 +
 +** DocView
 +
 +*** When `doc-view-continuous' is non-nil, scrolling a line
 +on the page edge advances to the next/previous page.
 +
 +** Elint
 +
 +*** Elint now uses compilation-mode.
 +
 +*** Elint can now scan individual files and whole directories,
 +and can be run in batch mode.
 +
 +*** Elint does a more thorough initialization, and recognizes more built-in
 +functions and variables.  Customize `elint-scan-preloaded' if you want
 +to sacrifice some accuracy for a faster startup.
 +
 +*** Elint attempts some basic understanding of featurep and (f)boundp tests.
 +
 +*** Customize `elint-ignored-warnings' to suppress some warnings.
 +
 +** GDB-UI
 +
 +*** Toolbar functionality for reverse debugging.  Display of STL
 +collections as watch expressions.  These features require GDB 7.0 or later.
 +
 +** Grep
 +
 +*** A new command `zrgrep' searches recursively in gzipped files.
 +
 +** Info
 +
 +*** The new command `Info-virtual-index' bound to "I" displays a menu of
 +matched topics found in the index.
 +
 +*** The new command `info-finder' replaces finder.el with a virtual Info
 +manual that generates an Info file which gives the same information
 +through a menu structure.
 +
 +** LaTeX mode now provides completion (via completion-at-point).
 +
 +** Message mode is now the default mode for composing mail.
 +
 +The default for `mail-user-agent' is now message-user-agent, so the
 +C-x m (`compose-mail') command uses Message mode instead of Mail mode.
 +
 +Message mode has been included in Emacs, as part of the Gnus package,
 +for several years.  It provides several features that are absent in
 +Mail mode, such as MIME handling.
 +
 +*** If the user has not customized mail-user-agent, `compose-mail'
 +checks for Mail mode customizations, and issues a warning if these
 +customizations are found.  This alerts users who may otherwise be
 +unaware that their mail configuration has changed.
 +
 +To disable this check, set compose-mail-user-agent-warnings to nil.
 +
 +** The default value of mail-interactive is t, since Emacs 23.1.
 +(This was not announced at the time.)  It means that when sending mail,
 +Emacs will wait for the process sending mail to return.  If you
 +experience delays when sending mail, you may wish to set this to nil.
 +
 +** nXML mode is now the default for editing XML files.
 +
 +** pcomplete provides a new command `pcomplete-std-completion' which
 +is similar to `pcomplete' but using the standard completion UI code.
 +
 +** Shell (and other comint modes)
 +
 +*** M-s is no longer bound to `comint-next-matching-input'.
 +
 +*** M-r is now bound to `comint-history-isearch-backward-regexp'.
 +This starts an incremental search of the comint/shell input history.
 +
 +*** ansi-color is now enabled by default in Shell mode.
 +To disable it, set ansi-color-for-comint-mode to nil.
 +
 +** Tramp
 +
 +*** New connection methods "rsyncc", "imap" and "imaps".
 +On systems which support GVFS-Fuse, Tramp offers also the new
 +connection methods "dav", "davs", "obex" and "synce".
 +
 +** VC and related modes
 +
 +*** When using C-x v v or C-x v i on a unregistered file that is in a
 +directory not controlled by any VCS, ask the user what VC backend to
 +use to create a repository, create a new repository and register the
 +file.
 +
 +*** New command `vc-root-print-log', bound to `C-x v L'.
 +This displays a `*vc-change-log*' buffer showing the history of the
 +version-controlled directory tree as a whole.
 +
 +*** New command `vc-root-diff', bound to `C-x v D'.
 +This is similar to `vc-diff', but compares the entire directory tree
 +of the current VC directory with its working revision.
 +
 +*** `C-x v l' and `C-x v L' do not show the full log by default.
 +The number of entries shown can be chosen interactively with a prefix
 +argument, or by customizing vc-log-show-limit.  The `*vc-change-log*'
 +buffer now contains buttons at the end of the buffer, which can be
 +used to increase the number of entries shown.  RCS, SCCS, and CVS do
 +not support this feature.
 +
 +*** vc-annotate supports annotations through file copies and renames,
 +it displays the old names for the files and it can show logs/diffs for
 +the corresponding lines.  Currently only Git and Mercurial take
 +advantage of this feature.
 +
 +*** The log command in vc-annotate can display a single log entry
 +instead of redisplaying the full log.  The RCS, CVS and SCCS VC
 +backends do not support this.
 +
 +*** When a file is not found, VC will not try to check it out of RCS anymore.
 +
 +*** Diff and log operations can be used from Dired buffers.
 +
 +*** vc-git changes
 +
 +**** The short log format for git makes use of the graph display,
 +so it's not supported on git versions earlier than 1.5.6.
 +
 +**** vc-dir uses the --relative option of git, and so requires at least
 +git version 1.5.5.
 +
 +**** Support for operating with stashes has been added to vc-dir:
 +the stash list is displayed in the *vc-dir* header, stashes can be
 +created, removed, applied and their content displayed.
 +
 +*** vc-bzr supports operating with shelves: the shelve list is
 +displayed in the *vc-dir* header, shelves can be created, removed and applied.
 +
 +*** log-edit-strip-single-file-name controls whether or not single filenames
 +are stripped when copying text from the ChangeLog to the *VC-Log* buffer.
 +
 +** Miscellaneous
 +
 +*** Interactively `multi-isearch-buffers' and `multi-isearch-buffers-regexp'
 +read buffer names to search, one by one, ended with RET.  With a prefix
 +argument, they ask for a regexp, and search in buffers whose names match
 +the specified regexp.  Interactively `multi-isearch-files' and
 +`multi-isearch-files-regexp' read file names to search, one by one,
 +ended with RET.  With a prefix argument, they ask for a wildcard, and
 +search in file buffers whose file names match the specified wildcard.
 +
 +*** Autorevert Tail mode now works also for remote files.
 +
 +*** The new eshell built-in commands `su' and `sudo' support Tramp.
 +Thus, they change `default-directory' to reflect the new user id, and
 +let commands run under that user's permissions.  This works even when
 +`default-directory' is already remote.  Calling the external commands
 +is possible via `*su' or `*sudo', respectively.
 +
 +** Obsolete packages
 +
 +*** sym-comp.el is now obsolete, superseded by completion-at-point.
 +
 +*** lucid.el and levents.el are now obsolete.
 +
 +\f
 +* New Modes and Packages in Emacs 23.2
 +
 +** CEDET (the Collection of Emacs Development Tools) is now in Emacs.
 +This is a collection of packages to aid with using Emacs as an IDE
 +(integrated development environment):
 +
 +*** The Semantic package allows the use of parsers to intelligently
 +edit and navigate source code.  Parsers for C/C++, Java, Javascript,
 +and several other languages are included by default, and Semantic can
 +also interface with external tools such as GNU Global and GNU Idutils.
 +
 +To enable Semantic, use the global minor mode `semantic-mode'.
 +See the Semantic manual for details.
 +
 +*** EDE (Emacs Development Environment) is a package for managing code
 +projects, including features such as automatic Makefile generation.
 +
 +To enable EDE, use the minor mode `global-ede-mode'.
 +See the EDE manual for details.
 +
 +*** SRecode is a library for recoding Semantic tags back into source
 +code.  It is currently used by some parts of Semantic and EDE; in the
 +future, it may be used for code generation features.
 +
 +*** The EIEIO library implements a subset of the Common Lisp Object
 +System (CLOS).  It is used by the other CEDET packages.
 +
 +** mpc.el is a front end for the Music Player Daemon.  Run it with M-x mpc.
 +
 +** htmlfontify.el turns a fontified Emacs buffer into an HTML page.
 +
 +** js.el is a new major mode for JavaScript files.
 +
 +** imap-hash.el is a new library to address IMAP mailboxes as hashtables.
 +
 +\f
 +* Incompatible Lisp Changes in Emacs 23.2
 +
 +** The Lisp reader turns integers that are too large/small into floats.
 +For instance, on machines where `536870911' is the largest integer,
 +reading `536870912' gives the floating-point object `536870912.0'.
 +
 +This change only concerns the Lisp reader; it does not affect how
 +actual integer objects overflow.
 +
 +** Several obsolete functions removed.
 +The functions have been obsolete since Emacs 19, and are unlikely to
 +be in use:
 +
 +  time-stamp-month-dd-yyyy, time-stamp-dd/mm/yyyy, time-stamp-mon-dd-yyyy
 +  time-stamp-dd-mon-yy, time-stamp-yy/mm/dd, time-stamp-yyyy/mm/dd,
 +  time-stamp-yyyy-mm-dd, time-stamp-yymmdd, time-stamp-hh:mm:ss,
 +  time-stamp-hhmm, baud-rate
 +
 +** Support for generating Emacs 18 compatible bytecode (by setting
 +the variable `byte-compile-compatibility') has been removed.
 +
 +** In image-mode.el `image-mode-maybe' is obsolete.
 +Instead, you can either use `image-mode' (which displays an image file
 +as the actual image initially), or `image-mode-as-text' (when you want
 +to display an image file as text initially).  `image-mode-as-text' is a
 +combination of a non-image mode from `auto-mode-alist' (or Fundamental
 +mode) and `image-minor-mode'.  `image-minor-mode' provides a `C-c C-c'
 +key binding to toggle image display.
 +`image-toggle-display-text' removes image properties.
 +`image-toggle-display-image' adds image properties.
 +`image-toggle-display' toggles between `image-mode-as-text' and `image-mode'.
 +
 +\f
 +* Lisp changes in Emacs 23.2
 +
 +** All the default-FOO variables that hold the default value of the FOO
 +variable, are now declared obsolete.
 +
 +** read-key is a function halfway between read-event and read-key-sequence.
 +It reads a single key, but obeys input and escape sequence decoding.
 +
 +** Frame parameter changes
 +
 +*** You can give the `fullscreen' frame parameter the value `maximized'.
 +This maximizes the frame.
 +
 +*** The new frame parameter `sticky' makes Emacs frames sticky in
 +virtual desktops.
 +
 +** Completion changes
 +
 +*** completion-base-size is obsoleted by completion-base-position.
 +This change causes a few backward incompatibilities, mostly with
 +choose-completion-string-functions where the `mini-p' argument has
 +been replaced by a `base-position' argument, and where the `base-size'
 +argument is now always nil.
 +
 +*** New function `completion-in-region' to use the standard completion
 +facilities on a particular region of text.
 +
 +*** The 4th arg to all-completions (aka hide-spaces) is declared obsolete.
 +
 +*** completion-annotate-function specifies how to compute annotations
 +for completions displayed in *Completions*.
 +
 +** Minibuffer changes
 +
 +*** read-file-name-predicate is obsolete.  It was used to pass the predicate
 +to read-file-name-internal because read-file-name-internal abused its `pred'
 +argument to pass the current directory, but this hack is not needed
 +any more.
 +
 +** Changes to file-manipulation functions
 +
 +*** `delete-directory' has an optional parameter RECURSIVE.
 +
 +*** New function `copy-directory', which copies a directory recursively.
 +
 +** called-interactively-p now takes one argument and replaces interactive-p
 +which is now marked obsolete.
 +
 +** New function set-advertised-calling-convention makes it possible
 +to obsolete arguments as well as make some arguments mandatory.
 +
 +** You can control which binding is preferentially shown in menus and
 +docstrings by adding a `:advertised-binding' property to the corresponding
 +command's symbol.  That property can hold a single binding or a list
 +of bindings.
 +
 +** Network and process changes
 +
 +*** start-process-shell-command and start-file-process-shell-command
 +now only take a single `command' argument.
 +
 +*** The new variable `process-file-side-effects' should be set to nil
 +if a `process-file' call does not change a remote file.  This allows
 +file name handlers such as Tramp to optimizations.
 +
 +*** make-network-process can now also create `seqpacket' Unix sockets.
 +
 +** Loading changes
 +
 +*** eval-next-after-load is obsolete.
 +
 +*** New hook `after-load-functions' run after loading an Elisp file.
 +
 +** Byte compilation changes
 +
 +*** Changing the file-names generated by byte-compilation by redefining
 +the function `byte-compile-dest-file' before loading bytecomp.el is obsolete.
 +Instead, customize byte-compile-dest-file-function.
 +
 +*** `byte-compile-warnings' has new members, `constants' and `suspicious'.
 +
 +** New macro with-silent-modifications to tweak text properties without
 +affecting the buffer's modification state.
 +
 +** Hash tables have a new printed representation that is readable.
 +The feature `hashtable-print-readable' identifies this new
 +functionality.
 +
 +** New functions for performing Unicode normalization:
 +ucs-normalize-NFD-region, ucs-normalize-NFD-string,
 +ucs-normalize-NFC-region, ucs-normalize-NFC-string,
 +ucs-normalize-NFKD-region, ucs-normalize-NFKD-string,
 +ucs-normalize-NFKC-region, ucs-normalize-NFKC-string,
 +ucs-normalize-HFS-NFD-region, ucs-normalize-HFS-NFD-string,
 +ucs-normalize-HFS-NFC-region, ucs-normalize-HFS-NFC-string.
 +
 +** Face aliases can now be marked as obsolete, using the macro
 +`define-obsolete-face-alias'.
 +
 +** New function `window-full-height-p', analogous to the full-width version.
 +
 +\f
 +* Changes in Emacs 23.2 on non-free operating systems
 +
 +** On MS-Windows, `display-time' now displays the system load average
 +as well as the time, as it does on GNU and Unix.
 +
 +\f
 +* Installation Changes in Emacs 23.1
 +
 +** The default X toolkit is now Gtk+, rather than Lucid.
 +The configure option `--with-gtk' has been removed.  Gtk is now the
 +default toolkit, but you can use --with-x-toolkit=gtk if necessary.
 +
 +** New font code.
 +Fonts are handled by new code capable of dealing with multiple font
 +backends.  This uses the freetype and fontconfig libraries.
 +
 +*** Emacs now accepts font names supplied in the fontconfig format
 +(e.g. "monospace-12:bold") and GTK format (e.g. "Monospace Bold 12").
 +
 +*** Added support for local fonts (fonts installed on the machine
 +where Emacs is running).
 +
 +*** Added support for the Xft library for antialiasing.
 +
 +*** Added support for the otf library for complex text layout by
 +OpenType fonts.
 +
 +*** Added support for the m17n library for text shaping.
 +
 +** Changes to image support
 +
 +*** configure now checks for libgif before libungif when searching for
 +a GIF library.
 +
 +*** Emacs now supports the SVG image format through librsvg2.
 +
 +*** Emacs now supports multi-page TIFF images.
 +
 +** New NeXTSTEP-based port.
 +This provides support for GNUstep (via the GNUstep libraries) and Mac
 +OS X (via the Cocoa libraries).
 +
 +Specify --with-ns to configure for this.  By default, a self-contained
 +app will be built (containing all lisp).  To install/share lisp with
 +other emacsen (e.g. X11 build) use --disable-ns-self-contained.  See
 +nextstep/README and nextstep/INSTALL in the Emacs source directory.
 +
 +** Mac OS X is no longer supported via Carbon.
 +Use the NeXTSTEP port, described above.
 +
 +** The new configuration option "--with-dbus" enables D-Bus language
 +bindings for Emacs.
 +
 +** Support for many obsolete platforms has been removed.
 +See the list at the end of etc/MACHINES for details.
 +
 +*** Support for systems without alloca has been removed.
 +
 +*** Support for Sun windows has been removed.
 +
 +*** The `emacstool' utility has been removed.
 +
 +** The following platforms will be removed in a future Emacs version:
 +If you are still using Emacs on one of these platforms, please email
 +emacs-devel@gnu.org to inform the Emacs developers.
 +
 +*** Old GNU/Linux systems based on libc version 5.
 +
 +*** Old FreeBSD, NetBSD, and OpenBSD systems based on the COFF
 +executable format.
 +
 +*** Solaris versions 2.6 and below.
 +
 +*** Solaris on IBM RS6000 machines.
 +
 +*** UNIX System V (the original SysV, not later platforms based on it).
 +
 +*** Unixware on non-x86 machines.
 +
 +*** Platforms not supporting shared libraries (i.e., requiring the
 +NO_SHARED_LIBS compilation flag).
 +
 +** The configure options `--with-gcc', `--without-gcc' have been removed.
 +Configure will use gcc by default.  Set the CC environment variable if
 +you need control over which C compiler is used.
 +
 +** The refcards are now shipped as PDF files.
 +
 +** The manuals are now licensed under the GNU Free Documentation License v1.3,
 +or any later version.
 +
 +** Emacs 23 comes with a new set of default icons.
 +Various resolutions are available as etc/images/icons/hicolor/*/apps/emacs.png.
 +The Emacs 22 icon is available as `emacs22.png' in the same location.
 +\f
 +* Changes in Emacs 23.1
 +
 +** Improved X Window System support
 +
 +*** Emacs now supports using both X displays and ttys in one session.
 +With an Emacs server active (M-x server-start), `emacsclient -t'
 +creates a tty frame connected to the running emacs server.  You can
 +use any number of different ttys.  `emacsclient -c' creates a new X11
 +frame on the current $DISPLAY (or a tty frame if $DISPLAY is not set).
 +There may be problems if a display exits unexpectedly and Emacs is compiled
 +with Gtk+, see etc/PROBLEMS.
 +
 +You can test for the presence of this feature in your Lisp code by
 +testing for the `multi-tty' feature.
 +
 +*** Emacs starts in the background, as a daemon, when given the
 +--daemon command line argument.  It disconnects from the terminal and
 +starts the server.  Clients can connect and create graphical or
 +terminal frames using emacsclient.
 +
 +**** emacsclient starts emacs in daemon mode and connects to it when
 +--alternate-editor="" is used (or when the evironment variable
 +ALTERNATE_EDITOR is set to "") and emacsclient cannot connect to an
 +emacs server.
 +
 +*** The new command close-display-connection closes a connection to a
 +remote display.  There are some bugs for Gtk+.  See etc/PROBLEMS.
 +
 +*** Emacs now supports the XEmbed specification.
 +You can embed Emacs in another application on X11.  The new command line
 +option --parent-id is used to pass the parent window id to Emacs.  See
 +http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html
 +for details about XEmbed.
 +
 +*** Emacs can now set the frame opacity.
 +The opacity of a frame can be controlled by setting the `alpha' frame
 +parameter.  This only takes effect on a compositing window manager for
 +the X Window System, such as Compiz, Beryl and Compiz Fusion, on Mac
 +OS X, or on Windows 2000 and later versions of Windows.
 +
 +The alpha parameter should be an integer between 0 (transparent) and
 +100 (opaque), or a float number between 0.0 and 1.0.  It can also be a
 +cons cell (ACTIVE . INACTIVE), where ACTIVE is the opacity of an
 +active frame and INACTIVE is the opacity of non-active frames.
 +
 +The variable `frame-alpha-lower-limit' defines a lower bound for the
 +opacity; the default is 20.
 +
 +** Internationalization changes
 +
 +*** The Emacs character set is now a superset of Unicode.
 +(It has about four times the code space, which should be plenty).
 +
 +The internal encoding used for buffers and strings is now
 +Unicode-based and called `utf-8-emacs' (`emacs-internal' is an alias
 +for this).  This encoding is backward-compatible with Unicode's UTF-8
 +encoding.  The internal encoding previously used by Emacs,
 +`emacs-mule', is still available for reading and writing files.
 +
 +During byte-compilation, Emacs 23 uses `utf-8-emacs' to write files.
 +As a result, byte-compiled files containing non-ASCII characters can't
 +be read by earlier versions of Emacs.  Files compiled by Emacs 20, 21,
 +or 22 are loaded correctly as `emacs-mule' (whether or not they
 +contain multibyte characters).  This takes somewhat more time, so it
 +may be worth recompiling existing .elc files which don't need to be
 +shared with older Emacsen.
 +
 +*** There are new coding systems/aliases; see M-x list-coding-systems.
 +
 +*** There is a new charset implementation with many new charsets.
 +See M-x list-character-sets.  New charsets can be defined conveniently
 +as tables of unicodes.
 +
 +*** There are new language environments for Chinese-GBK,
 +Chinese-GB18030, Khmer, Bengali, Punjabi, Gujarati, Oriya, Telugu,
 +Sinhala, and TaiViet.
 +
 +*** The minor modes unify-8859-on-encoding-mode and
 +unify-8859-on-decoding-mode are obsolete.
 +
 +*** `ucs-insert' is bound to `C-x 8 RET' and in addition to hex numbers
 +accepts numbers in hash notation (e.g. #o21430 for octal, or #10r8984 for
 +decimal).  It also accepts Unicode character names with completion.
 +
 +*** The `cyrillic-translit' input method supports many new characters.
 +Common typographical characters available from Unicode were added to
 +`cyrillic-translit': punctuation marks, accented characters, fractions,
 +and others.
 +
 +** Emacs now supports serial port access on GNU/Linux, Unix, and
 +Windows.  The new command `serial-term' starts an interactive terminal
 +on a serial port.  The serial port can be configured at runtime with
 +the mode-line mouse menu.
 +
 +** Menu Bar changes
 +
 +*** In the Options menu, the "Set Default Font" item applies the
 +selected font to the `default' face on all frames, not just the
 +current frame.  Furthermore, if Emacs is compiled with both GTK and
 +Fontconfig support, the "Set Default Font" item uses the GTK font
 +selection dialog instead of an Emacs pop-up menu.
 +
 +*** The font setting chosen by "Set Default Font" is saved if the
 +"Save Options" item is used.
 +
 +*** The Tools menu contains a new Encryption/Decryption submenu.
 +This contains commands provided by EasyPG, the newly-included
 +interface to GnuPG (see New Modes and Packages).
 +
 +*** In the Options menu, the "Truncate Long Lines in the Buffer" entry
 +has been replaced with a submenu offering three different ways to
 +handle long lines: truncation, continuation at the window edge, and
 +the new word wrapping behavior (see Editing Changes, below).
 +
 +*** Improvements to menus for major and minor modes
 +More major and minor modes now have a mode specific menu, and existing
 +mode menus have been improved to include more functionality.
 +
 +** Mode-line changes
 +
 +*** The mode-line displays a `@', instead of `-', if the
 +default-directory for the current buffer is on a remote machine.
 +
 +*** The mode-line displays a mode menu when mouse-1 is clicked on a
 +minor mode, in the same way as it already did for major modes.
 +
 +*** The `mode-line-emphasis' face is used to highlight certain
 +mode-line information (e.g. waiting for a VC command to finish).
 +
 +*** The mode-line tooltips have been improved to provide more details.
 +
 +*** The VC, line/colum number and minor mode indicators on the mode
 +line are now interactive: mouse-1 can be used on them to pop up a menu.
 +
 +** File deletion can make use of the Recycle Bin or system Trash folder.
 +Set `delete-by-moving-to-trash' non-nil to use this.  Deleted files
 +and directories will then be sent to the Recycle Bin on Windows, and
 +to `trash-directory' on other systems.
 +
 +** Directory-local variables can now be defined.
 +By default, Emacs looks in .dir-locals.el for directory-local
 +variables.  For more information, see `dir-locals-set-directory-class'
 +and `dir-locals-set-class-variables'.
 +
 +** Emacs can now use `auth-source' for authentication.
 +`smtpmail' and `url' (Tramp and Gnus also) use `auth-source' to obtain
 +login names and passwords.  The match, if found, is reported
 +in *Messages* with the password blanked out.
 +
 +** `where-is-preferred-modifier' can specify your favorite modifier.
 +
 +\f
 +* Startup Changes in Emacs 23.1
 +
 +** The option `inhibit-startup-screen' (with aliases to old names
 +`inhibit-splash-screen' and `inhibit-startup-message') doesn't inhibit
 +display of the initial message in the *scratch* buffer.  If you don't
 +want to display the initial message in the *scratch* buffer at startup,
 +you can set the option `initial-scratch-message' to nil.
 +
 +** New user option `initial-buffer-choice' specifies what to display
 +after starting Emacs: startup screen, *scratch* buffer, visiting a
 +file or directory.
 +
 +** New alias `argv' for `command-line-args-left'
 +This is a convenience alias, so that one can write `(pop argv)'
 +inside of --eval command line arguments in order to access
 +following arguments.
 +
 +** The abbrev file is no longer read at startup in batch mode.
 +
 +** Emacs now supports invocation by an X session manager.
 +It can save a session and restore it later.  See the documentation of
 +the functions `emacs-session-save' and `emacs-session-restore'.
 +(Actually, this feature was introduced with Emacs 22, but it was not
 +documented.)
 +\f
 +* Incompatible Editing Changes in Emacs 23.1
 +
 +** In Dired, `dired-flag-garbage-files' is rebound from `&' to `%&'
 +on the regexp command prefix map.
 +
 +** In Dired-x, all command guesses for ! are now added to the default
 +list accessible by M-n instead of pushing all guesses temporarily into
 +the history list.
 +
 +** In Isearch mode, a special case of typing `C-w' at the beginning of
 +the minibuffer that toggles word search (i.e. using key sequences
 +`C-s RET C-w' or `C-s M-e C-w') is obsolete.  You can use the global key
 +`M-s w' to start word search, or type `M-s w' in Isearch mode to
 +toggle word search.  To start nonincremental word search you can now use
 +`M-s w RET' and `M-s w C-r RET' instead of `C-s RET C-w' and `C-r RET C-w'.
 +
 +** In Info, `Info-search' is unbound from `M-s' to allow using `M-s w'
 +for word search as well as other search commands from the global prefix
 +key `M-s'.  `Info-search' is still bound to `s', and also incremental
 +search commands `C-s', `C-M-s', `C-r', `C-M-r' are available for searching
 +through multiple Info nodes, together with their nonincremental versions
 +`C-s RET', `C-r RET', `C-M-s RET', `C-M-r RET', `M-s w RET'.
 +
 +** In Text mode, `center-line' and `center-paragraph' are rebound from
 +`M-s' and `M-S' to global keys `M-o M-s' and `M-o M-S' on the global
 +prefix map `M-o', which is intended for such formatting commands.
 +
 +** The following input methods were removed in Emacs 22.2, but this was
 +not advertised: danish-alt-postfix, esperanto-alt-postfix,
 +finnish-alt-postfix, german-alt-postfix, icelandic-alt-postfix,
 +norwegian-alt-postfix, scandinavian-alt-postfix, spanish-alt-postfix,
 +and swedish-alt-postfix.  Use the versions without "alt-", which are
 +identical.
 +
 +\f
 +* Editing Changes in Emacs 23.1
 +
 +** The C-n and C-p line-motion commands now move by screen lines,
 +taking continued lines and variable-width characters into account.
 +Setting `line-move-visual' to nil reverts this to the previous
 +behavior (i.e., motion by logical lines based on buffer contents
 +alone).
 +
 +** C-x C-c now invokes `save-buffers-kill-terminal', and C-z now
 +invokes `suspend-frame'.  These changes are for compatibility with the
 +new multi-tty support (see `Improved X Window System support' above).
 +
 +** Mark changes
 +
 +*** Transient Mark mode is now on by default.
 +
 +*** mark-even-if-inactive now defaults to t
 +
 +*** When Transient Mark mode is on, C-SPC C-SPC pushes a mark without
 +activating it.
 +
 +*** When Transient Mark mode is on, M-q now fills the region if the
 +region is active.  Otherwise, it fills the current paragraph.
 +
 +*** When Transient Mark mode is on, M-$ now checks spelling of the
 +region if the region is active.  Otherwise, it checks spelling of the
 +word at point.
 +
 +*** When Transient Mark mode is on, TAB now indents the region if the
 +region is active.
 +
 +*** The variable `use-empty-active-region' controls whether an empty
 +active region in Transient Mark mode should make commands operate on
 +that empty region.
 +
 +** Temporarily active regions
 +
 +*** The new variable shift-select-mode, non-nil by default, controls
 +shift-selection.  When Shift Select mode is on, shift-translated
 +motion keys (e.g. S-left and S-down) activate and extend a temporary
 +region, similar to mouse-selection.
 +
 +*** Temporarily active regions, created using shift-selection or
 +mouse-selection, are not necessarily deactivated in the next command.
 +They are only deactivated after point motion commands that are not
 +shift-translated, or after commands that would ordinarily deactivate
 +the mark in Transient Mark mode (e.g., any command that modifies the
 +buffer).
 +
 +** Minibuffer and completion changes
 +
 +*** Emacs may ask for confirmation before opening a non-existent file
 +or buffer.  By default, Emacs requests confirmation if you type RET
 +immediately after TAB, and the resulting input is not an existing file
 +or buffer; this usually happens when the minibuffer input did not
 +complete far enough and you entered RET by mistake.  In that case,
 +Emacs puts the message "[Confirm]" in the minibuffer; type RET again
 +to create the file or buffer.
 +
 +The new variable confirm-nonexistent-file-or-buffer determines whether
 +Emacs asks for confirmation.  The default value is `after-completion'.
 +If you change it to t, Emacs always asks for confirmation; if you
 +change it to nil, Emacs never asks for confirmation.
 +
 +*** The rules for performing completion have been changed.
 +When generating completion alternatives, Emacs now takes the
 +minibuffer text after point, if any, into account: this text is
 +treated as a substring of the remaining part of the completion
 +alternative (i.e., the part not matched by the minibuffer text before
 +point).  If no completion alternatives are found this way, Emacs
 +attempts to perform partial-completion.  If still no completion
 +alternatives are found, we fall back on the Emacs 22 rules for
 +performing completion.
 +
 +The new variable `completion-styles' can be customized to choose your
 +favorite completion style.
 +
 +*** When M-n in the minibuffer reaches the end of the list of defaults,
 +it adds the completion list to the end, so next M-n continues putting
 +completion items to the minibuffer.  The same principle applies to
 +incremental search commands as well: C-s or C-M-s starts searching
 +the default values and after the end of defaults they continue
 +searching minibuffer completion items.
 +
 +*** Minibuffer input of shell commands now comes with completion.
 +
 +*** In the `C-x d' (Dired) prompt, typing M-n gives the visited file
 +name of the current buffer.
 +
 +*** In the M-! (shell-command) prompt, M-n provides some default commands.
 +These are guessed using the file extension of the current file, based
 +on the file-handlers specified in the operating system's `mailcap'
 +file.  The ! command in Dired (dired-do-shell-command) works
 +similarly, using the file displayed on the current line.
 +
 +*** A list of regexp default values is available via M-n for `occur',
 +`keep-lines', `flush-lines' and `how-many'.  This list includes the active
 +region in transient-mark-mode, the word under the cursor, the last Isearch
 +regexp, the last Isearch string and the last replacement regexp.
 +
 +*** When enable-recursive-minibuffers is non-nil, operations which use
 +switch-to-buffer (such as C-x b and C-x C-f) do not fail any more when
 +used in a minibuffer or a dedicated window.  Instead, they fallback on
 +using pop-to-buffer, which will use some other window.  This change
 +has no effect when enable-recursive-minibuffers is nil (the default).
 +
 +*** Isearch started in the minibuffer searches in the minibuffer history.
 +Reverse Isearch commands (C-r, C-M-r) search in previous minibuffer
 +history elements, and forward Isearch commands (C-s, C-M-s) search in
 +next history elements.  When the reverse search reaches the first history
 +element, it wraps to the last history element, and the forward search
 +wraps to the first history element.  When the search is terminated, the
 +history element containing the search string becomes the current.
 +
 +*** The variable read-file-name-completion-ignore-case overrides
 +completion-ignore-case for file name completion.
 +
 +*** The variable read-buffer-completion-ignore-case overrides
 +completion-ignore-case for buffer name completion.
 +
 +*** The new command `minibuffer-force-complete' chooses one of the
 +possible completions, rather than stopping at the common prefix.
 +
 +*** If `completion-auto-help' is `lazy', Emacs shows the completions
 +buffer only on the second attempt to complete.  This was already
 +supported in `partial-completion-mode'.
 +
 +** Face changes
 +
 +*** S-down-mouse-1 now pops up a menu for changing the font and text
 +size of the default face in the current buffer.  The face is changed
 +via face remapping (see Lisp changes, below).
 +
 +*** New commands to change the default face size in the current buffer.
 +To increase it, type `C-x C-+' or `C-x C-='.  To decrease it, type
 +`C-x C--'.  To restore the default (global) face size, type `C-x C-0'.
 +These work via Text Scale mode, a new minor mode.
 +
 +The final key in the above commands may be repeated without the
 +leading `C-x', e.g. `C-x C-= C-= C-=' increases the face height by
 +three steps.  Each step scales the height of the default face by the
 +value of the variable `text-scale-mode-step'.
 +
 +*** The commands buffer-face-mode and buffer-face-set can be used to
 +remap the default face in the current buffer.  See "Buffer Face mode",
 +under New Modes and Packages.
 +
 +** Primary selection changes
 +
 +*** You can disable kill ring commands from accessing the primary
 +selection by setting `x-select-enable-primary' to nil.
 +
 +** Continuation lines can now be wrapped at word boundaries
 +(word-wrapping).  This is controlled by the new per-buffer variable
 +`word-wrap'.  Word wrapping does not take place if continuation lines
 +are not shown, e.g. if truncate-lines is non-nil.  The most convenient
 +way to enable word-wrapping is using the new minor mode Visual Line
 +mode; in addition to setting `word-wrap' to t, this rebinds some
 +editing commands to work on screen lines rather than text lines.  See
 +New Modes and Packages, below.
 +
 +** Window management changes
 +
 +*** truncate-partial-width-windows now accepts integer values, which
 +specify a minimum window width for partial-width windows, below which
 +lines are truncated.  The default has been changed to 50.
 +
 +*** The new command balance-windows-area balances windows both
 +vertically and horizontally.
 +
 +*** pop-to-buffer now always sets input focus when the popped-to window
 +is on a different frame.
 +
 +** Miscellaneous changes:
 +
 +*** C-l is bound to the new command recenter-top-bottom, rather than recenter.
 +This moves the current line to window center, top and bottom on
 +successive invocations.
 +
 +*** scroll-preserve-screen-position also preserves the column position.
 +
 +*** If `yank-pop-change-selection' is t, rotating the kill ring also
 +updates the selection or clipboard to the current yank, just as M-w
 +would do so with the text it copies to the kill ring.
 +
 +*** C-M-% now shows replacement as it would look in the buffer, with
 +`\N' and `\&' substituted according to the match.  Old behavior can be
 +restored by customizing `query-replace-show-replacement'.
 +
 +*** The command shell prompts for the default directory, when it is
 +called with a prefix and the default directory is a remote file name.
 +This is because some file name handlers (like ange-ftp) are not able to
 +run processes remotely.
 +
 +*** The new command kill-matching-buffers kills buffers whose name
 +matches a regexp.
 +
 +*** The value of comment-style now defaults to `indent'.
 +Thefore, comment-start markers are inserted at the current indentation
 +of the region to comment, rather than the leftmost column.
 +
 +*** The new commands `pp-macroexpand-expression' and
 +`pp-macroexpand-last-sexp' pretty-print macro expansions.
 +
 +*** The new command `set-file-modes' allows to set file's mode bits.
 +The mode bits can be specified in symbolic notation, like with GNU
 +Coreutils, in addition to an octal number.  `chmod' is a new
 +convenience alias for this function.
 +
 +*** `next-error-recenter' specifies how next-error should recenter the
 +visited source file.  Its value can be a number (for example, 0 for
 +top line, -1 for bottom line), or nil for no recentering.
 +
 +*** When typing in a password in the echo area, C-y yanks the current
 +kill into the password.
 +
 +*** Tooltip frame parameters `font' and `color' in `tooltip-frame-parameters'
 +are ignored.  Customize the `tooltip' face instead.
 +
 +*** `mkdir' is a new convenience alias for `make-directory'.
 +\f
 +* New Modes and Packages in Emacs 23.1
 +
 +** Auto Composition Mode is a minor mode that composes characters
 +automatically when they are displayed.  It is globally on by default.
 +It uses `auto-composition-function' (default `auto-compose-chars').
 +
 +** Bubbles, a new game, is similar to SameGame.
 +
 +** Buffer Face mode is a minor mode for remapping the default face in
 +the current buffer.  The variable `buffer-face-mode-face' specifies
 +the face to remap to.  The command `buffer-face-set' prompts for a
 +face name, sets `buffer-face-mode-face' to it, and enables
 +buffer-face-mode.  See "Face changes", under Editing Changes, for a
 +description of face remapping.
 +
 +** butterfly flips the desired bit on the drive platter.
 +See http://xkcd.com/378/
 +
 +** bug-reference.el provides clickable links to bug reports.
 +
 +** dbus.el provides D-Bus language bindings.
 +D-Bus is an inter-process communication mechanism for applications
 +residing on the same host.  See the manual for details.
 +
 +** DocView mode allows viewing of PDF, PostScript and DVI documents.
 +One can also search for a regular expression in the document.  For
 +details, see the commentary in doc-view.el.
 +
 +PDF and DVI files are now opened in Doc View mode by default.
 +
 +In Postcript mode, C-c C-c launches Doc View minor mode for viewing
 +the postscript file.
 +
 +** EasyPG provides an interface to the GNU Privacy Guard (GnuPG).
 +It includes a GnuPG keyring browser, cryptographic operations on
 +regions and files, and automatic encryption of *.gpg files.  For
 +details, see the EasyPG Assistant User's Manual.
 +
 +** json.el is a library for parsing and generating JSON
 +(JavaScript Object Notation), a lightweight data-interchange format.
 +
 +** linum.el is a new minor mode to display line numbers for the
 +current buffer.
 +
 +** mairix.el is an interface to mairix, a free tool for indexing and
 +searching locally stored mail.  It allows you to query mairix and
 +display the search results with Rmail, Gnus and VM.  Note that there
 +is an existing Gnus back end, nnmairix.el, which should be used with
 +Maildir/MH setups.
 +
 +** minibuffer-depth-indicate-mode shows the minibuffer depth in the prompt.
 +
 +** nXML Mode
 +This is a new mode for editing XML documents.  It allows a schema to
 +be associated with the XML document being edited, using Relax NG as
 +the schema language.  The schema is used to provide two key features:
 +
 +*** Continuous validation.  nXML validates as you type, highlighting
 +any invalid parts of your document.
 +
 +*** Completion.  nXML can assist you in entering an element name,
 +attribute name or data value by using information about what is
 +allowed by the schema in that context.
 +
 +** proced.el provides a Dired-like interface for operating on
 +processes.  Proced makes an Emacs buffer containing a listing of the
 +current processes.  You can use the normal Emacs commands to move
 +around in this buffer, and special Proced commands to operate on the
 +processes listed.  It is currently only functional on GNU/Linux,
 +MS-Windows and Solaris.
 +
 +** Remember Mode is a mode for jotting down things to remember.
 +Notes can be saved to a Diary file.  For details, see the Remember
 +Manual.
 +
 +** RST mode is a major mode for editing reStructuredText files.
 +
 +** Ruby mode is a major mode for Ruby files.
 +
 +** Visual Line mode provides support for editing by visual lines.
 +It turns on word-wrapping in the current buffer, and rebinds C-a, C-e,
 +and C-k to commands that operate by visual lines instead of logical
 +lines.  This is a more reliable replacement for longlines-mode.
 +This can also be turned on using the menu bar, via
 +Options -> Line Wrapping in this Buffer -> Word Wrap
 +
 +** xesam.el is an implementation of Xesam, an interface to (desktop)
 +search engines like Beagle, Strigi, and Tracker.  The Xesam API
 +requires D-Bus for communication.
 +
 +** zeroconf.el offers service discovery and service publishing
 +interfaces according to the zeroconf specification.  It communicates
 +with Avahi, a zeroconf implementation, via D-Bus messages on systems
 +which have installed this software.
 +
 +** There is a new `whitespace' package.
 +(The pre-existing one has been renamed to `old-whitespace'.)
 +Now, besides reporting bogus blanks, the whitespace package has a
 +minor mode and a global minor mode to visualize blanks (TAB, (HARD)
 +SPACE and NEWLINE).  The visualization is made via faces and/or display
 +table.  It can also indicate lines that extend beyond a given column,
 +trailing blanks, and empty lines at the start or end of a buffer.
 +See `whitespace-style' for more details.  The `whitespace-action' option
 +specifies what to do when a buffer is visited, killed, or written.
 +
 +\f
 +* Changes in Specialized Modes and Packages in Emacs 23.1
 +
 +** Abbrev has been rewritten in Elisp and extended with more flexibility.
 +
 +*** New functions: abbrev-get, abbrev-put, abbrev-table-get, abbrev-table-put,
 +abbrev-table-p, abbrev-insert, abbrev-table-menu.
 +
 +*** Special hook `abbrev-expand-functions' obsoletes `pre-abbrev-expand-hook'.
 +
 +*** `make-abbrev-table', `define-abbrev', `define-abbrev-table' all take
 +extra arguments for arbitrary properties.
 +
 +*** New variable `abbrev-minor-mode-table-alist'.
 +
 +*** `local-abbrev-table' can hold a list of abbrev-tables.
 +
 +*** Abbrevs have now the following special properties:
 +`:count', `:system', `:enable-function', `:case-fixed'.
 +
 +*** Abbrev-tables have now the following special properties:
 +`:parents', `:case-fixed', `:enable-function', `:regexp',
 +`abbrev-table-modiff'.
 +
 +** Apropos
 +
 +*** `apropos-library' describes the elements defined in a given library.
 +
 +*** Set `apropos-compact-layout' is you want a more compact (but wider) layout.
 +
 +** Archive Mode has basic support to browse Rar archives.
 +Note, however, that the free version of the unrar command only handles
 +versions 1 and 2 of the Rar format.
 +
 +** BibTeX mode
 +
 +*** New command `bibtex-initialize' (re)initializes BibTeX buffers.
 +
 +*** New `bibtex-entry-format' options `whitespace', `braces', and
 +`string', disabled by default.
 +
 +*** New variable `bibtex-cite-matcher-alist' contains rules to
 +identify cited keys in BibTeX entries, used by `bibtex-find-crossref'.
 +
 +*** Command `bibtex-url' allows multiple URLs per entry.
 +
 +** Bookmarks
 +
 +*** bookmark.el saves bookmarks in a pre-Emacs-23-incompatible file format
 +bookmark.el can read a .emacs.bmk file saved by an older Emacs, but an
 +older Emacs cannot read one saved by Emacs 23.
 +
 +** Calendar and diary
 +
 +*** There is a new date style, `iso', essentially year/month/day.
 +The variable `european-calendar-style' is obsolete - use `calendar-date-style'.
 +Similarly, the commands `american-calendar' and `european-calendar'
 +should be replaced by `calendar-set-date-style'.
 +
 +*** The calendar namespace has been rationalized.
 +All functions and variables now begin with a `calendar-', `diary-', or
 +`holiday-' prefix.  The various calendar systems have secondary
 +prefixes, eg `calendar-french-'.  The old names you are likely to use
 +directly still exist, for the time being, as aliases, but please start
 +using the new names.
 +
 +*** The whitespace in the calendar layout can be customized.
 +See the variables:
 +calendar-left-margin, calendar-intermonth-spacing, calendar-column-width,
 +calendar-day-header-width, and calendar-day-digit-width.
 +
 +*** Text (e.g. ISO weeks) can be displayed between the calendar months.
 +See the variables calendar-intermonth-header and calendar-intermonth-text.
 +
 +*** The function `holiday-chinese' computes holidays on the Chinese calendar.
 +It has been used to add items to the list `holiday-oriental-holidays'.
 +
 +*** `diary-remind' accepts a negative number -DAYS as a shorthand for
 +the list (1 2 ... DAYS).
 +
 +** Change Log mode
 +
 +*** The new command C-c C-f (change-log-find-file) finds the file
 +associated with the current log entry.
 +
 +*** The new command C-c C-c (change-log-goto-source) goes to the
 +source code associated with a log entry.
 +
 +** Compile and grep modes
 +
 +*** The mode-line entry for the *compilation* and *grep* buffer is color coded.
 +It has different colors for to show that: (a) the command is still
 +running, (b) successful completion, (c) error.
 +
 +*** compilation-auto-jump-to-first-error tells `compile' to jump to
 +the first error encountered during compilations.
 +
 +*** compilation-scroll-output accepts a new value, `first-error', which
 +says to stop auto scrolling at the first error that occurs.
 +
 +*** The `cc' alias for C++ files in `grep-file-aliases' has been
 +improved.  `hh' can be used to match C++ header files and `cchh' both
 +C++ sources and headers.
 +
 +** Copyright
 +
 +*** You can specify your copyright holders' names.
 +Only copyright lines with holders matching `copyright-names-regexp' are
 +considered for update.
 +
 +*** Copyrights can be at the end of the buffer.
 +This is controlled by `copyright-at-end-flag' (used by, e.g., change-log-mode).
 +
 +** Custom
 +
 +*** defcustom accepts new keyword arguments, `:safe' and `:risky', which
 +set a variable's `safe-local-variable' and `risky-local-variable' property.
 +
 +** Diff mode
 +
 +*** diff-refine-hunk highlights word-level details of changes in a diff hunk.
 +It's used automatically as you move through hunks, see
 +diff-auto-refine-mode.  It is bound to `C-c C-b'.
 +
 +*** diff-add-change-log-entries-other-window iterates through the diff
 +buffer and tries to create ChangeLog entries for each change.
 +It is bound to `C-x 4 A'.
 +
 +*** Turning on `whitespace-mode' in a diff buffer will show trailing
 +whitespace problems in the modified lines.
 +
 +** Dired
 +
 +*** In Dired, C-x C-q now runs the command wdired-change-to-wdired-mode,
 +and C-x C-q in wdired-mode exits it with asking a question about
 +saving changes.
 +
 +*** `&' runs the command `dired-do-async-shell-command' that executes
 +the command asynchronously without the need to manually add ampersand
 +to the end of the command.  Its output appears in the buffer `*Async Shell
 +Command*'.
 +
 +*** `M-s f C-s' and `M-s f M-C-s' run Isearch that matches only at file names.
 +When a new user option `dired-isearch-filenames' is t, then even ordinary
 +Isearch started with `C-s' and `C-M-s' matches only at file names in the
 +Dired buffer.  When `dired-isearch-filenames' is `dwim' then activation of
 +file name Isearch depends on the position of point - if point is on a file
 +name initially, then Isearch matches only file names, otherwise it matches
 +everywhere in the Dired buffer.  You can toggle file names matching on or
 +off by typing `M-s f' in Isearch mode.
 +
 +*** `M-s a C-s' and `M-s a M-C-s' run multi-file Isearch on the marked files.
 +They visit the first marked file in the sequence and display the usual Isearch
 +prompt for a string or a regexp where all Isearch commands are available.
 +
 +*** `Q' in Dired provides two new keys for multi-file replacement.
 +The upper case key `Y' replaces all remaining matches in all remaining files
 +with no more questions.  The upper case key `N' stops doing replacements
 +in the current file and skips to the next file.  These multi-file keys
 +are available for all commands that use `tags-query-replace'
 +including `dired-do-query-replace-regexp', `vc-dir-query-replace-regexp',
 +`reftex-query-replace-document'.
 +
 +** Fortran
 +
 +*** The line length of fixed-form Fortran is not fixed at 72 any more.
 +Customize the variable `fortran-line-length' to change it.
 +
 +*** In Fortran mode, M-; is now bound to the standard comment-dwim,
 +rather than fortran-indent-comment.
 +
 +*** (The increasingly misnamed) F90 mode supports Fortran 2003 syntax.
 +
 +** Gnus
 +
 +*** The Gnus package has been updated
 +There are many new features, bug fixes and improvements; see the file
 +GNUS-NEWS or the node "No Gnus" in the Gnus manual for details.
 +
 +*** In Emacs 23, Gnus uses Emacs' new internal coding system `utf-8-emacs' for
 +saving articles, drafts, and ~/.newsrc.eld.  These file may not be read
 +correctly in Emacs 22 and below.  If you want to Gnus across different Emacs
 +versions, you may set `mm-auto-save-coding-system' to `emacs-mule'.
 +
 +*** Passwords are consistently loaded through `auth-source'
 +Gnus can use `auth-source' for POP and IMAP passwords.  Also see that
 +`smtpmail' and `url' support `auth-source' for SMTP and HTTP/HTTPS/RSS
 +authentication respectively.
 +
 +** Help mode
 +
 +*** New macro `with-help-window' should set up help windows better
 +than `with-output-to-temp-buffer' with `print-help-return-message'.
 +
 +*** New option `help-window-select' permits to customize whether help
 +window shall be automatically selected when invoking help.
 +
 +*** New variable `help-window-point-marker' permits one to specify a new
 +position for point in help window (for example in `view-lossage').
 +
 +** Isearch
 +
 +*** New command `isearch-forward-word' bound globally to `M-s w' starts
 +incremental word search.  New command `isearch-toggle-word' bound to the
 +same key `M-s w' in Isearch mode toggles word searching on or off
 +while Isearch is active.
 +
 +*** New command `isearch-highlight-regexp' bound to `M-s h r' in Isearch
 +mode runs `highlight-regexp' (`hi-lock-face-buffer') with the current
 +search string as its regexp argument.  The same key `M-s h r' and
 +other keys on the `M-s h' prefix are bound globally to the command
 +`highlight-regexp' and other hi-lock commands.
 +
 +*** New command `isearch-occur' bound to `M-s o' in Isearch mode
 +runs `occur' with the current search string.  The same key `M-s o'
 +is bound globally to the command `occur'.
 +
 +*** Isearch can now search through multiple ChangeLog files.
 +When running Isearch in a ChangeLog file, if the search fails,
 +then another C-s tries searching the previous ChangeLog,
 +if there is one (e.g. going from ChangeLog to ChangeLog.12).
 +This is enabled if multi-isearch-search is non-nil.
 +
 +*** Two new commands to start Isearch on a list of marked buffers
 +for buff-menu.el and ibuffer.el are bound to the keys `M-s a C-s' and
 +`M-s a M-C-s'.
 +
 +*** The part of an Isearch that failed to match is highlighted in
 +`isearch-fail' face.
 +
 +*** `C-h C-h' in Isearch mode displays isearch-specific Help screen,
 +`C-h b' displays all Isearch key bindings, `C-h k' displays the full
 +documentation of the given Isearch key sequence, `C-h m' displays
 +documentation for Isearch mode.  All the other Help commands exit
 +Isearch mode and execute their global definitions.
 +
 +*** When started in the minibuffer, Isearch searches in the minibuffer
 +history.  See `Minibuffer changes', above.
 +
 +** MH-E
 +
 +*** Upgraded to MH-E version 8.2.  See MH-E-NEWS for details.
 +
 +** Python
 +*** The file etc/emacs.py now supports both Python 2 and 3, meaning
 +that either version can be used as inferior Python by python.el.
 +
 +*** Python mode now has `pdbtrack' functionality.  When using pdb to
 +debug a Python program, pdbtrack notices the pdb prompt and displays
 +the source file and line that the program is stopped at, much the same
 +way as gud-mode does for debugging C programs with gdb.
 +
 +** Recentf
 +
 +*** The default value of `recentf-keep' prevents from checking of
 +remote files, if there is no established connection to the
 +corresponding remote host.
 +
 +** Rmail
 +
 +*** Rmail no longer converts the messages to Babyl format.
 +Instead, it uses UNIX mbox format, both on disk and in Rmail buffers,
 +and does conversion and decoding when a message is displayed.
 +
 +The first time you visit an Rmail file in Babyl format, Rmail
 +automatically converts it to mbox format.  This is a one-time
 +conversion, but it can take a few minutes, depending on how fast is
 +your machine and on the size of the file.  You should find the rest of
 +Rmail usage unaltered.
 +
 +However, M-x set-rmail-inbox-list now lasts only for one session
 +because there is no way to save the list of inbox files in an
 +mbox-format file.
 +
 +Also, whereas with Babyl format M-x find-file would switch to Rmail
 +mode, with mbox format this is no longer the case (there being no way
 +to add an "-*- rmail-*-" cookie to an mbox file).  Use C-u M-x rmail
 +instead.
 +
 +If you have written any extensions to Rmail, they are likely to need
 +updating.  Conceptually, the Rmail buffer that you see is no longer
 +just a narrowed portion of the whole.  So you cannot access the whole
 +of a message (or message collection) by a simple save-restriction and
 +widen.  Instead, there are two buffers: the rmail-buffer, and the
 +rmail-view-buffer.  The former is the buffer that you see, the latter
 +is invisible.  Most of the time, the invisible `view' buffer contains
 +the full contents of the Rmail file, and the Rmail buffer contains a
 +decoded copy of the current message (with only a subset of the
 +headers).  In this state, Rmail is said to be `swapped'.
 +
 +You may find the following functions useful:
 +
 +`rmail-get-header' and `rmail-set-header' get or set the value of a
 +message header, whether or not it is currently visible.
 +
 +`rmail-apply-in-message' is a general purpose function that calls a
 +function (with arguments) which you specify on the full text of a given
 +message.  To further narrow to just the headers, search forward for "\n\n".
 +
 +*** The new command `rmail-mime' displays MIME messages.
 +It is bound to `v' in Rmail buffers and summaries.  It displays plain
 +text and multipart messages in a temporary buffer, and offers buttons
 +to save attachments.
 +
 +*** The command `rmail-redecode-body' no longer accepts the optional arg RAW.
 +Since Rmail now holds messages in their original undecoded form in a
 +separate buffer, `rmail-redecode-body' no longer encodes the original
 +message, and therefore there should be no need to avoid encoding it.
 +
 +*** The o command is now `rmail-output'.  It is an all-purpose command
 +for copying messages from Rmail and appending them to files.  It
 +handles Babyl-format files as well as mbox-format files, and it
 +handles both kinds properly when they are visited in Emacs.  It always
 +copies the full headers of the message.
 +
 +*** The C-o command is now `rmail-output-as-seen'.  It uses
 +the message as displayed, appending it to an mbox file.
 +
 +*** The modified status of the Rmail buffer is reported in the mode-line.
 +Previously, this information was hidden.
 +
 +** TeX modes
 +
 +*** New option latex-indent-within-escaped-parens
 +permits to customize indentation of LaTeX environments delimited
 +by escaped parens.
 +
 +** T-mouse Mode
 +
 +*** If the gpm mouse server is running and t-mouse-mode is enabled,
 +Emacs uses a Unix socket in a GNU/Linux console to talk to server,
 +rather than faking events using the client program mev.  This C level
 +approach provides mouse highlighting and help echoing in the
 +minibuffer.
 +
 +** Tramp
 +
 +*** New connection methods.
 +The new methods "plinkx", "plink2", "psftp", "sftp" and "fish" have
 +been introduced.  There are also new so-called gateway methods
 +"tunnel" and "socks".
 +
 +*** IPv6 addresses.
 +IPv6 addresses are supported now as host names.  They must be embedded
 +in square brackets, like in "/ssh:[::1]:".
 +
 +*** Multihop syntax has been removed.
 +The pseudo-method "multi" has been removed.  Instead, multi hops
 +can be specified by the new variable `tramp-default-proxies-alist'.
 +
 +*** More default settings.
 +Default values can be set via the variables `tramp-default-user',
 +`tramp-default-user-alist' and `tramp-default-host'.
 +
 +*** Connection information is cached.
 +In order to reduce connection setup, information about used
 +connections is kept persistently in a file.  The name of this file is
 +defined in the variable `tramp-persistency-file-name'.
 +
 +*** Control of remote processes.
 +Running processes on a remote host can be controlled by settings in
 +`tramp-remote-path' and `tramp-remote-process-environment'.
 +
 +*** Success of remote copy is checked.
 +When the variable `file-precious-flag' is set, the success of a remote
 +file copy is checked via the file's checksum.
 +
 +*** Passwords can be read from an authentification file.
 +Tramp uses the package `auth-source' to read passwords from a file, if
 +necessary.
 +
 +** VC and related modes
 +
 +*** VC now supports applying VC operations to a set of files at a time.
 +This enables VC to work much more effectively with changeset-oriented
 +version-control systems such as Subversion, GNU Arch, Mercurial, Git
 +and Bzr.  VC will now pass a multiple-file commit to these systems as
 +a single changeset.
 +
 +*** vc-dir is a new command that displays file names and their VC
 +status.  It allows to apply various VC operations to a file, a
 +directory or a set of files/directories.
 +
 +*** VC switches are no longer appended, rather the first non-nil value is used.
 +(This was for the most part true in Emacs 22, but was not advertised).
 +This is because there is an increasing variety of VC systems, and they
 +do not all accept the same "common" options.  For example, a CVS diff
 +command used to append the values of `vc-cvs-diff-switches',
 +`vc-diff-switches', and `diff-switches'.  Now the first non-nil value
 +from that sequence is used.  The special value `t' means "no switches".
 +
 +*** Clicking on the VC mode-line entry now pops the VC menu.
 +
 +*** The VC mode-line entry now has a tooltip that explains the VC file status.
 +
 +*** In VC Annotate mode, the key bindings have changed to use lower
 +case keys instead of the upper case keys used in the past.
 +
 +*** In VC Annotate mode, for VC systems that support changesets, you can
 +see the diff for the whole changeset (not only for the current file)
 +by typing the D key.  Using the "Show changeset diff of revision at
 +line" menu entry does the same thing.
 +
 +*** In VC Annotate mode, you can type v to toggle the annotation visibility.
 +
 +*** In VC Annotate mode, you can type f to show the file revision on
 +the current line.
 +
 +*** Asynchronous VC commands display [Waiting...] in the mode-line
 +of the corresponding buffer as long as the asynchronous process is
 +active.
 +
 +*** Log entries can be modified using the key "e" in log-view.
 +For now only CVS, RCS, SCCS and SVN support this functionality.
 +This is done by the `modify-change-comment' backend function.
 +
 +*** In log-view-mode, for VC systems that support changesets, you can
 +see the diff for the whole changeset (not only for the current file)
 +by typing the D key or using the "Changeset Diff" menu entry.
 +
 +*** In Log Edit mode,  C-c C-d now shows the diff for the files involved.
 +
 +*** vc-git supports the "git grep" command.
 +
 +*** VC Support for Meta-CVS has been removed for lack of a maintainer able
 +to update it to the new VC.
 +
 +** Miscellaneous
 +
 +*** comint-mode uses `start-file-process' now (see Lisp Changes).
 +If `default-directory' is a remote file name, subprocesses are started
 +on the corresponding remote system.
 +
 +*** Eldoc highlights the function argument under point
 +with the face `eldoc-highlight-function-argument'.
 +
 +*** In Etags, the --members option is now the default.
 +Use --no-members if you want the old default behavior of not tagging
 +struct members in C, members variables in C++ and variables in PHP.
 +
 +*** The `gdb' command only works with the graphical interface now.
 +Use `gud-gdb' if you want the (old) text command mode.
 +
 +*** goto-address.el provides two new minor modes, goto-address-mode and
 +goto-address-prog-mode, which buttonize URLS and email addresses.
 +
 +*** The new command `eshell/info' runs info in an eshell buffer.
 +
 +*** The new variable `ffap-rfc-directories' specifies a list of local
 +directories in which `ffap-rfc' will first search for RFCs.
 +
 +*** hide-ifdef-mode allows shadowing ifdef-blocks instead of hiding them.
 +See option `hide-ifdef-shadow' and function `hide-ifdef-toggle-shadowing'.
 +
 +*** `icomplete-prospects-height' now supercedes `icomplete-prospects-length'.
 +
 +*** Info displays breadcrumbs in the header of the page.
 +See Info-breadcrumbs-depth to control it.
 +
 +*** net-utils has an `iwconfig' command, similar to the existing `ifconfig'.
 +It is used to configure wireless interfaces.
 +
 +*** The pcmpl-unix package supports hostname completion for ssh and scp.
 +
 +*** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs.
 +
 +*** smerge-refine highlights word-level details of changes in conflict.
 +It's used automatically as you move through conflicts, see
 +smerge-auto-refine-mode.
 +
 +*** talk.el has been extended for multiple tty support.
 +
 +*** A new command `display-time-world' has been added to the Time
 +package.  It creates a buffer with an updating time display using
 +several time zones.
 +
 +*** The appearance of superscript and subscript in TeX is more customizable.
 +See the documentation of the variables: tex-fontify-script,
 +tex-font-script-display, tex-suscript-height-ratio, and
 +tex-suscript-height-minimum.
 +
 +*** view-remove-frame-by-deleting is now by default t
 +since users found iconification of view-mode frames distracting.
 +
 +*** WoMan tries to add locale-specific manual page directories to the
 +search path.  This can be disabled by setting `woman-locale' to nil.
 +
 +\f
 +* Changes in Emacs 23.1 on non-free operating systems
 +
 +** Case is now considered significant in completion on MS-Windows.
 +The default value of `completion-ignore-case' is now nil on
 +MS-Windows, the same as it is for other operating systems.  The
 +variable doesn't apply to reading a file name -- in that case Emacs
 +heeds `read-file-name-completion-ignore-case' instead.
 +
 +** IPv6 is supported on MS-Windows.
 +Emacs now supports IPv6 on Windows XP and later, and earlier versions
 +of Windows with third party IPv6 stacks installed.  In Emacs 22, IPv6 was
 +supported on other platforms, but not on Windows due to using the winsock
 +1.1 header file, even though Emacs was linking to the winsock 2 library.
 +
 +** Busy cursor (hourglass) now displays on MS-Windows.
 +When Emacs is busy, an hourglass mouse cursor is displayed on Windows.
 +In Emacs 22 only X supported the busy cursor.
 +
 +** Battery status is available on MS-Windows
 +Emacs can now display the battery status in the mode-line when enabled with
 +display-battery-mode or from the Options menu.  More verbose battery
 +information is also available with the command `battery'.  In Emacs 22
 +battery status was supported only on GNU/Linux and Mac.
 +
 +** More keys available on MS-Windows.
 +Keys normally associated with IMEs, and some exotic keys not normally found
 +on standard keyboards have been given names so they can be bound to functions
 +inside Emacs.  If there are keys on your keyboard that have not been exposed
 +to Emacs in the past, try C-h k to see if they are available now.
 +
 +Emacs can now bind functions to the extra buttons for media player and
 +browser control present on some keyboards.  These buttons are disabled
 +by default, since enabling them prevents their system-wide use when
 +Emacs has focus.  To enable them, set the variable
 +w32-pass-multimedia-buttons to nil.  See the doc string of that variable
 +for the list of extra keys that are available.
 +
 +** BDF fonts no longer supported on MS-Windows.
 +The font backend was completely rewritten for this release.  The focus
 +on Windows has been getting acceptable performance and full unicode
 +support, including complex script shaping for native Windows fonts.  A
 +rewrite of the BDF font support has not happened due to lack of time
 +and developers.  If demand still exists for such a backend even with
 +the improved language support for native Windows fonts, future
 +development in this direction will most likely be based on the
 +freetype library, giving access to a wider range of font formats.
 +
 +\f
 +* Incompatible Lisp Changes in Emacs 23.1
 +
 +** Variables cannot be both buffer-local and frame-local any more.
 +
 +** `functionp' returns nil for special forms.
 +I.e., it only returns t for objects that can be passed to `funcall'.
 +
 +** The behavior of map-char-table has changed.  It may call the
 +specified function with a cons (FROM . TO) as a key if characters in
 +that range have the same value.
 +
 +** Process changes
 +
 +*** The function `dired-call-process' has been removed.
 +
 +*** The multibyteness of process filters is now determined by the
 +coding-system used for decoding.  The functions
 +`process-filter-multibyte-p' and `set-process-filter-multibyte' are
 +obsolete.
 +
 +** The variable `byte-compile-warnings' can now be a list starting with `not',
 +meaning to disable the specified warnings.  The meaning of this list
 +may therefore be the reverse of what you expect (of course, this is
 +only an issue if you make use of the new `not' syntax).  Rather than
 +checking/manipulating elements directly, use the new functions
 +`byte-compile-warning-enabled-p', `byte-compile-disable-warning', and
 +`byte-compile-enable-warning.'
 +
 +** `mode-name' is no longer guaranteed to be a string.
 +Use `(format-mode-line mode-name)' to ensure a string value.
 +
 +** The function x-font-family-list has been removed.
 +Use the new function font-family-list (see Lisp Changes, below).
 +
 +** Internationalization changes
 +
 +*** The value of the function `charset-id' is now always 0.
 +
 +*** The functions `register-char-codings' and `coding-system-spec'
 +have been removed.
 +
 +*** The cpXXX coding systems are now supported automatically.
 +The functions cp-...-codepage, which you had to use in Emacs 22 to
 +enable support for these coding systems, have been deleted.
 +
 +*** The following features have been removed.  They were used for
 +displaying various scripts with specific fonts, and are no longer
 +needed now that OpenType font support is available:
 +
 +**** `devanagari' and `devan-util', and all associated devanagari-* and
 +dev-* functions and variables (formerly used for Devanagari script).
 +
 +**** `kannada' and `knd-util', and all associated kannada-* and knd-*
 +functions and variables (formerly used for Kannada script).
 +
 +**** `malayalam' and `mlm-util', and all associated malayalam-* and
 +mlm-* functions and variables (formerly used for Malayalam script).
 +
 +**** `tamil' and `tml-util, and all associated tamil-* and tml-*
 +functions and variables (formerly used for Tamil script).
 +
 +*** The meaning of NAME argument of `set-fontset-font' is changed.
 +Previously nil is accepted as the default fontset.  Now, nil is for
 +the fontset of the selected frame and t is for the default fontset.
 +
 +*** The meaning of FONTSET argument of `print-fontset' is changed.
 +Now, nil is for the fontset of the selected frame and t is for the
 +default fontset.
 +
 +** If a function in write-region-annotate-functions returns with a
 +different buffer current, Emacs no longer kills that buffer
 +automatically.  This behavior existed in previous versions of Emacs,
 +but was undocumented.  To kill a buffer after write-region, give the
 +variable `write-region-post-annotation-function' a buffer-local value
 +of `kill-buffer'.
 +
 +** The variable temp-file-name-pattern has been removed.
 +This variable was only used by call-process-region, which now uses
 +temporary-file-directory instead.
 +
 +** The COUNT and SYSTEM-FLAG arguments to define-abbrev have been
 +removed.  The function now takes extra arguments for specifying
 +arbitrary abbrev properties.
 +
 +** end-of-defun-function is now guaranteed to work only when called
 +from the start of a defun.  It must now leave point exactly at the end
 +of defun, since `end-of-defun' now itself moves forward over
 +whitespace after calling it.
 +
 +\f
 +* Lisp Changes in Emacs 23.1
 +
 +** The new variable `generate-autoload-cookie' controls the magic comment
 +string used by `update-file-autoloads' to find autoloaded forms.  The
 +variable `generated-autoload-file' similarly controls the name of the
 +file where `update-file-autoloads' writes the calls to `autoload'.
 +The default values are ";;;###autoload" and `loaddefs.el',
 +respectively.
 +
 +** New primitives `list-system-processes' and `process-attributes'
 +let Lisp programs access the processes that are running on the local
 +machine.  See the doc strings of these functions for more details.
 +Not all platforms support accessing this information; on those that
 +don't, these primitives will return nil.
 +
 +** New variable `user-emacs-directory'.
 +Use this instead of "~/.emacs.d".
 +
 +** If a local hook function has a non-nil `permanent-local-hook'
 +property, `kill-all-local-variables' does not remove it from the local
 +value of the hook variable; it remains even if you change major modes.
 +
 +** `frame-inherited-parameters' lets new frames inherit parameters from
 +the selected frame.
 +
 +** New keymap `input-decode-map' overrides like key-translation-map, but
 +applies before function-key-map.  Also it is terminal-local contrary to
 +key-translation-map.  Terminal-specific key-sequences are generally added to
 +this map rather than to function-key-map now.
 +
 +** `ignore-errors' is now a standard macro (does not require the CL package).
 +
 +** `interprogram-paste-function' can now return one string or a list
 +of strings.  In the latter case, Emacs puts the second and following
 +strings on the kill ring.
 +
 +** In `condition-case', a handler can specify "let the debugger run first".
 +You do this by writing `debug' in the list of conditions to be handled,
 +like this:
 +
 +    (condition-case nil
 +      (foo bar)
 +      ((debug error) nil))
 +
 +** clone-indirect-buffer now runs the clone-indirect-buffer-hook.
 +
 +** `beginning-of-defun-function' now takes one argument, the count given to
 +`beginning-of-defun'.  (N.B. `end-of-defun-function' doesn't take any
 +arguments.)
 +
 +** `file-remote-p' has new optional parameters IDENTIFICATION and CONNECTED.
 +IDENTIFICATION specifies which part of the remote identifier has to be
 +returned.  With CONNECTED passed non-nil, it is checked whether a
 +remote connection has been established already.
 +
 +** The new macro `declare-function' suppresses compiler warnings about
 +undefined functions.
 +
 +** Changes to interactive function handling
 +
 +*** The new interactive spec code ^ says to first call
 +handle-shift-selection if shift-select-mode is non-nil, before reading
 +the command arguments.  This is used for shift-selection (see above).
 +
 +*** Built-in functions can now have an interactive specification that
 +is not a prompt string.  If the `intspec' parameter of a `DEFUN'
 +starts with a `(', the string is evaluated as a Lisp form.
 +
 +*** The interactive-form of a function can be added post-facto via the
 +`interactive-form' symbol property.  Mostly useful to add complex
 +interactive forms to subroutines.
 +
 +** Region changes
 +
 +*** Commands should use `use-region-p' to test whether there is
 +an active region that they should operate on.
 +
 +*** `region-active-p' returns non-nil when Transient Mark mode is
 +enabled and the mark is active.  Most commands that act specially on
 +the active region in Transient Mark mode should use `use-region-p'
 +instead of `region-active-p', because `use-region-p' obeys the new
 +user option `use-empty-active-region' (see Editing Changes, above).
 +
 +*** If a command sets `transient-mark-mode' to (only . OLDVAL), that
 +means to activate transient-mark-mode temporarily, until the next
 +unshifted point motion command or mark deactivation.  Afterwards,
 +reset transient-mark-mode to the value OLDVAL.  The values `only' and
 +`identity', introduced in Emacs 22, are now deprecated.
 +
 +** Emacs session information
 +
 +*** The new variables `before-init-time' and `after-init-time' record the
 +value of `current-time' before and after Emacs loads the init files.
 +
 +*** The new function `emacs-uptime' returns the uptime of an Emacs instance.
 +
 +*** The new function `emacs-init-time' returns the duration of the
 +Emacs initialization.
 +
 +** Changes affecting display-buffer
 +
 +*** display-buffer tries to be smarter when splitting windows.
 +The new option split-window-preferred-function lets you specify your own
 +function to pop up new windows.  Its default value split-window-sensibly
 +can split a window either vertically or horizontally, whichever seems
 +more suitable in the current configuration.  You can tune the behavior
 +of split-window-sensibly by customizing split-height-threshold and the
 +new option split-width-threshold.  Both options now take the value nil
 +to inhibit splitting in one direction.  Setting split-width-threshold to
 +nil inhibits horizontal splitting and gets you the behavior of Emacs 22
 +in this respect.  In any case, display-buffer may now split the largest
 +window vertically even when it is not as wide as the containing frame.
 +
 +*** If pop-up-frames has the value `graphic-only', display-buffer only
 +makes a separate frame on graphic displays.
 +
 +*** select-frame and set-frame-selected-window have a new optional
 +argument NORECORD.  If non-nil, this will avoid messing with the order
 +of recently selected windows and the buffer list.
 +
 +** Window parameters can now be defined.
 +These are analogous to frame parameters, but are associated with
 +individual windows.
 +
 +*** The new functions window-parameters, window-parameter, and
 +set-window-parameter are used to query and set window parameters.
 +
 +** Minibuffer and completion changes
 +
 +*** A list of default values can be specified for the DEFAULT argument of
 +functions `read-from-minibuffer', `read-string', `read-command',
 +`read-variable', `read-buffer', `completing-read'.  Elements of this list
 +are available for inserting into the minibuffer by typing `M-n'.
 +For empty input these functions return the first element of this list.
 +
 +*** New function `read-regexp' uses the regexp history and some useful
 +regexp defaults (string at point, last Isearch/replacement regexp/string)
 +via M-n when reading a regexp in the minibuffer.
 +
 +*** minibuffer-local-must-match-filename-map is now named
 +minibuffer-local-filename-must-match-map.
 +
 +*** The `require-match' argument to `completing-read' accepts the new
 +values `confirm-only' and `confirm-after-completion'.
 +
 +** Search and replacement changes
 +
 +*** The regexp form \(?<num>:<regexp>\) specifies the group number explicitly.
 +
 +*** New function `match-substitute-replacement' returns the result of
 +`replace-match' without actually using it in the buffer.
 +
 +*** The new variable `replace-search-function' determines the function
 +to use for searching in query-replace and replace-string.  The
 +function it specifies is called by `perform-replace' when its 4th
 +argument is nil.
 +
 +*** The new variable `replace-re-search-function' determines the
 +function to use for searching in `query-replace-regexp',
 +`replace-regexp', `query-replace-regexp-eval', and
 +`map-query-replace-regexp'.  The function it specifies is called by
 +`perform-replace' when its 4th argument is non-nil.
 +
 +*** New keymap `search-map' bound to `M-s' provides global bindings
 +for search related commands.
 +
 +*** New keymap `multi-query-replace-map' contains additonal keys bound
 +to `automatic-all' and `exit-current' for multi-buffer interactive replacement.
 +
 +*** The variable `inhibit-changing-match-data', if non-nil, prevents
 +the search and match primitives from changing the match data.
 +
 +*** New functions `word-search-forward-lax' and `word-search-backward-lax'.
 +These are like `word-search-forward and `word-search-backward', except
 +that the end of the search string need not match a word boundary,
 +unless it ends in whitespace.
 +
 +** File handling changes
 +
 +*** set-file-modes is now interactive and can take the mode value in
 +symbolic notation thanks to auxiliary functions.
 +
 +*** file-local-variables-alist stores an alist of file-local
 +variables defined in the current buffer.
 +
 +** Face-remapping
 +
 +*** Each face can be remapped to a different face definition using the
 +variable `face-remapping-alist'.  This is an alist that maps faces to
 +replacement definitions (which can be face names, lists of face names,
 +or attribute/value plists.  If this variable is buffer-local, the
 +remapping occurs only in that buffer.
 +
 +*** text-scale-mode remaps the default face to a larger or smaller
 +size in the current buffer.  This feature is used by the Buffer Face
 +menu and the new `C-x C-+', `C-x C--', and `C-x C-0' commands (see
 +Editing Changes, above).
 +
 +*** New functions:
 +
 +**** `face-remap-add-relative' adds a face remapping entry to the
 +current buffer.
 +
 +**** ``face-remap-remove-relative' removes a face remapping entry from
 +the current buffer.
 +
 +**** `face-remap-reset-base' restores a face to its global definition.
 +
 +**** `face-remap-set-base' sets the base remapping of a face.
 +
 +** Process changes
 +
 +*** The new function `start-file-process' is similar to `start-process',
 +but obeys file handlers.  The file handler is chosen based on
 +`default-directory'.  The functions `start-file-process-shell-command'
 +and `process-file-shell-command' are also new; they call internally
 +`start-file-process' and `process-file', respectively.
 +
 +*** The new function `process-lines' executes an external program and
 +returns its output as a list of lines.
 +
 +** Character code, representation, and charset changes.
 +
 +*** In multibyte buffers and strings, characters are represented by
 +UTF-8 byte sequences.  The character code space is now 0x0..0x3FFFFF
 +with no gap; code points 0x0..0x10FFFF are Unicode characters of the
 +same code points, while code points 0x3FFF80..0x3FFFFF are raw 8-bit
 +bytes.
 +
 +*** Generic characters no longer exist.
 +
 +*** The concept of a charset has changed.  A single character may
 +belong to multiple charsets (e.g. a-grave, U+00E0, belongs to charsets
 +unicode, iso-8859-1, iso-8859-3, etc).
 +
 +**** The dimension of a charset is now 1, 2, 3, or 4, and the size of
 +each dimension is no longer limited to 94 or 96.
 +
 +**** A dynamic charset priority list is used to infer the charset of
 +characters for display.
 +
 +*** The functions `split-char' and `make-char' now accept up to 4
 +positional codes instead of just 2.
 +
 +*** The functions `encode-char' and `decode-char' now accept any character sets.
 +
 +*** The function `define-charset' now accepts a completely different
 +form of arguments (old-style arguments still work).
 +
 +*** The value of the function `char-charset' depends on the current
 +priorities of charsets.
 +
 +*** The function get-char-code-property now accepts many Unicode base
 +character properties.  They are `name', `general-category',
 +`canonical-combining-class', `bidi-class', `decomposition',
 +`decimal-digit-value', `digit-value', `numeric-value', `mirrored',
 +`old-name', `iso-10646-comment', `uppercase', `lowercase', and
 +`titlecase'.
 +
 +*** The functions `modify-syntax-entry' and `modify-category-entry' now
 +accept a cons of characters as the first argument, and modify all
 +entries in that range of characters.
 +
 +*** Use of `translation-table-for-input' for character code unification
 +is now obsolete, since Emacs 23.1 and later uses Unicode as basis for
 +internal representation of characters.
 +
 +*** New functions:
 +
 +**** `characterp' returns t if and only if the argument is a character.
 +This replaces `char-valid-p', which is now obsolete.
 +
 +**** `max-char' returns the maximum character code (currently #x3FFFFF).
 +
 +**** `define-charset-alias' defines an alias of a charset.
 +
 +**** `set-charset-priority' sets priorities of charsets.
 +
 +**** `charset-priority-list' returns a prioritized list of charsets.
 +
 +**** `unibyte-string' makes a unibyte string from bytes.
 +
 +**** `define-char-code-property' defines a character code property.
 +
 +**** `char-code-property-description' returns the description string of
 +a character code property.
 +
 +*** New variables:
 +
 +**** `find-word-boundary-function-table' is a char-table of functions to
 +search for a word boundary.
 +
 +**** `char-script-table' is a char-table of script names.
 +
 +**** `char-width-table' is a char-table of character widths.
 +
 +**** `print-charset-text-property' controls how to handle `charset' text
 +property on printing a string.
 +
 +**** `printable-chars' is a char-table of printable characters.
 +
 +** Code conversion changes
 +
 +*** The new function `define-coding-system' should be used to define a
 +coding system instead of `make-coding-system' (which is now obsolete).
 +
 +*** The functions `encode-coding-region' and `decode-coding-region'
 +have an optional 4th argument to specify where the result of
 +conversion should go.
 +
 +*** The functions `encode-coding-string' and `decode-coding-string'
 +have an optional 4th argument specifying a buffer to store the result
 +of conversion.
 +
 +*** The new variable `inhibit-null-byte-detection' controls whether to
 +consider text with null bytes as binary data.  By default, it is
 +`nil', and Emacs uses `no-conversion' for any text containing null
 +bytes.
 +
 +*** The functions `set-coding-priority' and `make-coding-system' are obsolete.
 +
 +*** New functions:
 +
 +**** `with-coding-priority' executes Lisp code using the specified
 +coding system priority order.
 +
 +**** `check-coding-systems-region' checks if the text in the region is
 +encodable by the specified coding systems.
 +
 +**** `coding-system-aliases' returns a list of aliases of a coding system.
 +
 +**** `coding-system-charset-list' returns a list of charsets supported
 +by a coding system.
 +
 +**** `coding-system-priority-list' returns a list of coding systems
 +ordered by their priorities.
 +
 +**** `set-coding-system-priority' sets priorities of coding systems.
 +
 +**** `coding-system-from-name' returns a coding system matching with
 +the argument name.
 +
 +** There is a new input method, Robin, different from Quail.
 +It has three functionalities:
 + i) a simple input method (converts an ASCII sequence into a string).
 +ii) converts an existing buffer substring into another string
 +iii) reverse conversion (each character produced by a
 +robin rule can hold the original ASCII sequence as a char-code-property)
 +
 +*** The new function `robin-define-package' defines a Robin package.
 +
 +*** The new function `robin-modify-package' modifies an existing Robin package.
 +
 +*** The new function `robin-use-package' starts using a Robin package
 +as an input method.
 +
 +*** The new function `string-to-unibyte' is like `string-as-unibyte'
 +but signals an error if STRING contains a non-ASCII, non-eight-bit
 +character.
 +
 +** Changes related to the new font backend
 +
 +*** Which font backends to use can be specified by the X resource
 +"FontBackend".  For instance, to use both X core fonts and Xft fonts:
 +
 +Emacs.FontBackend: x,xft
 +
 +If this resource is not set, Emacs tries to use all font backends
 +available on your graphic device.
 +
 +*** New frame parameter `font-backend' specifies a list of
 +font-backends supported by the frame's graphic device.  On X, they are
 +currently `x' and `xft'.
 +
 +*** The function `set-fontset-font' now accepts a script name as the
 +second argument, and has an optional 5th argument to control how to
 +set the font.
 +
 +*** New functions:
 +
 +**** `fontp' checks if the argument is a font-spec or font-entity.
 +
 +**** `font-spec' creates a new font-spec object.
 +
 +**** `font-get' returns a font property value.
 +
 +**** `font-put' sets a font property value.
 +
 +**** `font-face-attributes' returns a plist of face attributes set by a font.
 +
 +**** `list-fonts' returns a list of font-entities matching a font spec.
 +
 +**** `find-font' returns the font-entity best matching the given font spec.
 +
 +**** `font-family-list' returns a list of family names of available fonts.
 +
 +**** `font-xlfd-name' returns an XLFD name of a given font spec, font
 +entity, or font object.
 +
 +**** `clear-font-cache' clears all font caches.
 +
 +** Changes related to multiple-terminal (multi-tty) support
 +
 +*** $TERM is now set to `dumb' for subprocesses.  If you want to know the
 +$TERM inherited by Emacs you will have to look inside initial-environment.
 +
 +*** $DISPLAY is now dynamically inherited from the frame's `display'.
 +
 +*** The `window-system' variable is now frame-local.  The new
 +`initial-window-system' variable contains the `window-system' value
 +for the first frame.  `window-system' is also now a function that
 +takes a frame argument.
 +
 +*** The `keyboard-translate-table' variable and the terminal and
 +keyboard coding systems are now terminal-local.
 +
 +*** You can specify a terminal device (`tty' parameter) and a terminal
 +type (`tty-type' parameter) to `make-terminal-frame'.
 +
 +*** The function `make-frame-on-display' now works during a tty
 +session.
 +
 +*** A new `terminal' data type.
 +The functions `get-device-terminal', `terminal-parameters',
 +`terminal-parameter', `set-terminal-parameter' use this data type.
 +
 +*** Function key sequences are now mapped using `local-function-key-map',
 +a new variable.  This inherits from the global variable function-key-map,
 +which is not used directly any more.
 +
 +*** New hooks:
 +
 +**** before-hack-local-variables-hook is called after setting new
 +variable file-local-variables-alist, and before actually applying the
 +file-local variables.
 +
 +**** `suspend-tty-functions' and `resume-tty-functions' are called
 +after a tty frame has been suspended or resumed, respectively.  The
 +functions are called with the terminal id of the frame being
 +suspended/resumed as a parameter.
 +
 +**** The special hook `delete-terminal-functions' is called before
 +deleting a terminal.
 +
 +*** New functions:
 +
 +**** `delete-terminal'
 +
 +**** `suspend-tty'
 +
 +**** `resume-tty'.
 +
 +*** `initial-environment' holds the environment inherited from Emacs's parent.
 +
 +** Redisplay changes
 +
 +*** For underlined characters, the distance between the underline and
 +the baseline is controlled by a new variable, `underline-minimum-offset'.
 +
 +*** You can now pass the value of the `invisible' property to
 +invisible-p to check whether it would cause the text to be invisible.
 +This is convenient when checking invisibility of text with no buffer
 +position (e.g. in before/after-strings).
 +
 +*** `clear-image-cache' can be told to flush only images of a specific file.
 +
 +*** `vertical-motion' can now be given a goal column.
 +It now accepts a cons cell (COLS . LINES) in its first argument, which
 +says to stop, where possible, at a pixel x-position equal to COLS
 +times the default column width.
 +
 +*** redisplay-end-trigger-functions, set-window-redisplay-end-trigger,
 +and window-redisplay-end-trigger are obsolete.  Use `jit-lock-register'
 +instead.
 +
 +*** The new variables `wrap-prefix' and `line-prefix' specify display
 +specs which are appended at display-time to every continuation line
 +and non-continuation line, respectively.  In addition, Emacs
 +recognizes the `wrap-prefix' and `line-prefix' text or overlay
 +properties; these have the same effects as the variables of the same
 +name, but take precedence.
 +
 +** The Lisp interpreter now treats non-breaking space as whitespace.
 +
 +** Miscellaneous new functions
 +
 +*** `apply-partially' performs a "curried" application of a function.
 +
 +*** `buffer-swap-text' swaps text between two buffers.  This can be
 +useful for modes such as tar-mode, archive-mode, RMAIL.
 +
 +*** `combine-and-quote-strings' produces a single string from a list of strings
 +sticking a separator string in between each pair, and quoting those
 +strings that include the separator as their substring.  Useful for
 +consing shell command lines from the individual arguments.
 +
 +*** `custom-note-var-changed' tells Custom to treat the change in a
 +certain variable as having been made within Custom.
 +
 +*** `face-all-attributes' returns an alist describing all the basic
 +attributes of a given face.
 +
 +*** `format-seconds' converts a number of seconds into a readable
 +string of days, hours, etc.
 +
 +*** `image-refresh' refreshes all images associated with a given image
 +specification.
 +
 +*** `locate-user-emacs-file' helps packages to select the appropriate
 +place to save user-specific files.  It defaults to `user-emacs-directory'
 +unless the file already exists at $HOME.
 +
 +*** `read-color' reads a color name using the minibuffer.
 +
 +*** `read-shell-command' does what its name says, with completion.  It
 +uses the minibuffer-local-shell-command-map for that.
 +
 +*** `split-string-and-unquote' splits a string into a list of substrings
 +on the boundaries of a given delimiter, and unquotes the substrings that
 +are quoted.  Useful for taking apart shell commands.
 +
 +*** The two new functions `looking-at-p' and `string-match-p' can do
 +the same matching as `looking-at' and `string-match' without changing
 +the match data.
 +
 +*** The two new functions `make-serial-process' and
 +`serial-process-configure' provide a Lisp interface to the new serial
 +port support (see Emacs changes, above).
 +
 +** Miscellaneous new variables
 +
 +*** `auto-save-include-big-deletions', if non-nil, means auto-save is
 +not turned off automatically after a big deletion.
 +
 +*** `read-circle', if nil, disables the reading of recursive Lisp
 +structures using the #N= and #N# syntax.
 +
 +*** `this-command-keys-shift-translated' is non-nil if the key
 +sequence invoking the current command was found by shift-translation.
 +
 +*** `window-point-insertion-type' determines the insertion-type of the
 +marker used for window-point.
 +
 +*** bookmark provides `bookmark-make-record-function' so special major
 +modes like Info can teach bookmark.el how to save and restore the
 +relevant data.
 +
 +*** `fill-forward-paragraph-function' specifies which function the
 +filling code should use to find paragraph boundaries.
 +
 +\f
 +* New Packages for Lisp Programming in Emacs 23.1
 +
 +** The new package avl-tree.el deals with the AVL tree data structure.
 +
 +** The new package check-declare.el verifies the accuracy of
 +declare-function macros (see Lisp Changes, above).
 +
 +** find-cmd.el can build `find' commands using lisp syntax.
 +
 +** The package misearch.el has been added.  It allows Isearch to search
 +through multiple buffers.  A variable `multi-isearch-next-buffer-function'
 +defines the function to call to get the next buffer to search in the series
 +of multiple buffers.  Top-level functions `multi-isearch-buffers',
 +`multi-isearch-buffers-regexp', `multi-isearch-files' and
 +`multi-isearch-files-regexp' accept a single argument that specifies
 +a list of buffers/files to search for a string/regexp.
 +
 +** The new major mode `special-mode' is intended as a parent for
 +major modes such as those that set the "'mode-class 'special" property.
 +
 +\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:
 +mode: outline
 +paragraph-separate: "[        \f]*$"
 +end:
 +
 +arch-tag: e759449d-88b3-4de4-9900-3a6c3dfa23e2
diff --combined lib-src/ChangeLog
index 160a19099a3e21aa6cb0912f53b2ec19c7b99982,ad1387aab0a004373f3bdb65a58e7370e86add45..c9031421cea47849b65d4276f6629cec0abd4b29
+ 2011-01-02  Glenn Morris  <rgm@gnu.org>
+       * ebrowse.c (version) <emacs_copyright>:
+       * etags.c (print_version) <emacs_copyright>:
+       * rcs2log (Copyright): Set short copyright year to 2011.
  2010-11-27  Joe Matarazzo  <joe.matarazzo@gmail.com>  (tiny change)
  
        * ebrowse.c (yylex): If end of input buffer encountered while
        searching for a newline after "//", return YYEOF.  (Bug#7446)
  
 -2010-11-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-11-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        * emacsclient.c (set_local_socket) [DARWIN_OS]: Add fall-back
        definition of _CS_DARWIN_USER_TEMP_DIR for Mac OS X 10.4 and older.
  
 -2010-10-01  Glenn Morris  <rgm@gnu.org>
 +2010-11-15  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * test-distrib.c: Remove include guards for config.h and fcntl.h.
 +      (O_RDONLY): Do not define.
 +      (cool_read): Fix type for variable "sofar".
 +
 +2010-10-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove easymenu.elc.
 +
 +2010-10-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * digest-doc.c, sorted-doc.c: Remove files.
 +      * Makefile.in (UTILITIES): Remove digest-doc and sorted-doc.
 +      (digest-doc${EXEEXT}, sorted-doc${EXEEXT}): Remove rules.
 +      * makefile.w32-in (ALL): Remove digest-doc and sorted-doc.
 +      ($(BLD)/sorted-doc.exe, $(BLD)/digest-doc.exe, sorted-doc, digest-doc)
 +      ($(BLD)/digest-doc.$(O), $(BLD)/sorted-doc.$(O)): Remove rules.
 +      (install): Don't install digest-doc.exe or sorted-doc.exe.
 +
 +2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (PROFILING_LDFLAGS): Remove, not needed.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * b2m.c, b2m.pl: Remove files.
 +      * Makefile.in (INSTALLABLES): Remove b2m.
 +      * makefile.w32-in ($(BLD)/b2m.$(O)): Remove.
 +
 +2010-10-08  Glenn Morris  <rgm@gnu.org>
  
        * emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back
        DARWIN_USER_TEMP_DIR.  (Bug#3992)
  
 +2010-10-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * test-distrib.c (cool_read):
 +      * movemail.c (main, concat):
 +      * make-docfile.c (scan_file, write_c_args):
 +      * emacsclient.c (get_server_config): Fix -Wconversion warning.
 +      (egetenv): Move conditional definition earlier.
 +      (progname): Use const.
 +      * sorted-doc.c (xstrdup): Use const.
 +
 +      * Makefile.in: Remove ^L, old makes choke on it.
 +
 +2010-10-02  Wolfgang Schnerring  <wosc@wosc.de>  (tiny change)
 +
 +      * emacsclient.c (main): Return EXIT_FAILURE if Emacs sends us an
 +      error string (Bug#6963).
 +
 +2010-10-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (tags): Remove target.
 +
 +2010-10-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (tags, TAGS): New targets.
 +
 +2010-09-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacsclient.c (get_server_config): Don't read Emacs pid from
 +      the authentication file.
 +
 +2010-09-29  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (../src/config.h): Remove target, it is stale.
 +
 +      * emacsclient.c (main): Remove unused variables.
 +      (start_daemon_and_retry_set_socket): Use EXIT_FAILURE.
 +
 +2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
 +
 +      * etags.c (compressors, print_language_names): Support xz compression.
 +
 +2010-08-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * fakemail.c: Include stdlib.h for getenv.  Remove declaration of
 +      popen, fclose and pclose.
 +      (my_name, fatal, error, put_line): Use const char*.
 +      (main): Remove extern getenv, mail_program_name is const char*.
 +
 +      * update-game-score.c (get_prefix, write_scores, main): Use const char*.
 +
 +      * sorted-doc.c (error, fatal, states): Use const char *.
 +
 +      * pop.h (pop_multi_first): Use const char *.
 +      (_ARGS): Remove.
 +
 +      * pop.c (pop_multi_first, socket_connection, sendline): Use const char*.
 +
 +      * movemail.c (fatal, error, concat): Use const char *.
 +
 +      * make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): Use
 +      const char *.
 +
 +      * etags.c (compressor, language, Ada_suffix, Ada_help, Asm_suffixes)
 +      (Asm_help, default_C_suffixes, default_C_help, Cplusplus_suffixes)
 +      (Cplusplus_help, Cjava_suffixes, Cobol_suffixes, Cstar_suffixes)
 +      (Erlang_suffixes, Erlang_help, Forth_suffixes, Forth_help)
 +      (Fortran_suffixes, Fortran_help, HTML_suffixes,  HTML_help)
 +      (Lisp_suffixes, Lisp_help, Lua_suffixes, Lua_help)
 +      (Makefile_filenames, Makefile_help, Objc_suffixes, Objc_help)
 +      (Pascal_suffixes, Pascal_help, Perl_suffixes, Perl_interpreters)
 +      (Perl_help, PHP_suffixes, PHP_help, plain_C_suffixses, PS_suffixes)
 +      (PS_help, Prolog_suffixes, Prolog_help, Python_suffixes, Python_help)
 +      (Scheme_suffixes, Scheme_help, TeX_suffixes, TeX_help, Texinfo_suffixes)
 +      (Texinfo_help, Yacc_suffixes, Yacc_help, auto_help, none_help)
 +      (no_lang_help, print_language_names)
 +      (get_language_from_interpreter, get_language_from_filename)
 +      (init, make_tag, struct C_stab_entry, write_classname, TEX_defenv)
 +      (TEX_decode_env, nocase_tail, savestr, savenstr, fatal, pfatal)
 +      (concat): Use const char*.
 +
 +      * emacsclient.c (message, sock_err_message, send_to_emacs)
 +      (quote_argument, set_local_socket)
 +      (start_daemon_and_retry_set_socket): Use const char*.
 +
 +      * ebrowse.c (struct member): filename, def_filename is const.
 +      (struct sym): filename, sfilename is const.
 +      (struct kw): name is const.
 +      (add_sym, yyerror, token_string, insert_keyword, main): Use const char*.
 +
 +      * b2m.c (concat, fatal): Use const char*.
 +      (main): Don't assign labels a string literal.
 +
 +2010-08-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * ebrowse.c (usage, version, mark_virtual):
 +      Remove duplicate declarations.
 +
 +2010-08-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * emacsclient.c: Move socket related #includes together with the
 +      rest of the #includes.  Move WINDOWSNT includes closer together.
 +      (HAVE_CONFIG_H): Remove.
 +      (NO_RETURN): Remove, defined in config.h.
 +      (main): Convert definition to standard C.
 +
 +2010-07-29  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * make-docfile.c (write_c_args): Warn for old-style empty arglist ().
 +
 +2010-07-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacsclient.c (getcwd): Fix previous change: make getcwd
 +      conditional on HAVE_GETCWD and declare with the correct POSIX
 +      profile (for some reason MinGW headers define its 2nd arg as int,
 +      not size_t; but getcwd is not used on Windows nonetheless).
 +
 +2010-07-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacsclient.c (getcwd, w32_getenv):
 +      * ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes.
 +
 +2010-07-24  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * update-game-score.c (usage): Add NO_RETURN specifier.
 +      * movemail.c (fatal, pfatal_with_name, pfatal_and_delete):
 +      * make-docfile.c (fatal):
 +      * hexl.c (usage):
 +      * fakemail.c (fatal):
 +      * etags.c (fatal, suggest_asking_for_help, pfatal):
 +      * emacsclient.c (fatal):
 +      * b2m.c (fatal): Likewise.
 +
 +2010-07-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * make-docfile.c (write_c_args): Correctly handle prefixes of "defalt".
 +
 +2010-07-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacsclient.c (get_current_dir_name, w32_get_resource)
 +      (w32_getenv, w32_set_user_model_id, w32_window_app, w32_execvp)
 +      (close_winsock, initialize_sockets, w32_find_emacs_process)
 +      (w32_give_focus):
 +      * ntlib.c (getlogin, getuid, getgid, getegid):
 +      Convert definitions to standard C.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
 +      (PROFILING_LDFLAGS): Set from substitution.
 +      (BASE_CFLAGS): Add  ${C_WARNINGS_SWITCH}.
 +      (ALL_CFLAGS, CPP_CFLAGS): Add ${PROFILING_CFLAGS}.
 +      (LINK_CFLAGS): Add ${PROFILING_LDFLAGS}.
 +
 +2010-07-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (lisp2): Change hebrew.el to hebrew.elc (see
 +      2010-07-12T05:25:46Z!handa@etlken).
 +
 +2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacsclient.c (set_local_socket): Use strchr, strrchr instead of
 +      index, rindex.
 +      * movemail.c (mail_spool_name, popmail): Likewise.
 +      * pop.c (pop_list): Likewise.
 +
 +2010-07-11  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (obj): Add menu.o, bidi.o, w32uniscribe.o,
 +      and unexw32.o.  (Bug#6603)
 +
 +2010-07-10  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * Makefile.in ($(DESTDIR)${archlibdir}): Convert spaces to TABs.
 +
 +2010-07-09  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * make-docfile.c (write_c_args): Restructure scanning loop.
 +
 +2010-07-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * make-docfile.c (write_c_args): Deal with type names in DEFUN
 +      arguments.
 +
 +2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * update-game-score.c (P_): Remove macro.
 +      * ebrowse.c: Remove include guards.
 +      (P_): Remove macro.
 +
 +2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
 +      memcpy, memmove, memset.
 +      * pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
 +
 +2010-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * movemail.c: Add MAIL_USE_POP around prototypes.
 +      Include <string.h> if HAVE_STRING_H.
 +      (strerror): Only declare if !HAVE_STRERROR.
 +      (fatal): Make static.
 +      (error): Likewise.
 +      (pfatal_with_name): Likewise.
 +      (pfatal_and_delete): Likewise.
 +      (concat): Likewise.
 +      (xmalloc): Likewise.
 +      (popmail): Likewise.
 +      (pop_retr): Likewise.
 +      (mbx_write): Likewise.
 +      (mbx_delimit_begin): Likewise.
 +      (mbx_delimit_end): Likewise.
 +
 +2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * fakemail.c (action): Convert function definitions to standard C.
 +      (add_a_stream):
 +      * test-distrib.c (cool_read):
 +      (main): Likewise.
 +
 +2010-07-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * sorted-doc.c (cmpdoc): Fix signature.
 +      (qsort_compare): Delete.
 +      (main): Remove cast.
 +
 +2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * ebrowse.c (match_qualified_namespace_alias): Check for null pointer.
 +
 +2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Fix prototype warnings.
 +
 +      * ebrowse.c (match_qualified_namespace_alias):
 +      Pass sym* to find_namespace, not link*.
 +
 +      * emacsclient.c (send_to_emacs, quote_argument): Arg s is HSOCKET.
 +
 +      * sorted-doc.c (qsort_compare): New typedef.
 +      (main): Use it to cast cmpdoc.
 +
 +2010-07-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * update-game-score.c: Convert function definitions to standard C.
 +      * sorted-doc.c:
 +      * profile.c:
 +      * pop.c:
 +      * movemail.c:
 +      * make-docfile.c:
 +      * hexl.c:
 +      * fakemail.c:
 +      * etags.c:
 +      * ebrowse.c:
 +      * digest-doc.c:
 +      * b2m.c: Likewise.
 +
 +2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * make-docfile.c (xmalloc, xrealloc, concat, readline, fatal):
 +      * b2m.c (scan_file, scan_lisp_file, scan_c_file): Convert to
 +      standard C prototypes.
 +
 +2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * ebrowse.c: Remove P_ and __P.
 +      * etags.c:
 +      * movemail.c:
 +      * pop.c:
 +      * update-game-score.c: Likewise.
 +
 +2010-06-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * movemail.c (error): Avoid warning when there are no args.
 +
 +2010-06-11  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (lisp2): Fix references to vc/vc-hooks.elc
 +      and vc/ediff-hook.elc.
 +
 +2010-06-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * ntlib.h: Remove code dealing with BSTRING.
 +
 +2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacsclient.c (longopts, decode_options, print_help_and_exit):
 +      New arg `-parent-id'.
 +      (main): Send parent-id to Emacs.
 +
 +2010-05-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (distclean): No more Makefile.c.
 +
 +2010-05-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * Makefile.in (STAMP_INST_SCRIPTS, STAMP_SCRIPS): New (Bug #6246).
 +      (all): Depend onSTAMP_INST_SCRIPTS, STAMP_SCRIPS (Bug #6246).
 +      (stamp-rcs2log, stamp-rcs-checkin, stamp-grep-changelog, stamp-vcdiff):
 +      New rules (Bug #6246).
 +      (clean): Remove stamp-* (Bug #6246).
 +
 +2010-05-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (INSTALLABLES): Remove @LIB_SRC_EXTRA_INSTALLABLES@.
 +
 +2010-05-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (.m.o): Remove, there are no .m files.
 +      (BASE_CFLAGS): New variable.
 +      (ALL_CFLAGS, LINK_CFLAGS, CPP_CFLAGS): Use $BASE_CFLAGS.
 +      (check): Update the message.
 +      (update-game-score${EXEEXT}): Do not use $MOVE_FLAGS.
 +
 +      * Makefile.in: Convert comments to makefile format.
 +
 +      * Makefile.in (LIBS_SYSTEM) [MSDOS]: Do not reset.
 +      (config.h) [MSDOS]: Do not include.
 +
 +2010-05-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBS_SYSTEM): Set with configure, not cpp.
 +      (LIBS_SYSTEM) [MSDOS]: Reset with MSDOS_LIBS_SYSTEM.
 +      (NOT_C_CODE): Remove, no longer used.
 +      (config.h) [!MSDOS]: No longer include.
 +      (LOADLIBES): Use LIBS_SYSTEM as a variable.
 +
 +      * Makefile.in (BLESSMAIL_TARGET): Set with configure, not cpp.
 +
 +2010-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (THIS_IS_MAKEFILE): Remove, unused.
 +
  2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
  
        * Version 23.2 released.
  
 -2010-05-05  Christoph  <cschol2112@googlemail.com>  (tiny change)
 +2010-05-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in: Minimize blessmail-related cpp usage.
 +      (BLESSMAIL_TARGET): New variable.
 +      (MOVEMAIL_NEEDS_BLESSING): Remove, replace by above variable.
 +      (blessmail): Always define this rule.
 +      (need-blessmail): New rule, split out from maybe-blessmail.
 +      (maybe-blessmail): Use BLESSMAIL_TARGET.
 +
 +2010-05-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in: Use @C_SWITCH_SYSTEM@, @C_SWITCH_MACHINE@ rather than
 +      @c_switch_system@, @c_switch_machine@.
 +
 +2010-04-26  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (LIBS_MACHINE): Remove all uses, unused.
 +
 +2010-04-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (ALL_CFLAGS, LINK_CFLAGS, CPP_CFLAGS): Move to the
 +      non-cpp section.
 +
 +2010-04-11  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE): Define using
 +      autoconf, not cpp.
 +      (ALL_CFLAGS): Use them as make variables.
 +
 +2010-04-07  Christoph  <cschol2112@googlemail.com>  (tiny change)
  
        * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Use parenthesis
        for macros for nmake compatibility.
        possibility of symlink attack when movemail is setgid mail
        (CVE-2010-0825).
  
 -2010-03-19  Tetsurou Okazaki  <okazaki@be.to>  (tiny change)
 +2010-04-02  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * Makefile.in (uninstall): Handle the case where archlibdir does
 -      not exist.  (Bug#5720)
 +      Remove extern errno declarations.
 +      * movemail.c:
 +      * etags.c:
 +      * emacsclient.c: Remove extern errno declarations.
 +
 +2010-03-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB)
 +      (LIBHESIOD, LIBRESOLV): Make previous change a bit more friendly by
 +      defining these as Makefile variables.
 +      (LIBS_MOVE): Add LIBS_MAIL into this.
 +      (movemail${EXEEXT}): Just use LIBS_MOVE, not LIBS_MAIL as well.
 +
 +2010-03-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB)
 +      (HESIODLIB, LIBS_MAIL): Set using autoconf rather than cpp.
 +      (BASE_CFLAGS): Remove (identical to CPP_CFLAGS).
 +
 +2010-03-18  Tetsurou Okazaki  <okazaki@be.to>  (tiny change)
 +
 +      * Makefile.in (uninstall): Handle the case where archlibdir does not
 +      exist.  (Bug#5720)
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
  
  2010-02-20  Kevin Ryde  <user42@zip.com.au>
  
  
  2010-01-29  Kester Habermann  <kester@linuxtag.org>  (tiny change)
  
 -      * etags.c (Fortran_functions): Handle recursive keyword
 -      (Bug#5484).
 +      * etags.c (Fortran_functions): Handle recursive keyword (Bug#5484).
  
  2010-01-11  Glenn Morris  <rgm@gnu.org>
  
  
  2008-02-01  Jason Rumney  <jasonr@gnu.org>
  
 -      * makefile.w32-in (obj): Sync with src/Makefile.in
 +      * makefile.w32-in (obj): Sync with src/Makefile.in.
        (TOOLTIP_SUPPORT, WINDOW_SUPPORT): New definitions.
        (WINNT_SUPPORT): Add term/w32-win.elc.
        (lisp1, lisp2): Sync with lisp in src/Makefile.in.
  
        * makefile.w32-in (WINNT_SUPPORT, MOUSE_SUPPORT, lisp): Revert to
        using .elc files.
 -      (lisp): Sync with list in src/Makefile.in
 +      (lisp): Sync with list in src/Makefile.in.
        (VMS_SUPPORT, MSDOS_SUPPORT): Define, so DOC files can be shared.
  
  2002-02-10  Paul Eggert  <eggert@twinsun.com>
  
  2000-03-02  Gerd Moellmann  <gerd@gnu.org>
  
 -      * etags.c (lisp_suffixes)  Add `LSP'.
 +      * etags.c (lisp_suffixes): Add `LSP'.
  
  2000-02-10  Francesco Potortì  <pot@gnu.org>
  
        * Makefile.in.in (install, maybe-blessmail): Don't cd ..;
        configure has already set $(INSTALL) to the proper relative path.
  
 -1995-06-27  Francesco Potortì  (pot@cnuce.cnr.it)
 -
 -      * etags.c (plain_C_entries): New function.
 -      (lowcase): New macro.
 -      (tail, Fortran_functions, Pascal_functions): Use new macro lowcase.
 -      (lang_suffixes): New suffix ".pc" for Pro*C files.
 -      (consider_token): Don't tag all tokens beginning with DEFUN & Co..
 -      (tail): Look for the end of the token when comparing.
 -      (takeprec): Since now tail behaves differently, use strneq.
 -
  1995-07-08  Paul Eggert  <eggert@twinsun.com>
  
        * rcs2log (datearg): Separate date from time with comma, not space,
        (main): Improve usage message.
        (error): Write to stderr, not stdout.
  
 -      * b2m.c cvtmail.c digest-doc.c emacsclient.c emacsserver.c etags.c
 -      fakemail.c hexl.c make-docfile.c profile.c sorted-doc.c test-distrib.c
 -      timer.c wakeup.c yow.c: Eliminate some -Wall warnings from unused
 -      variables and implicitly declared functions.
 +      * b2m.c, cvtmail.c, digest-doc.c, emacsclient.c, emacsserver.c:
 +      * etags.c, fakemail.c, hexl.c, make-docfile.c, profile.c, sorted-doc.c:
 +      * test-distrib.c, timer.c, wakeup.c, yow.c: Eliminate some -Wall
 +      warnings from unused variables and implicitly declared functions.
  
  1994-10-11  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
  
        (TOKEN): Member linestart removed.
        (linepos, prev_linepos, lb1): Deleted.
        (main): Call initbuffer on lbs array instead of lb1.
 -      (init): Removed the initialisation of the logical _gd array;
 +      (init): Removed the initialisation of the logical _gd array.
        (find_entries): A .sa suffix means assembler file.
        (C_create_stab): "auto", "void", "extern", "static" are st_C_typespec.
        All C state machines rewritten.
        * etags.c: Changes for VMS.
        Always define ETAGS on VMS.
        Define macros GOOD and BAD for success and failure exit codes.
 -      (begtk, intk): Allow `$' in identifiers
 +      (begtk, intk): Allow `$' in identifiers.
        (main): Don't support -B, -F or -u on VMS.
        Alternate loop for scanning filename arguments.
        (system): Delete definition of this function.
diff --combined lib-src/ebrowse.c
index 81067a90819626fcde28e745f8b23663ac90fe41,735cf30ae2e0a4b14f9146f281f208872b0b4297..72709503070d943af6df375d4d11bac19d442758
@@@ -1,8 -1,8 +1,8 @@@
  /* ebrowse.c --- parsing files for the ebrowse C++ browser
  
  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-               2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-               Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
@@@ -20,14 -20,20 +20,14 @@@ You should have received a copy of the 
  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
  
  
 -#ifdef HAVE_CONFIG_H
  #include <config.h>
 -#endif
 -
  #include <stdio.h>
  
  #ifdef HAVE_STDLIB_H
  #include <stdlib.h>
  #endif
  
 -#ifdef HAVE_STRING_H
  #include <string.h>
 -#endif
 -
  #include <ctype.h>
  #include <assert.h>
  #include "getopt.h"
  
  /* Conditionalize function prototypes.  */
  
 -#ifdef PROTOTYPES             /* From config.h.  */
 -#define P_(x) x
 -#else
 -#define P_(x) ()
 -#endif
 -
  /* Value is non-zero if strings X and Y compare equal.  */
  
  #define streq(X, Y) (*(X) == *(Y) && strcmp ((X) + 1, (Y) + 1) == 0)
@@@ -249,10 -261,10 +249,10 @@@ struct membe
    int vis;                    /* Visibility (public, ...).  */
    int flags;                  /* See F_* above.  */
    char *regexp;                       /* Matching regular expression.  */
 -  char *filename;             /* Don't free this shared string.  */
 +  const char *filename;               /* Don't free this shared string.  */
    int pos;                    /* Buffer position of occurrence.  */
    char *def_regexp;           /* Regular expression matching definition.  */
 -  char *def_filename;         /* File name of definition.  */
 +  const char *def_filename;   /* File name of definition.  */
    int def_pos;                        /* Buffer position of definition.  */
    char name[1];                       /* Member name.  */
  };
@@@ -294,8 -306,8 +294,8 @@@ struct sy
    struct member *types;               /* List of local types.  */
    char *regexp;                       /* Matching regular expression.  */
    int pos;                    /* Buffer position.  */
 -  char *filename;             /* File in which it can be found.  */
 -  char *sfilename;            /* File in which members can be found.  */
 +  const char *filename;               /* File in which it can be found.  */
 +  const char *sfilename;      /* File in which members can be found.  */
    struct sym *namesp;         /* Namespace in which defined. .  */
    char name[1];                 /* Name of the class.  */
  };
@@@ -353,7 -365,7 +353,7 @@@ int yyline
  
  /* The name of the current input file.  */
  
 -char *filename;
 +const char *filename;
  
  /* Three character class vectors, and macros to test membership
     of characters.  */
@@@ -444,7 -456,7 +444,7 @@@ int tk = -1
  
  struct kw
  {
 -  char *name;                 /* Spelling.  */
 +  const char *name;           /* Spelling.  */
    int tk;                     /* Token value.  */
    struct kw *next;            /* Next in collision chain.  */
  };
@@@ -467,59 -479,62 +467,59 @@@ struct search_path *search_path_tail
  
  /* Function prototypes.  */
  
 -int yylex P_ ((void));
 -void yyparse P_ ((void));
 -void re_init_parser P_ ((void));
 -char *token_string P_ ((int));
 -char *matching_regexp P_ ((void));
 -void init_sym P_ ((void));
 -struct sym *add_sym P_ ((char *, struct sym *));
 -void add_link P_ ((struct sym *, struct sym *));
 -void add_member_defn P_ ((struct sym *, char *, char *,
 -                        int, unsigned, int, int, int));
 -void add_member_decl P_ ((struct sym *, char *, char *, int,
 -                        unsigned, int, int, int, int));
 -void dump_roots P_ ((FILE *));
 -void *xmalloc P_ ((int));
 -void xfree P_ ((void *));
 -void add_global_defn P_ ((char *, char *, int, unsigned, int, int, int));
 -void add_global_decl P_ ((char *, char *, int, unsigned, int, int, int));
 -void add_define P_ ((char *, char *, int));
 -void mark_inherited_virtual P_ ((void));
 -void leave_namespace P_ ((void));
 -void enter_namespace P_ ((char *));
 -void register_namespace_alias P_ ((char *, struct link *));
 -void insert_keyword P_ ((char *, int));
 -void re_init_scanner P_ ((void));
 -void init_scanner P_ ((void));
 -void usage P_ ((int));
 -void version P_ ((void));
 -void process_file P_ ((char *));
 -void add_search_path P_ ((char *));
 -FILE *open_file P_ ((char *));
 -int process_pp_line P_ ((void));
 -int dump_members P_ ((FILE *, struct member *));
 -void dump_sym P_ ((FILE *, struct sym *));
 -int dump_tree P_ ((FILE *, struct sym *));
 -struct member *find_member P_ ((struct sym *, char *, int, int, unsigned));
 -struct member *add_member P_ ((struct sym *, char *, int, int, unsigned));
 -void mark_virtual P_ ((struct sym *));
 -void mark_virtual P_ ((struct sym *));
 -struct sym *make_namespace P_ ((char *, struct sym *));
 -char *sym_scope P_ ((struct sym *));
 -char *sym_scope_1 P_ ((struct sym *));
 -int skip_to P_ ((int));
 -void skip_matching P_ ((void));
 -void member P_ ((struct sym *, int));
 -void class_body P_ ((struct sym *, int));
 -void class_definition P_ ((struct sym *, int, int, int));
 -void declaration P_ ((int));
 -unsigned parm_list P_ ((int *));
 -char *operator_name P_ ((int *));
 -struct sym *parse_classname P_ ((void));
 -struct sym *parse_qualified_ident_or_type P_ ((char **));
 -void parse_qualified_param_ident_or_type P_ ((char **));
 -int globals P_ ((int));
 -void yyerror P_ ((char *, char *));
 -void usage P_ ((int)) NO_RETURN;
 -void version P_ (()) NO_RETURN;
 +int yylex (void);
 +void yyparse (void);
 +void re_init_parser (void);
 +const char *token_string (int);
 +char *matching_regexp (void);
 +void init_sym (void);
 +struct sym *add_sym (const char *, struct sym *);
 +void add_link (struct sym *, struct sym *);
 +void add_member_defn (struct sym *, char *, char *,
 +                      int, unsigned, int, int, int);
 +void add_member_decl (struct sym *, char *, char *, int,
 +                      unsigned, int, int, int, int);
 +void dump_roots (FILE *);
 +void *xmalloc (int);
 +void xfree (void *);
 +void add_global_defn (char *, char *, int, unsigned, int, int, int);
 +void add_global_decl (char *, char *, int, unsigned, int, int, int);
 +void add_define (char *, char *, int);
 +void mark_inherited_virtual (void);
 +void leave_namespace (void);
 +void enter_namespace (char *);
 +void register_namespace_alias (char *, struct link *);
 +void insert_keyword (const char *, int);
 +void re_init_scanner (void);
 +void init_scanner (void);
 +void process_file (char *);
 +void add_search_path (char *);
 +FILE *open_file (char *);
 +int process_pp_line (void);
 +int dump_members (FILE *, struct member *);
 +void dump_sym (FILE *, struct sym *);
 +int dump_tree (FILE *, struct sym *);
 +struct member *find_member (struct sym *, char *, int, int, unsigned);
 +struct member *add_member (struct sym *, char *, int, int, unsigned);
 +void mark_virtual (struct sym *);
 +struct sym *make_namespace (char *, struct sym *);
 +char *sym_scope (struct sym *);
 +char *sym_scope_1 (struct sym *);
 +int skip_to (int);
 +void skip_matching (void);
 +void member (struct sym *, int);
 +void class_body (struct sym *, int);
 +void class_definition (struct sym *, int, int, int);
 +void declaration (int);
 +unsigned parm_list (int *);
 +char *operator_name (int *);
 +struct sym *parse_classname (void);
 +struct sym *parse_qualified_ident_or_type (char **);
 +void parse_qualified_param_ident_or_type (char **);
 +int globals (int);
 +void yyerror (const char *, const char *);
 +void usage (int) NO_RETURN;
 +void version (void) NO_RETURN;
  
  
  \f
     name and line number.  */
  
  void
 -yyerror (format, s)
 -     char *format, *s;
 +yyerror (const char *format, const char *s)
  {
    fprintf (stderr, "%s:%d: ", filename, yyline);
    fprintf (stderr, format, s);
     available.  */
  
  void *
 -xmalloc (nbytes)
 -     int nbytes;
 +xmalloc (int nbytes)
  {
    void *p = malloc (nbytes);
    if (p == NULL)
  /* Like realloc but print an error and exit if out of memory.  */
  
  void *
 -xrealloc (p, sz)
 -     void *p;
 -     int sz;
 +xrealloc (void *p, int sz)
  {
    p = realloc (p, sz);
    if (p == NULL)
     available..  If S is null, return null.  */
  
  char *
 -xstrdup (s)
 -     char *s;
 +xstrdup (char *s)
  {
    if (s)
      s = strcpy (xmalloc (strlen (s) + 1), s);
     special symbol for globals (`*Globals*').  */
  
  void
 -init_sym ()
 +init_sym (void)
  {
    global_symbols = add_sym (GLOBALS_NAME, NULL);
  }
     create a new symbol and set it to default values.  */
  
  struct sym *
 -add_sym (name, nested_in_class)
 -     char *name;
 -     struct sym *nested_in_class;
 +add_sym (const char *name, struct sym *nested_in_class)
  {
    struct sym *sym;
    unsigned h;
 -  char *s;
 +  const char *s;
    struct sym *scope = nested_in_class ? nested_in_class : current_namespace;
  
    for (s = name, h = 0; *s; ++s)
        }
  
        sym = (struct sym *) xmalloc (sizeof *sym + strlen (name));
 -      bzero (sym, sizeof *sym);
 +      memset (sym, 0, sizeof *sym);
        strcpy (sym->name, name);
        sym->namesp = scope;
        sym->next = class_table[h];
  /* Add links between superclass SUPER and subclass SUB.  */
  
  void
 -add_link (super, sub)
 -     struct sym *super, *sub;
 +add_link (struct sym *super, struct sym *sub)
  {
    struct link *lnk, *lnk2, *p, *prev;
  
     found or null if not found.  */
  
  struct member *
 -find_member (cls, name, var, sc, hash)
 -     struct sym *cls;
 -     char *name;
 -     int var, sc;
 -     unsigned hash;
 +find_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
  {
    struct member **list;
    struct member *p;
     F_* defines).  */
  
  void
 -add_member_decl (cls, name, regexp, pos, hash, var, sc, vis, flags)
 -     struct sym *cls;
 -     char *name;
 -     char *regexp;
 -     int pos;
 -     unsigned hash;
 -     int var;
 -     int sc;
 -     int vis;
 -     int flags;
 +add_member_decl (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int vis, int flags)
  {
    struct member *m;
  
     F_* defines).  */
  
  void
 -add_member_defn (cls, name, regexp, pos, hash, var, sc, flags)
 -     struct sym *cls;
 -     char *name;
 -     char *regexp;
 -     int pos;
 -     unsigned hash;
 -     int var;
 -     int sc;
 -     int flags;
 +add_member_defn (struct sym *cls, char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
  {
    struct member *m;
  
     if it is non-null.  POS is the position in the file.  */
  
  void
 -add_define (name, regexp, pos)
 -     char *name, *regexp;
 -     int pos;
 +add_define (char *name, char *regexp, int pos)
  {
    add_global_defn (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
    add_global_decl (name, regexp, pos, 0, 1, SC_FRIEND, F_DEFINE);
     F_* defines).  */
  
  void
 -add_global_defn (name, regexp, pos, hash, var, sc, flags)
 -     char *name, *regexp;
 -     int pos;
 -     unsigned hash;
 -     int var;
 -     int sc;
 -     int flags;
 +add_global_defn (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
  {
    int i;
    struct sym *sym;
     F_* defines).  */
  
  void
 -add_global_decl (name, regexp, pos, hash, var, sc, flags)
 -     char *name, *regexp;
 -     int pos;
 -     unsigned hash;
 -     int var;
 -     int sc;
 -     int flags;
 +add_global_decl (char *name, char *regexp, int pos, unsigned int hash, int var, int sc, int flags)
  {
    /* Add declaration only if not already declared.  Header files must
       be processed before source files for this to have the right effect.
     Value is a pointer to the member's structure.  */
  
  struct member *
 -add_member (cls, name, var, sc, hash)
 -     struct sym *cls;
 -     char *name;
 -     int var;
 -     int sc;
 -     unsigned hash;
 +add_member (struct sym *cls, char *name, int var, int sc, unsigned int hash)
  {
    struct member *m = (struct member *) xmalloc (sizeof *m + strlen (name));
    struct member **list;
     in base classes.  */
  
  void
 -mark_virtual (r)
 -     struct sym *r;
 +mark_virtual (struct sym *r)
  {
    struct link *p;
    struct member *m, *m2;
     are virtual because of a virtual declaration in a base class.  */
  
  void
 -mark_inherited_virtual ()
 +mark_inherited_virtual (void)
  {
    struct sym *r;
    int i;
  /* Create and return a symbol for a namespace with name NAME.  */
  
  struct sym *
 -make_namespace (name, context)
 -     char *name;
 -     struct sym *context;
 +make_namespace (char *name, struct sym *context)
  {
    struct sym *s = (struct sym *) xmalloc (sizeof *s + strlen (name));
 -  bzero (s, sizeof *s);
 +  memset (s, 0, sizeof *s);
    strcpy (s->name, name);
    s->next = all_namespaces;
    s->namesp = context;
  /* Find the symbol for namespace NAME.  If not found, retrun NULL */
  
  struct sym *
 -check_namespace (name, context)
 -     char *name;
 -     struct sym *context;
 +check_namespace (char *name, struct sym *context)
  {
    struct sym *p = NULL;
  
      {
        if (streq (p->name, name) && (p->namesp == context))
            break;
 -      }
 +    }
  
    return p;
 -    }
 +}
  
  /* Find the symbol for namespace NAME.  If not found, add a new symbol
     for NAME to all_namespaces.  */
  
  struct sym *
 -find_namespace (name, context)
 -     char *name;
 -     struct sym *context;
 +find_namespace (char *name, struct sym *context)
  {
    struct sym *p = check_namespace (name, context);
  
  /* Find namespace alias with name NAME. If not found return NULL. */
  
  struct link *
 -check_namespace_alias (name)
 -    char *name;
 +check_namespace_alias (char *name)
  {
    struct link *p = NULL;
    struct alias *al;
  /* Register the name NEW_NAME as an alias for namespace list OLD_NAME.  */
  
  void
 -register_namespace_alias (new_name, old_name)
 -     char *new_name;
 -     struct link *old_name;
 +register_namespace_alias (char *new_name, struct link *old_name)
  {
    unsigned h;
    char *s;
  /* Enter namespace with name NAME.  */
  
  void
 -enter_namespace (name)
 -     char *name;
 +enter_namespace (char *name)
  {
    struct sym *p = find_namespace (name, current_namespace);
  
  /* Leave the current namespace.  */
  
  void
 -leave_namespace ()
 +leave_namespace (void)
  {
    assert (namespace_sp > 0);
    current_namespace = namespace_stack[--namespace_sp];
@@@ -1185,7 -1259,8 +1185,7 @@@ int scope_buffer_len
  /* Make sure scope_buffer has enough room to add LEN chars to it.  */
  
  void
 -ensure_scope_buffer_room (len)
 -     int len;
 +ensure_scope_buffer_room (int len)
  {
    if (scope_buffer_len + len >= scope_buffer_size)
      {
     scope name constructed.  */
  
  char *
 -sym_scope_1 (p)
 -     struct sym *p;
 +sym_scope_1 (struct sym *p)
  {
    int len;
  
     as it would appear in a C*+ source file.  */
  
  char *
 -sym_scope (p)
 -     struct sym *p;
 +sym_scope (struct sym *p)
  {
    if (!scope_buffer)
      {
     list.  */
  
  int
 -dump_members (fp, m)
 -     FILE *fp;
 -     struct member *m;
 +dump_members (FILE *fp, struct member *m)
  {
    int n;
  
  /* Dump class ROOT to stream FP.  */
  
  void
 -dump_sym (fp, root)
 -     FILE *fp;
 -     struct sym *root;
 +dump_sym (FILE *fp, struct sym *root)
  {
    fputs (CLASS_STRUCT, fp);
    PUTSTR (root->name, fp);
     number of classes written.  */
  
  int
 -dump_tree (fp, root)
 -     FILE *fp;
 -     struct sym *root;
 +dump_tree (FILE *fp, struct sym *root)
  {
    struct link *lk;
    unsigned n = 0;
  /* Dump the entire class tree to file FP.  */
  
  void
 -dump_roots (fp)
 -     FILE *fp;
 +dump_roots (FILE *fp)
  {
    int i, n = 0;
    struct sym *r;
@@@ -1437,7 -1521,7 +1437,7 @@@ do {                                            
     input buffer not consumed.  */
  
  int
 -process_pp_line ()
 +process_pp_line (void)
  {
    int in_comment = 0, in_string = 0;
    int c;
  /* Value is the next token from the input buffer.  */
  
  int
 -yylex ()
 +yylex (void)
  {
    int c;
    char end_char;
@@@ -1930,7 -2014,7 +1930,7 @@@ static char *matching_regexp_buffer, *m
     shorter than min_regexp.  */
  
  char *
 -matching_regexp ()
 +matching_regexp (void)
  {
    char *p;
    char *s;
  
  /* Return a printable representation of token T.  */
  
 -char *
 -token_string (t)
 -     int t;
 +const char *
 +token_string (int t)
  {
    static char b[3];
  
  /* Reinitialize the scanner for a new input file.  */
  
  void
 -re_init_scanner ()
 +re_init_scanner (void)
  {
    in = inbuffer;
    yyline = 1;
     table.  */
  
  void
 -insert_keyword (name, tk)
 -     char *name;
 -     int tk;
 +insert_keyword (const char *name, int tk)
  {
 -  char *s;
 +  const char *s;
    unsigned h = 0;
    struct kw *k = (struct kw *) xmalloc (sizeof *k);
  
     character class vectors and fills the keyword hash table.  */
  
  void
 -init_scanner ()
 +init_scanner (void)
  {
    int i;
  
     the current lookahead token after skipping.  */
  
  int
 -skip_to (token)
 -     int token;
 +skip_to (int token)
  {
    while (!LOOKING_AT2 (YYEOF, token))
      MATCH ();
     angle brackets, curly brackets) matching the current lookahead.  */
  
  void
 -skip_matching ()
 +skip_matching (void)
  {
    int open, close, n;
  
  }
  
  void
 -skip_initializer ()
 +skip_initializer (void)
  {
    for (;;)
      {
  /* Build qualified namespace alias (A::B::c) and return it. */
  
  struct link *
 -match_qualified_namespace_alias ()
 +match_qualified_namespace_alias (void)
  {
    struct link *head = NULL;
    struct link *cur = NULL;
          {
          case IDENT:
            tmp = (struct link *) xmalloc (sizeof *cur);
 -          tmp->sym = find_namespace (yytext, cur);
 +          tmp->sym = find_namespace (yytext, cur ? cur->sym : NULL);
            tmp->next = NULL;
            if (head)
              {
  /* Re-initialize the parser by resetting the lookahead token.  */
  
  void
 -re_init_parser ()
 +re_init_parser (void)
  {
    tk = -1;
  }
     distinguish between overloaded functions.  */
  
  unsigned
 -parm_list (flags)
 -     int *flags;
 +parm_list (int *flags)
  {
    unsigned hash = 0;
    int type_seen = 0;
  /* Print position info to stdout.  */
  
  void
 -print_info ()
 +print_info (void)
  {
    if (info_position >= 0 && BUFFER_POS () <= info_position)
      if (info_cls)
     public).  */
  
  void
 -member (cls, vis)
 -     struct sym *cls;
 -     int vis;
 +member (struct sym *cls, int vis)
  {
    char *id = NULL;
    int sc = SC_MEMBER;
     union, class).  */
  
  void
 -class_body (cls, tag)
 -     struct sym *cls;
 -     int tag;
 +class_body (struct sym *cls, int tag)
  {
    int vis = tag == CLASS ? PRIVATE : PUBLIC;
    int temp;
     symbol for that class.  */
  
  struct sym *
 -parse_classname ()
 +parse_classname (void)
  {
    struct sym *last_class = NULL;
  
     a static buffer holding the constructed operator name string.  */
  
  char *
 -operator_name (sc)
 -     int *sc;
 +operator_name (int *sc)
  {
    static int id_size = 0;
    static char *id = NULL;
 -  char *s;
 +  const char *s;
    int len;
  
    MATCH ();
     symbol structure for the ident.  */
  
  struct sym *
 -parse_qualified_ident_or_type (last_id)
 -     char **last_id;
 +parse_qualified_ident_or_type (char **last_id)
  {
    struct sym *cls = NULL;
    char *id = NULL;
     symbol structure for the ident.  */
  
  void
 -parse_qualified_param_ident_or_type (last_id)
 -     char **last_id;
 +parse_qualified_param_ident_or_type (char **last_id)
  {
    struct sym *cls = NULL;
    static char *id = NULL;
     Current lookahead is the class name.  */
  
  void
 -class_definition (containing, tag, flags, nested)
 -     struct sym *containing;
 -     int tag;
 -     int flags;
 -     int nested;
 +class_definition (struct sym *containing, int tag, int flags, int nested)
  {
    struct sym *current;
    struct sym *base_class;
     information about the member (see the F_* defines).  */
  
  void
 -add_declarator (cls, id, flags, sc)
 -     struct sym **cls;
 -     char **id;
 -     int flags, sc;
 +add_declarator (struct sym **cls, char **id, int flags, int sc)
  {
    if (LOOKING_AT2 (';', ','))
      {
  /* Parse a declaration.  */
  
  void
 -declaration (flags)
 -     int flags;
 +declaration (int flags)
  {
    char *id = NULL;
    struct sym *cls = NULL;
     otherwise.  */
  
  int
 -globals (start_flags)
 -     int start_flags;
 +globals (int start_flags)
  {
    int anonymous;
    int class_tk;
  /* Parse the current input file.  */
  
  void
 -yyparse ()
 +yyparse (void)
  {
    while (globals (0) == 0)
      MATCH_IF ('}');
     input files.  */
  
  void
 -add_search_path (path_list)
 -     char *path_list;
 +add_search_path (char *path_list)
  {
    while (*path_list)
      {
     unchanged file name.  */
  
  FILE *
 -open_file (file)
 -     char *file;
 +open_file (char *file)
  {
    FILE *fp = NULL;
    static char *buffer;
@@@ -3559,7 -3666,8 +3559,7 @@@ Usage: ebrowse [options] {files}\n
  "
  
  void
 -usage (error)
 -     int error;
 +usage (int error)
  {
    puts (USAGE);
    exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
  #endif
  
  void
 -version ()
 +version (void)
  {
    /* Makes it easier to update automatically. */
-   char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
+   char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc.";
  
    printf ("ebrowse %s\n", VERSION);
    puts (emacs_copyright);
     table.  */
  
  void
 -process_file (file)
 -     char *file;
 +process_file (char *file)
  {
    FILE *fp;
  
     is null when EOF is reached.  */
  
  char *
 -read_line (fp)
 -     FILE *fp;
 +read_line (FILE *fp)
  {
    static char *buffer;
    static int buffer_size;
  /* Main entry point.  */
  
  int
 -main (argc, argv)
 -     int argc;
 -     char **argv;
 +main (int argc, char **argv)
  {
    int i;
    int any_inputfiles = 0;
 -  static char *out_filename = DEFAULT_OUTFILE;
 +  static const char *out_filename = DEFAULT_OUTFILE;
    static char **input_filenames = NULL;
    static int input_filenames_size = 0;
    static int n_input_files;
    return EXIT_SUCCESS;
  }
  
- /* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8
-    (do not change this comment) */
  /* ebrowse.c ends here */
diff --combined lib-src/etags.c
index abc8b06dd8e67a11293e35b0cbddfa52f9d253aa,da43b89e40a831cd4a6edf4b08e93091495a4747..f06e714c04136b7673fd1a8f779f44dbb0b05592
@@@ -29,8 -29,8 +29,8 @@@ IF ADVISED OF THE POSSIBILITY OF SUCH D
  
  
  Copyright (C) 1984, 1987, 1988, 1989, 1993, 1994, 1995, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-   Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+   2011  Free Software Foundation, Inc.
  
  This file is not considered part of GNU Emacs.
  
@@@ -100,10 -100,15 +100,10 @@@ char pot_etags_version[] = "@(#) pot re
  # ifndef PTR                  /* for XEmacs */
  #   define PTR void *
  # endif
 -# ifndef __P                  /* for XEmacs */
 -#   define __P(args) args
 -# endif
  #else  /* no config.h */
  # if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C))
 -#   define __P(args) args     /* use prototypes */
  #   define PTR void *         /* for generic pointers */
  # else /* not standard C */
 -#   define __P(args) ()               /* no prototypes */
  #   define const              /* remove const for old compilers' sake */
  #   define PTR long *         /* don't use void* */
  # endif
  #  include <stdlib.h>
  #  include <string.h>
  # else /* no standard C headers */
 -   extern char *getenv __P((const char *));
 -   extern char *strcpy __P((char *, const char *));
 -   extern char *strncpy __P((char *, const char *, unsigned long));
 -   extern char *strcat __P((char *, const char *));
 -   extern char *strncat __P((char *, const char *, unsigned long));
 -   extern int strcmp __P((const char *, const char *));
 -   extern int strncmp __P((const char *, const char *, unsigned long));
 -   extern int system __P((const char *));
 -   extern unsigned long strlen __P((const char *));
 -   extern void *malloc __P((unsigned long));
 -   extern void *realloc __P((void *, unsigned long));
 -   extern void exit __P((int));
 -   extern void free __P((void *));
 -   extern void *memmove __P((void *, const void *, unsigned long));
 +   extern char *getenv (const char *);
 +   extern char *strcpy (char *, const char *);
 +   extern char *strncpy (char *, const char *, unsigned long);
 +   extern char *strcat (char *, const char *);
 +   extern char *strncat (char *, const char *, unsigned long);
 +   extern int strcmp (const char *, const char *);
 +   extern int strncmp (const char *, const char *, unsigned long);
 +   extern int system (const char *);
 +   extern unsigned long strlen (const char *);
 +   extern void *malloc (unsigned long);
 +   extern void *realloc (void *, unsigned long);
 +   extern void exit (int);
 +   extern void free (void *);
 +   extern void *memmove (void *, const void *, unsigned long);
  #  define EXIT_SUCCESS        0
  #  define EXIT_FAILURE        1
  # endif
  #include <stdio.h>
  #include <ctype.h>
  #include <errno.h>
 -#ifndef errno
 -  extern int errno;
 -#endif
  #include <sys/types.h>
  #include <sys/stat.h>
  
@@@ -268,22 -276,22 +268,22 @@@ If you want regular expression support
  
  #define bool int
  
 -typedef void Lang_function __P((FILE *));
 +typedef void Lang_function (FILE *);
  
  typedef struct
  {
 -  char *suffix;                       /* file name suffix for this compressor */
 -  char *command;              /* takes one arg and decompresses to stdout */
 +  const char *suffix;           /* file name suffix for this compressor */
 +  const char *command;                /* takes one arg and decompresses to stdout */
  } compressor;
  
  typedef struct
  {
 -  char *name;                 /* language name */
 -  char *help;                   /* detailed help for the language */
 +  const char *name;             /* language name */
 +  const char *help;           /* detailed help for the language */
    Lang_function *function;    /* parse function */
 -  char **suffixes;            /* name suffixes of this language's files */
 -  char **filenames;           /* names of this language's files */
 -  char **interpreters;                /* interpreters for this language */
 +  const char **suffixes;        /* name suffixes of this language's files */
 +  const char **filenames;       /* names of this language's files */
 +  const char **interpreters;    /* interpreters for this language */
    bool metasource;            /* source used to generate other sources */
  } language;
  
@@@ -304,7 -312,7 +304,7 @@@ typedef struct node_s
  {                             /* sorting structure */
    struct node_st *left, *right;       /* left and right sons */
    fdesc *fdp;                 /* description of file to whom tag belongs */
 -  char *name;                 /* tag name */
 +  char *name;                         /* tag name */
    char *regex;                        /* search regexp */
    bool valid;                 /* write this tag on the tag file */
    bool is_func;                       /* function tag: use regexp in CTAGS mode */
@@@ -360,87 -368,87 +360,87 @@@ typedef struct regex
  /* Many compilers barf on this:
        Lang_function Ada_funcs;
     so let's write it this way */
 -static void Ada_funcs __P((FILE *));
 -static void Asm_labels __P((FILE *));
 -static void C_entries __P((int c_ext, FILE *));
 -static void default_C_entries __P((FILE *));
 -static void plain_C_entries __P((FILE *));
 -static void Cjava_entries __P((FILE *));
 -static void Cobol_paragraphs __P((FILE *));
 -static void Cplusplus_entries __P((FILE *));
 -static void Cstar_entries __P((FILE *));
 -static void Erlang_functions __P((FILE *));
 -static void Forth_words __P((FILE *));
 -static void Fortran_functions __P((FILE *));
 -static void HTML_labels __P((FILE *));
 -static void Lisp_functions __P((FILE *));
 -static void Lua_functions __P((FILE *));
 -static void Makefile_targets __P((FILE *));
 -static void Pascal_functions __P((FILE *));
 -static void Perl_functions __P((FILE *));
 -static void PHP_functions __P((FILE *));
 -static void PS_functions __P((FILE *));
 -static void Prolog_functions __P((FILE *));
 -static void Python_functions __P((FILE *));
 -static void Scheme_functions __P((FILE *));
 -static void TeX_commands __P((FILE *));
 -static void Texinfo_nodes __P((FILE *));
 -static void Yacc_entries __P((FILE *));
 -static void just_read_file __P((FILE *));
 -
 -static void print_language_names __P((void));
 -static void print_version __P((void));
 -static void print_help __P((argument *));
 -int main __P((int, char **));
 -
 -static compressor *get_compressor_from_suffix __P((char *, char **));
 -static language *get_language_from_langname __P((const char *));
 -static language *get_language_from_interpreter __P((char *));
 -static language *get_language_from_filename __P((char *, bool));
 -static void readline __P((linebuffer *, FILE *));
 -static long readline_internal __P((linebuffer *, FILE *));
 -static bool nocase_tail __P((char *));
 -static void get_tag __P((char *, char **));
 -
 -static void analyse_regex __P((char *));
 -static void free_regexps __P((void));
 -static void regex_tag_multiline __P((void));
 -static void error __P((const char *, const char *));
 -static void suggest_asking_for_help __P((void));
 -void fatal __P((char *, char *));
 -static void pfatal __P((char *));
 -static void add_node __P((node *, node **));
 -
 -static void init __P((void));
 -static void process_file_name __P((char *, language *));
 -static void process_file __P((FILE *, char *, language *));
 -static void find_entries __P((FILE *));
 -static void free_tree __P((node *));
 -static void free_fdesc __P((fdesc *));
 -static void pfnote __P((char *, bool, char *, int, int, long));
 -static void make_tag __P((char *, int, bool, char *, int, int, long));
 -static void invalidate_nodes __P((fdesc *, node **));
 -static void put_entries __P((node *));
 -
 -static char *concat __P((char *, char *, char *));
 -static char *skip_spaces __P((char *));
 -static char *skip_non_spaces __P((char *));
 -static char *savenstr __P((char *, int));
 -static char *savestr __P((char *));
 -static char *etags_strchr __P((const char *, int));
 -static char *etags_strrchr __P((const char *, int));
 -static int etags_strcasecmp __P((const char *, const char *));
 -static int etags_strncasecmp __P((const char *, const char *, int));
 -static char *etags_getcwd __P((void));
 -static char *relative_filename __P((char *, char *));
 -static char *absolute_filename __P((char *, char *));
 -static char *absolute_dirname __P((char *, char *));
 -static bool filename_is_absolute __P((char *f));
 -static void canonicalize_filename __P((char *));
 -static void linebuffer_init __P((linebuffer *));
 -static void linebuffer_setlen __P((linebuffer *, int));
 -static PTR xmalloc __P((unsigned int));
 -static PTR xrealloc __P((char *, unsigned int));
 +static void Ada_funcs (FILE *);
 +static void Asm_labels (FILE *);
 +static void C_entries (int c_ext, FILE *);
 +static void default_C_entries (FILE *);
 +static void plain_C_entries (FILE *);
 +static void Cjava_entries (FILE *);
 +static void Cobol_paragraphs (FILE *);
 +static void Cplusplus_entries (FILE *);
 +static void Cstar_entries (FILE *);
 +static void Erlang_functions (FILE *);
 +static void Forth_words (FILE *);
 +static void Fortran_functions (FILE *);
 +static void HTML_labels (FILE *);
 +static void Lisp_functions (FILE *);
 +static void Lua_functions (FILE *);
 +static void Makefile_targets (FILE *);
 +static void Pascal_functions (FILE *);
 +static void Perl_functions (FILE *);
 +static void PHP_functions (FILE *);
 +static void PS_functions (FILE *);
 +static void Prolog_functions (FILE *);
 +static void Python_functions (FILE *);
 +static void Scheme_functions (FILE *);
 +static void TeX_commands (FILE *);
 +static void Texinfo_nodes (FILE *);
 +static void Yacc_entries (FILE *);
 +static void just_read_file (FILE *);
 +
 +static void print_language_names (void);
 +static void print_version (void);
 +static void print_help (argument *);
 +int main (int, char **);
 +
 +static compressor *get_compressor_from_suffix (char *, char **);
 +static language *get_language_from_langname (const char *);
 +static language *get_language_from_interpreter (char *);
 +static language *get_language_from_filename (char *, bool);
 +static void readline (linebuffer *, FILE *);
 +static long readline_internal (linebuffer *, FILE *);
 +static bool nocase_tail (const char *);
 +static void get_tag (char *, char **);
 +
 +static void analyse_regex (char *);
 +static void free_regexps (void);
 +static void regex_tag_multiline (void);
 +static void error (const char *, const char *);
 +static void suggest_asking_for_help (void) NO_RETURN;
 +void fatal (const char *, const char *) NO_RETURN;
 +static void pfatal (const char *) NO_RETURN;
 +static void add_node (node *, node **);
 +
 +static void init (void);
 +static void process_file_name (char *, language *);
 +static void process_file (FILE *, char *, language *);
 +static void find_entries (FILE *);
 +static void free_tree (node *);
 +static void free_fdesc (fdesc *);
 +static void pfnote (char *, bool, char *, int, int, long);
 +static void make_tag (const char *, int, bool, char *, int, int, long);
 +static void invalidate_nodes (fdesc *, node **);
 +static void put_entries (node *);
 +
 +static char *concat (const char *, const char *, const char *);
 +static char *skip_spaces (char *);
 +static char *skip_non_spaces (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 int etags_strcasecmp (const char *, const char *);
 +static int etags_strncasecmp (const char *, const char *, int);
 +static char *etags_getcwd (void);
 +static char *relative_filename (char *, char *);
 +static char *absolute_filename (char *, char *);
 +static char *absolute_dirname (char *, char *);
 +static bool filename_is_absolute (char *f);
 +static void canonicalize_filename (char *);
 +static void linebuffer_init (linebuffer *);
 +static void linebuffer_setlen (linebuffer *, int);
 +static PTR xmalloc (unsigned int);
 +static PTR xrealloc (char *, unsigned int);
  
  \f
  static char searchar = '/';   /* use /.../ searches */
@@@ -469,7 -477,7 +469,7 @@@ static linebuffer token_name;      /* a buff
  
  /* boolean "functions" (see init)     */
  static bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS];
 -static char
 +static const char
    /* white chars */
    *white = " \f\t\n\r\v",
    /* not in a name */
@@@ -561,7 -569,6 +561,7 @@@ static compressor compressors[] 
    { "gz", "gzip -d -c"},
    { "GZ", "gzip -d -c"},
    { "bz2", "bzip2 -d -c" },
 +  { "xz", "xz -d -c" },
    { NULL }
  };
  
   */
  
  /* Ada code */
 -static char *Ada_suffixes [] =
 +static const char *Ada_suffixes [] =
    { "ads", "adb", "ada", NULL };
 -static char Ada_help [] =
 +static const char Ada_help [] =
  "In Ada code, functions, procedures, packages, tasks and types are\n\
  tags.  Use the `--packages-only' option to create tags for\n\
  packages only.\n\
@@@ -590,7 -597,7 +590,7 @@@ body of the package `bidule', while `M-
  will just search for any tag `bidule'.";
  
  /* Assembly code */
 -static char *Asm_suffixes [] =
 +static const char *Asm_suffixes [] =
    { "a",      /* Unix assembler */
      "asm", /* Microcontroller assembly */
      "def", /* BSO/Tasking definition includes  */
      "src", /* BSO/Tasking C compiler output */
      NULL
    };
 -static char Asm_help [] =
 +static const char Asm_help [] =
  "In assembler code, labels appearing at the beginning of a line,\n\
  followed by a colon, are tags.";
  
  /* Note that .c and .h can be considered C++, if the --c++ flag was
     given, or if the `class' or `template' keywords are met inside the file.
     That is why default_C_entries is called for these. */
 -static char *default_C_suffixes [] =
 +static const char *default_C_suffixes [] =
    { "c", "h", NULL };
  #if CTAGS                             /* C help for Ctags */
 -static char default_C_help [] =
 +static const char default_C_help [] =
  "In C code, any C function is a tag.  Use -t to tag typedefs.\n\
  Use -T to tag definitions of `struct', `union' and `enum'.\n\
  Use -d to tag `#define' macro definitions and `enum' constants.\n\
@@@ -620,7 -627,7 +620,7 @@@ Use --globals to tag global variables.\
  You can tag function declarations and external variables by\n\
  using `--declarations', and struct members by using `--members'.";
  #else                                 /* C help for Etags */
 -static char default_C_help [] =
 +static const char default_C_help [] =
  "In C code, any C function or typedef is a tag, and so are\n\
  definitions of `struct', `union' and `enum'.  `#define' macro\n\
  definitions and `enum' constants are tags unless you specify\n\
@@@ -632,12 -639,12 +632,12 @@@ You can tag function declarations and e
  using `--declarations'.";
  #endif        /* C help for Ctags and Etags */
  
 -static char *Cplusplus_suffixes [] =
 +static const char *Cplusplus_suffixes [] =
    { "C", "c++", "cc", "cpp", "cxx", "H", "h++", "hh", "hpp", "hxx",
      "M",                      /* Objective C++ */
      "pdb",                    /* Postscript with C syntax */
      NULL };
 -static char Cplusplus_help [] =
 +static const char Cplusplus_help [] =
  "In C++ code, all the tag constructs of C code are tagged.  (Use\n\
  --help --lang=c --lang=c++ for full help.)\n\
  In addition to C tags, member functions are also recognized.  Member\n\
@@@ -646,131 -653,131 +646,131 @@@ Tags for variables and functions in cla
  and `CLASS::FUNCTION'.  `operator' definitions have tag names like\n\
  `operator+'.";
  
 -static char *Cjava_suffixes [] =
 +static const char *Cjava_suffixes [] =
    { "java", NULL };
  static char Cjava_help [] =
  "In Java code, all the tags constructs of C and C++ code are\n\
  tagged.  (Use --help --lang=c --lang=c++ --lang=java for full help.)";
  
  
 -static char *Cobol_suffixes [] =
 +static const char *Cobol_suffixes [] =
    { "COB", "cob", NULL };
  static char Cobol_help [] =
  "In Cobol code, tags are paragraph names; that is, any word\n\
  starting in column 8 and followed by a period.";
  
 -static char *Cstar_suffixes [] =
 +static const char *Cstar_suffixes [] =
    { "cs", "hs", NULL };
  
 -static char *Erlang_suffixes [] =
 +static const char *Erlang_suffixes [] =
    { "erl", "hrl", NULL };
 -static char Erlang_help [] =
 +static const char Erlang_help [] =
  "In Erlang code, the tags are the functions, records and macros\n\
  defined in the file.";
  
 -char *Forth_suffixes [] =
 +const char *Forth_suffixes [] =
    { "fth", "tok", NULL };
 -static char Forth_help [] =
 +static const char Forth_help [] =
  "In Forth code, tags are words defined by `:',\n\
  constant, code, create, defer, value, variable, buffer:, field.";
  
 -static char *Fortran_suffixes [] =
 +static const char *Fortran_suffixes [] =
    { "F", "f", "f90", "for", NULL };
 -static char Fortran_help [] =
 +static const char Fortran_help [] =
  "In Fortran code, functions, subroutines and block data are tags.";
  
 -static char *HTML_suffixes [] =
 +static const char *HTML_suffixes [] =
    { "htm", "html", "shtml", NULL };
 -static char HTML_help [] =
 +static const char HTML_help [] =
  "In HTML input files, the tags are the `title' and the `h1', `h2',\n\
  `h3' headers.  Also, tags are `name=' in anchors and all\n\
  occurrences of `id='.";
  
 -static char *Lisp_suffixes [] =
 +static const char *Lisp_suffixes [] =
    { "cl", "clisp", "el", "l", "lisp", "LSP", "lsp", "ml", NULL };
 -static char Lisp_help [] =
 +static const char Lisp_help [] =
  "In Lisp code, any function defined with `defun', any variable\n\
  defined with `defvar' or `defconst', and in general the first\n\
  argument of any expression that starts with `(def' in column zero\n\
  is a tag.";
  
 -static char *Lua_suffixes [] =
 +static const char *Lua_suffixes [] =
    { "lua", "LUA", NULL };
 -static char Lua_help [] =
 +static const char Lua_help [] =
  "In Lua scripts, all functions are tags.";
  
 -static char *Makefile_filenames [] =
 +static const char *Makefile_filenames [] =
    { "Makefile", "makefile", "GNUMakefile", "Makefile.in", "Makefile.am", NULL};
 -static char Makefile_help [] =
 +static const char Makefile_help [] =
  "In makefiles, targets are tags; additionally, variables are tags\n\
  unless you specify `--no-globals'.";
  
 -static char *Objc_suffixes [] =
 +static const char *Objc_suffixes [] =
    { "lm",                     /* Objective lex file */
      "m",                      /* Objective C file */
       NULL };
 -static char Objc_help [] =
 +static const char Objc_help [] =
  "In Objective C code, tags include Objective C definitions for classes,\n\
  class categories, methods and protocols.  Tags for variables and\n\
  functions in classes are named `CLASS::VARIABLE' and `CLASS::FUNCTION'.\n\
  (Use --help --lang=c --lang=objc --lang=java for full help.)";
  
 -static char *Pascal_suffixes [] =
 +static const char *Pascal_suffixes [] =
    { "p", "pas", NULL };
 -static char Pascal_help [] =
 +static const char Pascal_help [] =
  "In Pascal code, the tags are the functions and procedures defined\n\
  in the file.";
  /* " // this is for working around an Emacs highlighting bug... */
  
 -static char *Perl_suffixes [] =
 +static const char *Perl_suffixes [] =
    { "pl", "pm", NULL };
 -static char *Perl_interpreters [] =
 +static const char *Perl_interpreters [] =
    { "perl", "@PERL@", NULL };
 -static char Perl_help [] =
 +static const char Perl_help [] =
  "In Perl code, the tags are the packages, subroutines and variables\n\
  defined by the `package', `sub', `my' and `local' keywords.  Use\n\
  `--globals' if you want to tag global variables.  Tags for\n\
  subroutines are named `PACKAGE::SUB'.  The name for subroutines\n\
  defined in the default package is `main::SUB'.";
  
 -static char *PHP_suffixes [] =
 +static const char *PHP_suffixes [] =
    { "php", "php3", "php4", NULL };
 -static char PHP_help [] =
 +static const char PHP_help [] =
  "In PHP code, tags are functions, classes and defines.  Unless you use\n\
  the `--no-members' option, vars are tags too.";
  
 -static char *plain_C_suffixes [] =
 +static const char *plain_C_suffixes [] =
    { "pc",                     /* Pro*C file */
       NULL };
  
 -static char *PS_suffixes [] =
 +static const char *PS_suffixes [] =
    { "ps", "psw", NULL };      /* .psw is for PSWrap */
 -static char PS_help [] =
 +static const char PS_help [] =
  "In PostScript code, the tags are the functions.";
  
 -static char *Prolog_suffixes [] =
 +static const char *Prolog_suffixes [] =
    { "prolog", NULL };
 -static char Prolog_help [] =
 +static const char Prolog_help [] =
  "In Prolog code, tags are predicates and rules at the beginning of\n\
  line.";
  
 -static char *Python_suffixes [] =
 +static const char *Python_suffixes [] =
    { "py", NULL };
 -static char Python_help [] =
 +static const char Python_help [] =
  "In Python code, `def' or `class' at the beginning of a line\n\
  generate a tag.";
  
  /* Can't do the `SCM' or `scm' prefix with a version number. */
 -static char *Scheme_suffixes [] =
 +static const char *Scheme_suffixes [] =
    { "oak", "sch", "scheme", "SCM", "scm", "SM", "sm", "ss", "t", NULL };
 -static char Scheme_help [] =
 +static const char Scheme_help [] =
  "In Scheme code, tags include anything defined with `def' or with a\n\
  construct whose name starts with `def'.  They also include\n\
  variables set with `set!' at top level in the file.";
  
 -static char *TeX_suffixes [] =
 +static const char *TeX_suffixes [] =
    { "bib", "clo", "cls", "ltx", "sty", "TeX", "tex", NULL };
 -static char TeX_help [] =
 +static const char TeX_help [] =
  "In LaTeX text, the argument of any of the commands `\\chapter',\n\
  `\\section', `\\subsection', `\\subsubsection', `\\eqno', `\\label',\n\
  `\\ref', `\\cite', `\\bibitem', `\\part', `\\appendix', `\\entry',\n\
@@@ -782,28 -789,28 +782,28 @@@ Other commands can be specified by sett
       TEXTAGS=\"mycommand:myothercommand\".";
  
  
 -static char *Texinfo_suffixes [] =
 +static const char *Texinfo_suffixes [] =
    { "texi", "texinfo", "txi", NULL };
 -static char Texinfo_help [] =
 +static const char Texinfo_help [] =
  "for texinfo files, lines starting with @node are tagged.";
  
 -static char *Yacc_suffixes [] =
 +static const char *Yacc_suffixes [] =
    { "y", "y++", "ym", "yxx", "yy", NULL }; /* .ym is Objective yacc file */
 -static char Yacc_help [] =
 +static const char Yacc_help [] =
  "In Bison or Yacc input files, each rule defines as a tag the\n\
  nonterminal it constructs.  The portions of the file that contain\n\
  C code are parsed as C code (use --help --lang=c --lang=yacc\n\
  for full help).";
  
 -static char auto_help [] =
 +static const char auto_help [] =
  "`auto' is not a real language, it indicates to use\n\
  a default language for files base on file name suffix and file contents.";
  
 -static char none_help [] =
 +static const char none_help [] =
  "`none' is not a real language, it indicates to only do\n\
  regexp processing on files.";
  
 -static char no_lang_help [] =
 +static const char no_lang_help [] =
  "No detailed help available for this language.";
  
  
@@@ -849,10 -856,10 +849,10 @@@ static language lang_names [] 
  
  \f
  static void
 -print_language_names ()
 +print_language_names (void)
  {
    language *lang;
 -  char **name, **ext;
 +  const char **name, **ext;
  
    puts ("\nThese are the currently supported languages, along with the\n\
  default file names and dot suffixes:");
@@@ -875,7 -882,7 +875,7 @@@ followed by the name of an interpreter
  Fortran is tried first; if no tags are found, C is tried next.\n\
  When parsing any C file, a \"class\" or \"template\" keyword\n\
  switches to C++.");
 -  puts ("Compressed files are supported using gzip and bzip2.\n\
 +  puts ("Compressed files are supported using gzip, bzip2, and xz.\n\
  \n\
  For detailed help on a given language use, for example,\n\
  etags --help --lang=ada.");
  # define VERSION "17.38.1.4"
  #endif
  static void
 -print_version ()
 +print_version (void)
  {
    /* Makes it easier to update automatically. */
-   char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc.";
+   char emacs_copyright[] = "Copyright (C) 2011 Free Software Foundation, Inc.";
  
    printf ("%s (%s %s)\n", (CTAGS) ? "ctags" : "etags", EMACS_NAME, VERSION);
    puts (emacs_copyright);
  #endif
  
  static void
 -print_help (argbuffer)
 -     argument *argbuffer;
 +print_help (argument *argbuffer)
  {
    bool help_for_lang = FALSE;
  
@@@ -1082,7 -1090,9 +1082,7 @@@ Relative ones are stored relative to th
  
  \f
  int
 -main (argc, argv)
 -     int argc;
 -     char *argv[];
 +main (int argc, char **argv)
  {
    int i;
    unsigned int nincluded_files;
   * Idea by Vladimir Alexiev <vladimir@cs.ualberta.ca> (1998)
   */
  static compressor *
 -get_compressor_from_suffix (file, extptr)
 -     char *file;
 -     char **extptr;
 +get_compressor_from_suffix (char *file, char **extptr)
  {
    compressor *compr;
    char *slash, *suffix;
   * Return a language given the name.
   */
  static language *
 -get_language_from_langname (name)
 -     const char *name;
 +get_language_from_langname (const char *name)
  {
    language *lang;
  
   * Return a language given the interpreter name.
   */
  static language *
 -get_language_from_interpreter (interpreter)
 -     char *interpreter;
 +get_language_from_interpreter (char *interpreter)
  {
    language *lang;
 -  char **iname;
 +  const char **iname;
  
    if (interpreter == NULL)
      return NULL;
   * Return a language given the file name.
   */
  static language *
 -get_language_from_filename (file, case_sensitive)
 -     char *file;
 -     bool case_sensitive;
 +get_language_from_filename (char *file, int case_sensitive)
  {
    language *lang;
 -  char **name, **ext, *suffix;
 +  const char **name, **ext, *suffix;
  
    /* Try whole file name first. */
    for (lang = lang_names; lang->name != NULL; lang++)
   * This routine is called on each file argument.
   */
  static void
 -process_file_name (file, lang)
 -     char *file;
 -     language *lang;
 +process_file_name (char *file, language *lang)
  {
    struct stat stat_buf;
    FILE *inf;
  }
  
  static void
 -process_file (fh, fn, lang)
 -     FILE *fh;
 -     char *fn;
 -     language *lang;
 +process_file (FILE *fh, char *fn, language *lang)
  {
    static const fdesc emptyfdesc;
    fdesc *fdp;
   * of a char is TRUE if it is the string "white", else FALSE.
   */
  static void
 -init ()
 +init (void)
  {
 -  register char *sp;
 +  register const char *sp;
    register int i;
  
    for (i = 0; i < CHARS; i++)
   * which finds the function and type definitions.
   */
  static void
 -find_entries (inf)
 -     FILE *inf;
 +find_entries (FILE *inf)
  {
    char *cp;
    language *lang = curfdp->lang;
   * etags.el needs to use the same characters that are in NONAM.
   */
  static void
 -make_tag (name, namelen, is_func, linestart, linelen, lno, cno)
 -     char *name;              /* tag name, or NULL if unnamed */
 -     int namelen;             /* tag length */
 -     bool is_func;            /* tag is a function */
 -     char *linestart;         /* start of the line where tag is */
 -     int linelen;             /* length of the line where tag is */
 -     int lno;                 /* line number */
 -     long cno;                        /* character number */
 +make_tag (const char *name,   /* tag name, or NULL if unnamed */
 +        int namelen,          /* tag length */
 +        int is_func,          /* tag is a function */
 +        char *linestart,      /* start of the line where tag is */
 +        int linelen,          /* length of the line where tag is */
 +        int lno,              /* line number */
 +        long int cno)         /* character number */
  {
    bool named = (name != NULL && namelen > 0);
 +  char *nname = NULL;
  
    if (!CTAGS && named)                /* maybe set named to false */
      /* Let's try to make an implicit tag name, that is, create an unnamed tag
         such that etags.el can guess a name from it. */
      {
        int i;
 -      register char *cp = name;
 +      register const char *cp = name;
  
        for (i = 0; i < namelen; i++)
        if (notinname (*cp++))
      }
  
    if (named)
 -    name = savenstr (name, namelen);
 -  else
 -    name = NULL;
 -  pfnote (name, is_func, linestart, linelen, lno, cno);
 +    nname = savenstr (name, namelen);
 +
 +  pfnote (nname, is_func, linestart, linelen, lno, cno);
  }
  
  /* Record a tag. */
  static void
 -pfnote (name, is_func, linestart, linelen, lno, cno)
 -     char *name;              /* tag name, or NULL if unnamed */
 -     bool is_func;            /* tag is a function */
 -     char *linestart;         /* start of the line where tag is */
 -     int linelen;             /* length of the line where tag is */
 -     int lno;                 /* line number */
 -     long cno;                        /* character number */
 +pfnote (char *name, int is_func, char *linestart, int linelen, int lno, long int cno)
 +                              /* tag name, or NULL if unnamed */
 +                              /* tag is a function */
 +                              /* start of the line where tag is */
 +                              /* length of the line where tag is */
 +                              /* line number */
 +                                      /* character number */
  {
    register node *np;
  
   *    recurse on left children, iterate on right children.
   */
  static void
 -free_tree (np)
 -     register node *np;
 +free_tree (register node *np)
  {
    while (np)
      {
   *    delete a file description
   */
  static void
 -free_fdesc (fdp)
 -     register fdesc *fdp;
 +free_fdesc (register fdesc *fdp)
  {
    free (fdp->infname);
    free (fdp->infabsname);
   *    maintain state.
   */
  static void
 -add_node (np, cur_node_p)
 -     node *np, **cur_node_p;
 +add_node (node *np, node **cur_node_p)
  {
    register int dif;
    register node *cur_node = *cur_node_p;
   *    given file description (CTAGS case) or free them (ETAGS case).
   */
  static void
 -invalidate_nodes (badfdp, npp)
 -     fdesc *badfdp;
 -     node **npp;
 +invalidate_nodes (fdesc *badfdp, node **npp)
  {
    node *np = *npp;
  
  }
  
  \f
 -static int total_size_of_entries __P((node *));
 -static int number_len __P((long));
 +static int total_size_of_entries (node *);
 +static int number_len (long);
  
  /* Length of a non-negative number's decimal representation. */
  static int
 -number_len (num)
 -     long num;
 +number_len (long int num)
  {
    int len = 1;
    while ((num /= 10) > 0)
   * but is still supplied for backward compatibility.
   */
  static int
 -total_size_of_entries (np)
 -     register node *np;
 +total_size_of_entries (register node *np)
  {
    register int total = 0;
  
  }
  
  static void
 -put_entries (np)
 -     register node *np;
 +put_entries (register node *np)
  {
    register char *sp;
    static fdesc *fdp = NULL;
@@@ -2302,9 -2333,9 +2302,9 @@@ enum sym_typ
    st_C_struct, st_C_extern, st_C_enum, st_C_define, st_C_typedef
  };
  
 -static unsigned int hash __P((const char *, unsigned int));
 -static struct C_stab_entry * in_word_set __P((const char *, unsigned int));
 -static enum sym_type C_symtype __P((char *, int, int));
 +static unsigned int hash (const char *, unsigned int);
 +static struct C_stab_entry * in_word_set (const char *, unsigned int);
 +static enum sym_type C_symtype (char *, int, int);
  
  /* Feed stuff between (but not including) %[ and %] lines to:
       gperf -m 5
@@@ -2361,7 -2392,7 +2361,7 @@@ and replace lines between %< and %> wit
  /* Command-line: gperf -m 5  */
  /* Computed positions: -k'2-3' */
  
 -struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
 +struct C_stab_entry { const char *name; int c_ext; enum sym_type type; };
  /* maximum key range = 33, duplicates = 0 */
  
  #ifdef __GNUC__
@@@ -2372,7 -2403,9 +2372,7 @@@ inlin
  #endif
  #endif
  static unsigned int
 -hash (str, len)
 -     register const char *str;
 -     register unsigned int len;
 +hash (register const char *str, register unsigned int len)
  {
    static unsigned char asso_values[] =
      {
  }
  
  static struct C_stab_entry *
 -in_word_set (str, len)
 -     register const char *str;
 -     register unsigned int len;
 +in_word_set (register const char *str, register unsigned int len)
  {
    enum
      {
  /*%>*/
  
  static enum sym_type
 -C_symtype (str, len, c_ext)
 -     char *str;
 -     int len;
 -     int c_ext;
 +C_symtype (char *str, int len, int c_ext)
  {
    register struct C_stab_entry *se = in_word_set (str, len);
  
@@@ -2550,7 -2588,7 +2550,7 @@@ static enu
  /*
   * When objdef is different from onone, objtag is the name of the class.
   */
 -static char *objtag = "<uninited>";
 +static const char *objtag = "<uninited>";
  
  /*
   * Yet another little state machine to deal with preprocessor lines.
@@@ -2611,9 -2649,9 +2611,9 @@@ static struct to
   * Variables and functions for dealing with nested structures.
   * Idea by Mykola Dzyuba <mdzyuba@yahoo.com> (2001)
   */
 -static void pushclass_above __P((int, char *, int));
 -static void popclass_above __P((int));
 -static void write_classname __P((linebuffer *, char *qualifier));
 +static void pushclass_above (int, char *, int);
 +static void popclass_above (int);
 +static void write_classname (linebuffer *, const char *qualifier);
  
  static struct {
    char **cname;                       /* nested class names */
                         && bracelev == cstack.bracelev[nestlev-1] + 1)
  
  static void
 -pushclass_above (bracelev, str, len)
 -     int bracelev;
 -     char *str;
 -     int len;
 +pushclass_above (int bracelev, char *str, int len)
  {
    int nl;
  
  }
  
  static void
 -popclass_above (bracelev)
 -     int bracelev;
 +popclass_above (int bracelev)
  {
    int nl;
  
  }
  
  static void
 -write_classname (cn, qualifier)
 -     linebuffer *cn;
 -     char *qualifier;
 +write_classname (linebuffer *cn, const char *qualifier)
  {
    int i, len;
    int qlen = strlen (qualifier);
  }
  
  \f
 -static bool consider_token __P((char *, int, int, int *, int, int, bool *));
 -static void make_C_tag __P((bool));
 +static bool consider_token (char *, int, int, int *, int, int, bool *);
 +static void make_C_tag (bool);
  
  /*
   * consider_token ()
   */
  
  static bool
 -consider_token (str, len, c, c_extp, bracelev, parlev, is_func_or_var)
 -     register char *str;      /* IN: token pointer */
 -     register int len;                /* IN: token length */
 -     register int c;          /* IN: first char after the token */
 -     int *c_extp;             /* IN, OUT: C extensions mask */
 -     int bracelev;            /* IN: brace level */
 -     int parlev;              /* IN: parenthesis level */
 -     bool *is_func_or_var;    /* OUT: function or variable found */
 +consider_token (register char *str, register int len, register int c, int *c_extp, int bracelev, int parlev, int *is_func_or_var)
 +                              /* IN: token pointer */
 +                                      /* IN: token length */
 +                              /* IN: first char after the token */
 +                              /* IN, OUT: C extensions mask */
 +                              /* IN: brace level */
 +                              /* IN: parenthesis level */
 +                              /* OUT: function or variable found */
  {
    /* When structdef is stagseen, scolonseen, or snone with bracelev > 0,
       structtype is the type of the preceding struct-like keyword, and
@@@ -3057,7 -3101,8 +3057,7 @@@ do {                                                                    
  
  
  static void
 -make_C_tag (isfun)
 -     bool isfun;
 +make_C_tag (int isfun)
  {
    /* This function is never called when token.valid is FALSE, but
       we must protect against invalid input or internal errors. */
   *    C syntax and adds them to the list.
   */
  static void
 -C_entries (c_ext, inf)
 -     int c_ext;                       /* extension of C */
 -     FILE *inf;                       /* input file */
 +C_entries (int c_ext, FILE *inf)
 +                                      /* extension of C */
 +                                      /* input file */
  {
    register char c;            /* latest char read; '\0' for end of line */
    register char *lp;          /* pointer one beyond the character `c' */
    int curndx, newndx;         /* indices for current and new lb */
    register int tokoff;                /* offset in line of start of current token */
    register int toklen;                /* length of current token */
 -  char *qualifier;            /* string used to qualify names */
 +  const char *qualifier;        /* string used to qualify names */
    int qlen;                   /* length of qualifier */
    int bracelev;                       /* current brace level */
    int bracketlev;             /* current bracket level */
   * of a global flag.
   */
  static void
 -default_C_entries (inf)
 -     FILE *inf;
 +default_C_entries (FILE *inf)
  {
    C_entries (cplusplus ? C_PLPL : C_AUTO, inf);
  }
  
  /* Always do plain C. */
  static void
 -plain_C_entries (inf)
 -     FILE *inf;
 +plain_C_entries (FILE *inf)
  {
    C_entries (0, inf);
  }
  
  /* Always do C++. */
  static void
 -Cplusplus_entries (inf)
 -     FILE *inf;
 +Cplusplus_entries (FILE *inf)
  {
    C_entries (C_PLPL, inf);
  }
  
  /* Always do Java. */
  static void
 -Cjava_entries (inf)
 -     FILE *inf;
 +Cjava_entries (FILE *inf)
  {
    C_entries (C_JAVA, inf);
  }
  
  /* Always do C*. */
  static void
 -Cstar_entries (inf)
 -     FILE *inf;
 +Cstar_entries (FILE *inf)
  {
    C_entries (C_STAR, inf);
  }
  
  /* Always do Yacc. */
  static void
 -Yacc_entries (inf)
 -     FILE *inf;
 +Yacc_entries (FILE *inf)
  {
    C_entries (YACC, inf);
  }
   * matching on files that have no language defined.
   */
  static void
 -just_read_file (inf)
 -     FILE *inf;
 +just_read_file (FILE *inf)
  {
    register char *dummy;
  
  \f
  /* Fortran parsing */
  
 -static void F_takeprec __P((void));
 -static void F_getit __P((FILE *));
 +static void F_takeprec (void);
 +static void F_getit (FILE *);
  
  static void
 -F_takeprec ()
 +F_takeprec (void)
  {
    dbp = skip_spaces (dbp);
    if (*dbp != '*')
  }
  
  static void
 -F_getit (inf)
 -     FILE *inf;
 +F_getit (FILE *inf)
  {
    register char *cp;
  
  
  
  static void
 -Fortran_functions (inf)
 -     FILE *inf;
 +Fortran_functions (FILE *inf)
  {
    LOOP_ON_INPUT_LINES (inf, lb, dbp)
      {
   * Philippe Waroquiers (1998)
   */
  
 -static void Ada_getit __P((FILE *, char *));
 -
  /* Once we are positioned after an "interesting" keyword, let's get
     the real tag value necessary. */
  static void
 -Ada_getit (inf, name_qualifier)
 -     FILE *inf;
 -     char *name_qualifier;
 +Ada_getit (FILE *inf, const char *name_qualifier)
  {
    register char *cp;
    char *name;
  }
  
  static void
 -Ada_funcs (inf)
 -     FILE *inf;
 +Ada_funcs (FILE *inf)
  {
    bool inquote = FALSE;
    bool skip_till_semicolumn = FALSE;
   * Idea by Bob Weiner, Motorola Inc. (1994)
   */
  static void
 -Asm_labels (inf)
 -     FILE *inf;
 +Asm_labels (FILE *inf)
  {
    register char *cp;
  
   * Ideas by Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> (2001)
   */
  static void
 -Perl_functions (inf)
 -     FILE *inf;
 +Perl_functions (FILE *inf)
  {
    char *package = savestr ("main"); /* current package name */
    register char *cp;
   * More ideas by seb bacon <seb@jamkit.com> (2002)
   */
  static void
 -Python_functions (inf)
 -     FILE *inf;
 +Python_functions (FILE *inf)
  {
    register char *cp;
  
   * Idea by Diez B. Roggisch (2001)
   */
  static void
 -PHP_functions (inf)
 -     FILE *inf;
 +PHP_functions (FILE *inf)
  {
    register char *cp, *name;
    bool search_identifier = FALSE;
   * Idea by Corny de Souza (1993)
   */
  static void
 -Cobol_paragraphs (inf)
 -     FILE *inf;
 +Cobol_paragraphs (FILE *inf)
  {
    register char *bp, *ep;
  
   * Ideas by Assar Westerlund <assar@sics.se> (2001)
   */
  static void
 -Makefile_targets (inf)
 -     FILE *inf;
 +Makefile_targets (FILE *inf)
  {
    register char *bp;
  
   *  the tag is skipped.
   */
  static void
 -Pascal_functions (inf)
 -     FILE *inf;
 +Pascal_functions (FILE *inf)
  {
    linebuffer tline;           /* mostly copied from C_entries */
    long save_lcno;
   *  look for (def or (DEF, quote or QUOTE
   */
  
 -static void L_getit __P((void));
 +static void L_getit (void);
  
  static void
 -L_getit ()
 +L_getit (void)
  {
    if (*dbp == '\'')           /* Skip prefix quote */
      dbp++;
  }
  
  static void
 -Lisp_functions (inf)
 -     FILE *inf;
 +Lisp_functions (FILE *inf)
  {
    LOOP_ON_INPUT_LINES (inf, lb, dbp)
      {
   *  "function" and "local function" are tags if they start at column 1.
   */
  static void
 -Lua_functions (inf)
 -     FILE *inf;
 +Lua_functions (FILE *inf)
  {
    register char *bp;
  
   *   Masatake Yamato <masata-y@is.aist-nara.ac.jp> (1999)
   */
  static void
 -PS_functions (inf)
 -     FILE *inf;
 +PS_functions (FILE *inf)
  {
    register char *bp, *ep;
  
   * Ideas by Eduardo Horvath <eeh@netbsd.org> (2004)
   */
  static void
 -Forth_words (inf)
 -     FILE *inf;
 +Forth_words (FILE *inf)
  {
    register char *bp;
  
   * Original code by Ken Haase (1985?)
   */
  static void
 -Scheme_functions (inf)
 -     FILE *inf;
 +Scheme_functions (FILE *inf)
  {
    register char *bp;
  
@@@ -4959,13 -5030,13 +4959,13 @@@ static linebuffer *TEX_toktab = NULL; /
  
  /* Default set of control sequences to put into TEX_toktab.
     The value of environment var TEXTAGS is prepended to this.  */
 -static char *TEX_defenv = "\
 +static const char *TEX_defenv = "\
  :chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem\
  :part:appendix:entry:index:def\
  :newcommand:renewcommand:newenvironment:renewenvironment";
  
 -static void TEX_mode __P((FILE *));
 -static void TEX_decode_env __P((char *, char *));
 +static void TEX_mode (FILE *);
 +static void TEX_decode_env (const char *, const char *);
  
  static char TEX_esc = '\\';
  static char TEX_opgrp = '{';
@@@ -4975,7 -5046,8 +4975,7 @@@ static char TEX_clgrp = '}'
   * TeX/LaTeX scanning loop.
   */
  static void
 -TeX_commands (inf)
 -     FILE *inf;
 +TeX_commands (FILE *inf)
  {
    char *cp;
    linebuffer *key;
  /* Figure out whether TeX's escapechar is '\\' or '!' and set grouping
     chars accordingly. */
  static void
 -TEX_mode (inf)
 -     FILE *inf;
 +TEX_mode (FILE *inf)
  {
    int c;
  
  /* Read environment and prepend it to the default string.
     Build token table. */
  static void
 -TEX_decode_env (evarname, defenv)
 -     char *evarname;
 -     char *defenv;
 +TEX_decode_env (const char *evarname, const char *defenv)
  {
 -  register char *env, *p;
 +  register const char *env, *p;
    int i, len;
  
    /* Append default string to environment. */
    if (!env)
      env = defenv;
    else
 -    {
 -      char *oldenv = env;
 -      env = concat (oldenv, defenv, "");
 -    }
 +    env = concat (env, defenv, "");
  
    /* Allocate a token table */
    for (len = 1, p = env; p;)
  \f
  /* Texinfo support.  Dave Love, Mar. 2000.  */
  static void
 -Texinfo_nodes (inf)
 -     FILE * inf;
 +Texinfo_nodes (FILE *inf)
  {
    char *cp, *start;
    LOOP_ON_INPUT_LINES (inf, lb, cp)
   * Francesco Potortì, 2002.
   */
  static void
 -HTML_labels (inf)
 -     FILE * inf;
 +HTML_labels (FILE *inf)
  {
    bool getnext = FALSE;               /* next text outside of HTML tags is a tag */
    bool skiptag = FALSE;               /* skip to the end of the current HTML tag */
   * Original code by Sunichirou Sugou (1989)
   * Rewritten by Anders Lindgren (1996)
   */
 -static int prolog_pr __P((char *, char *));
 -static void prolog_skip_comment __P((linebuffer *, FILE *));
 -static int prolog_atom __P((char *, int));
 +static int prolog_pr (char *, char *);
 +static void prolog_skip_comment (linebuffer *, FILE *);
 +static int prolog_atom (char *, int);
  
  static void
 -Prolog_functions (inf)
 -     FILE *inf;
 +Prolog_functions (FILE *inf)
  {
    char *cp, *last;
    int len;
  
  
  static void
 -prolog_skip_comment (plb, inf)
 -     linebuffer *plb;
 -     FILE *inf;
 +prolog_skip_comment (linebuffer *plb, FILE *inf)
  {
    char *cp;
  
   * header was found.
   */
  static int
 -prolog_pr (s, last)
 -     char *s;
 -     char *last;              /* Name of last clause. */
 +prolog_pr (char *s, char *last)
 +             
 +                              /* Name of last clause. */
  {
    int pos;
    int len;
   *   Backslash quotes everything.
   */
  static int
 -prolog_atom (s, pos)
 -     char *s;
 -     int pos;
 +prolog_atom (char *s, int pos)
  {
    int origpos;
  
   * Assumes that Erlang functions start at column 0.
   * Original code by Anders Lindgren (1996)
   */
 -static int erlang_func __P((char *, char *));
 -static void erlang_attribute __P((char *));
 -static int erlang_atom __P((char *));
 +static int erlang_func (char *, char *);
 +static void erlang_attribute (char *);
 +static int erlang_atom (char *);
  
  static void
 -Erlang_functions (inf)
 -     FILE *inf;
 +Erlang_functions (FILE *inf)
  {
    char *cp, *last;
    int len;
   * was found.
   */
  static int
 -erlang_func (s, last)
 -     char *s;
 -     char *last;              /* Name of last clause. */
 +erlang_func (char *s, char *last)
 +             
 +                              /* Name of last clause. */
  {
    int pos;
    int len;
   * -record(graph, {vtab = notable, cyclic = true}).
   */
  static void
 -erlang_attribute (s)
 -     char *s;
 +erlang_attribute (char *s)
  {
    char *cp = s;
  
   * Return the number of bytes consumed, or -1 if there was an error.
   */
  static int
 -erlang_atom (s)
 -     char *s;
 +erlang_atom (char *s)
  {
    int pos = 0;
  
  }
  
  \f
 -static char *scan_separators __P((char *));
 -static void add_regex __P((char *, language *));
 -static char *substitute __P((char *, char *, struct re_registers *));
 +static char *scan_separators (char *);
 +static void add_regex (char *, language *);
 +static char *substitute (char *, char *, struct re_registers *);
  
  /*
   * Take a string like "/blah/" and turn it into "blah", verifying
   * unterminated regexps.
   */
  static char *
 -scan_separators (name)
 -     char *name;
 +scan_separators (char *name)
  {
    char sep = name[0];
    char *copyto = name;
  /* Look at the argument of --regex or --no-regex and do the right
     thing.  Same for each line of a regexp file. */
  static void
 -analyse_regex (regex_arg)
 -     char *regex_arg;
 +analyse_regex (char *regex_arg)
  {
    if (regex_arg == NULL)
      {
  /* Separate the regexp pattern, compile it,
     and care for optional name and modifiers. */
  static void
 -add_regex (regexp_pattern, lang)
 -     char *regexp_pattern;
 -     language *lang;
 +add_regex (char *regexp_pattern, language *lang)
  {
    static struct re_pattern_buffer zeropattern;
    char sep, *pat, *name, *modifiers;
 +  char empty[] = "";
    const char *err;
    struct re_pattern_buffer *patbuf;
    regexp *rp;
    if (modifiers == NULL)      /* no terminating separator --> no name */
      {
        modifiers = name;
 -      name = "";
 +      name = empty;
      }
    else
      modifiers += 1;           /* skip separator */
   * arguments.
   */
  static char *
 -substitute (in, out, regs)
 -     char *in, *out;
 -     struct re_registers *regs;
 +substitute (char *in, char *out, struct re_registers *regs)
  {
    char *result, *t;
    int size, dig, diglen;
  
  /* Deallocate all regexps. */
  static void
 -free_regexps ()
 +free_regexps (void)
  {
    regexp *rp;
    while (p_head != NULL)
   * Idea by Ben Wing <ben@666.com> (2002).
   */
  static void
 -regex_tag_multiline ()
 +regex_tag_multiline (void)
  {
    char *buffer = filebuf.buffer;
    regexp *rp;
  
  \f
  static bool
 -nocase_tail (cp)
 -     char *cp;
 +nocase_tail (const char *cp)
  {
    register int len = 0;
  
  }
  
  static void
 -get_tag (bp, namepp)
 -     register char *bp;
 -     char **namepp;
 +get_tag (register char *bp, char **namepp)
  {
    register char *cp = bp;
  
   * appended to `filebuf'.
   */
  static long
 -readline_internal (lbp, stream)
 -     linebuffer *lbp;
 -     register FILE *stream;
 +readline_internal (linebuffer *lbp, register FILE *stream)
  {
    char *buffer = lbp->buffer;
    register char *p = lbp->buffer;
   * directives.
   */
  static void
 -readline (lbp, stream)
 -     linebuffer *lbp;
 -     FILE *stream;
 +readline (linebuffer *lbp, FILE *stream)
  {
    long result;
  
   * with xnew where the string CP has been copied.
   */
  static char *
 -savestr (cp)
 -     char *cp;
 +savestr (const char *cp)
  {
    return savenstr (cp, strlen (cp));
  }
   * the string CP has been copied for at most the first LEN characters.
   */
  static char *
 -savenstr (cp, len)
 -     char *cp;
 -     int len;
 +savenstr (const char *cp, int len)
  {
    register char *dp;
  
   * Identical to POSIX strrchr, included for portability.
   */
  static char *
 -etags_strrchr (sp, c)
 -     register const char *sp;
 -     register int c;
 +etags_strrchr (register const char *sp, register int c)
  {
    register const char *r;
  
   * Identical to POSIX strchr, included for portability.
   */
  static char *
 -etags_strchr (sp, c)
 -     register const char *sp;
 -     register int c;
 +etags_strchr (register const char *sp, register int c)
  {
    do
      {
   * Same as BSD's strcasecmp, included for portability.
   */
  static int
 -etags_strcasecmp (s1, s2)
 -     register const char *s1;
 -     register const char *s2;
 +etags_strcasecmp (register const char *s1, register const char *s2)
  {
    while (*s1 != '\0'
         && (ISALPHA (*s1) && ISALPHA (*s2)
   * Same as BSD's strncasecmp, included for portability.
   */
  static int
 -etags_strncasecmp (s1, s2, n)
 -     register const char *s1;
 -     register const char *s2;
 -     register int n;
 +etags_strncasecmp (register const char *s1, register const char *s2, register int n)
  {
    while (*s1 != '\0' && n-- > 0
         && (ISALPHA (*s1) && ISALPHA (*s2)
  
  /* Skip spaces (end of string is not space), return new pointer. */
  static char *
 -skip_spaces (cp)
 -     char *cp;
 +skip_spaces (char *cp)
  {
    while (iswhite (*cp))
      cp++;
  
  /* Skip non spaces, except end of string, return new pointer. */
  static char *
 -skip_non_spaces (cp)
 -     char *cp;
 +skip_non_spaces (char *cp)
  {
    while (*cp != '\0' && !iswhite (*cp))
      cp++;
  
  /* Print error message and exit.  */
  void
 -fatal (s1, s2)
 -     char *s1, *s2;
 +fatal (const char *s1, const char *s2)
  {
    error (s1, s2);
    exit (EXIT_FAILURE);
  }
  
  static void
 -pfatal (s1)
 -     char *s1;
 +pfatal (const char *s1)
  {
    perror (s1);
    exit (EXIT_FAILURE);
  }
  
  static void
 -suggest_asking_for_help ()
 +suggest_asking_for_help (void)
  {
    fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
           progname, NO_LONG_OPTIONS ? "-h" : "--help");
  
  /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
  static void
 -error (s1, s2)
 -     const char *s1, *s2;
 +error (const char *s1, const char *s2)
  {
    fprintf (stderr, "%s: ", progname);
    fprintf (stderr, s1, s2);
  /* Return a newly-allocated string whose contents
     concatenate those of s1, s2, s3.  */
  static char *
 -concat (s1, s2, s3)
 -     char *s1, *s2, *s3;
 +concat (const char *s1, const char *s2, const char *s3)
  {
    int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
    char *result = xnew (len1 + len2 + len3 + 1, char);
  /* Does the same work as the system V getcwd, but does not need to
     guess the buffer size in advance. */
  static char *
 -etags_getcwd ()
 +etags_getcwd (void)
  {
  #ifdef HAVE_GETCWD
    int bufsize = 200;
  /* Return a newly allocated string containing the file name of FILE
     relative to the absolute directory DIR (which should end with a slash). */
  static char *
 -relative_filename (file, dir)
 -     char *file, *dir;
 +relative_filename (char *file, char *dir)
  {
    char *fp, *dp, *afn, *res;
    int i;
  /* Return a newly allocated string containing the absolute file name
     of FILE given DIR (which should end with a slash). */
  static char *
 -absolute_filename (file, dir)
 -     char *file, *dir;
 +absolute_filename (char *file, char *dir)
  {
    char *slashp, *cp, *res;
  
     file name of dir where FILE resides given DIR (which should
     end with a slash). */
  static char *
 -absolute_dirname (file, dir)
 -     char *file, *dir;
 +absolute_dirname (char *file, char *dir)
  {
    char *slashp, *res;
    char save;
  /* Whether the argument string is an absolute file name.  The argument
     string must have been canonicalized with canonicalize_filename. */
  static bool
 -filename_is_absolute (fn)
 -     char *fn;
 +filename_is_absolute (char *fn)
  {
    return (fn[0] == '/'
  #ifdef DOS_NT
  /* Upcase DOS drive letter and collapse separators into single slashes.
     Works in place. */
  static void
 -canonicalize_filename (fn)
 -     register char *fn;
 +canonicalize_filename (register char *fn)
  {
    register char* cp;
    char sep = '/';
  \f
  /* Initialize a linebuffer for use. */
  static void
 -linebuffer_init (lbp)
 -     linebuffer *lbp;
 +linebuffer_init (linebuffer *lbp)
  {
    lbp->size = (DEBUG) ? 3 : 200;
    lbp->buffer = xnew (lbp->size, char);
  
  /* Set the minimum size of a string contained in a linebuffer. */
  static void
 -linebuffer_setlen (lbp, toksize)
 -     linebuffer *lbp;
 -     int toksize;
 +linebuffer_setlen (linebuffer *lbp, int toksize)
  {
    while (lbp->size <= toksize)
      {
  
  /* Like malloc but get fatal error if memory is exhausted. */
  static PTR
 -xmalloc (size)
 -     unsigned int size;
 +xmalloc (unsigned int size)
  {
    PTR result = (PTR) malloc (size);
    if (result == NULL)
  }
  
  static PTR
 -xrealloc (ptr, size)
 -     char *ptr;
 -     unsigned int size;
 +xrealloc (char *ptr, unsigned int size)
  {
    PTR result = (PTR) realloc (ptr, size);
    if (result == NULL)
   * End:
   */
  
- /* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051
-    (do not change this comment) */
  /* etags.c ends here */
diff --combined lisp/ChangeLog
index 8e693845a4ffe844db34c927dcfa3bc88804ff3f,6ec62fe628f94a13981d629a848b9862c5cdcce6..d1bcb77882facef3812d2547eefc2760a8618cf1
 -2011-01-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 -
 -      * files.el (file-local-variables-alist):
 -      Make permanent-local (bug#7767).
 -
 -2011-01-02  Glenn Morris  <rgm@gnu.org>
 -
 -      * version.el (emacs-copyright): Set short copyright year to 2011.
 -
 -2011-01-02  Mark Lillibridge  <mark.lillibridge@hp.com>  (tiny change)
 -
 -      * mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering
 -      an existing temp buffer.  (Bug#7746)
 -
 -2011-01-02  Glenn Morris  <rgm@gnu.org>
 -
 -      * mail/mail-utils.el (mail-mbox-from): Handle From: headers with
 -      multiple addresses.  (Bug#7760)
 -
 -2010-12-31  Michael Albinus  <michael.albinus@gmx.de>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
 -      * net/tramp.el (tramp-methods): Add recursive options to "scpc",
 -      "scpx", "pscp" and "psftp".
 -
 -2010-12-31  Eli Zaretskii  <eliz@gnu.org>
 -
 -      * term/w32-win.el (image-library-alist): Set up correctly for
++      * term/w32-win.el (dynamic-library-alist): Set up correctly for
+       libpng versions both before and after 1.4.0.  (Bug#7716)
 -2010-12-25  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * time.el (display-time-mode): Mention display-time-interval in
+       the doc string.  (Bug#7713)
 -      * simple.el (select-active-regions): Doc fix.  (Bug#7702)
 -
 -2010-12-24  Kenichi Handa  <handa@m17n.org>
++2011-01-02  Kenichi Handa  <handa@m17n.org>
+       * mail/rmailmm.el (rmail-mime-parse): Perform parsing in
+       condition-case and return an error message string if something
+       goes wrong.
+       (rmail-show-mime): Adjust for the above change.  Insert the
+       header by rmail-mime-insert-header.
 -2010-12-24  Kenichi Handa  <handa@m17n.org>
++2011-01-02  Kenichi Handa  <handa@m17n.org>
+       * mail/rmailmm.el: New key bindings for rmail-mime-next-item,
+       rmail-mime-previous-item, and rmail-mime-toggle-hidden.
+       (rmail-mime-mbox-buffer)
+       (rmail-mime-view-buffer, rmail-mime-coding-system): New variables.
+       (rmail-mime-entity): Argument changed.  All codes handling an
+       entity object are changed.
+       (rmail-mime-entity-header, rmail-mime-entity-body): Adjust for
+       the above change.
+       (rmail-mime-entity-children, rmail-mime-entity-handler)
+       (rmail-mime-entity-tagline): New functions.
+       (rmail-mime-message-p): New function.
+       (rmail-mime-save): Bind rmail-mime-mbox-buffer.
+       (rmail-mime-entity-segment, rmail-mime-next-item)
+       (rmail-mime-previous-item, rmail-mime-shown-mode)
+       (rmail-mime-hidden-mode, rmail-mime-raw-mode)
+       (rmail-mime-toggle-raw, rmail-mime-toggle-hidden)
+       (rmail-mime-insert-tagline, rmail-mime-insert-header):
+       New functions.
+       (rmail-mime-text-handler): Call rmail-mime-insert-text.
+       (rmail-mime-insert-decoded-text): New function.
+       (rmail-mime-insert-text): Call rmail-mime-insert-decoded-text.
+       (rmail-mime-insert-image): Argument changed.  Caller changed.
+       (rmail-mime-image): Call rmail-mime-toggle-hidden.
+       (rmail-mime-set-bulk-data): New funciton.
+       (rmail-mime-insert-bulk): Argument changed.
+       (rmail-mime-multipart-handler): Return t.
+       (rmail-mime-process-multipart): Argument changed.
+       Handle "multipart/alternative" here.
+       (rmail-mime-process): Argument changed.
+       (rmail-mime-parse): Bind rmail-mime-mbox-buffer.
+       (rmail-mime-insert): Argument changed.  Handle raw display mode.
+       (rmail-mime): Argument changed.  Handle toggling of raw display
+       mode.
+       (rmail-show-mime): Bind rmail-mime-mbox-buffer and
+       rmail-mime-view-buffer.
+       (rmail-insert-mime-forwarded-message): Likewise.
+       (rmail-search-mime-message): Likewise.  Don't bind rmail-buffer.
+       * mail/rmail.el (rmail-show-message-1): If rmail-enable-mime is
+       non-nil, handle the header in rmail-show-mime-function.
 -2010-12-20  Leo  <sdl.web@gmail.com>
++2011-01-02  Leo  <sdl.web@gmail.com>
 -      * help-fns.el (describe-variable): Fix 2010-12-17 change.
++      * help-fns.el (describe-variable): Fix previous change.
 -2010-12-20  Juri Linkov  <juri@jurta.org>
++2011-01-02  Juri Linkov  <juri@jurta.org>
+       * isearch.el (isearch-lazy-highlight-error): New variable.
+       (isearch-lazy-highlight-new-loop): Compare `isearch-error' and
+       `isearch-lazy-highlight-error'.  Set `isearch-lazy-highlight-error'
+       to the current value of `isearch-error' (Bug#7468).
 -2010-12-17  Chong Yidong  <cyd@stupidchicken.com>
++2011-01-02  Chong Yidong  <cyd@stupidchicken.com>
+       * help-fns.el (describe-variable): Don't emit trailing whitespace
+       (Bug#7511).
 -2010-12-17  Leo  <sdl.web@gmail.com>
 -
 -      * eshell/em-hist.el (eshell-previous-matching-input): Signal error
 -      if point is not behind eshell-last-output-end (Bug#7585).
 -
 -2010-12-16  Chong Yidong  <cyd@stupidchicken.com>
++2011-01-02  Chong Yidong  <cyd@stupidchicken.com>
+       * textmodes/rst.el (rst-compile-pdf-preview)
+       (rst-compile-slides-preview): Use make-temp-file (Bug#7646).
 -2010-12-15  Kevin Gallagher  <Kevin.Gallagher@boeing.com>
++2011-01-02  Kevin Gallagher  <Kevin.Gallagher@boeing.com>
+       * emulation/edt-mapper.el: Override mapping of function keys so
+       that the later call to read-key-sequence works.
 -2010-12-13  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * mail/smtpmail.el (smtpmail-send-it): Write queued mail body with
+       Unix EOLs.  (Bug#7589)
 -2010-12-12  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Leo  <sdl.web@gmail.com>
++
++      * eshell/em-hist.el (eshell-previous-matching-input): Signal error
++      if point is not behind eshell-last-output-end (Bug#7585).
++
++2011-01-02  Stefan Monnier  <monnier@iro.umontreal.ca>
++
++      * files.el (file-local-variables-alist):
++      Make permanent-local (bug#7767).
++
++2011-01-02  Glenn Morris  <rgm@gnu.org>
++
++      * version.el (emacs-copyright): Set short copyright year to 2011.
++
++2011-01-02  Mark Lillibridge  <mark.lillibridge@hp.com>  (tiny change)
++
++      * mail/mail-utils.el (mail-strip-quoted-names): Avoid clobbering
++      an existing temp buffer.  (Bug#7746)
++
++2011-01-02  Glenn Morris  <rgm@gnu.org>
++
++      * mail/mail-utils.el (mail-mbox-from): Handle From: headers with
++      multiple addresses.  (Bug#7760)
++
 +2010-12-31  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-sh.el (tramp-methods): Add recursive options to "scpc"
 +      and "scpx".
 +
 +2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * doc-view.el (doc-view-set-doc-type): New function refactored
 +      from doc-view-mode.
 +      (doc-view-fallback-mode): New function.
 +      (doc-view-mode): Use it.
 +      (doc-view-mode-maybe): New function that checks if doc-view-mode
 +      can be used and falls back to the next best mode otherwise.
 +
 +      * files.el (auto-mode-alist): Use doc-view-mode-maybe for PDF,
 +      DVI, OpenDocument, and MS Office files.
 +
 +2010-12-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs-lisp/rx.el (rx-syntax): Fix typo.
 +
 +2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * doc-view.el (doc-view-toggle-display): Perform rassq-delete-all
 +      on a copy of auto-mode-alist, because that deletes with side
 +      effects.
 +
 +2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * doc-view.el (doc-view-mode, doc-view-toggle-display): Use
 +      normal-mode without doc-view-mode bindings in auto-mode-alist as
 +      fallback instead of hard coding fundamental mode.
 +
 +2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * doc-view.el (doc-view-doc->txt): Handle OpenDocument (or MS
 +      Office) files also for searching.
 +
 +2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * doc-view.el: Implement viewing of OpenDocument (and Microsoft
 +      Office) files.  Not yet enabled via auto-mode-list.
 +      (doc-view-unoconv-program): New custom variable.
 +      (doc-view-mode-p): Handle new odf document type.
 +      (doc-view-odf->pdf): New conversion function.
 +      (doc-view-convert-current-doc): Call it for odf files.
 +      (doc-view-mode): Recognize newly supported file extensions.
 +
 +2010-12-30  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-default-method-alist)
 +      (tramp-default-user-alist)
 +      (tramp-local-host-regexp, tramp-prefix-domain-format)
 +      (tramp-prefix-domain-regexp): Set tramp-autoload cookie.
 +
 +      * net/tramp-ftp.el:
 +      * net/tramp-gvfs.el:
 +      * net/tramp-gw.el:
 +      * net/tramp-imap.el:
 +      * net/tramp-sh.el:
 +      * net/tramp-smb.el: Add tramp-autoload cookie for initialisation
 +      code of `tramp-default-method-alist' and `tramp-default-user-alist'.
 +
 +2010-12-29  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * saveplace.el (save-place-alist-to-file): Save list sorted and
 +      pretty-printed, so that it is mergeable by line-based text merging,
 +      as suggested by Iain Dalton <iain.dalton {_AT_} gmail.com>.
 +
 +2010-12-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * tool-bar.el (tool-bar-setup): Remove :enable conditions, which
 +      are handled by the menu-bar entries.  As before, don't use
 +      :visibile to avoid changing the tool-bar.
 +
 +2010-12-27  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/secrets.el (secrets-delete-alias): New defun.
 +
 +2010-12-27  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-default-user-alist): Do not add "ssh" based
 +      methods, otherwise ~/.ssh/config would be ignored.
 +
 +2010-12-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/rx.el: Make it a superset of sregex.
 +      (rx-constituents): Add `any => "."', mark `repeat' as taking any number
 +      of args, add `regex' alias.
 +      (rx-info): Add arg to distinguish head and standalone forms.
 +      (rx-check, rx-form): Pass the corresponding arg.
 +      (rx-**): Simplify.
 +      (rx-repeat): Make it work for any number of args.
 +      (rx-syntax): Make it accept syntax chars as is.
 +      * obsolete/sregex.el: Move from emacs-lisp/.
 +      * emacs-lisp/re-builder.el: Remove sregex support.
 +      * emacs-lisp/edebug.el (sregexq, rx): Remove redundant defs.
 +
 +2010-12-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * mouse.el (mouse-yank-primary): On MS-Windows, try the (emulated)
 +      PRIMARY first, then the clipboard.  (Bug#7699)
 +
 +2010-12-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-output-docform): Fix up use of
 +      print-number-table.
 +
 +2010-12-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * help-fns.el (find-lisp-object-file-name): Locate .emacs from
 +      .emacs.elc (Bug#7530).
 +
 +      * wid-edit.el (widget-image-find): Remove bogus :ascent spec from
 +      image spec (Bug#7480).
 +
 +2010-12-21  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * obsolete/pgg-parse.el, obsolete/pgg-pgp5.el, obsolete/pgg-pgp.el,
 +      * obsolete/pgg-gpg.el, obsolete/pgg-def.el, obsolete/pgg.el:
 +      Move from lisp/.
 +
 +2010-12-20  Leo  <sdl.web@gmail.com>
 +
 +      * dnd.el (dnd-get-local-file-name): Unhex of file name shall
 +      always be performed (Bug#7680).
 +
 +2010-12-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * menu-bar.el (menu-bar-kill-ring-save): Make obsolete.
 +      (menu-bar-edit-menu): Bind "Copy" to kill-ring-save.  Don't use
 +      mouse-region-match.
 +
 +      * color.el: Move from gnus/.
 +
 +      * vc/diff.el (diff-better-file-name): Function deleted.
 +      abbreviating file names causes problems with shell-quote-argument.
 +      (diff-no-select): Just use expand-file-name.
 +
 +      * tool-bar.el (tool-bar--image-expression): New function.
 +      (tool-bar-local-item, tool-bar--image-exp): Use it.
 +      (tool-bar-setup): Initialize tool-bar-separator-image-expression.
 +      Use :enable instead of :visible to avoid changing the tool-bar
 +      configuration unnecessarily.
 +
 +      * info.el (info-tool-bar-map): Add separators.
 +
 +2010-12-17  Ken Brown  <kbrown@cornell.edu>
 +
 +      * loadup.el: Use version numbers in Cygwin build.
 +
 +2010-12-17  Ryan Twitchell  <metatheorem@gmail.com>  (tiny change)
 +
 +      * ido.el (ido-file-internal): Ask for confirmation before
 +      overwriting an existing file (Bug#1238).
 +
 +2010-12-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * tool-bar.el (tool-bar-setup): Add separators.
 +
 +      * menu-bar.el (featurep): Use menu-bar-separator.
 +
 +2010-12-16  Ken Manheimer  <ken.manheimer@gmail.com>
 +
 +      Migrate allout encryption provisions from pgg to epg.
 +
 +      * allout.el (allout-toggle-current-subtree-encryption)
 +      (allout-toggle-subtree-encryption): Adjust docstrings to reflect
 +      defaulting policy and other changes.  Change fetch-pass to keymode-cue,
 +      for simpler universal argument interpretation.
 +      (allout-toggle-subtree-encryption):  Adjust docstring to describe
 +      changed encryption provisions.  Change fetch-pass to keymode-cue, for
 +      simpler universal argument interpretation.  Remove provisions for
 +      handling key type and identity - they'll all be within
 +      allout-encrypt-string or epg/epg or even contained all the way in gpg.
 +      (allout-encrypt-string): Include keymode-cue, for optionally prompting
 +      for keypair recipients (universal argument > 1) and, in addition,
 +      associating the specified recipients with the outline (universal
 +      argument > 4) using a file local variable setting for
 +      'epa-file-encrypt-to'.
 +      Require epa, for recipients handling.
 +      Change how regexp filtering elements are named.
 +      Describe the problem with caching of incorrect symmetric-decryption
 +      keys.
 +      Use the epa-passphrase-callback-function, in case the user is using
 +      GnuPG v1.
 +      Support saving of the selected keypair recipients when invoked with a
 +      keymode-cue > 4.
 +      Remove obsolete arguments 'fetch-pass', 'target-cache-id', 'retried'.
 +      Require 'epa.
 +      Establish epg-context with armoring and default epg-protocol.
 +      Remove all passphrase cache, verification, and hinting code.
 +      (allout-passphrase-verifier-handling, allout-passphrase-hint-handling):
 +      No longer used, delete.
 +      (allout-mode): Adjust docstring to describe changed encryption
 +      provisions.  Describe the problem with caching of incorrect
 +      symmetric-decryption keys.
 +      (allout-obtain-passphrase, allout-epg-passphrase-callback-function)
 +      (allout-make-passphrase-state, allout-passphrase-state-passphrase)
 +      (allout-encrypted-key-info, allout-update-passphrase-mnemonic-aids)
 +      (allout-get-encryption-passphrase-verifier, allout-verify-passphrase):
 +      Obsolete, remove.
 +
 +2010-12-16  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-file.el (epa-file-select-keys): Accept 'silent to inhibit
 +      key selection prompt; make 'silent as default (Bug#7487).
 +
 +2010-12-16  Leo  <sdl.web@gmail.com>
 +
 +      * eshell/eshell.el (eshell-directory-name): Use
 +      locate-user-emacs-file (Bug#7578).
 +
 +2010-12-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * loadup.el (symbol-file-load-history-loaded): Remove; unused.
 +
 +2010-12-15  Jari Aalto  <jari.aalto@cante.net>
 +            Scott Evans <gse@antisleep.com>
 +
 +      * rect.el (rectange--default-line-number-format)
 +      (rectangle-number-line-callback): New functions.
 +      (rectangle-number-lines): New command, bound to C-x r N (Bug#4382).
 +
 +2010-12-15  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * rect.el (operate-on-rectangle-lines, string-rectangle-string):
 +      Delete unused variables.
 +      (move-to-column-force): Remove function obsolete since 21.2.
 +
 +2010-12-14  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-temp-buffer-file-name): Make it permanent-local.
 +      (tramp-handle-insert-file-contents): Do not set permanent-local
 +      property.
 +
 +      * net/tramp-cache.el (tramp-persistency-file-name): Use
 +      `locate-user-emacs-file' if fboundp.
 +
 +      * net/tramp-sh.el (tramp-methods): Add "ksu".
 +      (tramp-default-user-alist): Add "ksu".  Use `regexp-opt' for
 +      method list.
 +
 +2010-12-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/js.el: Doc't require font-lock, etags, or easymenu.
 +      (find-tag-marker-ring): Declare.
 +      (js-find-symbol): Require etags.
 +
 +      * mail/sendmail.el: Don't require rmail or mailalias when compiling.
 +      Require mail-utils.
 +      (mail-alias-file): Don't autoload.  Doc fix.
 +      (mail-bury-selects-summary, mail-send-nonascii): Don't autoload.
 +      (mail-mailer-swallows-blank-line): Default to nil.  Doc fix.
 +      Mark as obsolete, and risky.
 +      (mail-setup): Simplify.
 +
 +      * mail/mailalias.el (build-mail-aliases): Make it interactive.
 +      * mail/sendmail.el (build-mail-aliases): Update autoload.
 +
 +      * dired.el (dired-trivial-filenames, dired-chown-program)
 +      (dired-auto-revert-buffer): Remove autoload cookies.
 +      * mail/sendmail.el (mail-recover-1): Require 'dired.
 +
 +      * dired.el (dired-subdir-switches, dired-chown-program)
 +      (dired-use-ls-dired, dired-chmod-program, dired-touch-program):
 +      Make into defcustoms.
 +      (dired-chown-program): Simplify initialization.
 +
 +      * mail/mail-utils.el: No need to require lisp-mode, it's in loadup.
 +
 +2010-12-13  Romain Francoise  <romain@orebokech.com>
 +
 +      * net/gnutls.el (gnutls-negotiate): Fix setting of default trustfiles.
 +
 +2010-12-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/netrc.el (netrc-point-at-eol): Remove the unused
 +      netrc-point-at-old and netrc-bound-and-true-p bindings.
 +      (netrc-parse): Cache the netrc contents.
 +
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * subr.el (posn-col-row): Evaluate header-line-format in the
        context of the POSITION window's buffer.
  
 -2010-12-11  Glenn Morris  <rgm@gnu.org>
 +2010-12-13  Glenn Morris  <rgm@gnu.org>
  
        * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1)
        (with-silent-modifications): Doc fixes.
  
 -2010-12-10  Michael Albinus  <michael.albinus@gmx.de>
 +2010-12-13  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-action-password, tramp-process-actions):
 -      Revert patch from 2010-12-08.  Use `save-restriction'.
 -
 -2010-12-09  Eli Zaretskii  <eliz@gnu.org>
 -
 -      * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p):
 -      New functions.
 -      (menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
 -      them instead of `nil' and `>', respectively.  (Bug#1077)
 +      Revert previous from.  Use `save-restriction'.
  
 -2010-12-09  Stephen Berman  <stephen.berman@gmx.net>
 +2010-12-13  Stephen Berman  <stephen.berman@gmx.net>
  
        * calendar/diary-lib.el (diary-list-sexp-entries):
        Handle case of no newline at end of file.  (Bug#7536)
  
 -2010-12-09  Glenn Morris  <rgm@gnu.org>
 +2010-12-13  Glenn Morris  <rgm@gnu.org>
  
        * mail/smtpmail.el (smtpmail-send-it): Revert previous change.
  
 -2010-12-08  Michael Albinus  <michael.albinus@gmx.de>
 +2010-12-13  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * net/tramp.el (tramp-handle-start-file-process):
 -      Protect buffer-modified value.  (Bug#7557)
 -      (tramp-action-password): Delete region, do not narrow.
 +      * net/tramp.el (tramp-action-password): Delete region, do not narrow.
        (tramp-process-actions): Do not widen.
  
 -2010-12-08   Jan Moringen  <jmoringe@techfak.uni-bielefeld.de>
 +      * net/tramp-sh.el (tramp-sh-handle-start-file-process):
 +      Protect buffer-modified value.  (Bug#7557)
 +
 +2010-12-13   Jan Moringen  <jmoringe@techfak.uni-bielefeld.de>
  
        * log-edit.el (log-edit-changelog-entries):
        Regexp quote filename.  (Bug#7505)
  
 -2010-12-08  Tom Breton  <tehom@panix.com>
 +2010-12-13  Tom Breton  <tehom@panix.com>
  
        * cus-edit.el (custom-save-all):
        Bind print-length and print-level to nil.  (Bug#7581)
  
 -2010-12-08  Glenn Morris  <rgm@gnu.org>
 +2010-12-13  Glenn Morris  <rgm@gnu.org>
  
        * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map):
        Run hooks to update menu contents.  (Bug#7586)
        * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued
        file names, for the sake of MS Windows.  (Bug#7588)
  
 -2010-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-12-13  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
        empty lines without a leading space.
  
 -2010-12-06  Leo  <sdl.web@gmail.com>
 +2010-12-13  Leo  <sdl.web@gmail.com>
  
        * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook
        while mapping over marks (Bug#6810).
  
 -2010-12-06  Chong Yidong  <cyd@stupidchicken.com>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
        * image-dired.el (image-dired-db-file)
        (image-dired-temp-image-file, image-dired-gallery-dir)
        (image-dired-temp-rotate-image-file): Set default values relative
        to image-dired-dir (Bug#7518).
  
 -2010-12-06  Lawrence Mitchell  <wence@gmx.li>
 +2010-12-13  Lawrence Mitchell  <wence@gmx.li>
  
        * format.el (format-decode-run-method): Pass args FROM and TO, not
        point-min and point-max, to shell-command-on-region (Bug#7488).
  
 -2010-12-06  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-12-13  Jan Djärv  <jan.h.d@swipnet.se>
  
        * frame.el (blink-cursor-mode): Make default t for ns.
  
 -2010-12-05  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 +2010-12-13  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
  
        * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501).
  
 -2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
        * comint.el (comint-dynamic-list-input-ring)
        (comint-dynamic-complete-filename)
        * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height):
        Doc fix (Bug#7471).
  
 -2010-12-04  Martin Rudalics  <rudalics@gmx.at>
 +2010-12-13  Martin Rudalics  <rudalics@gmx.at>
  
        * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil
        (Bug#7533).
  
 -2010-12-04  W. Martin Borgert <debacle@debian.org>  (tiny change)
 +2010-12-13  W. Martin Borgert <debacle@debian.org>  (tiny change)
  
        * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode.
        (Bug#7491).
  
 -2010-12-04  Chong Yidong  <cyd@stupidchicken.com>
 -
 -      * simple.el (transient-mark-mode): Doc fix (Bug#7465).
 -
 -2010-12-04  Eli Zaretskii  <eliz@gnu.org>
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * files.el (file-relative-name): Handle UNC file names on
        DOS/Windows.  (Bug#4674)
  
 -2010-12-03  Daiki Ueno  <ueno@unixuser.org>
 +2010-12-13  Daiki Ueno  <ueno@unixuser.org>
  
        * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with
        "RIPEMD160" (Bug#7490).  Reported by Daniel Kahn Gillmor.
        (epg-context-set-passphrase-callback): Mention that the callback
        is not called when used with GnuPG 2.x.
  
 -2010-12-02  Glenn Morris  <rgm@gnu.org>
 +2010-12-13  Glenn Morris  <rgm@gnu.org>
  
        * ps-print.el (ps-line-lengths-internal, ps-nb-pages):
        Ensure ps-footer-font-size-internal is initialized.
        Call ps-get-page-dimensions before trying to use ps-font-for-text.
  
 -2010-12-01  Kenichi Handa  <handa@m17n.org>
 +2010-12-13  Kenichi Handa  <handa@m17n.org>
  
        * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process
        within condition-case.
        (rmail-search-mime-message-function): Set to
        rmail-search-mime-message.
  
 -2010-12-01  Leo  <sdl.web@gmail.com>
 +2010-12-13  Leo  <sdl.web@gmail.com>
  
        * ido.el (ido-common-initialization): New function.  (bug#3274)
        (ido-mode): Use it.
        (ido-completing-read): Call it.
  
 +2010-12-12  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * bookmark.el (bookmark-name-from-full-record): Rename back to
 +      this original name from `bookmark-name-from-record' reverting part
 +      of 2010-12-08T08:09:27Z!kfogel@red-bean.com / kfogel@red-bean.com-20101208080927-5j9jqnb2xvcw4ogm.
 +      As Drew Adams pointed out, there was no reason to cause churn for
 +      third-party callers.
 +
 +2010-12-12  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-forward-type): Before scanning a
 +      template arglist, check that the current language supports this.
 +
 +2010-12-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc/vc-bzr.el (vc-bzr-state-heuristic): Also check that the executable
 +      state of the file matches.  (Bug#7544)
 +      (vc-bzr-register, vc-bzr-checkin)
 +      (vc-bzr-annotate-extract-revision-at-line): Doc fixes.
 +      (vc-directory-exclusion-list): Remove unnecessary eval-after-load.
 +
 +      * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension.
 +
 +2010-12-11  Karel Klíč  <kklic@redhat.com>
 +
 +      * files.el (auto-mode-alist): Use html-mode for *.xhtml.  (Bug#7606)
 +
 +2010-12-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Derive from prog-mode, use derived-mode-p, and fix up various
 +      minor style issues in lisp/progmodes.
 +
 +      * progmodes/vhdl-mode.el (vhdl-mode):
 +      * progmodes/verilog-mode.el (verilog-mode):
 +      * progmodes/vera-mode.el (vera-mode):
 +      * progmodes/sql.el (sql-mode):
 +      * progmodes/scheme.el (scheme-mode):
 +      * progmodes/perl-mode.el (perl-mode):
 +      * progmodes/octave-inf.el (inferior-octave-mode):
 +      * progmodes/autoconf.el (autoconf-mode):
 +      * progmodes/m4-mode.el (m4-mode):
 +      * progmodes/inf-lisp.el (inferior-lisp-mode):
 +      * progmodes/idlwave.el (idlwave-mode):
 +      * progmodes/icon.el (icon-mode):
 +      * progmodes/idlw-help.el (idlwave-help-mode):
 +      * progmodes/dcl-mode.el (dcl-mode):
 +      * progmodes/idlw-shell.el (idlwave-shell-mode):
 +      * progmodes/ebrowse.el (ebrowse-tree-mode, ebrowse-electric-list-mode)
 +      (ebrowse-member-mode, ebrowse-electric-position-mode):
 +      Use define-derived-mode.
 +
 +      * progmodes/xscheme.el (exit-scheme-interaction-mode)
 +      (xscheme-enter-interaction-mode, xscheme-enter-debugger-mode)
 +      (xscheme-debugger-mode-p, xscheme-send-string-1):
 +      * progmodes/tcl.el (inferior-tcl-proc, tcl-current-word)
 +      (tcl-load-file, tcl-restart-with-file):
 +      * progmodes/ps-mode.el (ps-run-running):
 +      * progmodes/gdb-mi.el (gud-watch, gdb-mouse-set-clear-breakpoint):
 +      * progmodes/js.el (js--get-all-known-symbols):
 +      * progmodes/inf-lisp.el (inferior-lisp-proc):
 +      * progmodes/idlwave.el (idlwave-beginning-of-statement)
 +      (idlwave-template, idlwave-update-buffer-routine-info)
 +      (idlwave-update-current-buffer-info)
 +      (idlwave-get-routine-info-from-buffers, idlwave-choose)
 +      (idlwave-scan-class-info, idlwave-fix-keywords)
 +      (idlwave-list-buffer-load-path-shadows):
 +      * progmodes/idlw-toolbar.el (idlwave-toolbar, idlwave-toolbar-add)
 +      (idlwave-toolbar-remove):
 +      * progmodes/idlw-shell.el (idlwave-shell-save-and-action)
 +      (idlwave-shell-file-name, idlwave-shell-electric-debug-all-off)
 +      (idlwave-shell-menu-def):
 +      * progmodes/idlw-complete-structtag.el
 +      (idlwave-prepare-structure-tag-completion):
 +      * progmodes/gud.el (gud-set-buffer):
 +      * progmodes/f90.el (f90-backslash-not-special):
 +      * progmodes/delphi.el (delphi-find-unit): Use derived-mode-p.
 +
 +      * progmodes/xscheme.el (xscheme-start)
 +      (local-set-scheme-interaction-buffer, scheme-interaction-mode):
 +      * progmodes/which-func.el (which-function):
 +      * progmodes/vhdl-mode.el (vhdl-set-style):
 +      * progmodes/verilog-mode.el (verilog-set-compile-command)
 +      (verilog-modify-compile-command, verilog-error-regexp-add-xemacs)
 +      (verilog-set-define, verilog-auto-reeval-locals):
 +      * progmodes/sql.el (sql-product-font-lock, sql-interactive-mode):
 +      * progmodes/simula.el (simula-mode):
 +      * progmodes/scheme.el (scheme-mode-variables, dsssl-mode):
 +      * progmodes/python.el (python-check, python-mode):
 +      * progmodes/prolog.el (prolog-mode-variables):
 +      * progmodes/gud.el (gud-tooltip-activate-mouse-motions):
 +      * progmodes/ebrowse.el (ebrowse-view-file-other-frame):
 +      * progmodes/delphi.el (delphi-mode):
 +      * progmodes/cc-styles.el (c-setup-paragraph-variables):
 +      * progmodes/cc-mode.el (c-basic-common-init, c-common-init)
 +      (c-font-lock-init): Move make-local-variable to their setq.
 +
 +      * progmodes/vhdl-mode.el (vhdl-write-file-hooks-init)
 +      (vhdl-hs-minor-mode, vhdl-ps-print-init): Fix make-local-variable ->
 +      make-local-hook.
 +      * progmodes/sh-script.el (sh-require-final-newline): Remove.
 +      (sh-set-shell): Don't set require-final-newline since it's already done
 +      by prog-mode.
 +      * progmodes/modula2.el (m2-mode): Don't make m2-end-comment-column
 +      since we never set it.
 +      * progmodes/ebrowse.el (ebrowse-set-tree-indentation):
 +      Use read-string and standard prompt.
 +      * progmodes/dcl-mode.el (dcl-mode-map): Move init into declaration.
 +      * progmodes/meta-mode.el (meta-mode-abbrev-table): Merge init and decl.
 +      (meta-common-mode-syntax-table): Rename from meta-mode-syntax-table.
 +      (meta-common-mode-map): Rename from meta-mode-map.
 +      Remove C-m binding, which is a user preference, not mode specific.
 +      (meta-common-mode): New major mode; replace meta-common-initialization.
 +      * progmodes/js.el (js-mode): Call syntax-propertize rather than messing
 +      around with font-lock.
 +      * progmodes/etags.el (select-tags-table-mode):
 +      Derive from special-mode.
 +      * progmodes/octave-mod.el (octave-mode):
 +      * progmodes/gdb-mi.el (gdb-inferior-io-mode, gdb-threads-mode)
 +      (gdb-memory-mode, gdb-disassembly-mode, gdb-breakpoints-mode)
 +      (gdb-frames-mode, gdb-locals-mode, gdb-registers-mode):
 +      Let define-derived-mode do its job.
 +      * progmodes/cpp.el (cpp-edit-mode-map):
 +      Move initialization into declaration.
 +      (cpp-edit-mode): Use define-derived-mode.
 +      (cpp-edit-load): Use derived-mode-p.
 +      * progmodes/mixal-mode.el (mixal-mode):
 +      * progmodes/f90.el (f90-mode):
 +      * progmodes/cfengine.el (cfengine-mode): Don't bother setting
 +      require-final-newline since prog-mode does it already.
 +      * progmodes/cc-cmds.el (c-update-modeline): Use match-string.
 +      * progmodes/asm-mode.el (asm-mode-map): Fix menu setup.
 +      * progmodes/antlr-mode.el: Require cc-mode upfront.
 +      (antlr-mode-syntax-table, antlr-action-syntax-table): Initialize in
 +      the declaration.
 +      (antlr-directory-dependencies, antlr-show-makefile-rules):
 +      Use derived-mode-p.
 +      (antlr-language-option): Don't assume point-min==1.
 +      (antlr-mode): Use define-derived-mode.
 +      * progmodes/ada-mode.el: Use derived-mode-p.
 +      (ada-mode): Use define-derived-mode.
 +      Use hack-local-variables-hook.
 +
 +2010-12-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/texinfo.el (texinfo-mode-map): Bind texinfo-insert-@end.
 +      (texinfo-mode): Don't disable adaptive-fill-mode.
 +      (texinfo-insert-block): Adjust cursor placement for blocks with arg.
 +      (texinfo-insert-@end, texinfo-insert-braces, texinfo-insert-@code)
 +      (texinfo-insert-@dfn, texinfo-insert-@email, texinfo-insert-@emph)
 +      (texinfo-insert-@example, texinfo-insert-@file, texinfo-insert-@item)
 +      (texinfo-insert-@kbd, texinfo-insert-@node, texinfo-insert-@noindent)
 +      (texinfo-insert-@quotation, texinfo-insert-@samp)
 +      (texinfo-insert-@strong, texinfo-insert-@table, texinfo-insert-@var)
 +      (texinfo-insert-@uref): Use define-skeleton.
 +      (texinfo-insert-@-with-arg): Delete.
 +
 +2010-12-10  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * arc-mode.el (archive-zip-extract): If w32-quote-process-args is
 +      nil, do quote archive member names.  (Bug#6144)
 +
 +2010-12-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * files.el (diff-no-select): Declare.
 +
 +      * mail/emacsbug.el (report-emacs-bug): Use mail-user-agent properties.
 +      (report-emacs-bug-create-existing-bugs-buffer): Avoid free variables.
 +
 +      * comint.el (comint-input-ring-file-name): Doc fix.
 +
 +2010-12-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p):
 +      New functions.
 +      (menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>:
 +      Use them instead of `nil' and `>', respectively.
 +      (menu-bar-showhide-tool-bar-menu): Use menu-bar-frame-for-menubar
 +      instead of `nil'.
 +      (toggle-menu-bar-mode-from-frame): Use menu-bar-frame-for-menubar
 +      and menu-bar-positive-p instead of `nil' and `>', respectively.
 +      (Bug#1077)
 +
 +2010-12-09  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +
 +      * whitespace.el (whitespace-newline-mode): Code fix.
 +
 +2010-12-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * play/landmark.el (lm-print-y,s,noise-int, lm-print-y,s,noise):
 +      Rename functions without commas, update callers.
 +
 +2010-12-08  Jeff Dairiki  <dairiki@dairiki.org>  (tiny change)
 +
 +      * whitespace.el (whitespace-cleanup-region):
 +      Clean up spaces before tabs.  (Bug#7582)
 +
 +2010-12-08  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * bookmark.el: Adjust parameter names and doc strings to resolve
 +      confusion over whether "bookmark" meant a bookmark name or a
 +      bookmark record.  Along the way, shorten one function's name for
 +      similar reasons.  (Issue #7548)
 +      (bookmark-name-from-record): New name for
 +      `bookmark-name-from-full-record'.  All callers changed.
 +      (bookmark-get-bookmark, bookmark-get-bookmark-record)
 +      (bookmark-default-annotation-text, bookmark-prop-get, bookmark-prop-set)
 +      (bookmark-get-annotation, bookmark-set-annotation)
 +      (bookmark-get-filename, bookmark-set-filename)
 +      (bookmark-get-position, bookmark-set-position)
 +      (bookmark-get-front-context-string, bookmark-set-front-context-string)
 +      (bookmark-get-rear-context-string, bookmark-set-rear-context-string)
 +      (bookmark-get-handler, bookmark-edit-annotation, bookmark--jump-via)
 +      (bookmark-handle-bookmark, bookmark-location, bookmark-show-annotation):
 +      Rename `bookmark' parameter to `bookmark-name-or-record', to
 +      clearly show its role, and shorten or adjust doc strings accordingly.
 +      (bookmark-set-name): Same, and pass the parameter directly to
 +      `bookmark-get-bookmark' instead of redundantly doing the callee's work.
 +      (bookmark-default-annotation-text, bookmark-send-edited-annotation)
 +      (bookmark-relocate, bookmark-insert-location, bookmark-insert)
 +      (bookmark-delete): Rename `bookmark' parameter to `bookmark-name',
 +      and in some cases shorten doc string accordingly.
 +      (bookmark-rename): Change `old' and `new' parameters to `old-name'
 +      and `new-name', and adjust an internal variable to avoid confusion.
 +      (bookmark-jump, bookmark-jump-noselect): Clarify `bookmark'
 +      parameter in doc string.
 +
 +2010-12-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/gdb-mi.el (gdb): Try to initialize comint input history
 +      from gdb's history file.  (Bug#7575)
 +
 +      * mail/emacsbug.el (report-emacs-bug):
 +      Try to handle some other mail clients.
 +
 +2010-12-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.el (dir-locals-collect-variables): Don't let errors stop us.
 +      Use string-prefix-p.
 +      (file-name-version-regexp): New var.
 +      (file-name-sans-versions):
 +      * jka-cmpr-hook.el (jka-compr-build-file-regexp): Use it,
 +      (jka-compr-get-compression-info): Use dolist.
 +      (jka-compr-compression-info-list): Don't bother specifying
 +      version/backup regexps.
 +
 +2010-12-07  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * simple.el (just-one-space): Make argument n default to 1 if
 +      omitted.
 +
 +2010-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * electric.el (electric-indent-post-self-insert-function):
 +      Delete trailing newlines even if we don't reindent.
 +
 +2010-12-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-at-point): Remove the `arg'.
 +      * bindings.el (complete-symbol): Move back from minibuffer.el.
 +
 +2010-12-06  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 +
 +      * simple.el (just-one-space): Delete newlines for negative arg.
 +
 +2010-12-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * ansi-color.el (ansi-color-unfontify-region): Replace by trivial def.
 +      (ansi-color-filter-apply): Simplify.
 +      (ansi-color-apply): Use `font-lock-face' rather than `face'.
 +
 +2010-12-05  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 +
 +      * vc/vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501).
 +
 +2010-12-04  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * dired.el (dired-use-ls-dired): Set default to a special
 +      "unspecified" value.
 +      (dired-insert-directory): When called the first time, check
 +      whether "ls --dired" succeeds and set dired-use-ls-dired (Bug#7546).
 +
 +2010-12-04  Tak Ota  <Takaaki.Ota@am.sony.com>
 +
 +      * replace.el: Add "collect" feature to occur.
 +      (occur-collect-regexp-history): New var.
 +      (occur-read-primary-args): Return a replace string for nlines,
 +      if needed.
 +      (occur): Extend the meaning of nlines.
 +
 +2010-12-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/which-func.el (which-func-ff-hook): Log the error message.
 +      (which-func-update-1): Distinguish symbols from strings.
 +      (which-function): Stay within 80 columns.
 +
 +2010-12-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (with-demoted-errors): Distinguish symbols from strings.
 +
 +      * newcomment.el (comment-styles): Add docs to each style (bug#7509).
 +      Improve docstring.
 +      (comment-style): Use comment-styles's docs to describe values.
 +
 +2010-12-03  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * term/common-win.el (x-setup-function-keys): Restore ns-new-frame
 +      and ns-show-prefs (Bug#7535).
 +
 +      * term/ns-win.el (global-map): Restore ns-new-frame and ns-show-prefs
 +      bindings (Bug#7535).
 +
 +2010-12-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * nxml/nxml-mode.el: Require rng-nxml.
 +      (rng-nxml-mode-init, nxml-enable-unicode-char-name-sets):
 +      Remove declarations.
 +
 +      * nxml/nxml-mode.el, nxml/nxml-outln.el, nxml/rng-loc.el:
 +      * nxml/rng-nxml.el, nxml/rng-valid.el:
 +      Remove leading `*' from defcustom docs.
 +
 +      * startup.el (normal-top-level-add-subdirs-to-load-path): Simplify.
 +      (normal-top-level-add-to-load-path, tty-handle-args):
 +      Convert comments to basic doc-strings.
 +
 +      * net/browse-url.el (browse-url-url-at-point)
 +      (browse-url-default-browser): Remove autoload cookies.
 +
 +      * mail/emacsbug.el (report-emacs-bug-create-existing-bugs-buffer):
 +      Remove more undefined cl functions.
 +
 +      * vc/diff.el (diff-sentinel): Make new arguments optional.
 +      * ibuf-ext.el (diff-sentinel): Update declaration.
 +
 +2010-12-03  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with
 +      "RIPEMD160" (Bug#7490).  Reported by Daniel Kahn Gillmor.
 +      (epg-context-set-passphrase-callback): Mention that the callback
 +      is not called when used with GnuPG 2.x.
 +
 +2010-12-02  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-local-host-regexp): Add "localhost6".
 +      (tramp-file-name-port): Check also for `tramp-default-port'.
 +      (tramp-get-connection-name): New defun.
 +      (tramp-get-connection-process): Use it.
 +      (tramp-debug-message): Extend function exclude list.
 +      (tramp-drop-volume-letter): Fix doc string.
 +
 +      * net/tramp-cmds.el: Remove solved todo item.
 +
 +      * net/tramp-efs.el:
 +      * net/tramp-ftp.el:
 +      * net/tramp-gvfs.el:
 +      * net/tramp-gw.el:
 +      * net/tramp-imap.el:
 +      * net/tramp-smb.el: Fix regexps added to `tramp-default-method-alist'
 +      and `tramp-default-user-alist', respectively.
 +
 +      * net/tramp-gw.el (tramp-gw-open-connection):
 +      Use `tramp-get-connection-name' and `tramp-get-connection-buffer'.
 +
 +      * net/tramp-imap.el (tramp-imap-make-iht): Use just
 +      `tramp-file-name-port'.
 +
 +      * net/tramp-sh.el (tramp-methods): Add recursive options to "pscp"
 +      and "psftp".  Exchange "%k" marker with options.
 +      (tramp-do-copy-or-rename-file, tramp-sh-handle-file-local-copy):
 +      Compute size of link target.
 +      (tramp-do-copy-or-rename-file-out-of-band). Move setting of
 +      `tramp-current-*' up due to gateway methods.  Optimze computing of
 +      copy arguments.  Use `tramp-get-connection-name' and
 +      `tramp-get-connection-buffer'.  Improve debug messages.
 +      (tramp-compute-multi-hops): Remove port determination.
 +      (tramp-maybe-open-connection): Use `tramp-get-connection-name'.
 +
 +      * net/trampver.el: Update release number.
 +
 +2010-12-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/cl-macs.el (cl-parse-loop-clause):
 +      Avoid infinite loop over windows.  (Bug#7492)
 +
 +      * progmodes/flymake.el (flymake-check-file-limit):
 +      Allow nil to mean "no limit".
 +      (flymake-check-patch-master-file-buffer): Update for above change.
 +      Allow a .tex file-name extension to be optional.
 +      (flymake-master-tex-init): Also match \include statements.
 +
 +2010-11-30  Sam Steingold  <sds@gnu.org>
 +
 +      * nxml/nxml-mode.el (nxml-parent-document): Add a variable.
 +      (nxml-parent-document-set): A function to set `nxml-parent-document'.
 +      (nxml-mode): Define using `define-derived-mode' instead of `defun'.
 +      (nxml-mode-hook): Remove `defcustom' (auto-defined by
 +      define-derived-mode').
 +      * nxml/rng-valid.el (rng-dtd-trivial-p): Add a helper function for
 +      users who want to call `nxml-parent-document-set'.
 +
  2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * log-edit.el (log-edit-font-lock-keywords): Don't try matching
        `directory-listing-before-filename-regexp'.  (Bug#7308)
        (locate-post-command-hook, locate-post-command-hook): New defcustoms.
  
 -2010-11-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-27  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * emacs-lisp/smie.el (smie-prec2->grammar): Simplify handling
        of :smie-open/close-alist.
        (smie-indent-keyword): Be careful not to misidentify tokens that span
        more than one line, as empty lines.  Add argument `token'.
  
 -2010-11-26  Kenichi Handa  <handa@m17n.org>
 +2010-11-27  Kenichi Handa  <handa@m17n.org>
  
        * mail/rmailmm.el (rmail-mime-insert-multipart): For unsupported
        multipart subtypes, insert all as usual.
  
        * mail/rmail.el: Require rfc2047.
  
 -2010-11-26  Kenichi Handa  <handa@m17n.org>
 +2010-11-27  Kenichi Handa  <handa@m17n.org>
  
        * mail/rmailmm.el (rmail-mime-entity, rmail-mime-entity-type)
        (rmail-mime-entity-disposition)
        rmail-show-mime-function for a MIME message.  Decode the headers
        according to RFC2047.
  
 -2010-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-27  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * progmodes/which-func.el (which-func-imenu-joiner-function):
        Return a string, as expected.
        (which-function-mode): Make sure we stop any previous timer before
        starting a new one.
  
 -2010-11-23  Michael Albinus  <michael.albinus@gmx.de>
 +2010-11-27  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-default-method-alist)
        (tramp-default-user-alist, tramp-default-proxies-alist):
        Adapt custom options type.  (Bug#7445)
  
 -2010-11-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * progmodes/python.el: Add Ipython support (Bug#5390).
        (python-shell-prompt-alist)
        (python-comint-output-filter-function): Use it.
        (run-python): Use a pipe (Bug#5694).
  
 -2010-11-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * progmodes/python.el (run-python): Doc fix.
        (python-keep-current-directory-in-path): New var (Bug#7454).
  
 -2010-11-20  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-27  Chong Yidong  <cyd@stupidchicken.com>
  
        * lpr.el (lpr-buffer, print-buffer, lpr-region, print-region):
        Prompt user before actually printing.
  
 -2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-27  Glenn Morris  <rgm@gnu.org>
  
 -      * simple.el (kill-new, kill-append, kill-region):
 -      * comint.el (comint-kill-region): Make the yank-handler argument
 -      obsolete.
 +      * startup.el (package-enable-at-startup, package-initialize):
 +      Remove unnecessary declarations.
  
 -2010-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-27  Eli Zaretskii  <eliz@gnu.org>
  
 -      * emacs-lisp/smie.el (smie-bnf-classify): Signal errors for tokens
 -      that are both openers (resp. closers) and something else.
 -      (smie-grammar): Loosen definition of valid values.
 -      (smie-next-sexp, smie-down-list, smie-blink-matching-open)
 -      (smie-indent--parent, smie-rule-parent, smie-indent-keyword)
 -      (smie-indent-after-keyword): Adjust users.
 -      (smie-indent-keyword): Don't indent empty lines.
 +      * international/characters.el (glyphless-char-display-control):
 +      Exclude newline and TAB from the c0-control group.
  
 -      * vc-hg.el (vc-hg-program): New var.
 -      Suggested by Norman Gray <norman@astro.gla.ac.uk>.
 -      (vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it.
 +2010-11-27  Glenn Morris  <rgm@gnu.org>
  
 -2010-11-17  Glenn Morris  <rgm@gnu.org>
 +      * mail/sendmail.el (build-mail-aliases): Doc fix for autoload.
 +      (expand-mail-aliases): Remove unnecessary autoload.
  
 -      * emacs-lisp/autoload.el (autoload-find-destination): The function
 -      coding-system-eol-type may return non-numeric values.  (Bug#7414)
 +      * allout.el (allout-command-prefix, allout-mode-map): Declare.
  
 -2010-11-16  Ulrich Mueller  <ulm@gentoo.org>
 +      * shell.el (shell-dir-cookie-re): Move definition before use.
  
 -      * server.el (server-force-stop): Ensure the server is stopped (Bug#7409).
 +      * mail/emacsbug.el (report-emacs-bug-create-existing-bugs-buffer):
 +      Replace undefined CL functions.
  
 -2010-11-13  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * simple.el (prog-mode): Set bidi-paragraph-direction to
 +      left-to-right.
 +
 +      * term/pc-win.el (x-get-selection-internal): Emulation for MS-DOS.
 +
 +2010-11-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/diary-lib.el (diary-outlook-format-1): New function, so that
 +      diary-outlook-formats can be sensitive to calendar-date-style.
 +      (diary-outlook-formats): Simplify the default setting.
 +      (diary-from-outlook-internal): Pass subject and body as arguments.
 +      Use dolist rather than dotimes.  Don't save the diary buffer.
 +      (diary-from-outlook-gnus, diary-from-outlook-rmail):
 +      Pass subject and body as explicit arguments to the -internal function.
 +
 +2010-11-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * mail/rfc2368.el (rfc2368-parse-mailto-url): Unfold URLs before
 +      parsing them.  This makes mailto:...?subject=foo\nbar work.
 +
 +2010-11-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/diff.el (diff): Fix last change.
 +
 +2010-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el: Improve pcase-let.  Use "pcase--" prefix.
 +      (pcase--dontcare-upats): New var.
 +      (pcase-let, pcase-let*): Generate better code.
 +      Accept the same bodies as `let'.
 +      (pcase-dolist): New macro.
 +      (pcase--trivial-upat-p): New helper function.
 +      (pcase--expand): Strip leading "(let nil" if any.
 +
 +2010-11-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * mail/mailclient.el (browse-url): Require.
 +      (mailclient-send-it): Bind `browse-url-mailto-function' to nil to
 +      use the external browser function to send the mail (bug#7469).
 +
 +      * net/browse-url.el (browse-url-browser-function): Revert the
 +      default back to the previous value, since the new value broke
 +      mailclient.el.
 +      (browse-url-mailto-function): New variable for mailto: URLs.
 +      (browse-url): Use the new variable for mailto: URLs.
 +
 +2010-11-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eshell/esh-cmd.el (eshell-parse-command):
 +      * eshell/esh-arg.el (eshell-parse-arguments):
 +      * eshell/em-script.el (eshell-source-file):
 +      Use with-silent-modifications.
 +
 +2010-11-23  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * vc/vc.el (vc-merge): Remove optional arg PROMPT.  Always prompt
 +      for a merge location.
 +
 +      * vc/vc-bzr.el (vc-bzr-pull): Remove unused var.
 +      (vc-bzr-merge-branch): Always prompt.
 +      (vc-bzr-async-command): Use the full branch filename.
 +
 +2010-11-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * shell.el (shell): Use current-buffer by default if it's already
 +      a shell mode buffer and its process is dead.
 +      Suggested by Jose E. Marchesi <jemarch@gnu.org>.
 +
 +2010-11-23  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * mail/emacsbug.el (report-emacs-bug-query-existing-bugs):
 +      Mention that the keywords should be comma separated.
 +
 +2010-11-23  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * vc/vc.el (vc-merge): Use vc-BACKEND-merge-branch if available.
 +      Accept optional prefix arg meaning to prompt for a command.
 +      (vc-update): Use vc-BACKEND-pull if available.  Accept optional
 +      prefix arg meaning to prompt for a command.
 +      (vc-pull): Alias for vc-update.
 +
 +      * vc/vc-bzr.el (vc-bzr-admin-branchconf, vc-bzr-history): New vars.
 +      (vc-bzr--branch-conf, vc-bzr-async-command, vc-bzr-pull)
 +      (vc-bzr-merge-branch): New functions, implementing merge-branch
 +      and pull operations.
 +
 +2010-11-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * Makefile.in: Fix up last merge.
 +
 +      * vc/diff.el (diff-old-temp-file, diff-new-temp-file): Remove.
 +      (diff-sentinel): Get them as arguments instead.
 +      (diff-old-file, diff-new-file, diff-extra-args): Remove.
 +      (diff-file-local-copy, diff-better-file-name): New funs.
 +      (diff-no-select): Rename from diff-into-buffer.
 +      Support buffers additionally to files.  Move `buf' arg.  Don't display buf.
 +      Prefer closures to buffer-local variables.
 +      (diff): Adjust accordingly.
 +      (diff-buffer-with-file): Move from files.el.
 +      * files.el (diff-buffer-with-file): Move to vc/diff.el.
 +      (diff-buffer-internal): Remove.
 +      (diff-buffer-buffer): Remove.
 +      (save-some-buffers-action-alist): Use diff-no-select so as not to guess
 +      the buffer name used, and so as not to mess up windows and frames.
 +
 +2010-11-22  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 +
 +      * files.el: Make revert work with diff-buffer-with-file (bug#7277).
 +      (diff-buffer-internal): New function extracted from diff-buffer-with-file
 +      (diff-buffer-with-file): Use it.
 +      * vc/diff.el (diff-into-buffer): New fun, extracted from diff.
 +      (diff): Use it.
 +
 +2010-11-22  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * textmodes/reftex-ref.el (reftex-goto-label): Use the current
 +      \ref's or \pageref's value as default instead of initial input.
 +
 +2010-11-21  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * files.el (backup-by-copying-when-mismatch): The default value is
 +      now t.
 +
 +      * startup.el (normal-top-level):
 +      * net/tramp.el (tramp-handle-insert-file-contents): Do not set
 +      `backup-by-copying-when-mismatch'.
 +
 +2010-11-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * tool-bar.el (tool-bar-setup): Remove save as, print and customize.
 +
 +2010-11-21  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 +
 +      * progmodes/python.el (python-font-lock-keywords):
 +      Highlight top-level augmented assignments (Bug#6445).
 +
 +2010-11-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * term/ns-win.el (ns-right-control-modifier)
 +      (ns-right-command-modifier): Defvar them.
 +
 +      * cus-start.el (all): Add ns-right-control-modifier and
 +      ns-right-command-modifier (Bug#7458).
 +
 +2010-11-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/authors.el (authors-ignored-files)
 +      (authors-valid-file-names, authors-renamed-files-alist): Add entries.
 +
 +2010-11-20  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * mail/emacsbug.el (report-emacs-bug-query-existing-bugs)
 +      (report-emacs-bug-parse-query-results)
 +      (report-emacs-bug-create-existing-bugs-buffer): Pass through
 +      keywords used for querying the bug database to show them in the
 +      existing bugs buffer.
 +
 +2010-11-20  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * tool-bar.el (tool-bar-setup): Add some :vert-only keywords.
 +
 +      * info.el (info-tool-bar-map): Add some :vert-only keywords.
 +
 +2010-11-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/characters.el (glyphless-char-display-control):
 +      Make it a defcustom, with update-glyphless-char-display as its
 +      :set attribute.
 +      (top level): Don't call update-glyphless-char-display.
 +
 +2010-11-20  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Sync with Tramp 2.2.0.
 +
 +      * net/tramp.el (tramp-handle-insert-file-contents): Don't use
 +      `file-remote-p' (due to compatibility).
 +
 +      * net/tramp-sh.el (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band): Use `ignore-errors'.
 +
 +      * net/trampver.el: Update release number.
 +
 +2010-11-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * faces.el (glyphless-char): Define value for `pc'.
 +
 +2010-11-20  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      Implemented a bug querying mechanism.
 +      * mail/emacsbug.el (report-emacs-bug-tracker-url): New variable.
 +      (report-emacs-bug-create-existing-bugs-buffer)
 +      (report-emacs-bug-parse-query-results)
 +      (report-emacs-bug-query-existing-bugs): New functions.
 +
 +2010-11-19  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * textmodes/reftex-ref.el (reftex-goto-label): If point is inside
 +      a \ref{} or \pageref{} macro, then use its value as initial input.
 +
 +2010-11-19  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-units.el (math-build-units-table-buffer):
 +      calc/README: Mention that the TeX specific units won't use the
 +      `tex' prefix in TeX mode.
 +      calc/calc-lang.el (math-variable-table): Don't use the `tex'
 +      prefix for units in TeX mode.
 +
 +2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (kill-new, kill-append, kill-region):
 +      * comint.el (comint-kill-region): Make the yank-handler argument
 +      obsolete.
 +
 +2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-bnf-classify): Signal errors for tokens
 +      that are both openers (resp. closers) and something else.
 +      (smie-grammar): Loosen definition of valid values.
 +      (smie-next-sexp, smie-down-list, smie-blink-matching-open)
 +      (smie-indent--parent, smie-rule-parent, smie-indent-keyword)
 +      (smie-indent-after-keyword): Adjust users.
 +      (smie-indent-keyword): Don't indent empty lines.
 +
 +      * vc-hg.el (vc-hg-program): New var.
 +      Suggested by Norman Gray <norman@astro.gla.ac.uk>.
 +      (vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it.
 +
 +2010-11-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/autoload.el (autoload-find-destination): The function
 +      coding-system-eol-type may return non-numeric values.  (Bug#7414)
 +
 +2010-11-18  Ulrich Mueller  <ulm@gentoo.org>
 +
 +      * server.el (server-force-stop): Ensure the server is stopped (Bug#7409).
 +
 +2010-11-18  Eli Zaretskii  <eliz@gnu.org>
  
        * subr.el (posn-col-row): Pay attention to header line.  (Bug#7390)
  
 -2010-11-13  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-18  Chong Yidong  <cyd@stupidchicken.com>
  
        * textmodes/picture.el (picture-mouse-set-point): Don't use
        posn-col-row; explicitly compute the motion based on the posn at
        the window-start (Bug#7390).
  
 -2010-11-13  Michael Albinus  <michael.albinus@gmx.de>
 -
 -      * net/tramp.el (tramp-remote-coding-commands): Add an alternative
 -      using "base64 -d -i".  This is needed for older base64 versions
 -      from GNU coreutils.  Reported by Klaus Reichl
 -      <Klaus.Reichl@thalesgroup.com>.
 -
 -2010-11-13  Glenn Morris  <rgm@gnu.org>
 +2010-11-18  Glenn Morris  <rgm@gnu.org>
  
        * novice.el (disabled-command-function):
        Fix 2009-11-15 change.  (Bug#7384)
  
 -2010-11-12  Glenn Morris  <rgm@gnu.org>
 +2010-11-18  Glenn Morris  <rgm@gnu.org>
  
        * calendar/calendar.el (diary-iso-date-forms): Make elements
        mutually exclusive.  (Bug#7377)
  
 -2010-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * emacs-lisp/smie.el (smie-prec2->grammar): Obey equality constraints
        when filling the remaining "unconstrained" values.
  
 -2010-11-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * emacs-lisp/bytecomp.el (byte-compile-warnings): Simplify the
        safety predicate.
        (smie-indent-keyword): Consult rules, even for openers at bol.
        (smie-indent-comment-close): Try to align closer's content.
  
 -2010-11-11  Glenn Morris  <rgm@gnu.org>
 +2010-11-18  Glenn Morris  <rgm@gnu.org>
  
        * ls-lisp.el (ls-lisp-dired-ignore-case): Make it an obsolete alias.
  
 -2010-11-10  Glenn Morris  <rgm@gnu.org>
 +2010-11-18  Glenn Morris  <rgm@gnu.org>
  
        * printing.el (pr-menu-bind): Doc fix.
  
        * wid-edit.el (widget-field-use-before-change)
        (widget-use-overlay-change): Doc fixes.
  
 +2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Minor cleanup to improve style.
 +      * textmodes/rst.el (rst-update-section): Use point-marker.
 +      (rst-get-decoration): Eliminate unneeded assignment.
 +      (rst-promote-region, rst-straighten-decorations)
 +      (rst-section-tree, rst-adjust): Use point-marker.
 +      (rst-toc-mode-mouse-goto): Avoid setq.
 +      (rst-shift-region-guts, rst-shift-region-left)
 +      (rst-iterate-leftmost-paragraphs, rst-iterate-leftmost-paragraphs-2)
 +      (rst-convert-bullets-to-enumeration): Use copy-marker.
 +
 +      * minibuffer.el (completion-fail-discreetly): New var.
 +      (completion--do-completion): Use it.
 +
 +      * electric.el (electric-pair-pairs): New var.
 +      (electric-pair-post-self-insert-function): Use it.
 +      (electric-layout-post-self-insert-function): Don't insert a before
 +      newline unless it's actually needed.
 +
 +2010-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/python.el (run-python): Explain why we remove the current
 +      directory from sys.path.  Suggested by Eric Hanchrow <erich@cozi.com>.
 +
 +      * progmodes/grep.el (grep-regexp-alist): Tighten the regexp (bug#7378).
 +
 +2010-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/octave-mod.el: Rely on elecric-*-modes.
 +      (octave-mode-map): Don't bind ;, SPC, and LF.
 +      (octave-auto-indent, octave-auto-newline): Remove.
 +      (electric-layout-rules): Declare.
 +      (octave-mode): Set electric-layout-rules.
 +      (octave-indent-new-comment-line): Use reindent-then-newline-and-indent.
 +      (octave-reindent-then-newline-and-indent, octave-electric-semi)
 +      (octave-electric-space): Remove.
 +
 +      * electric.el (electric-layout-mode): New minor mode.
 +      (electric--after-char-pos): New function.
 +      (electric-indent-post-self-insert-function): Use it.
 +      (electric-layout-rules): New var.
 +      (electric-layout-post-self-insert-function): New function.
 +      (electric-indent-mode): Make them interact better.
 +
 +2010-11-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/checkdoc.el (checkdoc-syntax-table): Fix last change.
 +      (checkdoc-sentencespace-region-engine, checkdoc-this-string-valid)
 +      (checkdoc-proper-noun-region-engine): Use with-syntax-table.
 +
 +2010-11-15  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/flyspell.el (flyspell-generic-progmode-verify):
 +      Make sure to check inside the word (Bug#6761).
 +
 +2010-11-14  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line): If the cursorColor resource is set,
 +      change the cursor face-spec (Bug#7392).
 +
 +2010-11-13  Ken Manheimer  <ken.manheimer@gmail.com>
 +
 +      The main features of the following allout.el changes are:
 +      - implement user customization for the allout key bindings
 +      - add a customization control by which the user can inhibit use of
 +        a trailing Ctrl-H, so by default it's reserved for use with
 +        describe-prefix-bindings
 +      - adapt to new version of called-interactively-p, while
 +        maintaining backwards compatibility with old version
 +      - fix hotspot navigation so i works properly with meta-modified keys
 +
 +      * allout.el (allout-keybindings, allout-bind-keys)
 +      (allout-keybindings-binding, allout-prefixed-keybindings)
 +      (allout-unprefixed-keybindings, allout-preempt-trailing-ctrl-h)
 +      (allout-keybindings-list, allout-mode-map-adjustments)
 +      (allout-setup-mode-map): Establish allout-mode keymaps as user
 +      customizable settings, and also establish a customizable setting which
 +      regulates whether or not a trailing control-h is reserved for use with
 +      describe-prefix-bindings - and inhibit it by default, so that control-h
 +      *is* reserved for describe-prefix-bindings unless the user changes it.
 +
 +      * allout.el (allout-hotspot-key-handler): Distinguish more explicitly
 +      and accurately between modified and unmodified events, and handle
 +      modified events more comprehensively.
 +
 +      * allout.el (allout-substring-no-properties):
 +      Alias to use or provide version of `substring-no-properties'.
 +      (allout-solicit-alternate-bullet): Use `allout-substring-no-properties'.
 +
 +      * allout.el (allout-next-single-char-property-change):
 +      Alias to use or provide version of `next-single-char-property-change'.
 +      (allout-annotate-hidden, allout-hide-by-annotation):
 +      Use `allout-next-single-char-property-change'.
 +
 +      * allout.el (allout-select-safe-coding-system):
 +      Alias to use or provide version of `select-safe-coding-system'.
 +      (allout-toggle-subtree-encryption):
 +      Use `allout-select-safe-coding-system'.
 +
 +      * allout.el (allout-set-buffer-multibyte):
 +      Alias to use or provide version of `set-buffer-multibyte'.
 +      (allout-encrypt-string): Use `allout-set-buffer-multibyte'.
 +
 +      * allout.el (allout-called-interactively-p): Macro for using the
 +      different versions of called-interactively-p identically, depending on
 +      the subroutine's argument signature.
 +      (allout-back-to-current-heading, allout-beginning-of-current-entry):
 +      Use `(interactive "p")' instead of `(called-interactively-p)'.
 +
 +      * allout.el (allout-init, allout-ascend, allout-end-of-level)
 +      (allout-previous-visible-heading, allout-forward-current-level)
 +      (allout-backward-current-level, allout-show-children):
 +      Use `allout-called-interactively-p' instead of `called-interactively-p'.
 +
 +      * allout.el (allout-before-change-handler):
 +      Exempt edits to the (overlaid) character after the allout outline
 +      bullet from edit confirmation prompt.
 +
 +      * allout.el (allout-add-resumptions):
 +      Ensure that it respects correct buffer for keybindings.
 +
 +      * allout.el (allout-beginning-of-line):
 +      Use `allout-previous-single-char-property-change' alias for the sake of
 +      diverse compatibility.
 +
 +      * allout.el (allout-end-of-line):
 +      Use `allout-mark-active-p' to encapsulate respect for mark activity.
 +
 +2010-11-13  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.el (frame-notice-user-settings): Don't clobber other
 +      user-set parameters when calling face-set-after-frame-default in
 +      response to background-color parameter (Bug#7373).
 +
 +2010-11-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/characters.el (glyphless-char-display-control):
 +      Rename from glyphless-char-control; all users changed.  Doc fix.
 +      Signal an error if display method is not one of the recognized
 +      symbols.
 +
 +2010-11-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (tramp-compat-line-beginning-position)
 +      (tramp-compat-line-end-position): Remove them.
 +
 +      * net/tramp.el (tramp-parse-rhosts-group)
 +      (tramp-parse-shosts-group, tramp-parse-sconfig-group)
 +      (tramp-parse-hosts-group, tramp-parse-passwd-group)
 +      (tramp-parse-netrc-group, tramp-parse-putty-group)
 +      * net/tramp-cmds.el (tramp-append-tramp-buffers)
 +      * net/tramp-sh.el (tramp-do-file-attributes-with-ls)
 +      (tramp-sh-handle-file-selinux-context)
 +      (tramp-sh-handle-file-name-all-completions)
 +      (tramp-sh-handle-insert-directory)
 +      (tramp-sh-handle-expand-file-name, tramp-find-executable)
 +      (tramp-wait-for-output, tramp-send-command-and-read)
 +      * net/tramp-smb.el (tramp-smb-read-file-entry)
 +      (tramp-smb-get-cifs-capabilities): Use `point-at-eol'.
 +
 +      * net/tramp-sh.el (tramp-sh-handle-insert-directory) Use
 +      `point-at-bol'.
 +      (tramp-remote-coding-commands): Add an alternative using "base64
 +      -d -i".  This is needed for older base64 versions from GNU
 +      coreutils.  Reported by Klaus Reichl
 +      <Klaus.Reichl@thalesgroup.com>.
 +
 +2010-11-13  Hrvoje Niksic  <hniksic@xemacs.org>
 +
 +      * simple.el (count-words-region): New function.
 +
 +2010-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * shell.el (shell-dir-cookie-re): New custom variable.
 +      (shell-dir-cookie-watcher): New function.
 +
 +      * vc/vc.el (vc-deduce-backend): Use default-directory in shell-mode
 +      and compilation-mode (bug#7350).
 +
 +      * vc/smerge-mode.el (smerge-refine): Choose better default part to
 +      highlight when one of them is empty.
 +
 +      * skeleton.el (skeleton-read): Don't use `newline' since it may strip
 +      trailing space.
 +      (skeleton-newline): New function.
 +      (skeleton-internal-1): Use it.
 +
 +      * simple.el (open-line): `newline' may strip trailing space.
 +
 +2010-11-12  Kevin Ryde  <user42@zip.com.au>
 +
 +      * international/mule-cmds.el (princ-list): Use mapc.
 +
 +2010-11-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-log-buffer): New constant.
 +      Use it to replace all instances of "*Compile-Log*"
 +
 +2010-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase-let*, pcase-let): Add debug and
 +      indentation specs.
 +
 +2010-11-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/modula2.el: Use SMIE and skeleton.
 +      (m2-mode-syntax-table): (*..*) can be nested.
 +      Add //...\n.  Fix paren syntax.
 +      (m2-mode-map): Remove LF and TAB bindings.
 +      (m2-indent): Add safety property.
 +      (m2-smie-grammar): New var.
 +      (m2-smie-refine-colon, m2-smie-refine-of, m2-smie-backward-token)
 +      (m2-smie-forward-token, m2-smie-refine-semi, m2-smie-rules): New funs.
 +      (m2-mode): Use define-derived-mode.
 +      (m2-newline, m2-tab): Remove.
 +      (m2-begin, m2-case, m2-definition, m2-else, m2-for, m2-header)
 +      (m2-if, m2-loop, m2-module, m2-or, m2-procedure, m2-with, m2-record)
 +      (m2-stdio, m2-type, m2-until, m2-var, m2-while, m2-export)
 +      (m2-import): Use define-skeleton.
 +
 +2010-11-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * obsolete/lucid.el: Don't warn about any CL functions in this file.
 +
 +      * ls-lisp.el (ls-lisp-ignore-case, ls-lisp-dirs-first)
 +      (ls-lisp-verbosity): Add custom :set-after property.
 +      (ls-lisp-verbosity, ls-lisp-use-localized-time-format): Doc fixes.
 +      (ls-lisp-format, ls-lisp-format-time): Don't take `now' as an argument.
 +      (ls-lisp-insert-directory): Update caller.
 +      (ls-lisp-set-options): New function.
 +      (ls-lisp-emulation): Use ls-lisp-set-options for custom :set.
 +      Doc fix.
 +
 +      * play/landmark.el (lm-prompt-for-move):
 +      * play/gomoku.el (gomoku-prompt-for-move): Remove nonsensical code.
 +
 +      * progmodes/idlw-complete-structtag.el: Remove unused dec `name'.
 +
 +      * progmodes/idlwave.el (idlwave-routine-entry-compare-twins)
 +      (idlwave-study-twins): Prefix dynamic local variable `name'.
 +      (idlwave-routine-twin-compare): Update for above change.
 +
 +      * progmodes/idlw-help.el (idlwave-do-mouse-completion-help):
 +      Prefix dynamic local variables `name', `kwd', and `link'.
 +      * progmodes/idlw-shell.el (idlwave-shell-complete-execcomm-help):
 +      * progmodes/idlw-complete-structtag.el
 +      (idlwave-complete-structure-tag-help):
 +      * progmodes/idlwave.el (idlwave-complete-sysvar-help)
 +      (idlwave-complete-sysvar-tag-help)
 +      (idlwave-complete-class-structure-tag-help):
 +      Update for above name changes.
 +
 +2010-11-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/browse-url.el (browse-url-browser-function): Change the
 +      default to use `browse-url-mail' on mailto: URLs.
 +
 +2010-11-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-read-all-archive-contents):
 +      Reset package-archive-contents to nil before re-reading.
 +
 +2010-11-10  Brandon Craig Rhodes  <brandon@rhodesmill.org>  (tiny change)
 +
 +      * textmodes/flyspell.el (flyspell-word): Do not re-check words
 +      already found as misspellings by (flyspell-large-region), just
 +      do highlighting (bug#7322).
 +
 +2010-11-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/octave-mod.el (octave-mark-block): Update for smie change.
 +
 +      * emulation/edt.el (edt-with-position): New macro.
 +      (edt-find-forward, edt-find-backward, edt-find-next-forward)
 +      (edt-find-next-backward, edt-sentence-forward, edt-sentence-backward)
 +      (edt-paragraph-forward, edt-paragraph-backward): Use it.
 +
 +      * emulation/tpu-extras.el (tpu-with-position): New macro.
 +      (tpu-paragraph, tpu-page, tpu-search-internal): Use it.
 +
 +      * textmodes/texnfo-upd.el (texinfo-pointer-name): Fix typo.
 +
 +      * textmodes/texnfo-upd.el (texinfo-all-menus-update)
 +      (texinfo-menu-copy-old-description, texinfo-start-menu-description)
 +      (texinfo-master-menu, texinfo-insert-node-lines)
 +      (texinfo-multiple-files-update):
 +      * textmodes/texinfmt.el (texinfo-append-refill, texinfo-copying):
 +      Use line-beginning-position.
 +
 +      * progmodes/cperl-mode.el (cperl-find-pods-heres, cperl-write-tags):
 +      No recent Emacs supports system-type `emx'.
 +
 +      * progmodes/ada-xref.el (is-windows): Rename to ada-on-ms-windows.
 +      (ada-command-separator, ada-default-prj-properties)
 +      (ada-find-any-references): Update for above name change.
 +
 +      * dirtrack.el (dirtrack-directory-function)
 +      (dirtrack-canonicalize-function):
 +      * filecache.el (file-cache-completion-ignore-case)
 +      (file-cache-case-fold-search, file-cache-ignore-case):
 +      * term.el (serial-port-is-file-p): Cosmetic change.
 +
 +      * emulation/viper-init.el (viper-ms-style-os-p): Doc fix.
 +      Remove non-existent `windows-95' system-type.
 +      * dired.el (dired-chown-program): Remove non-existent `linux'
 +      system-type.
 +
 +      * net/net-utils.el (net-utils-remove-ctl-m): Use memq for system-types.
 +      (ping-program-options): Remove non-existent `linux' system-type.
 +
 +      * startup.el (package-initialize): Update declaration.
 +
 +      * ls-lisp.el (ls-lisp-time-lessp, ls-lisp-time-to-seconds): Remove.
 +      (ls-lisp-handle-switches): Use time-less-p.
 +      (ls-lisp-format-time): Use float-time.
 +
 +      * textmodes/remember.el (remember-time-to-seconds): Remove.
 +      (remember-store-in-mailbox): Use float-time.
 +
 +      * calendar/timeclock.el (timeclock-time-to-seconds): Make it an alias.
 +
 +      * calendar/time-date.el (time-to-seconds): Always an alias on Emacs,
 +      never a real function.
 +      (with-no-warnings): Remove compat stub, now unused.
 +      (time-less-p): Doc fix.
 +      (time-to-number-of-days): Simplify.
 +
 +      * eshell/esh-util.el (eshell-time-less-p, eshell-time-to-seconds):
 +      Remove.
 +      (eshell-read-passwd, eshell-read-hosts): Use time-less-p.
 +      * eshell/esh-test.el (eshell-test, eshell-show-usage-metrics):
 +      * eshell/em-unix.el (eshell-show-elapsed-time, eshell/time):
 +      * eshell/em-pred.el (eshell-pred-file-time): Use float-time.
 +      * eshell/em-ls.el (eshell-ls-sort-entries): Use time-less-p.
 +
 +      * eshell/em-unix.el (eshell-remove-entries, eshell/rm)
 +      (eshell-shuffle-files, eshell-shorthand-tar-command)
 +      (eshell-mvcpln-template, eshell/mv, eshell/cp, eshell/ln):
 +      Prefix dynamic locals `interactive', `preview', `recursive', `verbose'.
 +      * eshell/em-glob.el (eshell-extended-glob, eshell-glob-entries):
 +      Prefix dynamic local variable `matches'.
 +
 +      * skeleton.el (skeleton-internal-list, skeleton-internal-1):
 +      Prefix dynamic local variable `skeleton'.
 +
 +2010-11-10  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * net/browse-url.el (browse-url-mail): Insert body part of mailto url
 +      in mail buffer; make yank-action always a command that yanks original
 +      buffer.
 +
  2010-11-09  Glenn Morris  <rgm@gnu.org>
  
        * progmodes/tcl.el (tcl-hairy-scan-for-comment): Doc fix.
  
 -2010-11-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-09  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * minibuffer.el (minibuffer-completion-help): Specify the end of the
        completion field (bug#7211).
        Fix handling of backslash escapes.
        (python-quote-syntax): Adjust accordingly.
  
 -2010-11-08  Richard Levitte  <richard@levitte.org>  (tiny change)
 +2010-11-09  Richard Levitte  <richard@levitte.org>  (tiny change)
  
        * vc-mtn.el (vc-mtn-working-revision, vc-mtn-after-dir-status)
        (vc-mtn-workfile-branch): Adjust to new output format.
  
 -2010-11-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-09  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * international/mule-cmds.el (princ-list): Mark as obsolete.
  
 -2010-11-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-09  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * emacs-lisp/smie.el: New package.
  
 -2010-11-06  Michael Albinus  <michael.albinus@gmx.de>
 +2010-11-09  Michael Albinus  <michael.albinus@gmx.de>
  
        * files.el (backup-by-copying-when-mismatch):
        Set `permanent-local' property.
        * net/tramp.el (tramp-handle-insert-file-contents): Do not set
        `permanent-local' property for `backup-by-copying-when-mismatch'.
  
 -2010-11-06  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-09  Eli Zaretskii  <eliz@gnu.org>
  
        * ls-lisp.el (insert-directory): Doc fix.  (bug#7285)
 -      (ls-lisp-classify-file): New function.
 -      (ls-lisp-insert-directory): Call it if switches include -F (bug#6294).
 -      (ls-lisp-classify): Call ls-lisp-classify-file.
 -      (insert-directory): Remove blanks from switches.
  
 -2010-11-07  Wilson Snyder  <wsnyder@wsnyder.org>
 +2010-11-09  Wilson Snyder  <wsnyder@wsnyder.org>
  
        * progmodes/verilog-mode.el (verilog-insert-one-definition)
        (verilog-read-decls, verilog-read-sub-decls-sig): Fix AUTOWIRE and
        (verilog-preprocess): Use with-current-buffer and
        font-lock-fontify-buffer to cleanup style issues.
  
 -2010-11-05  Michael Albinus  <michael.albinus@gmx.de>
 -
 -      * net/trampver.el: Update release number.
 -
 -2010-08-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 -
 -      * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the
 -      beginning of the string.  Use `string-match-p'.  (Bug#6765)
 -
 -2010-11-01  Glenn Morris  <rgm@gnu.org>
 +2010-11-09  Glenn Morris  <rgm@gnu.org>
  
        * locate.el (locate, locate-mode): Doc fixes.
  
 -2010-11-01  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-09  Chong Yidong  <cyd@stupidchicken.com>
  
        * server.el (server-start): New arg INHIBIT-PROMPT prevents asking
        user for confirmation.
        (server-start): Use server-force-stop for kill-emacs-hook, to
        avoid user interaction while killing Emacs.
  
 -2010-10-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-09  Glenn Morris  <rgm@gnu.org>
  
 -      * vc/log-edit.el (log-edit-rewrite-fixes): New var.
 -      (log-edit-author): New dynamic var.
 -      (log-edit-changelog-ours-p, log-edit-insert-changelog-entries):
 -      Use it to return the author if different from committer.
 -      (log-edit-insert-changelog): Use them to add Author: and Fixes headers.
 +      * progmodes/meta-mode.el: Remove leading `*' from defcustom docs.
 +      (meta-indent-line): Simplify.
 +
 +      * vc/emerge.el (emerge-line-number-in-buf):
 +      * textmodes/ispell.el (ispell-region):
 +      * textmodes/fill.el (current-fill-column):
 +      * progmodes/xscheme.el (xscheme-send-current-line):
 +      * progmodes/vhdl-mode.el (vhdl-current-line, vhdl-line-copy):
 +      * progmodes/tcl.el (tcl-hairy-scan-for-comment):
 +      * progmodes/sh-script.el (sh-handle-prev-do):
 +      * progmodes/meta-mode.el (meta-indent-line):
 +      * progmodes/idlwave.el (idlwave-goto-comment, idlwave-fill-paragraph)
 +      (idlwave-in-quote):
 +      * progmodes/idlw-shell.el (idlwave-shell-current-frame)
 +      (idlwave-shell-update-bp-overlays, idlwave-shell-sources-filter):
 +      * progmodes/fortran.el (fortran-looking-at-if-then):
 +      * progmodes/etags.el (find-tag-in-order, etags-snarf-tag):
 +      * progmodes/cperl-mode.el (cperl-sniff-for-indent)
 +      (cperl-find-pods-heres):
 +      * progmodes/ada-mode.el (ada-get-current-indent, ada-narrow-to-defun):
 +      * net/quickurl.el (quickurl-list-insert):
 +      * net/ldap.el (ldap-search-internal):
 +      * net/eudc.el (eudc-expand-inline):
 +      * mail/sendmail.el (sendmail-send-it):
 +      * mail/mspools.el (mspools-visit-spool, mspools-get-spool-name):
 +      * emulation/viper-cmd.el (viper-paren-match, viper-backward-indent)
 +      (viper-brac-function):
 +      * calc/calc-yank.el (calc-do-grab-region):
 +      * calc/calc-keypd.el (calc-keypad-press):
 +      * term.el (term-move-columns, term-insert-spaces):
 +      * speedbar.el (speedbar-highlight-one-tag-line):
 +      * simple.el (current-word):
 +      * mouse-drag.el (mouse-drag-should-do-col-scrolling):
 +      * info.el (Info-find-node-in-buffer-1, Info-follow-reference)
 +      (Info-scroll-down):
 +      * hippie-exp.el (he-line-beg):
 +      * epa.el (epa--marked-keys):
 +      * dired-aux.el (dired-kill-line, dired-do-kill-lines)
 +      (dired-update-file-line, dired-add-entry, dired-remove-entry)
 +      (dired-relist-entry):
 +      * buff-menu.el (Buffer-menu-buffer):
 +      * array.el (current-line):
 +      * allout.el (allout-resolve-xref)
 +      (allout-latex-verbatim-quote-curr-line):
 +      Replace yet more uses of end-of-line etc with line-end-position, etc.
  
 -2010-10-31  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-08  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * vc/vc-hooks.el (vc-default-mode-line-string): Doc fix.
 +      * emacs-lisp/checkdoc.el (checkdoc-display-status-buffer)
 +      (checkdoc-interactive-loop, checkdoc-recursive-edit): Avoid princ-list.
 +      (checkdoc-syntax-table): Initialize in the declaration.
 +      (emacs-lisp-mode-hook): Use just checkdoc-minor-mode now that it turns
 +      the mode on unconditionally.
  
 -2010-10-31  Chong Yidong  <cyd@stupidchicken.com>
 +      * emacs-lisp/cl-macs.el (extent-data, extent-face, extent-priority)
 +      (extent-end-position, extent-start-position): Remove setf method for
 +      non-existing functions (bug#7319).
  
 -      * vc/vc.el (vc-deduce-backend): New fun.  Handle diff buffers.
 -      (vc-root-diff, vc-print-root-log, vc-log-incoming)
 -      (vc-log-outgoing): Use it.
 -      (vc-diff-internal): Set diff-vc-backend.
 +2010-11-07  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * vc/diff-mode.el (diff-vc-backend): New var.
 +      * emacs-lisp/smie.el: Simplify the smie-rules-function return values.
 +      (smie-precs->prec2): Rename from smie-precs-precedence-table.
 +      (smie-bnf->prec2): Rename from smie-bnf-precedence-table.
 +      (smie-prec2->grammar): Rename from smie-prec2-levels.
 +      (smie-grammar): Rename from smie-op-levels.
 +      (smie-indent--hanging-p): Rename from smie-hanging-p.
 +      (smie-rule-hanging-p): New alias.
 +      (smie-indent--bolp): Rename from smie-bolp.
 +      (smie-indent--hanging-p): New alias.
 +      (smie--token): New dynamically bound variable.
 +      (smie-indent--parent): New function.
 +      (smie-rule-parent-p): Use it; rename from smie-parent-p.
 +      (smie-rule-next-p): Rename from smie-next-p.
 +      (smie-rule-prev-p): Rename from smie-prev-p.
 +      (smie-rule-sibling-p, smie-rule-parent)
 +      (smie-indent--separator-outdent, smie-rule-separator): New functions.
 +      (smie-rule-separator-outdent): New var.
 +      (smie-indent--rule): Merge with smie-indent--column.
 +      (smie-indent-forward-token, smie-indent-backward-token):
 +      Also recognize close parens.
 +      (smie-indent-keyword): Don't use smie-indent--column any more.
 +      (smie-indent-after-keyword): Ignore closers by default.
 +      (smie-indent-line): Use with-demoted-errors.
 +      * progmodes/octave-mod.el (octave-smie-grammar):
 +      Rename from octave-smie-op-levels.
 +      (octave-smie-rules): Adjust to new behavior.
 +      * progmodes/prolog.el (prolog-smie-grammar):
 +      Rename from prolog-smie-op-levels.
 +
 +2010-11-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * eshell/esh-util.el (subst-char-in-string)
 +      (directory-files-and-attributes): These compatibility definitions are
 +      not needed on any version of Emacs since at least 21.4.
 +
 +      * progmodes/verilog-mode.el (verilog-get-beg-of-line)
 +      (verilog-get-end-of-line): Remove.
 +      (verilog-within-string, verilog-re-search-forward-substr)
 +      (verilog-re-search-backward-substr, verilog-set-auto-endcomments)
 +      (verilog-surelint-off, verilog-getopt-file, verilog-highlight-region):
 +      Use point-at-bol, point-at-eol.
 +      * progmodes/pascal.el (pascal-get-beg-of-line, pascal-get-end-of-line):
 +      Remove.
 +      (pascal-declaration-end, pascal-declaration-beg, pascal-within-string)
 +      (electric-pascal-terminate-line, pascal-set-auto-comments)
 +      (pascal-indent-paramlist, pascal-indent-declaration)
 +      (pascal-get-lineup-indent, pascal-func-completion)
 +      (pascal-get-completion-decl, pascal-var-completion, pascal-completion):
 +      Use point-at-bol, point-at-eol.
 +      * progmodes/flymake.el (flymake-line-beginning-position)
 +      (flymake-line-end-position): Remove.
 +      (flymake-highlight-line): Use point-at-bol, point-at-eol.
 +      * eshell/esh-util.el (line-end-position, line-beginning-position):
 +      Remove compat definitions.
 +
 +      * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
 +      Use end-of-line N.
 +      (checkdoc-this-string-valid-engine, checkdoc-file-comments-engine):
 +      Use line-end-position.
 +
 +      * emacs-lisp/chart.el (chart-zap-chars):
 +      * play/decipher.el (decipher-set-map):
 +      * progmodes/ada-mode.el (ada-get-current-indent)
 +      (ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
 +      * progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
 +      * progmodes/ada-xref.el (ada-initialize-runtime-library)
 +      (ada-get-all-references):
 +      * progmodes/cperl-mode.el (cperl-electric-paren)
 +      (cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
 +      (cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
 +      (cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
 +      (cperl-word-at-point-hard):
 +      * progmodes/idlw-shell.el (idlwave-shell-move-or-history)
 +      (idlwave-shell-filename-string, idlwave-shell-batch-command)
 +      (idlwave-shell-display-line):
 +      * progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
 +      (idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
 +      * progmodes/js.el (js--re-search-forward-inner)
 +      (js--re-search-backward-inner):
 +      * progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
 +      (vhdl-fix-clause, vhdl-compose-configuration-architecture):
 +      * progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
 +      * textmodes/flyspell.el (flyspell-process-localwords):
 +      * textmodes/ispell.el (ispell-buffer-local-parsing)
 +      (ispell-buffer-local-dict, ispell-buffer-local-words):
 +      Use point-at-bol and point-at-eol.
 +
 +      * speedbar.el (speedbar-generic-item-info)
 +      (speedbar-item-info-tag-helper, speedbar-change-expand-button-char)
 +      (speedbar-add-indicator, speedbar-check-vc-this-line)
 +      (speedbar-check-obj-this-line, speedbar-extract-one-symbol)
 +      (speedbar-buffers-line-directory, speedbar-buffer-revert-buffer):
 +      Replace more uses of end-of-line etc with line-end-position.
 +
 +2010-11-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * textmodes/texnfo-upd.el (texinfo-start-menu-description)
 +      (texinfo-update-menu-region-beginning, texinfo-menu-first-node)
 +      (texinfo-delete-existing-pointers, texinfo-find-pointer)
 +      (texinfo-clean-up-node-line, texinfo-insert-node-lines)
 +      (texinfo-multiple-files-update):
 +      * textmodes/table.el (table--probe-cell-left-up)
 +      (table--probe-cell-right-bottom):
 +      * textmodes/picture.el (picture-tab-search):
 +      * textmodes/page-ext.el (pages-copy-header-and-position)
 +      (pages-directory-for-addresses):
 +      * progmodes/vera-mode.el (vera-get-offset):
 +      * progmodes/simula.el (simula-calculate-indent):
 +      * progmodes/python.el (python-pdbtrack-overlay-arrow):
 +      * progmodes/prolog.el (end-of-prolog-clause):
 +      * progmodes/perl-mode.el (perl-calculate-indent, perl-indent-exp):
 +      * progmodes/icon.el (indent-icon-exp):
 +      * progmodes/etags.el (tag-re-match-p):
 +      * progmodes/ebrowse.el (ebrowse-show-file-name-at-point):
 +      * progmodes/ebnf2ps.el (ebnf-begin-file):
 +      * progmodes/dcl-mode.el (dcl-back-to-indentation-1)
 +      (dcl-save-local-variable):
 +      * play/life.el (life-setup):
 +      * play/gametree.el (gametree-looking-at-ply):
 +      * nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
 +      * mail/sendmail.el (mail-mode-auto-fill):
 +      * emacs-lisp/lisp-mode.el (calculate-lisp-indent):
 +      * emacs-lisp/edebug.el (edebug-overlay-arrow):
 +      * emacs-lisp/checkdoc.el (checkdoc-this-string-valid):
 +      * woman.el (woman-parse-numeric-value, woman2-TH, woman2-SH)
 +      (woman-tab-to-tab-stop, WoMan-warn-ignored):
 +      * type-break.el (type-break-file-keystroke-count):
 +      * term.el (term-replace-by-expanded-history-before-point)
 +      (term-skip-prompt, term-extract-string):
 +      * speedbar.el (speedbar-edit-line, speedbar-expand-line)
 +      (speedbar-contract-line, speedbar-toggle-line-expansion)
 +      (speedbar-parse-c-or-c++tag, speedbar-parse-tex-string)
 +      (speedbar-buffer-revert-buffer, speedbar-highlight-one-tag-line):
 +      * sort.el (sort-skip-fields):
 +      * skeleton.el (skeleton-internal-list):
 +      * simple.el (line-move-finish, line-move-to-column):
 +      * shell.el (shell-forward-command):
 +      * misc.el (copy-from-above-command):
 +      * makesum.el (double-column):
 +      * ebuff-menu.el (electric-buffer-update-highlight):
 +      * dired.el (dired-move-to-end-of-filename):
 +      * dframe.el (dframe-popup-kludge):
 +      * bookmark.el (bookmark-kill-line, bookmark-bmenu-show-filenames):
 +      * arc-mode.el (archive-get-lineno):
 +      Use line-end-position and line-beginning-position.
 +
 +      * progmodes/idlwave.el (idlwave-routine-entry-compare-twins):
 +      (idlwave-study-twins): Prefix dynamic local `class'.
 +      (idlwave-routine-twin-compare): Update for above name change.
 +
 +      * emacs-lisp/eieio-comp.el (byte-compile-file-form-defmethod):
 +      Use boundp tests to silence compiler.  Update for changed name of
 +      bytecomp-filename variable.
 +
 +      * emulation/viper-cmd.el (viper-read-string-with-history):
 +      Prefix dynamic local `initial'.
 +      (viper-minibuffer-standard-hook): Update for above name change.
 +
 +      * emacs-lisp/elint.el (elint-init-env): Prefix dynamic local `env'.
 +      (elint-init-form): Update for above name change.
 +
 +      * mail/mail-extr.el (mail-extract-address-components): Give dynamic
 +      local variables `cbeg' and `cend' a prefix.
 +      (mail-extr-voodoo): Update for above name change.
 +
 +      * textmodes/reftex-toc.el (reftex-toc-do-promote)
 +      (reftex-toc-promote-prepare): Pass `delta' as an explicit argument.
 +      (reftex-toc-promote-action): Doc fix.
 +
 +      * textmodes/reftex-sel.el (reftex-select-item): Give local variables
 +      `prompt', `data' a prefix.
 +      (reftex-select-post-command-hook, reftex-select-callback)
 +      (reftex-select-mouse-accept, reftex-select-read-cite):
 +      Update for above name changes.
 +
 +      * textmodes/reftex-ref.el (reftex-reference): Rename local variable
 +      `refstyle' to reftex-refstyle.
 +      (reftex-offer-label-menu): Update for above name change.
 +      * textmodes/reftex-sel.el (reftex-select-toggle-varioref): Update for
 +      `refstyle' name change.
 +
 +      * vc/emerge.el (emerge-eval-in-buffer): Remove, and replace all uses
 +      with with-current-buffer.
 +      (diff, template): Give dynamic local variables a prefix.
 +      (emerge-line-numbers): Rename local `diff' to emerge-line-diff.
 +      (emerge-line-number-in-buf): Update for above name change.
 +      (emerge-combine-versions-internal): Rename local `template' to
 +      emerge-combine-template.
 +      (emerge-combine-versions-edit): Update for above name change.
 +
 +2010-11-06  Ralf Angeli  <angeli@caeruleus.net>
 +
 +      * textmodes/reftex-cite.el
 +      (reftex-extract-bib-entries-from-thebibliography): Match bibitem
 +      entries with whitespace after \bibitem.
 +      (reftex-create-bibtex-file): Match entries containing numbers and
 +      symbol constituents.  Make sure that entries with whitespace at
 +      various places are found.
 +
 +2010-11-05  Christian Millour  <cm@abtela.com>  (tiny change)
 +
 +      * shell.el (shell-process-popd): Made aware of comint-file-name-prefix.
 +
 +2010-11-05  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * mouse.el (mouse-yank-primary): Update comment (Bug#6802).
 +
 +2010-11-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * woman.el (woman0-roff-buffer, woman1-roff-buffer)
 +      (woman2-roff-buffer): Give local variable `request' a prefix.
 +      (woman0-macro): Rename argument `request' in the same way.
 +      (woman-request): New name for `request' dynamic variable.
 +      (woman-unquote, woman-forward-arg): Update for above name change.
 +      (woman1-roff-buffer): Give local variable `unquote' a prefix.
 +      (woman1-unquote): New name for `unquote' dynamic variable.
 +      (woman1-B-or-I, woman1-alt-fonts): Update for above name change.
 +      (woman-translations): Rename from `translations'.  No longer global.
 +      (woman2-tr, woman-translate): Update for above name change.
 +      (woman-translate): Check for bound variable.
 +      (woman2-roff-buffer): Give local variable `translations' a prefix.
 +
 +      * play/doctor.el: Give all local variables a prefix.  Update callers.
 +      (doc$, doctor-put-meaning): Use backquote.
 +
 +      * emacs-lisp/cl-macs.el (loop): Give local variable args a prefix.
 +      (cl-parse-loop-clause, cl-loop-handle-accum): Update for above change.
 +
 +      * emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): Give local
 +      variables bytes, ptr, op a prefix.
 +      (disassemble-offset): Update for above change.
 +
 +2010-11-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-unpack): Remove no-op.
 +      (package--builtins, package--dir): Doc fix.
 +      (package-activate-1, package-activate, package-install)
 +      (package-compute-transaction): Fix error message.
 +      (package-delete): Use delete-directory.  Omit system packages.
 +      (package-initialize): Set package-alist to nil first.
 +      (package-menu-mark-delete, package-menu-mark-install): Don't add
 +      symbols that are inconsistent with the package state.
 +      (package-menu-execute): Perform deletions and installations as
 +      single batch operations.
  
 -2010-10-31  Juri Linkov  <juri@jurta.org>
 +2010-11-03  Glenn Morris  <rgm@gnu.org>
  
 -      * vc/vc.el (vc-diff-internal): Set `revert-buffer-function'
 -      buffer-locally to lambda that re-runs the vc diff command.
 -      (Bug#6447)
 +      * progmodes/idlwave.el (idlwave-pset): Only used on XEmacs.
 +      (props): Remove unnecessary declaration.
  
 -2010-10-31  Dan Nicolaescu  <dann@ics.uci.edu>
 +      * textmodes/ispell.el (ispell-init-process): On Emacs, always use
 +      set-process-query-on-exit-flag.
  
 -      * vc/log-view.el (log-view-mode-map): Bind revert-buffer.
 +      * textmodes/reftex-toc.el (name1, dummy, dummy2): Remove unused decs.
 +      (reftex-toc-do-promote): Remove unused local `mpos'.
 +      (reftex-toc-restore-region): Make `mpos' local to this function.
  
 -      Make 'g' (AKA revert-buffer) rerun VC log, log-incoming and
 -      log-outgoing commands.
 -      * vc/vc.el (vc-log-internal-common): Add a new argument and use it
 -      to create a buffer local revert-buffer-function variable.
 -      (vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a
 -      revert-buffer-function lambda.
 +      * net/dbus.el (dbus-name-owner-changed-handler): Doc fix.
  
 -      Improve VC create/retrieve tag/branch.
 -      * vc.el (vc-create-tag): Do not read the directory name for VCs
 -      with repository revision granularity.  Adjust the tag/branch
 -      prompt.  Reset VC properties.
 -      (vc-retrieve-tag): Do not read the directory name for VCs
 -      with repository revision granularity.  Reset VC properties.
 +      * play/landmark.el (lm-losing-threshold): Correct spelling.
 +      (lm-human-plays): Use new name.
 +
 +      * play/gomoku.el (gomoku-loosing-threshold): Correct spelling.
 +      (gomoku-human-plays): Use new name.
  
 -      Add optional support for resetting VC properties.
 -      * vc-dispatcher.el (vc-resynch-window): Add new optional argument,
 -      call vc-file-clearprops when true.
 -      (vc-resynch-buffer): Add new optional argument, pass it down.
 -      (vc-resynch-buffers-in-directory): Likewise.
 +      * play/gomoku.el (nil-score, Xscore, XXscore, XXXscore, XXXXscore)
 +      (Oscore, OOscore, OOOscore, OOOOscore): Rename with gomoku- prefix.
 +      (gomoku-score-trans-table, gomoku-winning-threshold)
 +      (gomoku-loosing-threshold, gomoku-init-score-table): Use new names.
 +
 +2010-11-03  Chong Yidong  <cyd@stupidchicken.com>
  
 -      Improve support for special markup in the VC commit message.
 -      * vc-mtn.el (vc-mtn-checkin): Support Author: and Date: markup.
 -      * vc-hg.el (vc-hg-checkin): Add support for Date:.
 -      * vc-git.el (vc-git-checkin):
 -      * vc-bzr.el (vc-bzr-checkin): Likewise.
 +      * emacs-lisp/package.el: Don't put built-in packages in
 +      package-alist, to avoid loading inefficiencies.
 +      (package-built-in-p): Make VERSION optional, and treat it as a
 +      minimum acceptable version.
 +      (package-activate): Search separately for built-in packages.
 +      Emit a warning if a dependency fails.
 +      (define-package): Handle most common case, where there is no
 +      obsolete package, first.
 +      (package-compute-transaction): Print required version in error.
 +      (package--initialized): New variable.
 +      (list-packages): Use it.
 +      (package-initialize): Optional arg NO-ACTIVATE.  Don't put
 +      built-in packages in packages-alist; keep it separate.
 +      Set package--initialized.
 +      (describe-package): Avoid activating packages as a side-effect.
 +      Search separately for built-in packages.
 +      (describe-package-1): Handle the case where an elpa package is
 +      simultaneously built-in and available/installed.
 +      (package-installed-p, package--generate-package-list):
 +      Search separately for built-in packages.
 +      (package-load-descriptor): Doc fix.
  
 -      Add support for vc-log-incoming, improve vc-log-outgoing for Git.
 -      * vc-git.el (vc-git-log-view-mode): Fix font lock for
 -      incoming/outgoing logs.
 -      (vc-git-log-outgoing, vc-git-log-incoming): New functions.
 +2010-11-03  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * vc-git.el (vc-git-log-outgoing): Use the same format as the
 -      short log.
 -      (vc-git-log-incoming): Likewise.  Run "git fetch" before the log
 -      command
 +      * progmodes/perl-mode.el (perl-syntax-propertize-function):
 +      Handle __DATA__ and __END__.
  
 -      Add bindings for vc-log-incoming and vc-log-outgoing.
 -      * vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming
 -      and vc-log-outgoing.
 -      * vc-dir.el (vc-dir-menu-map): Add menu bindings for vc-log-incoming
 -      and vc-log-outgoing.
 +2010-11-02  Noah Friedman  <friedman@splode.com>
  
 -      Improve state updating for VC tag commands.
 -      * vc.el (vc-create-tag, vc-retrieve-tag): Call vc-resynch-buffer
 -      to update the state of all buffers in the directory.
 +      * emacs-lisp/bytecomp.el (byte-recompile-file): If bytecomp-arg is
 +      nil, do not ask to recompile files that are not already compiled,
 +      and do not recompile them.
  
 -2010-05-19  Glenn Morris  <rgm@gnu.org>
 +2010-11-02  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * vc-dir.el (vc-dir): Don't pop-up-windows.  (Bug#6204)
 +      * emacs-lisp/package.el (package-initialize): Ensure that
 +      obsoleted built-in packages are not in package-activated-list
 +      during activation.
 +      (describe-package-1): Make the "installed" status override
 +      "built-in".
  
 -2010-10-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-01  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
  
 -      * vc.el (vc-checkin, vc-modify-change-comment):
 -      Adjust to new vc-start/finish-logentry.
 -      (vc-find-conflicted-file): New command.
 -      (vc-transfer-file): Adjust to new vc-checkin.
 -      (vc-next-action): Improve scoping.
 +      * subr.el (version-separator, version-regexp-alist): Remove '*'
 +      from docstring.
 +      (version-list-<=, version<=, version=): Doc fix.
  
 -      * vc-git.el (vc-git-checkin): Use log-edit-extract-headers.
 -      (vc-git-commits-coding-system): Rename from git-commits-coding-system.
 +2010-11-01  Kenichi Handa  <handa@m17n.org>
  
 -      * vc-dispatcher.el (vc-log-edit): Shorten names for
 -      log-edit-show-files.
 +      * faces.el (glyphless-char): Inherit underline for tty.
  
 -      * vc-bzr.el (vc-bzr-checkin): Use log-edit-extract-headers.
 -      (vc-bzr-conflicted-files): New function.
 +2010-11-01  Kenichi Handa  <handa@m17n.org>
  
 -      * log-edit.el (log-edit-summary, log-edit-header)
 -      (log-edit-unknown-header): New faces.
 -      (log-edit-headers-alist): New var.
 -      (log-edit-header-contents-regexp): New const.
 -      (log-edit-match-to-eoh): New function.
 -      (log-edit-font-lock-keywords): Use them.
 -      (log-edit): Insert a "Summary:" header as default.
 -      (log-edit-mode): Mark font-lock rules as case-insensitive.
 -      (log-edit-done): Cleanup headers.
 -      (log-edit-extract-headers): New function to replace it.
 +      Implement various display methods for glyphless characters.
  
 -      * vc-dispatcher.el (vc-finish-logentry): Don't mess so badly with
 -      the windows/frames.
 +      * international/characters.el (char-acronym-table): New variable.
 +      (glyphless-char-control): New variable.
 +      (update-glyphless-char-display): New funciton.
  
 -      * vc-bzr.el (vc-bzr-shelve-apply): Don't use *vc-bzr-shelve*.
 +      * faces.el (glyphless-char): New face.
  
 -      * vc-dir.el (vc-dir-kill-line): New command.
 -      (vc-dir-mode-map): Bind it to C-k.
 -      (vc-dir-headers): Abbreviate the working dir.
 +2010-11-01  Glenn Morris  <rgm@gnu.org>
  
 -      * vc-git.el (vc-git-revision-table): Include remote branches.
 +      * calendar/holidays.el (general-holidays, oriental-holidays)
 +      (local-holidays, other-holidays, hebrew-holidays, christian-holidays)
 +      (islamic-holidays, bahai-holidays, solar-holidays): Move aliases before
 +      the definitions of their targets.
  
 -2010-10-31  Dan Nicolaescu  <dann@ics.uci.edu>
 +      * emacs-lisp/smie.el (smie): New custom group.
 +      (smie-blink-matching-inners, smie-indent-basic): Add :group.
  
 -      New VC methods: vc-log-incoming and vc-log-outgoing.
 -      * vc.el (vc-print-log-setup-buttons, vc-log-internal-common)
 -      (vc-incoming-outgoing-internal, vc-log-incoming, vc-log-outgoing):
 -      New functions.
 -      (vc-print-log-internal): Just call vc-log-internal-common.
 -      (vc-log-view-type): New permanent local variable.
 +      * faces.el (xw-defined-colors, x-setup-function-keys):
 +      * mouse-sel.el (x-select-text):
 +      * term/w32console.el (x-setup-function-keys): Update declarations.
  
 -      * vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing.
 +      * progmodes/ruby-mode.el (ruby-syntax-propertize-heredoc): Declare.
  
 -      * vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead
 -      of the dynamic bound vc-short-log.
 -      (vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions.
 +      * textmodes/ispell.el (comment-add): Declare.
  
 -      * vc-git.el (vc-git-log-outgoing): New function.
 -      (vc-git-log-view-mode): Use vc-log-view-type instead
 -      of the dynamic bound vc-short-log.
 +      * net/gnutls.el (gnutls-boot, gnutls-errorp, gnutls-error-string):
 +      Declare.
  
 -      * vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead of
 -      the dynamic bound vc-short-log.  Highlight the tag.
 -      (vc-hg-log-incoming, vc-hg-log-outgoing): New functions.
 -      (vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode):
 -      (vc-hg-incoming-mode): Remove.
 -      (vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing.
 +      * info.el (finder-keywords-hash, package-alist): Declare.
  
 -      Fix default-directory for vc-root-diff.
 -      * vc.el (vc-root-diff): Bind default-directory to the root
 -      directory for the diff command.
 +2010-11-01  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-10-31  Sam Steingold  <sds@gnu.org>
 +      * finder.el (finder-compile-keywords): Don't use intern-soft,
 +      since package names may not yet exist in the obarray.
  
 -      * vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling
 -      `vc-hg-command' with a list of flags.
 +2010-11-01  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-10-31  Glenn Morris  <rgm@gnu.org>
 +      * vc/vc-arch.el (vc-arch-checkin):
 +      * vc/vc-cvs.el (vc-cvs-checkin):
 +      * vc/vc-mtn.el (vc-mtn-checkin):
 +      * vc/vc-rcs.el (vc-rcs-checkin):
 +      * vc/vc-sccs.el (vc-sccs-checkin):
 +      * vc/vc-svn.el (vc-svn-checkin): Remove optional extra arg, unused
 +      since 2010-04-21 commit by Stefan Monnier.
  
 -      * vc-bzr.el (vc-bzr-log-edit-mode): Add --fixes support to
 -      log-edit-before-checkin-process.
 +2010-11-01  Glenn Morris  <rgm@gnu.org>
  
 -      * vc.el (vc-modify-change-comment): Pass MODE to vc-start-logentry.
 +      * emacs-lisp/bytecomp.el (byte-recompile-file): Fix previous change.
  
 -      * vc-bzr.el, vc-hg.el (log-edit-mode): Declare.
 +      * startup.el (package-enable-at-startup, package-initialize):
 +      Silence compiler.
  
 -      * vc-dispatcher.el (vc-start-logentry): Doc fix.
 -      (log-view-process-buffer, log-edit-extra-flags): Declare.
 +      * progmodes/ada-mode.el (ada-font-lock-syntactic-keywords):
 +      Silence compiler.
  
 -2010-10-31  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-10-31  Julien Danjou  <julien@danjou.info>
  
 -      Add special markup processing for commit logs.
 -      * log-edit.el (log-edit): Add new argument MODE.  Use that mode
 -      when non-nil instead of the log-view-mode.
 +      * emacs-lisp/bytecomp.el (byte-recompile-file): New fun (bug#7297).
 +      (byte-recompile-directory):
 +      * emacs-lisp/lisp-mode.el (emacs-lisp-byte-compile-and-load):
 +      Use `byte-recompile-file'.
  
 -      * vc.el (vc-default-log-edit-mode): New function.
 +2010-10-31  Glenn Morris  <rgm@gnu.org>
  
 -      * vc-dispatcher.el (vc-log-edit): Add a mode argument, pass it to
 -      log-edit.
 +      * cus-start.el: Handle standard values via a keyword.
 +      Only set version property if specified.
 +      (cursor-in-non-selected-windows, menu-bar-mode)
 +      (tool-bar-mode, show-trailing-whitespace):
 +      Do not specify standard values.
 +      (transient-mark-mode, temporary-file-directory): Use :standard.
  
 -      Support for shelving snapshots and for showing shelves.
 -      * vc-bzr.el (vc-bzr-shelve-show, vc-bzr-shelve-show-at-point)
 -      (vc-bzr-shelve-apply-and-keep-at-point, vc-bzr-shelve-snapshot):
 -      New functions.
 -      (vc-bzr-shelve-map, vc-bzr-shelve-menu-map)
 -      (vc-bzr-extra-menu-map): Map them.
 +2010-10-31  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-10-30  Michael Albinus  <michael.albinus@gmx.de>
 +      * term/x-win.el (x-get-selection-value): New function that gets
 +      PRIMARY with type as specified in x-select-request-type. (Bug#6802).
 +
 +2010-10-31  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-handle-insert-file-contents): For root,
        preserve owner and group when editing files.  (Bug#7289)
  
 -2010-10-29  Glenn Morris  <rgm@gnu.org>
 +2010-10-31  Glenn Morris  <rgm@gnu.org>
  
        * speedbar.el (speedbar-mode):
        * play/fortune.el (fortune-in-buffer, fortune):
        * textmodes/bibtex.el (bibtex-validate, bibtex-validate-globally):
        Replace inappropriate uses of toggle-read-only.  (Bug#7292)
  
 -2010-10-28  Glenn Morris  <rgm@gnu.org>
 -
        * select.el (x-selection): Mark it as an obsolete alias.
  
 -2010-10-27  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 +2010-10-31  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
  
 -      * add-log.el (find-change-log): Use derived-mode-p rather than
 +      * vc/add-log.el (find-change-log): Use derived-mode-p rather than
        major-mode (bug#7284).
  
 -2010-10-27  Glenn Morris  <rgm@gnu.org>
 +2010-10-31  Glenn Morris  <rgm@gnu.org>
  
        * menu-bar.el (menu-bar-files-menu): Make it into an actual alias,
        rather than just an unused variable that inherits from the real one.
  
 -2010-10-23  Michael McNamara  <mac@mail.brushroad.com>
 +2010-10-31  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error.
 +      This fixes bug #7185.
 +
 +2010-10-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line): Search for package directories, and
 +      don't load package.el if none are found.
 +
 +      * emacs-lisp/package.el (describe-package, list-packages):
 +      Call package-initialize if it has not been called yet.
 +
 +2010-10-30  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-fonts.el (c-font-lock-enum-tail): New function
 +      which fontifies the tail of an enum.
 +      (c-basic-matchers-after): Insert a call to the above new function.
 +      This fixes bug #7264.
 +
 +2010-10-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * cus-start.el: Add :set properties for minor modes menu-bar-mode,
 +      tool-bar-mode, transient-mark-mode.  (Bug#7306)
 +      Include the :set property in the dumped Emacs.
 +
 +2010-10-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      SMIE: change indent rules format, improve smie-setup.
 +      * emacs-lisp/smie.el (smie-precs-precedence-table)
 +      (smie-merge-prec2s, smie-bnf-precedence-table, smie-prec2-levels):
 +      Mark them pure so the tables gets built at compile time.
 +      (smie-bnf-precedence-table): Store the closer-alist in the table.
 +      (smie-prec2-levels): Preserve the closer-alist.
 +      (smie-blink-matching-open): Be more forgiving in case of indentation.
 +      (smie-hanging-p): Rename from smie-indent--hanging-p.
 +      (smie-bolp): Rename from smie-indent--bolp.
 +      (smie--parent, smie--after): New dynamic vars.
 +      (smie-parent-p, smie-next-p, smie-prev-p): New funs.
 +      (smie-indent-rules): Remove.
 +      (smie-indent--offset-rule): Remove fun.
 +      (smie-rules-function): New var.
 +      (smie-indent--rule): New fun.
 +      (smie-indent--offset, smie-indent-keyword, smie-indent-after-keyword)
 +      (smie-indent-exps): Use it.
 +      (smie-setup): Setup paren blinking; add keyword args for token
 +      functions; extract closer-alist from op-levels.
 +      (smie-indent-debug-log): Remove var.
 +      (smie-indent-debug): Remove fun.
 +      * progmodes/prolog.el (prolog-smie-indent-rules): Remove.
 +      (prolog-smie-rules): New fun to replace it.
 +      (prolog-mode-variables): Simplify.
 +      * progmodes/octave-mod.el (octave-smie-closer-alist): Remove, now that
 +      it's setup automatically.
 +      (octave-smie-indent-rules): Remove.
 +      (octave-smie-rules): New fun to replace it.
 +      (octave-mode): Simplify.
 +
 +2010-10-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * files.el (temporary-file-directory): Remove (already defined in C).
 +      * cus-start.el: Add temporary-file-directory.
 +
 +      * abbrev.el (abbrev-mode):
 +      * composite.el (auto-composition-mode):
 +      * menu-bar.el (menu-bar-mode):
 +      * simple.el (transient-mark-mode):
 +      * tool-bar.el (tool-bar-mode): Adjust the define-minor-mode calls so
 +      that they do not define the associated variables twice.
 +      * simple.el (transient-mark-mode): Remove defvar.
 +      * composite.el (auto-composition-mode): Make variable auto-buffer-local.
 +      * cus-start.el: Add transient-mark-mode, menu-bar-mode, tool-bar-mode.
 +      Handle multiple groups, and also custom-delayed-init-variables.
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
 +
 +2010-10-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase): New `string' and `guard' patterns.
 +      (pcase-if): Add one minor optimization.
 +      (pcase-split-equal): Rename from pcase-split-eq.
 +      (pcase-split-member): Rename from pcase-split-memq.
 +      (pcase-u1): Add strings to the member optimization.
 +      Add `guard' variant of predicates.
 +      (pcase-q1): Add string patterns.
 +
 +2010-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/log-edit.el (log-edit-rewrite-fixes): State its safety pred.
 +
 +2010-10-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * term/ns-win.el (global-map, menu-bar-final-items, menu-bar-help-menu):
 +      Move menu-bar related settings to ../menu-bar.el.
 +      * menu-bar.el (global-map, menu-bar-final-items, menu-bar-help-menu):
 +      Move ns-specific settings here from term/ns-win.el.
 +
 +      * simple.el (x-selection-owner-p): Remove unused declaration.
 +
 +2010-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-cycling): New var (bug#7266).
 +      (minibuffer-complete, completion--do-completion):
 +      Use completion--flush-all-sorted-completions.
 +      (minibuffer-complete): Only cycle if completion-cycling is set.
 +      (completion--flush-all-sorted-completions): Unset completion-cycling.
 +      (minibuffer-force-complete): Set completion-cycling.
 +      (completion-all-sorted-completions): Move declaration before first use.
 +
 +2010-10-28  Leo  <sdl.web@gmail.com>
 +
 +      * iswitchb.el (iswitchb-kill-buffer): Avoid `iswitchb-make-buflist'
 +      which changes the order of matches seen by users (bug#7231).
 +
 +2010-10-28  Jes Bodi Klinke  <jes@bodi-klinke.dk>  (tiny change)
 +
 +      * progmodes/compile.el (compilation-mode-font-lock-keywords):
 +      Don't confuse -omega as "-o mega".
 +
 +2010-10-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/log-edit.el (log-edit-rewrite-fixes): New var.
 +      (log-edit-author): New dynamic var.
 +      (log-edit-changelog-ours-p, log-edit-insert-changelog-entries): Use it
 +      to return the author if different from committer.
 +      (log-edit-insert-changelog): Use them to add Author: and Fixes headers.
 +
 +      * play/landmark.el: Adjust commenting convention.
 +      (lm-nil-score): Rename from nil-score.
 +      (Xscore, XXscore, XXXscore, XXXXscore, Oscore, OOscore, OOOscore)
 +      (OOOOscore): Move into a let in lm-score-trans-table.
 +      (lm-winning-threshold, lm-loosing-threshold): Use lm-score-trans-table.
 +
 +      * electric.el (electric-indent-chars): Autoload.
 +      * progmodes/octave-mod.el (octave-mode):
 +      * progmodes/ruby-mode.el (ruby-mode): Take advantage of it.
 +      (ruby-mode-abbrev-table): Merge initialization and declaration.
 +
 +2010-10-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * abbrev.el (abbrev-mode): Remove one of the three definitions of this
 +      variable.
 +
 +      * server.el (server-host, server-port, server-auth-dir): Autoload risky.
 +
 +      * term/ns-win.el: Restore require of cl when compiling.
 +      (menu-bar-final-items): Remove non-existent `windows' menu.
 +      (ns-handle-nxopen): Optionally handle the temp-case.
 +      (ns-handle-nxopentemp): Just call ns-handle-nxopen.
 +      (ns-insert-file, ns-find-file): Use `pop'.
 +
 +2010-10-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * term/common-win.el (xw-defined-colors): Simplify the 'ns case.
 +
 +2010-10-26  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +
 +      * term/ns-win.el (ns-new-frame, ns-show-prefs): Don't add to
 +      global map.
 +      * term/common-win.el (x-setup-function-keys): Remove most of the
 +      keymappings.  Comment on the remaining ones.
 +
 +2010-10-26  Peter Oliver  <p.d.oliver@mavit.org.uk>  (tiny change)
 +
 +      * server.el (server-port): New option.  (Bug#854)
 +      (server-start): Use server-port.
 +
 +2010-10-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * term/ns-win.el (ns-version-string): Remove unused declaration.
 +      (ns-invocation-args): Change to x-invocation-args.
 +      (ns-handle-switch, ns-handle-numeric-switch, ns-handle-iconic)
 +      (ns-handle-name-switch, ns-ignore-2-arg): Remove.
 +      (ns-handle-nxopen, ns-handle-nxopentemp, ns-ignore-1-arg):
 +      Use x-invocation-args instead of ns-invocation-args.
 +      (ns-initialize-window-system, handle-args-function-alist):
 +      Use x-handle-args instead of ns-handle-args.
 +      * term/common-win.el (x-handle-args): Also handle nextstep arguments.
 +      * startup.el (command-line-ns-option-alist): Replace
 +      ns-handle-name-switch, ns-handle-switch, ns-handle-numeric-switch,
 +      ns-handle-iconic with the x- equivalents.
 +
 +      * term/common-win.el (x-select-enable-clipboard):
 +      * term/pc-win.el (x-select-enable-clipboard): Doc fix.
 +
 +      * term/ns-win.el: No need to require cl when compiling.
 +      (x-display-name, x-setup-function-keys, x-select-text, x-colors)
 +      (xw-defined-colors): Use the common-win definitions.
 +      (ns-alternatives-map): Make it an obsolete alias for x-alternatives-map.
 +      (ns-handle-iconic): Make it an alias for x-handle-iconic.
 +      * term/common-win.el (x-select-text, x-alternatives-map)
 +      (x-setup-function-keys, x-colors, xw-defined-colors): Handle 'ns case.
 +      * loadup.el [ns]: Load common-win.
 +
 +2010-10-26  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-mail.el (epa-mail-encrypt): Handle local-part only
 +      recipients; expand mail aliases (Bug#7280).
 +
 +2010-10-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * term/common-win.el (x-handle-switch): Simplify with pop.
 +      Optionally handle numeric switches.
 +      (x-handle-numeric-switch): Just call x-handle-switch.
 +      (x-handle-initial-switch, x-handle-xrm-switch, x-handle-geometry)
 +      (x-handle-name-switch, x-handle-display, x-handle-args):
 +      Simplify with pop.
 +
 +      * term/ns-win.el: Do not require easymenu.
 +      (menu-bar-edit-menu) <copy, paste, paste-from-menu, separator-undo>:
 +      <spell>: Move adjustments to menu-bar.el.
 +      * menu-bar.el (menu-bar-edit-menu) <copy, paste, paste-from-menu>:
 +      <separator-undo, spell>: Move ns-win's adjustments here.
 +      * loadup.el [ns]: Do not load easymenu.
 +
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.el (image-checkbox-checked, image-checkbox-unchecked):
 +      Delete (Bug#7222).
 +
 +      * startup.el (fancy-startup-tail): Instead of using inline images,
 +      refer to image files from etc/.
 +
 +      * wid-edit.el (checkbox): Likewise.
 +      (widget-image-find): Center image specs.
 +
 +2010-10-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * term/ns-win.el (x-select-text): Doc fix.
 +      * w32-fns.el (x-alternatives-map, x-setup-function-keys)
 +      (x-select-text): Move to term/common-win.
 +      * term/w32-win.el (xw-defined-colors): Move to common-win.
 +      * term/x-win.el (xw-defined-colors, x-alternatives-map)
 +      (x-setup-function-keys, x-select-text): Move to common-win.
 +      * term/common-win.el (x-select-text, x-alternatives-map)
 +      (x-setup-function-keys, xw-defined-colors): Merge x- and w32-
 +      definitions here.
 +
 +2010-10-24  T.V. Raman  <tv.raman.tv@gmail.com>  (tiny change)
 +
 +      * net/mairix.el (mairix-searches-mode-map):
 +      * mail/mspools.el (mspools-mode-map): Fix 2010-10-10 change.
 +
 +2010-10-24  Michael McNamara  <mac@mail.brushroad.com>
  
        * verilog-mode.el (verilog-directive-re): Make this variable
        auto-built for efficiency of execution and updating.
        (verilog-calc-1): Fix for clocking block in modport
        declaration. Reported by Brian Hunter.
  
 -2010-10-23  Wilson Snyder  <wsnyder@wsnyder.org>
 +2010-10-24  Wilson Snyder  <wsnyder@wsnyder.org>
  
        * verilog-mode.el (verilog-auto-inst, verilog-gate-ios)
        (verilog-gate-keywords, verilog-read-sub-decls)
        (verilog-read-sub-decls-expr): Fix AUTOOUTPUT not detecting
        submodule connections with replications "{#{a},#{b}}".
  
 -2010-10-23  Glenn Morris  <rgm@gnu.org>
 -
 -      * comint.el (comint-password-prompt-regexp):
 -      Match "enter the password".  (Bug#7224)
 -
 -2010-10-22  Juanma Barranquero  <lekktu@gmail.com>
 +2010-10-24  Juanma Barranquero  <lekktu@gmail.com>
  
        * progmodes/dcl-mode.el (dcl-electric-reindent-regexps):
        Fix typo in docstring.
  
 -2010-10-21  Michael Albinus  <michael.albinus@gmx.de>
 -
 -      * net/tramp.el (tramp-get-inline-coding): Return `nil' in case of
 -      errors.
 -
 -      * net/trampver.el: Update release number.
 -
 -2010-10-20  Kenichi Handa  <handa@m17n.org>
 +2010-10-24  Kenichi Handa  <handa@m17n.org>
  
        * face-remap.el (text-scale-adjust): Call read-event with a proper
        prompt.
  
 -2010-10-19  Michael Albinus  <michael.albinus@gmx.de>
 -
 -      * net/tramp.el (tramp-do-file-attributes-with-stat)
 -      (tramp-do-directory-files-and-attributes-with-stat): Use "e0" in
 -      order to make stat results a float.  Patch by Andreas Schwab
 -      <schwab@linux-m68k.org>.
 -
 -2010-10-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 -
 -      * repeat.el (repeat): Use read-key (bug#6256).
 -
 -2010-10-18  Chong Yidong  <cyd@stupidchicken.com>
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * emacs-lisp/unsafep.el: Don't mark functions that display
        messages as safe.  Suggested by Johan Bockgård.
  
 -2010-10-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-10-24  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * emacs-lisp/regexp-opt.el (regexp-opt-group, regexp-opt-charset):
        Turn comments into docstrings.
        * minibuffer.el (completion--replace): Move point where it belongs
        when there's a common suffix (bug#7215).
  
 -2010-10-15  Michael Albinus  <michael.albinus@gmx.de>
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * net/tramp.el (tramp-open-connection-setup-interactive-shell):
 -      Suppress expansion of tabs to spaces.  Reported by Dale Sedivec
 -      <dale@codefu.org>.
 +      Merge read-color and facemenu-read-color (Bug#7242).
  
 -2010-10-15  Kenichi Handa  <handa@m17n.org>
 +      * faces.el (read-color): Use the completion code from
 +      facemenu-read-color.  Require match in completion.  Doc fix.
  
 -      * international/characters.el: Add category '|' (word breakable)
 -      to fullwidth characters.
 +      * facemenu.el (facemenu-read-color): Alias for read-color.
 +      (facemenu-set-foreground, facemenu-set-background):
 +      Use read-color.
  
 -2010-10-14  Kenichi Handa  <handa@m17n.org>
 +      * frame.el (set-background-color, set-foreground-color)
 +      (set-cursor-color, set-mouse-color, set-border-color):
 +      Use read-color.
  
 -      * mail/rmail.el (rmail-show-message-1): Catch an error of
 -      base64-decode-region and just show an error message (bug#7165).
 +2010-10-24  Leo  <sdl.web@gmail.com>
  
 -      * ps-mule.el (ps-mule-font-spec-list): Delete it.  Not used anymore.
 -      (ps-mule-begin-job): Fix for the case that only ENCODING is set in
 -      a font-spec (bug#7197).
 +      * eshell/em-unix.el (eshell-remove-entries): Use the TRASH
 +      argument of delete-file and delete-directory (Bug#7011).
  
 -2010-10-13  Glenn Morris  <rgm@gnu.org>
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * mail/emacsbug.el (report-emacs-bug): Mention debbugs.gnu.org.
 +      * emacs-lisp/package.el (package-menu-mode-map): Inherit from
 +      button-buffer-map.
  
 -2010-10-12  Juanma Barranquero  <lekktu@gmail.com>
 +2010-10-24  Ralf Angeli  <angeli@caeruleus.net>
  
 -      * international/mule.el (define-coding-system):
 -      * international/titdic-cnv.el (quail-cxterm-package-ext-info):
 -      * composite.el (compose-region): Fix typo in docstring.
 +      * emacs-lisp/package.el (package--generate-package-list): Make the
 +      *Packages* buffer read-only.
  
 -2010-10-10  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-10-24  Alan Mackenzie  <acm@muc.de>
  
 -      * term/ns-win.el (ns-right-alternate-modifier): New defvar.
 -      (ns-right-option-modifier): New alias for ns-right-alternate-modifier.
 -      (mac-right-option-modifier): New alias for ns-right-option-modifier.
 +      * progmodes/cc-fonts.el (c-font-lock-declarations): Cache the
 +      result of `c-beginning-of-decl-1' between invocations of a lambda
 +      function (Bug #7265).
  
 -      * cus-start.el (all): ns-right-alternate-modifier is new.
 +2010-10-24  Daiki Ueno  <ueno@unixuser.org>
  
 -2010-10-10  Andreas Schwab  <schwab@linux-m68k.org>
 +      * epg-config.el (epg-gpg-program): Try to use "gpg2" if "gpg"
 +      executable is not available on the system (Bug#7268).
  
 -      * Makefile.in (ELCFILES): Update.
 +2010-10-24  Glenn Morris  <rgm@gnu.org>
  
 -2010-10-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * select.el (selection-coding-system, next-selection-coding-system):
 +      Sync doc with C versions.
  
 -      * emacs-lisp/lisp.el (lisp-completion-at-point):
 -      Use emacs-lisp-mode-syntax-table for the whole function.
 +      * w32-vars.el (x-select-enable-clipboard):
 +      * term/x-win.el (x-select-enable-clipboard): Move to common-win.
 +      * term/common-win.el (x-select-enable-clipboard): Move here.
  
 -2010-10-09  Richard Sharman  <richard_sharman@mitel.com>  (tiny change)
 +      * term/tty-colors.el (tty-defined-color-alist): Remove duplicate
 +      definition of C variable.
  
 -      * progmodes/gdb-ui.el (gdb-mouse-toggle-breakpoint-margin)
 -      (gdb-mouse-toggle-breakpoint-fringe): Correct regexp to
 -      work when breakpoint number exceeds nine.
 +      * frame.el (show-trailing-whitespace, auto-hscroll-mode)
 +      (display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
 +      Don't redefine things that are defined in C.
 +      * cus-start.el: Also handle :risky, :safe, :set, and :tag.
 +      (show-trailing-whitespace, auto-hscroll-mode)
 +      (display-hourglass, hourglass-delay, cursor-in-non-selected-windows):
 +      Set up the appropriate custom properties.
  
 -2010-10-05  David Koppelman  <koppel@ece.lsu.edu>
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified
 -      instead of font-lock-mode before adding keywords.
 -      Remove hi-lock-mode off code.  Remove inhibit hack.
 -      (hi-lock-set-pattern): Only add keywords if font-lock-fontified
 -      non-nil; removed hook inhibit hack.
 +      Bind "C-c ]" to ...
 +      * progmodes/f90.el (f90-mode-map): ... f90-insert-end.
 +      * nxml/nxml-mode.el (nxml-mode-map): ... nxml-finish-element.
 +      * textmodes/tex-mode.el (tex-mode-map): ... latex-close-block.
 +      * textmodes/sgml-mode.el (sgml-mode-map): ... sgml-close-tag.
  
 -2010-10-09  Glenn Morris  <rgm@gnu.org>
 +2010-10-23  Glenn Morris  <rgm@gnu.org>
  
 -      * emacs-lisp/shadow.el (find-emacs-lisp-shadows): Rename it...
 -      (load-path-shadows-find): ... to this.
 -      (list-load-path-shadows): Update for above change.
 +      * textmodes/flyspell.el (flyspell-mode): If there was an error,
 +      say what it was.
  
 -      * mail/mail-utils.el (mail-mbox-from): Also try return-path.
 +      * frame.el (auto-hscroll-mode, cursor-in-non-selected-windows):
 +      Sync docs with C version.
  
 -2010-10-08  Glenn Morris  <rgm@gnu.org>
 +      * term/ns-win.el (xw-defined-colors):
 +      * term/x-win.el (xw-defined-colors): Make docs identical to w32-win.
  
 -      * emacs-lisp/cl-compat.el, emacs-lisp/lmenu.el: Move to obsolete/.
 +      * term/pc-win.el (x-select-enable-clipboard):
 +      * term/x-win.el (x-select-enable-clipboard):
 +      * w32-vars.el (x-select-enable-clipboard): Make doc-strings identical.
  
 -      * emacs-lisp/shadow.el (lisp-shadow): Change prefix.
 -      (shadows-compare-text-p): Make it an obsolete alias for...
 -      (load-path-shadows-compare-text): ... new name.
 -      (find-emacs-lisp-shadows): Update for above name change.
 -      (load-path-shadows-same-file-or-nonexistent): New name for the old
 -      shadow-same-file-or-nonexistent.
 +      * comint.el (comint-password-prompt-regexp): Make it less vague.
 +      Bump version.
  
 -2010-10-03  Chong Yidong  <cyd@stupidchicken.com>
 +      * help-fns.el (doc-file-to-man, doc-file-to-info): New commands.
  
 -      * minibuffer.el (completion--some, completion--do-completion)
 -      (minibuffer-complete-and-exit, minibuffer-completion-help)
 -      (completion-basic-try-completion)
 -      (completion-basic-all-completions)
 -      (completion-pcm--find-all-completions): Use lexical-let to
 -      avoid some false matches in variable completion (Bug#7056)
 +      * help.el (finder-by-keyword): Remove unnecessary autoload.
  
 -2010-10-03  Olof Ohlsson Sax  <olof.ohlsson.sax@gmail.com>  (tiny change)
 +2010-10-22  Glenn Morris  <rgm@gnu.org>
  
 -      * vc-svn.el (vc-svn-merge-news): Use --non-interactive.  (Bug#7152)
 +      * loadup.el: Unconditionally load float-sup.
 +      * paren.el (show-paren-delay):
 +      * emacs-lisp/float-sup.el:
 +      * emulation/cua-base.el (cua-prefix-override-inhibit-delay):
 +      * obsolete/lazy-lock.el (lazy-lock-defer-time, lazy-lock-stealth-nice)
 +      (lazy-lock-stealth-verbose): Assume float support.
 +      * ps-print.el: Assume float support on Emacs.
 +      * emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
 +      Remove non-float branch.
  
 -2010-10-03  Leo  <sdl.web@gmail.com>
 +      * emacs-lisp/autoload.el (batch-update-autoloads): Update for
 +      src/Makefile no longer being pre-processed.
  
 -      * dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only
 -      return non-nil if the file exists (Bug#7090).
 +2010-10-22  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * emacs-lisp/find-func.el (find-library): Use test-completion.
  
 -      * minibuffer.el (completion--replace):
 -      Better preserve markers (bug#7138).
 +2010-10-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
 -2010-09-29  Juanma Barranquero  <lekktu@gmail.com>
 +      * newcomment.el (comment-dwim): Fix the intentation in the doc string.
  
 -      * server.el (server-process-filter): Doc fix.
 +2010-10-21  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-09-27  Drew Adams  <drew.adams@oracle.com>
 +      * net/tramp-sh.el (tramp-do-file-attributes-with-stat): Do not use
 +      space in stat format string.
 +      (tramp-send-command): Unset $PS1 when using here documents, in
 +      order not to get several prompts.
 +      (tramp-get-inline-coding): Return `nil' in case of errors.
  
 -      * dired.el (dired-save-positions): Doc fix.  (Bug#7119)
 +2010-10-21  Daiki Ueno  <ueno@unixuser.org>
  
 -2010-09-27  Andreas Schwab  <schwab@linux-m68k.org>
 +      * hexl.el (hexl-mode, hexl-mode-exit):
 +      Tweak revert-buffer-function to inhibit auto-mode-alist (Bug#7252).
 +      (hexl-revert-buffer-function): New function.
 +      (hexl-before-revert-hook, hexl-after-revert-hook): Abolish.
  
 -      * Makefile.in (ELCFILES): Update.
 +2010-10-19  Alan Mackenzie  <acm@muc.de>
  
 -      * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
 -      Avoid infinite recursion on erroneous lambda form.  (Bug#7114)
 +      * progmodes/cc-langs.el (c-type-decl-prefix-key): C++ bit:
 +      Move "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so
 +      that these keywords aren't wrongly matched as identifiers.
  
 -2010-09-27  Kenichi Handa  <handa@m17n.org>
 +      * progmodes/cc-mode.el (c-before-change, c-after-change): Move the
 +      setting of c-new-BEG and c-new-END from c-before-change to
 +      c-after-change.  (Bug#7181)
  
 -      * tar-mode.el (tar-header-block-tokenize): Decode filenames in
 -      "ustar" format.
 +2010-10-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-09-27  Kenichi Handa  <handa@m17n.org>
 +      * cus-face.el (custom-theme-set-faces): Revert 2010-10-18 change.
 +      Don't mark as safe.
  
 -      * international/mule.el (define-coding-system): Docstring fixed.
 +      * custom.el (custom-theme-set-variables): Likewise.
 +      (load-theme): Add custom-theme-set-faces and
 +      custom-theme-set-variables to safe-functions while loading.
 +      (custom-enabled-themes): Mark as risky.
  
 -      * international/mule-diag.el (describe-character-set): Use princ
 -      with proper print-length and print-level instead of insert.
 +2010-10-18  Julien Danjou  <julien@danjou.info>
  
 -2010-09-26  Juanma Barranquero  <lekktu@gmail.com>
 +      * bindings.el: Remove end dashes in default mode-line-format.
  
 -      * window.el (walk-windows): Doc fix (bug#7105).
 +2010-10-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-09-23  Glenn Morris  <rgm@gnu.org>
 +      * bindings.el (global-map): Bind C-d to delete-char and deletechar
 +      to delete-forward-char.
  
 -      * isearch.el (isearch-lazy-highlight-cleanup)
 -      (isearch-lazy-highlight-initial-delay)
 -      (isearch-lazy-highlight-interval)
 -      (isearch-lazy-highlight-max-at-a-time, isearch-lazy-highlight-face):
 -      * net/net-utils.el (ipconfig-program-options):
 -      Move aliases to options before the associated definitions.
 +      * simple.el (normal-erase-is-backspace-mode): Remap delete to
 +      deletechar, and hence delete-forward-char.
  
 -2010-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-10-19  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * newcomment.el (comment-normalize-vars): Better test validity of
 -      comment-end-skip.
 +      * repeat.el (repeat): Use read-key (bug#6256).
  
 -2010-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-10-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * emacs-lisp/float-sup.el (float-pi): New name for `pi'.
 -      (float-e): New name for `e'.
 -      (degrees-to-radians, radians-to-degrees):
 -      * calendar/solar.el (solar-longitude):
 -      * calculator.el (calculator-registers, calculator-funcall):
 -      * textmodes/artist.el (artist-spray-random-points):
 -      * play/bubbles.el (bubbles--initialize-images): Use new names.
 +      * emacs-lisp/unsafep.el: Don't mark functions that display
 +      messages as safe.  Suggested by Johan Bockgård.
  
 -2010-09-19  Eric M. Ludlam  <zappo@gnu.org>
 +2010-10-19  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      Update to CEDET 1.0's version of EIEIO.
 +      * minibuffer.el (completion--replace): Move point where it belongs
 +      when there's a common suffix (bug#7215).
  
 -      * emacs-lisp/eieio.el (eieio-specialized-key-to-generic-key):
 -      New function.
 -      (eieio-defmethod, eieio-generic-form, eieio-generic-call): Use it.
 -      (eieio-default-eval-maybe): Eval val instead of unquoting only.
 -      (class-precedence-list): If class is nil, return nil.
 -      (eieio-generic-call): If class of first input arg is nil, don't
 -      look up static methods, and do check for primary methods.
 -      (initialize-instance): See if the default needs to be evaluated
 -      during the constructor.
 -      (eieio-perform-slot-validation-for-default): Don't do the check
 -      for values that will eventually be evaluated.
 -      (eieio-eval-default-p): New function.
 -      (eieio-default-eval-maybe): Use it.
 +2010-10-19  Kenichi Handa  <handa@m17n.org>
  
 -2010-07-03  Jan Moringen  <jan.moringen@uni-bielefeld.de>
 +      * international/characters.el: Add category '|' (word breakable)
 +      to fullwidth characters.
  
 -      * emacs-lisp/eieio.el (eieio-defclass): Allow :c3
 -      method-invocation-order.
 -      (eieio-c3-candidate, eieio-c3-merge-lists): New functions.
 -      (eieio-class-precedence-dfs): Compute class precedence list using
 -      dfs algorithm.
 -      (eieio-class-precedence-bfs): Compute class precedence list using
 -      bfs algorithm.
 -      (eieio-class-precedence-c3): Compute class precedence list using
 -      c3 algorithm.
 -      (class-precedence-list): New function.
 -      (eieiomt-method-list, eieiomt-sym-optimize): Use it.
 -      (inconsistent-class-hierarchy): New error symbol.
 -      (call-next-method): Stow the replacement argument list for future
 -      call-next-method invocations.
 +2010-10-19  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-09-15  Glenn Morris  <rgm@gnu.org>
 +      * net/tramp-sh.el (tramp-do-file-attributes-with-stat)
 +      (tramp-do-directory-files-and-attributes-with-stat): Use "e0" in
 +      order to make stat results a float.  Patch by Andreas Schwab
 +      <schwab@linux-m68k.org>.
  
 -      * calendar/appt.el (appt-check): If not displaying the diary,
 -      use (diary 1) to only get the entries we need.
 -      (appt-make-list): Sort diary-list-entries, if we cannot guarantee
 -      that it is in day order.  (Bug#7019)
 +2010-10-18  Julien Danjou  <julien@danjou.info>
  
 -      * calendar/appt.el (appt-check): Rather than showing the diary,
 -      just turn off invisible display, and only if needed.
 +      * avoid.el (mouse-avoidance-ignore-p): Ignore mouse when it is
 +      hidden by `make-pointer-invisible'.
  
 -      * calendar/diary-lib.el (diary-list-entries): Doc fix.  (Bug#7019)
 +2010-10-18  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * files.el (locate-file-completion-table): Strip non-matching elements
 +      before checking length of list (bug#7238).
  
 -      * emacs-lisp/byte-run.el (set-advertised-calling-convention):
 -      Add `when' argument.  Update callers.
 +2010-10-18  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * subr.el (unintern): Declare the obarray arg mandatory.
 +      * custom.el (custom-theme-set-variables): Mark as a safe function.
 +      (load-theme): Check forms using unsafep.
 +
 +      * cus-face.el (custom-theme-set-faces): Mark as a safe function.
 +
 +2010-10-17  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-aspell-find-dictionary):
 +      Fix aspell data file searching (bug#7230).
 +
 +2010-10-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-theme.el (custom-theme--migrate-settings): New var.
 +      (customize-create-theme): Allow editing the `user' theme.
 +      (custom-theme-add-variable, custom-theme-add-var-1)
 +      (custom-theme-add-face, custom-theme-add-face-1): Add a checkbox
 +      to the front of each variable or face widget.
 +      (custom-theme-write): Save theme settings in the correct order.
 +      Optionally, remove saved settings from user customizations.
 +      (custom-theme-write-variables, custom-theme-write-faces):
 +      Save only the checked widgets.
 +      (customize-themes): Add a link for migrating custom settings.
 +
 +      * custom.el (custom-declare-theme, provide-theme):
 +      Use custom-theme-name-valid-p.
 +      (custom-theme-name-valid-p): Remove checks that are now
 +      unnecessary since themes no longer obey load-path.
 +
 +      * cus-edit.el (custom-variable-value-create): For the simple
 +      style, hide documentation string when hidden.
 +
 +2010-10-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (custom-variable, custom-face): Combine the
 +      :inhibit-magic and :display-style properties into a single
 +      :custom-style property.
 +      (custom-toggle-hide-variable, custom-toggle-hide-face):
 +      New functions.  If hiding an edited value, save it to :shown-value.
 +      (custom-variable-value-create, custom-face-value-create): Use them.
 +      (custom-magic-reset): Allow magic property to be unset.
 +
 +      * custom.el: Custom themes no longer use load-path.
 +      (custom-theme-load-path): New option.  Change built-in theme
 +      directory to etc/.
 +      (custom-enabled-themes): Add custom-theme-load-path dependency.
 +      (custom-theme--load-path): New function.
 +      (load-theme, custom-available-themes): Use it.
 +
 +      * cus-theme.el (describe-theme-1): Use custom-theme--load-path.
 +      (customize-themes): Link to custom-theme-load-path variable.
 +      (custom-theme-add-var-1, custom-theme-add-face-1): Use the
 +      :custom-style property.
 +
 +      * themes/*.el: Moved to etc/.
 +
 +2010-10-16  Ralf Angeli  <angeli@caeruleus.net>
 +
 +      * textmodes/reftex-cite.el
 +      (reftex-extract-bib-entries-from-thebibliography): Do not move
 +      point when searching for \bibitem entries.  Match entries with
 +      spaces or tabs in front of arguments.
 +
 +2010-10-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-theme.el (customize-create-theme): Delete overlays after
 +      erasing.  If given a THEME arg, display only the faces of that arg
 +      instead of custom-theme--listed-faces.
 +      (custom-theme-variable-menu, custom-theme-variable-action)
 +      (custom-variable-reset-theme, custom-theme-delete-variable): Delete.
 +      (custom-theme-add-variable, custom-theme-add-face): Apply value
 +      from the theme settings, instead of the current value.
 +      (custom-theme-add-var-1, custom-theme-add-face-1): New functions.
 +      (custom-theme-visit-theme): Allow calling outside theme buffers.
 +      (custom-theme-merge-theme): Don't enable the theme when merging.
 +      (custom-theme-write-variables, custom-theme-write-faces): Use the
 +      :shown-value properties to save buffer values, not global ones.
 +      (customize-themes): Display a warning about user customizations.
 +
 +      * cus-edit.el (custom-variable-value-create)
 +      (custom-face-value-create): Obey new special properties
 +      :shown-value and :inhibit-magic.
  
 -2010-09-14  Glenn Morris  <rgm@gnu.org>
 +2010-10-15  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * calendar/diary-lib.el (diary-list-entries-hook, diary-sort-entries):
 -      Doc fixes.
 +      * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
 +      Suppress expansion of tabs to spaces.  Reported by Dale Sedivec
 +      <dale@codefu.org>.
  
 -      * calendar/diary-lib.el (diary-included-files): New variable.
 -      (diary-list-entries): Maybe initialize diary-included-files.
 -      (diary-include-other-diary-files): Append to diary-included-files.
 -      * calendar/appt.el (appt-update-list): Also check the members of
 -      diary-included-files.  (Bug#6999)
 -      (appt-check): Doc fix.
 +2010-10-14  Kenichi Handa  <handa@m17n.org>
  
 -2010-09-12  David Reitter  <david.reitter@gmail.com>
 +      * mail/rmail.el (rmail-show-message-1): Catch an error of
 +      base64-decode-region and just show an error message (bug#7165).
  
 -      * simple.el (line-move-visual): Do not truncate goal column to
 -      integer size.  (Bug#7020)
 +      * ps-mule.el (ps-mule-font-spec-list): Delete it.  Not used anymore.
 +      (ps-mule-begin-job): Fix for the case that only ENCODING is set in
 +      a font-spec (bug#7197).
  
 -2010-09-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-10-14  Glenn Morris  <rgm@gnu.org>
  
 -      * repeat.el (repeat): Allow repeating when the last event is a click.
 -      Suggested by Drew Adams (bug#6256).
 +      * mail/emacsbug.el (report-emacs-bug): Mention debbugs.gnu.org.
  
 -2010-09-11  Sascha Wilde  <wilde@sha-bang.de>
 +2010-10-14  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * vc/vc-hg.el (vc-hg-state,vc-hg-working-revision):
 -      Replace setting HGRCPATH to "" by some less invasive --config options.
 +      * international/mule.el (define-coding-system):
 +      * international/titdic-cnv.el (quail-cxterm-package-ext-info):
 +      * composite.el (compose-region): Fix typo in docstring.
  
 -2010-09-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-10-14  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * font-lock.el (font-lock-beginning-of-syntax-function):
 -      Mark as obsolete.
 +      * cus-face.el (custom-theme-set-faces): Call custom-push-theme
 +      only after checking the theme-face property.
  
 -2010-09-10  Glenn Morris  <rgm@gnu.org>
 +      * faces.el (face-spec-reset-face): Reset all attributes in one
 +      single call to set-face-attribute.
 +      (face-spec-match-p): Make it a defsubst.
 +      (frame-set-background-mode): New arg KEEP-FACE-SPECS.
 +      (x-create-frame-with-faces, tty-create-frame-with-faces)
 +      (tty-set-up-initial-frame-faces): Don't recompute face specs in
 +      frame-set-background-mode, since they are recomputed immediately
 +      afterwards in face-set-after-frame-default.
 +      (face-set-after-frame-default): Minor optimization.
 +      (cursor): Provide non-trivial defface spec.
  
 -      * menu-bar.el (menu-bar-options-save): Fix handling of menu-bar
 -      and tool-bar modes.  (Bug#6211)
 -      (menu-bar-mode): Move setting of standard-value after the
 -      minor-mode definition, otherwise it seems to have no effect.
 +      * custom.el (custom-theme-recalc-face): Simplify.
  
 -2010-09-08  Masatake YAMATO  <yamato@redhat.com>
 +2010-10-14  Jay Belanger  <jay.p.belanger@gmail.com>
  
 -      * progmodes/antlr-mode.el (antlr-font-lock-additional-keywords):
 -      Fix typo.  (Bug#6976)
 +      * calc/calc-alg.el (math-var): Rename from `var'.
 +      (math-is-polynomial, math-is-poly-rec): Replace `var'
 +      with `math-var'.
  
 -2010-09-06  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +      * calc/calcalg2.el (math-var): Rename from `var'.
 +      (calcFunc-table, math-scan-for-limits): Replace `var'
 +      with `math-var'.
  
 -      * whitespace.el: Allow cleaning up blanks without blank
 -      visualization (Bug#6651).  Adjust help window for
 -      whitespace-toggle-options (Bug#6479).  Allow to use fill-column
 -      instead of whitespace-line-column (from EmacsWiki).  New version 13.1.
 -      (whitespace-style): Add new value 'face.  Adjust docstring.
 -      (whitespace-space, whitespace-hspace, whitespace-tab):
 -      Adjust foreground property face.
 -      (whitespace-line-column): Adjust docstring and type declaration.
 -      (whitespace-style-value-list, whitespace-toggle-option-alist)
 -      (whitespace-help-text): Adjust const initialization.
 -      (whitespace-toggle-options, global-whitespace-toggle-options):
 -      Adjust docstring.
 -      (whitespace-display-window, whitespace-interactive-char)
 -      (whitespace-style-face-p, whitespace-color-on): Adjust code.
 -      (whitespace-help-scroll): New fun.
 +2010-10-13  Glenn Morris  <rgm@gnu.org>
  
 -2010-09-05  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +      * subr.el (last): Deal with dotted lists (reported in bug#7174).
  
 -      * files.el (directory-abbrev-alist): Use \` as default regexp.
 +2010-10-13  Stephen Berman  <stephen.berman@gmx.net>
  
 -      * emacs-lisp/rx.el (rx-any): Don't explode ranges that end in special
 -      chars like - or ] (bug#6984).
 -      (rx-any-condense-range): Explode 2-char ranges.
 +      * subr.el (last): Use `safe-length' instead of `length' (bug#7206).
  
 -2010-09-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-10-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
 -      * textmodes/bibtex.el:
 -      * proced.el: Update to new email for Roland Winkler <winkler@gnu.org>.
 +      * net/tls.el (tls-program): Remove spurious %s from openssl.
 +      (tls-starttls-switches): Remove starttls hack.
 +      (open-tls-stream): Ditto.
 +      (tls-find-starttls-argument): Ditto.
  
 -2010-09-02  Glenn Morris  <rgm@gnu.org>
 +2010-10-13  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * desktop.el (desktop-path): Bump :version after 2009-09-15 change.
 +      * image.el (image-library-alist): Declare as obsolete alias.
 +      (image-type-available-p): Use `dynamic-library-alist'.
  
 -2010-08-31  Kenichi Handa  <handa@m17n.org>
 +      * term/w32-win.el (dynamic-library-alist):
 +      Use instead of `image-library-alist'.
  
 -      * international/mule-cmds.el (standard-display-european-internal):
 -      Setup standard-display-table for 8-bit characters by storing 8-bit
 -      characters in the element vector.
 +2010-10-13  IRIE Shinsuke  <irieshinsuke@yahoo.co.jp>  (tiny change)
  
 -      * disp-table.el (standard-display-8bit):
 -      Setup standard-display-table for 8-bit characters by storing 8-bit
 -      characters in the element vector.
 -      (standard-display-european): Likewise.
 +      * subr.el (last): Make it faster.  (Bug#7174)
  
 -2010-08-26  Michael Albinus  <michael.albinus@gmx.de>
 +2010-10-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>  (tiny change)
  
 -      Sync with Tramp 2.1.19.
 +      * Makefile.in (compile-clean): Use `` instead of $().  (Bug#7178)
  
 -      * net/tramp-cmds.el (tramp-cleanup-all-connections)
 -      (tramp-reporter-dump-variable, tramp-load-report-modules)
 -      (tramp-append-tramp-buffers): Use `tramp-compat-funcall'.
 -      (tramp-bug): Recommend setting of `tramp-verbose' to 9.
 +2010-10-12  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * net/tramp-compat.el (top): Do not autoload
 -      `tramp-handle-file-remote-p'.  Load tramp-util.el and tramp-vc.el
 -      only when `start-file-process' is not bound.
 -      (byte-compile-not-obsolete-vars): Define if not bound.
 -      (tramp-compat-funcall): New defmacro.
 -      (tramp-compat-line-beginning-position)
 -      (tramp-compat-line-end-position)
 -      (tramp-compat-temporary-file-directory)
 -      (tramp-compat-make-temp-file, tramp-compat-file-attributes)
 -      (tramp-compat-copy-file, tramp-compat-copy-directory)
 -      (tramp-compat-delete-file, tramp-compat-delete-directory)
 -      (tramp-compat-number-sequence, tramp-compat-process-running-p):
 -      Use it.
 -      (tramp-advice-file-expand-wildcards): Do not use
 -      `tramp-handle-file-remote-p'.
 -      (tramp-compat-make-temp-file): Simplify fallback implementation.
 -      (tramp-compat-copy-file): Add PRESERVE-SELINUX-CONTEXT.
 -      (tramp-compat-copy-tree): Remove function.
 -      (tramp-compat-delete-file): New defun.
 -      (tramp-compat-delete-directory): Provide implementation for older
 -      Emacsen.
 -      (tramp-compat-file-attributes): Handle only
 -      `wrong-number-of-arguments' error.
 +      * cus-theme.el (custom-theme--listed-faces): Add cursor face.
 +      (describe-theme-1): Extract doc from unloaded themes.
  
 -      * net/tramp-fish.el (tramp-fish-handle-copy-file):
 -      Add PRESERVE_SELINUX_CONTEXT.
 -      (tramp-fish-handle-delete-file): Add TRASH arg.
 -      (tramp-fish-handle-directory-files-and-attributes):
 -      Do not use `tramp-fish-handle-file-attributes.
 -      (tramp-fish-handle-file-local-copy)
 -      (tramp-fish-handle-insert-file-contents)
 -      (tramp-fish-maybe-open-connection): Use `with-progress-reporter'.
 +      * custom.el (custom-theme-name-valid-p): Don't list color-themes.
  
 -      * net/tramp-gvfs.el (top): Require url-util.
 -      (tramp-gvfs-mount-point): Remove.
 -      (tramp-gvfs-file-name-handler-alist): Add `file-selinux-context'
 -      and `set-file-selinux-context'.
 -      (tramp-gvfs-stringify-dbus-message, tramp-gvfs-send-command)
 -      (tramp-gvfs-handle-file-selinux-context)
 -      (tramp-gvfs-handle-set-file-selinux-context): New defuns.
 -      (with-tramp-dbus-call-method): Format trace message.
 -      (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT.
 -      (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file):
 -      Implement backup call, when operation on local files fails.
 -      Use progress reporter.  Flush properties of changed files.
 -      (tramp-gvfs-handle-delete-file): Add TRASH arg.
 -      Use `tramp-compat-delete-file'.
 -      (tramp-gvfs-handle-expand-file-name): Expand "~/".
 -      (tramp-gvfs-handle-make-directory): Make more traces.
 -      (tramp-gvfs-handle-write-region): Protect deleting tmpfile.
 -      (tramp-gvfs-url-file-name): Hexify file name in url.
 -      (tramp-gvfs-fuse-file-name): Take also prefix (like dav shares)
 -      into account for the resulting file name.
 -      (tramp-gvfs-handler-askquestion): Preserve current message, in
 -      order to let progress reporter continue afterwards.  (Bug#6257)
 -      Return dummy mountpoint, when the answer is "no".
 -      See `tramp-gvfs-maybe-open-connection'.
 -      (tramp-gvfs-handler-mounted-unmounted)
 -      (tramp-gvfs-connection-mounted-p): Test also for new mountspec
 -      attribute "default_location".  Set "prefix" property.
 -      Handle default-location.
 -      (tramp-gvfs-mount-spec): Return both prefix and mountspec.
 -      (tramp-gvfs-maybe-open-connection): Test, whether mountpoint
 -      exists.  Raise an error, if not (due to a corresponding answer
 -      "no" in interactive questions, for example).
 -      Use `tramp-compat-funcall'.
 +      * themes/tango-theme.el:
 +      * themes/tango-dark-theme.el:
 +      * themes/wheatgrass-theme.el: New files.
  
 -      * net/tramp-imap.el (top): Autoload `epg-make-context'.
 -      (tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT.
 -      (tramp-imap-do-copy-or-rename-file)
 -      (tramp-imap-handle-insert-file-contents)
 -      (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'.
 -      (tramp-imap-handle-delete-file): Add TRASH arg.
 +2010-10-12  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * net/tramp-smb.el (tramp-smb-handle-copy-file):
 -      Add PRESERVE-SELINUX-CONTEXT.
 -      (tramp-smb-handle-copy-file)
 -      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 -      (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
 -      Use `with-progress-reporter'.
 -      (tramp-smb-handle-delete-file): Add TRASH arg.
 +      * cus-theme.el (describe-theme, customize-themes)
 +      (custom-theme-save): New commands.
 +      (custom-new-theme-mode-map): Bind C-x C-s.
 +      (custom-new-theme-mode): Use custom--initialize-widget-variables.
 +      (customize-create-theme): New optional arg THEME.
 +      (custom-theme-revert): Use it.
 +      (custom-theme-visit-theme): Remove dead code.
 +      (custom-theme-merge-theme): Use custom-available-themes.
 +      (custom-theme-write): Make interactive.
 +      (custom-theme-write): Use custom-theme-name-valid-p.
 +      (describe-theme-1, custom-theme-choose-revert)
 +      (custom-theme-checkbox-toggle, custom-theme-selections-toggle):
 +      New funs.
 +      (custom-theme-allow-multiple-selections): New option.
 +      (custom-theme-choose-mode): New major mode.
  
 -      * net/tramp.el (tramp-methods): Move hostname to the end in all
 -      ssh `tramp-login-args'.  Add `tramp-async-args' attribute where
 -      appropriate.
 -      (tramp-verbose): Describe verbose level 9.
 -      (tramp-completion-function-alist)
 -      (tramp-file-name-regexp, tramp-chunksize)
 -      (tramp-local-coding-commands, tramp-remote-coding-commands)
 -      (with-connection-property, tramp-completion-mode-p)
 -      (tramp-action-process-alive, tramp-action-out-of-band)
 -      (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote)
 -      (tramp-exists-file-name-handler): Fix docstring.
 -      (tramp-remote-process-environment): Use `format' instead of
 -      `concat'.  Protect version string by apostroph.
 -      (tramp-shell-prompt-pattern): Do not use a shy group in case of
 -      XEmacs.
 -      (tramp-file-name-regexp-unified)
 -      (tramp-completion-file-name-regexp-unified): On W32 systems, do
 -      not regard the volume letter as remote filename.  (Bug#5447)
 -      (tramp-perl-file-attributes)
 -      (tramp-perl-directory-files-and-attributes): Don't pass "$3".
 -      (tramp-vc-registered-read-file-names): Read input as
 -      here-document, otherwise the command could exceed maximum length
 -      of command line.
 -      (tramp-file-name-handler-alist): Add `file-selinux-context' and
 -      `set-file-selinux-context'.
 -      (tramp-debug-message): Add `tramp-compat-funcall' to ignored
 -      backtrace functions.
 -      (tramp-error-with-buffer): Don't show the connection buffer when
 -      we are in completion mode.
 -      (tramp-progress-reporter-update, tramp-remote-selinux-p)
 -      (tramp-handle-file-selinux-context)
 -      (tramp-handle-set-file-selinux-context, tramp-process-sentinel)
 -      (tramp-connectable-p, tramp-open-shell, tramp-get-remote-trash):
 -      New defuns.
 -      (with-progress-reporter): New defmacro.
 -      (tramp-debug-outline-regexp): New defconst.
 -      (top, tramp-rfn-eshadow-setup-minibuffer)
 -      (tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times)
 -      (tramp-handle-dired-compress-file, tramp-handle-shell-command)
 -      (tramp-completion-mode-p, tramp-check-for-regexp)
 -      (tramp-open-connection-setup-interactive-shell)
 -      (tramp-compute-multi-hops, tramp-read-passwd, tramp-clear-passwd)
 -      (tramp-time-diff, tramp-coding-system-change-eol-conversion)
 -      (tramp-set-process-query-on-exit-flag, tramp-unload-tramp):
 -      Use `tramp-compat-funcall'.
 -      (tramp-handle-make-symbolic-link): Flush file properties.
 -      (tramp-handle-load, tramp-handle-file-local-copy)
 -      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 -      (tramp-handle-vc-registered, tramp-maybe-send-script)
 -      (tramp-find-shell): Use `with-progress-reporter'.
 -      (tramp-do-file-attributes-with-stat): Add space in format string,
 -      in order to work around a bug in pdksh.  Reported by Gilles Pion
 -      <gpion@lfdj.com>.
 -      (tramp-handle-verify-visited-file-modtime): Do not send a command
 -      when the connection is not established.
 -      (tramp-handle-set-file-times): Simplify the check for utc.
 -      (tramp-handle-directory-files-and-attributes)
 -      (tramp-get-remote-path): Use `copy-tree'.
 -      (tramp-completion-handle-file-name-all-completions): Ensure, that
 -      non remote files are still checked.  Oops.
 -      (tramp-handle-copy-file, tramp-do-copy-or-rename-file):
 -      Handle PRESERVE-SELINUX-CONTEXT.
 -      (tramp-do-copy-or-rename-file): Add progress reporter.
 -      (tramp-do-copy-or-rename-file-directly): Do not use
 -      `tramp-handle-file-remote-p'.
 -      (tramp-do-copy-or-rename-file-out-of-band):
 -      Use `tramp-compat-delete-directory'.
 -      (tramp-do-copy-or-rename-file-out-of-band)
 -      (tramp-compute-multi-hops, tramp-maybe-open-connection):
 -      Use `format-spec-make'.
 -      (tramp-handle-delete-file): Add TRASH arg.
 -      (tramp-handle-dired-uncache): Flush directory cache, not only file
 -      cache.
 -      (tramp-handle-expand-file-name)
 +      * custom.el (custom-theme-set-variables): Remove dead code.
 +      Obey custom--inhibit-theme-enable.
 +      (custom--inhibit-theme-enable): New var.
 +      (provide-theme): Obey it.
 +      (load-theme): Replace load with manual read/eval, in order to
 +      check for correctness.  Use custom-theme-name-valid-p.
 +      (custom-theme-name-valid-p): New function.
 +      (custom-available-themes): Use it.
 +
 +      * cus-edit.el (custom--initialize-widget-variables): New function.
 +      (Custom-mode): Use it.
 +
 +      * cus-face.el (custom-theme-set-faces): Remove dead code.
 +      Obey custom--inhibit-theme-enable.
 +
 +      * help-mode.el (help-theme-def, help-theme-edit): New buttons.
 +
 +2010-10-12  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * net/telnet.el (telnet-mode-map): Fix previous change (bug#7193).
 +
 +2010-10-12  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * term/ns-win.el (ns-right-alternate-modifier): New defvar.
 +      (ns-right-option-modifier): New alias for ns-right-alternate-modifier.
 +      (mac-right-option-modifier): New alias for ns-right-option-modifier.
 +
 +      * cus-start.el (all): ns-right-alternate-modifier is new.
 +
 +2010-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/lisp.el (lisp-completion-at-point):
 +      Use emacs-lisp-mode-syntax-table for the whole function.
 +
 +2010-10-12  David Koppelman  <koppel@ece.lsu.edu>
 +
 +      * hi-lock.el (hi-lock-font-lock-hook): Check font-lock-fontified
 +      instead of font-lock-mode before adding keywords.
 +      Remove hi-lock-mode off code.  Remove inhibit hack.
 +      (hi-lock-set-pattern): Only add keywords if font-lock-fontified
 +      non-nil; removed hook inhibit hack.
 +
 +2010-10-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/shadow.el (find-emacs-lisp-shadows): Rename it...
 +      (load-path-shadows-find): ... to this.
 +      (list-load-path-shadows): Update for above change.
 +
 +      * mail/mail-utils.el (mail-mbox-from): Also try return-path.
 +
 +2010-10-11  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * mail/hashcash.el, net/imap.el, pgg-parse.el, pgg.el:
 +      Fix comment for declare-function.
 +
 +2010-10-11  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * custom.el (custom-fix-face-spec): New function; code moved from
 +      custom-face-edit-fix-value.
 +      (custom-push-theme): Use it when checking if a face has been
 +      changed outside customize.
 +      (custom-available-themes): New function.
 +      (load-theme): Use it.
 +
 +      * cus-edit.el (custom-face-edit-fix-value): Use custom-fix-face-spec.
 +
 +      * custom.el (custom-push-theme): Cleanup (use cond).
 +      (disable-theme): Recompute the saved-face property.
 +      (custom-theme-recalc-face): Follow face alias before setting prop.
 +
 +      * image.el (image-checkbox-checked, image-checkbox-unchecked):
 +      New variables, containing checkbox images.
 +
 +      * startup.el (fancy-startup-tail):
 +      * wid-edit.el (checkbox): Use them.
 +
 +2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * shell.el (shell-mode-map):
 +      * progmodes/modula2.el (m2-mode-map):
 +      * progmodes/inf-lisp.el (inferior-lisp-mode-map):
 +      * play/mpuz.el (mpuz-mode-map):
 +      * play/landmark.el (lm-mode-map):
 +      * play/decipher.el (decipher-mode-map):
 +      * play/5x5.el (5x5-mode-map):
 +      * net/telnet.el (telnet-mode-map):
 +      * net/quickurl.el (quickurl-list-mode-map):
 +      * net/mairix.el (mairix-searches-mode-map):
 +      * net/eudc-hotlist.el (eudc-hotlist-mode-map):
 +      * net/dig.el (dig-mode-map):
 +      * mail/mspools.el (mspools-mode-map):
 +      * hexl.el (hexl-mode-map):
 +      * emulation/ws-mode.el (wordstar-C-k-map, wordstar-mode-map)
 +      (wordstar-C-o-map, wordstar-C-q-map):
 +      * emacs-lisp/edebug.el (edebug-eval-mode-map):
 +      * emacs-lisp/chart.el (chart-map):
 +      * edmacro.el (edmacro-mode-map):
 +      * erc/erc-list.el (erc-list-menu-mode-map):
 +      * array.el (array-mode-map): Declare and define in one step.
 +
 +      * vc/log-view.el (log-view-mode-map): Bind revert-buffer.
 +
 +2010-10-10  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa.el (epa-passphrase-callback-function): Display filename
 +      passed as the 3rd arg.
 +      * epa-file.el (epa-file-passphrase-callback-function):
 +      Pass filename to epa-passphrase-callback-function.
 +
 +2010-10-09  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (custom-face-widget-to-spec)
 +      (custom-face-get-current-spec, custom-face-state): New functions.
 +      (custom-face-set, custom-face-mark-to-save)
 +      (custom-face-value-create, custom-face-state-set): Use them.
 +
 +      * cus-theme.el (custom-theme--listed-faces): New var.
 +      (customize-create-theme): Use *Custom Theme* as the buffer name.
 +      Set revert-buffer-function.  Optional arg BUFFER.  Insert all
 +      faces listed in custom-theme--listed-faces.
 +      (custom-theme-revert): New function.
 +      (custom-theme-add-variable, custom-theme-add-face): Insert at the
 +      bottom of the list.
 +      (custom-theme-write): Prompt for theme name if empty.
 +      (custom-theme-write-variables): Use dolist.
 +      (custom-theme-write-faces): Handle hidden (collapsed) widgets.
 +
 +2010-10-09  Alan Mackenzie  <acm@muc.de>
 +
 +      Enhance fontification of declarators to take account of the
 +      presence/absence of "typedef".
 +
 +      * cc-engine.el (c-forward-type): New &optional param
 +      "brace-block-too".
 +      (c-forward-decl-or-cast-1): cdr of return value now indicates the
 +      presence of either or both of a "struct"-like keyword and "typedef".
 +
 +      * cc-fonts.el (c-complex-decl-matchers): Remove the heuristic
 +      fontification of declarators which follow a "}".
 +      (c-font-lock-declarations): Fontify declarators according to the
 +      presence/absence of "typedef".
 +
 +      * cc-langs.el (c-typedef-kwds c-typedef-key): New lang variable
 +      for "typedef".
 +      (c-typedef-decl-key): New lang variable built from
 +      c-typedef-decl-kwds.
 +
 +2010-10-09  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * ibuffer.el (ibuffer-mode-map): Don't redefine the cursor keys,
 +      since that's too annoying.  Move the filter groups commands to
 +      TAB/backtab.
 +
 +      * epa.el (epa-passphrase-callback-function): Say what we're
 +      querying the password for.
 +
 +      * ibuffer.el (ibuffer-visit-buffer): To mimick list-buffers
 +      behaviour, don't bury the ibuffer buffer when visiting other buffers.
 +
 +2010-10-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (custom-commands, custom-buffer-create-internal)
 +      (custom-magic-value-create): Pad button tags with spaces.
 +      (custom-face-edit): New variable.
 +      (custom-face-value-create): Determine whether to use the usual
 +      face editor here, instead of using custom-face-selected.
 +      Pass face defaults to custom-face-edit widget.
 +      (custom-face-selected, custom-display-unselected): Delete widgets.
 +      (custom-display-unselected-match): Function removed.
 +      (custom-face-set, custom-face-mark-to-save):
 +      Accept custom-face-edit widgets as the direct widget child.
 +
 +      * wid-edit.el (widget--completing-widget): New var.
 +      (widget-default-complete): Bind it when doing completion.
 +      (widget-string-complete, widget-file-complete): Use it.
 +
 +2010-10-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/cal-hebrew.el (holiday-hebrew-rosh-hashanah)
 +      (holiday-hebrew-passover, holiday-hebrew-tisha-b-av)
 +      (holiday-hebrew-misc): Small simplifications.
 +
 +      * emacs-lisp/authors.el (authors-valid-file-names): Add b2m.c.
 +
 +      * net/browse-url.el: Don't require thingatpt, term, dired,
 +      executable, or w3-auto when compiling.
 +      (dired-get-filename, term-char-mode, term-send-down, term-send-string):
 +      Declare.
 +      (browse-url-text-emacs): Require term.
 +
 +2010-10-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * net/browse-url.el (browse-url-xdg-open): Remove use of /bin/sh.
 +
 +2010-10-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/cl-compat.el, emacs-lisp/lmenu.el: Move to obsolete/.
 +
 +      * emacs-lisp/shadow.el (lisp-shadow): Change prefix.
 +      (shadows-compare-text-p): Make it an obsolete alias for...
 +      (load-path-shadows-compare-text): ... new name.
 +      (find-emacs-lisp-shadows): Update for above name change.
 +      (load-path-shadows-same-file-or-nonexistent): New name for the old
 +      shadow-same-file-or-nonexistent.
 +
 +2010-10-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * minibuffer.el (completion--some, completion--do-completion)
 +      (minibuffer-complete-and-exit, minibuffer-completion-help)
 +      (completion-basic-try-completion)
 +      (completion-basic-all-completions)
 +      (completion-pcm--find-all-completions): Use lexical-let to
 +      avoid some false matches in variable completion (Bug#7056)
 +
 +2010-10-08  Olof Ohlsson Sax  <olof.ohlsson.sax@gmail.com>  (tiny change)
 +
 +      * vc-svn.el (vc-svn-merge-news): Use --non-interactive.  (Bug#7152)
 +
 +2010-10-08  Leo  <sdl.web@gmail.com>
 +
 +      * dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only
 +      return non-nil if the file exists (Bug#7090).
 +
 +2010-10-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion--replace):
 +      Better preserve markers (bug#7138).
 +
 +2010-10-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * server.el (server-process-filter): Doc fix.
 +
 +2010-10-08  Drew Adams  <drew.adams@oracle.com>
 +
 +      * dired.el (dired-save-positions): Doc fix.  (Bug#7119)
 +
 +2010-10-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc/ediff-wind.el (ediff-setup-control-frame):
 +      * vc/ediff-ptch.el (ediff-default-backup-extension):
 +      * vc/ediff-diff.el (ediff-shell, ediff-diff-options)
 +      (ediff-exec-process): Remove system-types emx, windows-95.
 +
 +      * net/browse-url.el (browse-url-xdg-open): Shell-quote url.  (Bug#7166)
 +
 +2010-10-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (custom-variable, custom-face): Doc fix.
 +      (custom-face-edit): Add value-create attribute.
 +      (custom-face-edit-value-create)
 +      (custom-face-edit-value-visibility-action): New functions.
 +      Hide unused face attributes by default, and add a visibility toggle.
 +      (custom-face-edit-deactivate): Show empty values with shadow face.
 +      (custom-face-selected): Only use this for face specs with default
 +      attributes.
 +      (custom-face-value-create): Cleanup.
 +
 +      * wid-edit.el (widget-checklist-value-create): Use dolist.
 +      (widget-checklist-match-find): Make second arg optional.
 +
 +2010-10-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * hilit-chg.el (hilit-chg-get-diff-info, hilit-chg-get-diff-list-hk):
 +      Prefix things.
 +
 +      * emacs-lisp/shadow.el (shadow-font-lock-keywords)
 +      (load-path-shadows-mode, list-load-path-shadows): Rename shadow-mode to
 +      load-path-shadows-mode, update references.
 +      (load-path-shadows-font-lock-keywords, load-path-shadows-find-file):
 +      Rename variable and button.
 +      (list-load-path-shadows): Update button caller.
 +
 +2010-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-bnf-classify): New function.
 +      (smie-bnf-precedence-table): Use it to remember the closers/openers.
 +      (smie-merge-prec2s): Handle those new entries.
 +      (smie-prec2-levels): Only set precedence to nil for actual
 +      openers/closers.
 +      * progmodes/octave-mod.el (octave-smie-op-levels): Remove dummy entry
 +      that is now unnecessary.
 +
 +2010-10-07  Miles Bader  <miles@gnu.org>
 +
 +      * emacs-lisp/regexp-opt.el (regexp-opt): Add `symbols' mode.
 +
 +2010-10-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * mail/rmail.el (mail-sendmail-delimit-header, mail-header-end)
 +      (mail-position-on-field): Remove declarations.
 +      (mail-position-on-field): Autoload it.
 +      (rmail-retry-failure): Replace use of mail-sendmail-delimit-header
 +      and mail-header-end.  Don't require sendmail.
 +
 +      * emacs-lisp/shadow.el (shadow-font-lock-keywords): New variable.
 +      (shadow-mode): New mode.
 +      (shadow-find-file): New button.
 +      (list-load-path-shadows): Use shadow-mode and buttons.
 +
 +      * iimage.el (iimage-version): Remove.
 +      (iimage-mode-image-search-path, iimage-mode-image-regex-alist):
 +      Turn into defcustoms.
 +      (iimage-mode-map): Give it a doc string.
 +
 +      * calendar/appt.el (appt-activate): Give a warning rather than an error
 +      if there is no diary-file.
 +
 +2010-10-06  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
 +      Use `tramp-handle-find-backup-file-name'.
 +
 +2010-10-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * font-core.el (font-lock-defaults-alist): Remove variable.
 +      (font-lock-mode): Doc fix.
 +      (font-lock-default-function): Do not consult font-lock-defaults-alist.
 +      * font-lock.el (font-lock-refresh-defaults): Doc fix.
 +      (font-lock-set-defaults): Doc fix.
 +      Do not consult font-lock-defaults-alist.
 +
 +      * hilit-chg.el (hilit-chg-get-diff-list-hk): Declare `e' for compiler.
 +
 +      * emacs-lisp/cl.el: No longer provide cl-19.
 +
 +2010-10-05  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-directory-files-and-attributes)
 +      (tramp-handle-file-exists-p, tramp-handle-file-newer-than-file-p):
 +      New defuns, taken from tramp-smb.el.
 +      (tramp-coding-system-change-eol-conversion)
 +      (tramp-set-process-query-on-exit-flag): Remove.
 +
 +      * net/tramp-compat.el (top): Do not check for byte-compiler objects.
 +      (tramp-compat-coding-system-change-eol-conversion)
 +      (tramp-compat-set-process-query-on-exit-flag): New defuns, taken
 +      from tramp.el.
 +
 +      * net/tramp-gvfs.el:
 +      * net/tramp-gw.el: Replace `tramp-set-process-query-on-exit-flag'
 +      by `tramp-compat-set-process-query-on-exit-flag'.
 +
 +      * net/tramp-imap.el (tramp-imap-file-name-handler-alist):
 +      Use `tramp-handle-directory-files-and-attributes',
 +      `tramp-handle-file-exists-p' and
 +      `tramp-handle-file-newer-than-file-p'.
 +      (tramp-imap-handle-file-exists-p)
 +      (tramp-imap-handle-file-executable-p)
 +      (tramp-imap-handle-file-readable-p)
 +      (tramp-imap-handle-directory-files-and-attributes)
 +      (tramp-imap-handle-file-newer-than-file-p): Remove.
 +
 +      * net/tramp-sh.el: Replace `tramp-set-process-query-on-exit-flag'
 +      by `tramp-compat-set-process-query-on-exit-flag' and
 +      `tramp-coding-system-change-eol-conversion' by
 +      `tramp-compat-coding-system-change-eol-conversion'.
 +
 +      * net/tramp-smb.el (tramp-smb-file-name-handler-alist):
 +      Use `tramp-handle-directory-files-and-attributes',
 +      `tramp-handle-file-exists-p' and
 +      `tramp-handle-file-newer-than-file-p'.
 +      (tramp-smb-handle-directory-files-and-attributes)
 +      (tramp-smb-handle-file-exists-p)
 +      (tramp-smb-handle-file-newer-than-file-p): Remove.
 +      (tramp-smb-maybe-open-connection):
 +      Replace `tramp-set-process-query-on-exit-flag' by
 +      `tramp-compat-set-process-query-on-exit-flag'.
 +
 +2010-10-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * obsolete/rnews.el, obsolete/rnewspost.el: Remove files.
 +
 +2010-10-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Continue reorganization of load dependencies.  (Bug#7156)
 +
 +      * net/tramp.el (tramp-handle-file-local-copy-hook)
 +      (tramp-delete-temp-file-function): Move down.
 +      (tramp-exists-file-name-handler): Move up.
 +      (tramp-register-file-name-handlers): Simplify autoload.
 +      (tramp-handle-write-region-hook, tramp-handle-directory-file-name)
 +      (tramp-handle-directory-files, tramp-handle-dired-uncache)
 +      (tramp-handle-file-modes, tramp-handle-file-name-as-directory)
 +      (tramp-handle-file-name-completion)
 +      (tramp-handle-file-name-directory)
 +      (tramp-handle-file-name-nondirectory, tramp-handle-file-regular-p)
 +      (tramp-handle-file-remote-p, tramp-handle-file-symlink-p)
 +      (tramp-handle-find-backup-file-name)
 +      (tramp-handle-insert-file-contents, tramp-handle-load)
 +      (tramp-handle-substitute-in-file-name)
 +      (tramp-handle-unhandled-file-name-directory)
 +      (tramp-mode-string-to-int, tramp-local-host-p)
 +      (tramp-make-tramp-temp-file): Move from tramp-sh.el.
 +
 +      * net/tramp-gvfs.el (top):
 +      * net/tramp-smb.el (top): Do not require 'tramp-sh.
 +
 +      * net/tramp-sh.el (all): Move several objects to tramp.el, see
 +      there.  Rename `tramp-handle-*' to `tramp-sh-handle-*'.
 +
 +2010-10-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/appt.el (appt-add): Ensure reminders are enabled.
 +      (appt-activate): Give status messages.
 +
 +2010-10-03  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/gnutls.el: Improve docs.  Remove starttls and ssl emulation.
 +      Provide only `open-gnutls-stream' (formerly `open-ssl-stream') and
 +      `gnutls-negotiate' (formerly `starttls-negotiate').
 +      Remove trivial wrapper `starttls-open-stream'.
 +
 +2010-10-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and
 +      log-outgoing commands.
 +      * vc/vc.el (vc-log-internal-common): Add a new argument and use it
 +      to create a buffer local revert-buffer-function variable.
 +      (vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a
 +      revert-buffer-function lambda.
 +
 +2010-10-03  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/gnutls.el (starttls-negotiate): Use the plist interface to
 +      `gnutls-boot'.  Make TYPE the only required parameter.
 +      Allow TRUSTFILES and KEYFILES to be lists.
 +      (open-ssl-stream): Use it.
 +
 +2010-10-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * subr.el (directory-sep-char): Remove obsolete variable.
 +      * net/tramp-compat.el: Don't mess about with the byte-compiler unless
 +      it is "necessary".
 +
 +      * vc/vc-hooks.el (vc-header-alist): Remove obsolete variable.
 +      * vc/vc.el (vc-static-header-alist): Doc fix.
 +      * vc/vc-cvs.el (vc-cvs-header):
 +      * vc/vc-rcs.el (vc-rcs-header):
 +      * vc/vc-sccs.el (vc-sccs-header):
 +      * vc/vc-svn.el (vc-svn-header): Do not consult vc-header-alist.
 +      * obsolete/vc-mcvs.el (vc-mcvs-header):
 +      * progmodes/cperl-mode.el (cperl-mode): Only set vc-header-alist
 +      on XEmacs.
 +
 +2010-10-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-from-buffer):
 +      Remove obsolete use of binary-overwrite-mode (Bug#7001).
 +
 +2010-10-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * obsolete/x-menu.el: Remove file, obsolete since 21.1
 +
 +      * textmodes/rst.el (rst-font-lock-keywords-function):
 +      Drop Emacs 20 code.
 +
 +      * textmodes/artist.el (artist-replace-char): Drop Emacs 20 code.
 +
 +      * printing.el: Drop Emacs 20 code.
 +
 +      * calendar/appt.el (appt-delete): Don't autoload it (you can't use it
 +      without having used appt.el already).
 +
 +      * subr.el (make-local-hook): Remove function obsolete since 21.1.
 +      * progmodes/cc-mode.el (make-local-hook): Don't do cc-bytecomp stuff.
 +      (c-basic-common-init, c-font-lock-init): Only call make-local-hook on
 +      XEmacs.
 +      * progmodes/cc-styles.el (make-local-hook): Don't do cc-bytecomp stuff.
 +      (c-make-styles-buffer-local): Only call make-local-hook on XEmacs.
 +
 +      * ps-def.el (leading-code-private-22, charset-bytes, charset-id)
 +      (charset-width, find-charset-region, chars-in-region, forward-point)
 +      (encode-coding-string, coding-system-p, ccl-execute-on-string)
 +      (define-ccl-program, multibyte-string-p, string-make-multibyte):
 +      Remove compatibility cruft (none of these are used by ps*.el).
 +
 +2010-10-03  Kevin Rodgers  <kevin.d.rodgers@gmail.com>
 +
 +      * subr.el (booleanp): Return t instead of a list (Bug#7086).
 +
 +2010-10-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * server.el (server-process-filter, server-return-error):
 +      Give emacsclient time to shut down after receiving an error string.
 +
 +2010-10-02  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * files.el (remote-file-name-inhibit-cache): New defcustom.
 +
 +      * time.el (display-time-file-nonempty-p):
 +      Use `remote-file-name-inhibit-cache'.
 +
 +      * net/tramp.el (tramp-completion-reread-directory-timeout):
 +      Fix docstring.
 +
 +      * net/tramp-cache.el (tramp-cache-inhibit-cache): Remove.
 +      (tramp-get-file-property): Replace `tramp-cache-inhibit-cache' by
 +      `remote-file-name-inhibit-cache'.  Check also for an integer
 +      value.  Add/increase counter when `tramp-verbose' >= 10.
 +      (tramp-set-file-property): Add/increase counter when
 +      `tramp-verbose' >= 10.
 +
 +      * net/tramp-cmds.el (tramp-cleanup-all-connections)
 +      (tramp-cleanup-all-buffers): Set tramp-autoload cookie.
 +      (tramp-bug): Set tramp-autoload cookie.  Report all interned
 +      tramp-* variables.  Report also `remote-file-name-inhibit-cache'.
 +      (tramp-reporter-dump-variable): Fix docstring.  Mask non-7bit
 +      characters only in strings.
 +
 +      * net/tramp-compat.el (remote-file-name-inhibit-cache): Define due
 +      to backward compatibility.
 +
 +      * net/tramp-sh.el (tramp-handle-verify-visited-file-modtime)
 +      (tramp-handle-file-name-all-completions)
 +      (tramp-handle-vc-registered): Use `remote-file-name-inhibit-cache'.
 +      (tramp-open-connection-setup-interactive-shell):
 +      Call `tramp-cleanup-connection' directly.
 +
 +2010-10-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/checkdoc.el (checkdoc-minor-keymap): Remove obsolete alias.
 +
 +      * subr.el (char-bytes): Remove obsolete function.
 +
 +      * isearch.el (isearch-return-char): Remove obsolete function.
 +
 +      * mouse.el: No longer provide mldrag.
 +      (mldrag-drag-mode-line, mldrag-drag-vertical-line):
 +      Remove obsolete aliases.
 +
 +      * comint.el (comint-kill-output): Remove obsolete alias.
 +
 +      * composite.el (decompose-composite-char): Remove obsolete function.
 +      * ps-def.el (decompose-composite-char): Remove unused function.
 +
 +      * iswitchb.el (iswitchb-default-keybindings): Remove obsolete function.
 +
 +      * outline.el (outline-visible): Remove obsolete function.
 +
 +      * term/pc-win.el (x-frob-font-slant, x-frob-font-weight):
 +      * faces.el (internal-find-face, internal-get-face)
 +      (frame-update-faces, frame-update-face-colors)
 +      (x-frob-font-weight, x-frob-font-slant)
 +      (internal-frob-font-weight, internal-frob-font-slant)
 +      (x-make-font-bold, x-make-font-demibold, x-make-font-unbold)
 +      (x-make-font-italic, x-make-font-oblique, x-make-font-unitalic)
 +      (x-make-font-bold-italic): Remove functions and aliases, obsolete
 +      since Emacs 21.1.
 +      * emulation/viper-util.el (viper-get-face):
 +      * obsolete/lucid.el (find-face, get-face): Use facep.
 +      * vc/ediff-init.el (ediff-valid-color-p, ediff-get-face):
 +      Remove unused functions.
 +      * vc/ediff-util.el (ediff-submit-report): Doc fix.
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-file): Use kill-emacs-hook to
 +      delete tempfile if interrupted during compilation.
 +
 +2010-10-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/tls.el (tls-starttls-switches): Give up on using starttls with
 +      gnutls-cli.
 +      (tls-program): Add --insecure to be consistent with the defaults from
 +      openssl s_client.  Now all three commands are insecure.
 +
 +2010-10-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (DEST, TAGS, TAGS-LISP, TAGS-nmake)
 +      (TAGS-LISP-nmake, TAGS-gmake, TAGS-LISP-gmake, TAGS-SH)
 +      (TAGS-LISP-SH, TAGS-CMD, TAGS-LISP-CMD): New targets.
 +
 +2010-10-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * obsolete/sc.el: Remove file.
 +
 +      * files.el (temporary-file-directory): On darwin, also try
 +      DARWIN_USER_TEMP_DIR (see discussion in bug#7135).
 +
 +2010-10-01  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * server.el (server-start): Revert part of 2010-09-30T02:53:26Z!lekktu@gmail.com.
 +      Let's not break compatibility gratuitously, shall we?
 +
 +2010-09-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/tls.el (tls-starttls-switches): New variable.
 +      (tls-find-starttls-argument): Use it.
 +      (open-tls-stream): Ditto.
 +
 +      * net/netrc.el (netrc-credentials): Return the value of the "default"
 +      entry.
 +      (netrc-machine): Ditto.
 +
 +2010-09-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * vc/vc-hooks.el (vc-default-mode-line-string): Doc fix.
 +
 +2010-09-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * server.el (server-start): Don't write pid to the authentication file.
 +      (server-create-tty-frame): Don't send pid.
 +      (server-process-filter): Send pid at the start of every connection.
 +
 +2010-09-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/diary-lib.el (view-diary-entries, list-diary-entries)
 +      (show-all-diary-entries): Remove obsolete function aliases.
 +
 +      * calendar/appt.el (appt-issue-message, appt-visible, appt-msg-window):
 +      Remove options, obsolete since 22.1.
 +      (appt-display-format, appt-display-message):
 +      Remove backwards-compatibility code.
 +      (appt-check): No longer check appt-issue-message.
 +      (appt-make-list): No longer autoload it.  Doc fix.  No longer
 +      activate the package.
 +
 +2010-09-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/gnutls.el (starttls-negotiate): Loop a lot longer.
 +      (starttls-negotiate): Just call boot, and let the handshake be
 +      triggered from the read loop.
 +
 +2010-09-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/diary-lib.el (diary-list-entries): Use temp buffers when
 +      not displaying the diary.
 +      (diary-add-to-list): If no buffer-file-name, fall back to diary-file.
 +      * calendar/appt.el (appt-check): No longer need to kill diary.
 +
 +      * calendar/diary-lib.el (diary-list-entries): Move the
 +      "Preparing..." message entirely here.
 +      (diary-simple-display, diary-fancy-display): Move "Preparing..."
 +      messages to diary-list-entries.
 +      (diary-include-other-diary-files): Use LIST-ONLY rather than setting
 +      diary-display-function.
 +
 +      * calendar/diary-lib.el (diary-include-other-diary-files):
 +      Trap some recursive includes.
 +
 +      * calendar/appt.el (appt-activate): Check diary file.
 +
 +2010-09-29  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * pgg.el (pgg-run-at-time-1): Define it for XEmacs only; fix if/else
 +      construction.
 +
 +      * calendar/time-date.el: No need to require cl for Emacs 21.
 +
 +2010-09-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/appt.el (appt-check): Minor simplification.
 +
 +2010-09-28  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from
 +      citation prefix.
 +
 +2010-09-27  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
 +      Avoid infinite recursion on erroneous lambda form.  (Bug#7114)
 +
 +2010-09-27  Kenichi Handa  <handa@m17n.org>
 +
 +      * tar-mode.el (tar-header-block-tokenize): Decode filenames in
 +      "ustar" format.
 +
 +2010-09-27  Kenichi Handa  <handa@m17n.org>
 +
 +      * international/mule.el (define-coding-system): Docstring fixed.
 +
 +      * international/mule-diag.el (describe-character-set): Use princ
 +      with proper print-length and print-level instead of insert.
 +
 +2010-09-27  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * window.el (walk-windows): Doc fix (bug#7105).
 +
 +2010-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/float-sup.el (e): Remove.
 +
 +2010-09-27  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/gnutls.el (gnutls, gnutls-log-level): Add group and custom
 +      variable.
 +      (starttls-negotiate): Use it.
 +
 +2010-09-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/gnutls.el (starttls-negotiate): Stop looping when we get a t
 +      back.
 +
 +2010-09-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let.
 +
 +2010-09-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/gnutls.el (starttls-negotiate): Avoid the cl.el decf function.
 +
 +      * net/netrc.el (netrc-store-data): New function.
 +
 +2010-09-26  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/gnutls.el: GnuTLS glue code to set up a connection.
 +
 +2010-09-25  Julien Danjou  <julien@danjou.info>
 +
 +      * notifications.el: Call dbus-register-signal only if it is bound.
 +
 +2010-09-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el:
 +      * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el:
 +      * eshell/em-hist.el, eshell/em-ls.el, eshell/em-pred.el:
 +      * eshell/em-prompt.el, eshell/em-rebind.el, eshell/em-script.el:
 +      * eshell/em-smart.el, eshell/em-term.el, eshell/em-unix.el:
 +      * eshell/esh-cmd.el, eshell/esh-ext.el, eshell/esh-io.el:
 +      * eshell/esh-mode.el, eshell/esh-proc.el, eshell/esh-test.el:
 +      * eshell/esh-util.el, eshell/esh-var.el:
 +      Remove leading `*' from docs of faces and defcustoms.
 +
 +2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
 +
 +      * eshell/em-ls.el (eshell-ls-archive-regexp):
 +      * eshell/esh-util.el (eshell-tar-regexp):
 +      * ibuffer.el (ibuffer-compressed-file-name-regexp):
 +      * info.el (Info-suffix-list):
 +      * international/mule.el (auto-coding-alist):
 +      * woman.el (woman-file-regexp, woman-file-compression-regexp):
 +      * progmodes/etags.el (tags-compression-info-list):
 +      Support xz compression.
 +
 +2010-09-25  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * files.el (get-free-disk-space): Don't assume the "df" output
 +      columns line up (Bug#6995).
 +
 +2010-09-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * finder.el (finder-unknown-keywords):
 +      * progmodes/gdb-mi.el (gdb-jsonify-buffer, gdb-running-threads-count):
 +      * progmodes/etags.el (tags-table-including): Fix typos in docstrings.
 +
 +2010-09-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * server.el (server-start): Revert part of 2010-08-08 change.  Using
 +      address 127.0.0.1 for local host is now done in Fmake_network_process.
 +
 +2010-09-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * image-mode.el, progmodes/compile.el, progmodes/gud.el:
 +      * progmodes/mixal-mode.el, textmodes/bibtex-style.el:
 +      * textmodes/css-mode.el, textmodes/dns-mode.el:
 +      Move autoloaded auto-mode-alist entries to files.el.
 +      * files.el (auto-mode-alist): Move entries here.
 +
 +2010-09-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * isearch.el (isearch-lazy-highlight-cleanup)
 +      (isearch-lazy-highlight-initial-delay)
 +      (isearch-lazy-highlight-interval)
 +      (isearch-lazy-highlight-max-at-a-time, isearch-lazy-highlight-face):
 +      * net/net-utils.el (ipconfig-program-options):
 +      Move aliases to options before the associated definitions.
 +
 +2010-09-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * newcomment.el (comment-normalize-vars): Better test validity of
 +      comment-end-skip.
 +
 +2010-09-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/float-sup.el (float-pi): New name for `pi'.
 +      (float-e): New name for `e'.
 +      (degrees-to-radians, radians-to-degrees):
 +      * calendar/solar.el (solar-longitude):
 +      * calculator.el (calculator-registers, calculator-funcall):
 +      * textmodes/artist.el (artist-spray-random-points):
 +      * play/bubbles.el (bubbles--initialize-images): Use new names.
 +
 +2010-09-23  Eric M. Ludlam  <zappo@gnu.org>
 +
 +      Update to CEDET 1.0's version of EIEIO.
 +
 +      * emacs-lisp/eieio.el (eieio-specialized-key-to-generic-key):
 +      New function.
 +      (eieio-defmethod, eieio-generic-form, eieio-generic-call): Use it.
 +      (eieio-default-eval-maybe): Eval val instead of unquoting only.
 +      (class-precedence-list): If class is nil, return nil.
 +      (eieio-generic-call): If class of first input arg is nil, don't
 +      look up static methods, and do check for primary methods.
 +      (initialize-instance): See if the default needs to be evaluated
 +      during the constructor.
 +      (eieio-perform-slot-validation-for-default): Don't do the check
 +      for values that will eventually be evaluated.
 +      (eieio-eval-default-p): New function.
 +      (eieio-default-eval-maybe): Use it.
 +
 +2010-09-23  Jan Moringen  <jan.moringen@uni-bielefeld.de>
 +
 +      * emacs-lisp/eieio.el (eieio-defclass): Allow :c3
 +      method-invocation-order.
 +      (eieio-c3-candidate, eieio-c3-merge-lists): New functions.
 +      (eieio-class-precedence-dfs): Compute class precedence list using
 +      dfs algorithm.
 +      (eieio-class-precedence-bfs): Compute class precedence list using
 +      bfs algorithm.
 +      (eieio-class-precedence-c3): Compute class precedence list using
 +      c3 algorithm.
 +      (class-precedence-list): New function.
 +      (eieiomt-method-list, eieiomt-sym-optimize): Use it.
 +      (inconsistent-class-hierarchy): New error symbol.
 +      (call-next-method): Stow the replacement argument list for future
 +      call-next-method invocations.
 +
 +2010-09-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/appt.el (appt-check): If not displaying the diary,
 +      use (diary 1) to only get the entries we need.
 +      (appt-make-list): Sort diary-list-entries, if we cannot guarantee
 +      that it is in day order.  (Bug#7019)
 +
 +      * calendar/appt.el (appt-check): Rather than showing the diary,
 +      just turn off invisible display, and only if needed.
 +
 +      * calendar/diary-lib.el (diary-list-entries): Doc fix.  (Bug#7019)
 +
 +2010-09-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-file-form-defvar):
 +      (byte-compile-defvar, byte-compile-cl-warn):
 +      Start warnings with lower-case, like the majority.
 +
 +      * files.el (auto-mode-alist): Add .xa, .xw, .xsw for ld-script-mode.
 +
 +      * files.el (auto-mode-alist): Prefer C-mode for .xs.  (Bug#7071)
 +
 +      * progmodes/ld-script.el (auto-mode-alist): Move to files.el.
 +      * files.el (auto-mode-alist): Move ld-script entries here, further down
 +      the list.
 +
 +      * vc/add-log.el: Don't require timezone when compiling.
 +      (timezone-make-date-sortable): Autoload it.
 +      (change-log-sortable-date-at): Don't require timezone.
 +      Use `ignore-errors'.
 +
 +      * comint.el (comint-use-prompt-regexp-instead-of-fields):
 +      Move alias before definition, so it does not need autoloading.
 +
 +      * emulation/crisp.el, emulation/cua-base.el, emulation/edt.el:
 +      * emulation/pc-select.el, emulation/vip.el, international/iso-ascii.el:
 +      * international/kkc.el, international/ogonek.el, mail/feedmail.el:
 +      * net/browse-url.el, net/eudc-vars.el, net/net-utils.el:
 +      * net/rcompile.el, net/rlogin.el, textmodes/enriched.el:
 +      * textmodes/makeinfo.el, textmodes/page-ext.el, textmodes/picture.el:
 +      * textmodes/refer.el, textmodes/spell.el, textmodes/table.el:
 +      * textmodes/tex-mode.el, textmodes/two-column.el:
 +      Remove leading `*' from docs of defcustoms etc.
 +
 +2010-09-23  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/netrc.el (netrc-parse): Remove encrypt.el mentions.
 +
 +2010-09-22  Dan Christensen  <jdc@uwo.ca>
 +
 +      * calendar/time-date.el (date-to-time): Try using parse-time-string
 +      first before using the slower timezone-make-date-arpa-standard.
 +
 +2010-09-22  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * calendar/time-date.el (format-seconds): Comment fix.
 +
 +2010-09-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/package.el (package-menu-mode): `revert-buffer-function'
 +      is not automatically buffer-local.
 +
 +2010-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-debug--describe-cycle): Fix typo.
 +      (smie-indent-comment): Be more careful with comment-start-skip.
 +      (smie-indent-comment-close, smie-indent-comment-inside): New funs.
 +      (smie-indent-functions): Use them.
 +
 +2010-09-21  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/ange-ftp.el (ange-ftp-skip-msgs): Add "^504 ..." message.
 +
 +2010-09-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * menu-bar.el (menu-bar-set-tool-bar-position): customize-set-variable
 +      tool-bar-position.  Don't modify frame parameters here.
 +      (menu-bar-options-save): Add tool-bar-position.
 +
 +      * tool-bar.el (tool-bar-position): New defcustom (Bug#7049).
 +
 +2010-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/reftex-parse.el (reftex-what-macro)
 +      (reftex-context-substring): Let-bind forward-sexp-function to nil
 +      since we don't need/want to treat \begin...\end as a block (bug#7053).
 +
 +      * emacs-lisp/lisp.el (up-list): Don't do nothing silently.
 +
 +      * simple.el (blink-matching-open): Use syntax-class.
 +
 +      * progmodes/pascal.el (pascal-mode): Use define-derived-mode.
 +      Set invisibility spec for pascal's outline mode.
 +      (pascal-outline-change): Clean up calling convention.
 +      (pascal-show-all, pascal-hide-other-defuns): Update callers.
 +
 +      * progmodes/prolog.el (prolog-smie-forward-token)
 +      (prolog-smie-backward-token): New functions.
 +      (prolog-mode-variables): Use them to parse "!," correctly.
 +      Set up smie-blink-matching for ".".
 +
 +      * textmodes/ispell.el (ispell-start, ispell-end): Rename from `start'
 +      and `end'.
 +      (ispell-region, ispell-process-line): Update users.
 +
 +      * textmodes/reftex-parse.el (reftex-what-macro): Don't hardcode
 +      point-min==1.
 +
 +      * textmodes/ispell.el: Fix commenting convention.
 +      (ispell-parse-output): Simplify, use push.
 +      (ispell-region): Use match-string-no-properties.
 +      (ispell-begin-skip-region-regexp): Use mapconcat to simplify.
 +      (ispell-minor-mode): Use define-minor-mode.
 +      (ispell-message): Remove unused var `skip-regexp'.
 +      (ispell-add-per-file-word-list): Use dynamic let-binding.
 +      Try and use the proper comment marker.
 +
 +      * mail/sendmail.el: Fix commenting convention.
 +      (sendmail-send-it): Use line-beginning-position.
 +
 +      * help-fns.el (describe-variable): Add original value, if applicable.
 +
 +2010-09-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * subr.el (y-or-n-p): Remove leftover code from 2010-09-17T13:30:30Z!monnier@iro.umontreal.ca.
 +
 +      * emacs-lisp/smie.el (smie-indent--hanging-p): Use `smie-indent--bolp'.
 +
 +2010-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-bnf-precedence-table): Improve error message.
 +      (smie-debug--prec2-cycle, smie-debug--describe-cycle): New functions.
 +      (smie-prec2-levels): Use them to better diagnose precedence cycles.
 +      (smie-blink-matching-check): Don't signal a mismatch if car is t.
 +      (smie-blink-matching-open): Rewrite to remove assumptions, so that
 +      something like "." can also be a closer.
 +      (smie--associative-p, smie-indent--hanging-p, smie-indent--bolp)
 +      (smie-indent--offset, smie-indent--offset-rule, smie-indent--column):
 +      Rename internal functions to use "--".  Update callers.
 +
 +      * frame.el (make-frame-names-alist): Don't list frames on other displays.
 +
 +      * fringe.el (fringe-styles): New var.
 +      (fringe-mode, fringe-query-style): Use it.
 +
 +2010-09-18  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.8
 +      (sql-login-params): Update widget structure; changes still needed.
 +      (sql-product-alist): Add :list-all and :list-table features for
 +      SQLite, Postgres and MySQL products.
 +      (sql-redirect): Handle default value.
 +      (sql-execute, sql-execute-feature): New functions.
 +      (sql-read-table-name): New function.
 +      (sql-list-all, sql-list-table): New functions.  User API.
 +      (sql-mode-map, sql-interactive-mode-map): Add key definitions
 +      for above functions.
 +      (sql-mode-menu, sql-interactive-mode-menu): Add menu definitions
 +      for above functions.
 +      (sql-postgres-login-params): Add user and database defaults.
 +      (sql-buffer-live-p): Bug fix.
 +      (sql-product-history): New variable.
 +      (sql-read-product): New function. Use it.
 +      (sql-set-product, sql-product-interactive): Use it.
 +      (sql-connection-history): New variable.
 +      (sql-read-connection): New function.  Use it.
 +      (sql-connect): New function.
 +      (sql-for-each-login): Redesign function interface.
 +      (sql-make-alternate-buffer-name, sql-save-connection): Use it.
 +      (sql-get-login-ext, sql-get-login): Use it.  Handle default values.
 +      (sql-comint): Check for program.  Existing live buffer.
 +      (sql-comint-postgres): Add port parameter.
 +
 +2010-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/warnings.el: Fix commenting convention.
 +      (display-warning): Use special mode and make the buffer read-only.
 +
 +2010-09-18  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-prog.el (calc-read-parse-table-part): Don't "fix" the
 +      empty string when it follows a repeated or optional pattern.
 +
 +2010-09-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * indent.el (indent-according-to-mode): Apply syntax-propertize.
 +      (indent-region): Use indent-according-to-mode.
 +
 +2010-09-18  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.el (fringe-mode): Doc fix.
 +
 +2010-09-14  Kan-Ru Chen  <kanru@kanru.info>  (tiny change)
 +
 +      * textmodes/nroff-mode.el (nroff-view): Kill old buffer before
 +      refreshing the preview buffer.
 +
 +2010-09-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/tex-mode.el (tex-syntax-propertize-rules)
 +      (latex-syntax-propertize-rules): New consts; replace
 +      tex-font-lock-syntactic-keywords.
 +      (tex-env-mark, latex-env-before-change): New functions.
 +      (latex-electric-env-pair-mode): New minor mode.
 +      (tex-font-lock-verb): Change arguments; do move point.
 +      (tex-font-lock-syntactic-face-function): Adjust to new verbatim
 +      representation as a form of comment.
 +      (tex-font-lock-keywords-1): Remove workaround, now unneeded.
 +      (doctex-syntax-propertize-rules): New const; replaces
 +      doctex-font-lock-syntactic-keywords.
 +      (tex-common-initialization, doctex-mode): Use syntax-propertize-rules.
 +
 +      * progmodes/fortran.el (fortran--font-lock-syntactic-keywords): Remove.
 +      (fortran-make-syntax-propertize-function): New function; replaces
 +      fortran-font-lock-syntactic-keywords.
 +      (fortran-mode): Use it.
 +      (fortran-line-length): Use it.  Improve interactive spec.
 +
 +      * emacs-lisp/syntax.el (syntax-propertize-precompile-rules): New macro.
 +      (syntax-propertize-rules): Add var-ref case.  Fix offset computation
 +      when adding surrounding \(..\).
 +
 +      * progmodes/js.el (js-mode): Fix last change (bug#7054).
 +
 +2010-09-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * obsolete/old-whitespace.el (whitespace-rescan-files-in-buffers):
 +      Use with-current-buffer.
 +
 +      * isearch.el (isearch-face): Rename from `isearch'.
 +      (isearch-highlight): Use new name.
 +
 +2010-09-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.el (fringe-mode, fringe-query-style): Use 4 pixels, not
 +      5, for `half' width fringes.  (Bug#6933)
 +
 +2010-09-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
 +      (byte-compile-defvar): "foo/bar" does not lack a prefix.
 +
 +      * subr.el (y-or-n-p): Add the "(y or n)" that was lost somehow.
 +
 +2010-09-17  Stephen Berman  <stephen.berman@gmx.net>
 +
 +      * dframe.el (dframe-reposition-frame-emacs): Use tool-bar-pixel-width
 +      in calculating new frame position.  Add more space between new and
 +      parent on the left (Bug#7048).
 +
 +2010-09-17  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (tramp-compat-with-temp-message): Make it a
 +      defmacro.
 +
 +2010-09-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mail/sendmail.el: Add "*unsent mail*" to same-window-buffer-names.
 +
 +      * term/x-win.el (x-cut-buffer-or-selection-value): Define as
 +      obsolete alias for x-selection-value.
 +
 +      * ido.el (ido-make-buffer-list): Fix error in 2010-08-22 merge.
 +
 +2010-09-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-cmds.el (tramp-cleanup-connection): Set tramp-autoload
 +      cookie.
 +
 +2010-09-15  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (tramp-compat-with-temp-message)
 +      (tramp-compat-font-lock-add-keywords, tramp-compat-process-get)
 +      (tramp-compat-process-put): New defuns.
 +
 +      * net/tramp.el (top):
 +      * net/tramp-gvfs.el (top):
 +      * net/tramp-cache.el (top): Use `tramp-compat-font-lock-add-keywords'.
 +
 +      * net/tramp.el (tramp-progress-reporter-update):
 +      Use `tramp-compat-funcall'.
 +
 +      * net/tramp.el (tramp-process-actions):
 +      * net/tramp-gvfs.el (tramp-handle-vc-registered):
 +      * net/tramp-sh.el (tramp-gvfs-handler-askquestion)
 +      (tramp-get-remote-stat, tramp-get-remote-readlink):
 +      Use `tramp-compat-with-temp-message'.
 +
 +      * net/tramp-sh.el (top): Require 'cl.
 +      (tramp-handle-start-file-process): Use `tramp-compat-process-get'.
 +      (tramp-open-connection-setup-interactive-shell):
 +      Use `tramp-compat-process-put'.
 +
 +2010-09-15  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Correct the
 +      indentation.
 +      (c-forward-<>-arglist-recur): Fix an infinite recursion.
 +
 +2010-09-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-warning-types): New type
 +      `lexical' for warnings related to lexical scoping.
 +      (byte-compile-file-form-defvar, byte-compile-defvar): Warn about
 +      global vars which don't have a prefix and could hence affect lexical
 +      scoping in unrelated files.
 +
 +2010-09-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/imap.el: Revert back to version
 +      cb950ed8ff3e0f40dac437a51b269166f9ffb60d, since some of the changes
 +      seem problematic.
 +
 +2010-09-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * obsolete/old-whitespace.el (whitespace-unload-function):
 +      Explicitly pass `obarray' to `unintern' to avoid a warning.
 +
 +2010-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/byte-run.el (set-advertised-calling-convention):
 +      Add `when' argument.  Update callers.
 +
 +      * subr.el (unintern): Declare the obarray arg mandatory.
 +
 +2010-09-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/diary-lib.el (diary-list-entries-hook, diary-sort-entries):
 +      Doc fixes.
 +
 +      * calendar/diary-lib.el (diary-included-files): New variable.
 +      (diary-list-entries): Maybe initialize diary-included-files.
 +      (diary-include-other-diary-files): Append to diary-included-files.
 +      * calendar/appt.el (appt-update-list): Also check the members of
 +      diary-included-files.  (Bug#6999)
 +      (appt-check): Doc fix.
 +
 +2010-09-14  David Reitter  <david.reitter@gmail.com>
 +
 +      * simple.el (line-move-visual): Do not truncate goal column to
 +      integer size.  (Bug#7020)
 +
 +2010-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * repeat.el (repeat): Allow repeating when the last event is a click.
 +      Suggested by Drew Adams (bug#6256).
 +
 +2010-09-14  Sascha Wilde  <wilde@sha-bang.de>
 +
 +      * vc/vc-hg.el (vc-hg-state,vc-hg-working-revision):
 +      Replace setting HGRCPATH to "" by some less invasive --config options.
 +
 +2010-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * font-lock.el (font-lock-beginning-of-syntax-function):
 +      Mark as obsolete.
 +
 +2010-09-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * menu-bar.el (menu-bar-options-save): Fix handling of menu-bar
 +      and tool-bar modes.  (Bug#6211)
 +      (menu-bar-mode): Move setting of standard-value after the
 +      minor-mode definition, otherwise it seems to have no effect.
 +
 +2010-09-14  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * progmodes/antlr-mode.el (antlr-font-lock-additional-keywords):
 +      Fix typo.  (Bug#6976)
 +
 +2010-09-14  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +
 +      * whitespace.el: Allow cleaning up blanks without blank
 +      visualization (Bug#6651).  Adjust help window for
 +      whitespace-toggle-options (Bug#6479).  Allow to use fill-column
 +      instead of whitespace-line-column (from EmacsWiki).  New version 13.1.
 +      (whitespace-style): Add new value 'face.  Adjust docstring.
 +      (whitespace-space, whitespace-hspace, whitespace-tab):
 +      Adjust foreground property face.
 +      (whitespace-line-column): Adjust docstring and type declaration.
 +      (whitespace-style-value-list, whitespace-toggle-option-alist)
 +      (whitespace-help-text): Adjust const initialization.
 +      (whitespace-toggle-options, global-whitespace-toggle-options):
 +      Adjust docstring.
 +      (whitespace-display-window, whitespace-interactive-char)
 +      (whitespace-style-face-p, whitespace-color-on): Adjust code.
 +      (whitespace-help-scroll): New fun.
 +
 +2010-09-14  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * calendar/time-date.el (format-seconds): Comment fix.
 +
 +2010-09-13  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.7.
 +      (sql-buffer-live-p): Improve detection.
 +      (sql-find-sqli-buffer, sql-set-sqli-buffer-generally)
 +      (sql-set-sqli-buffer): Use it.
 +      (sql-product-interactive): Run `sql-set-sqli-hook'.
 +      (sql-rename-buffer): Code cleanup.
 +      (sql-redirect, sql-redirect-value): New functions.  More to come.
 +
 +2010-09-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Port tramp-related Makefile changes of 2010-09-08T14:42:54Z!michael.albinus@gmx.de, 2010-09-13T15:17:01Z!michael.albinus@gmx.de to Windows.
 +      * makefile.w32-in (LOADDEFS): Add $(lisp)/net/tramp-loaddefs.el.
 +      (TRAMP_SRC): New macro.
 +      ($(lisp)/net/tramp-loaddefs.el): New target.
 +
 +2010-09-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Major code cleanup.  Split tramp.el into tramp.el and tramp-sh.el.
 +
 +      * Makefile.in (TRAMP_SRC): Remove tramp-fish.el.  Add tramp-sh.el.
 +
 +      * net/tramp.el (top): Don't show loading message.  Require just
 +      'tramp-compat, everything else is required there.
 +      Use `ignore-errors' where appropriate.
 +      (tramp-inline-compress-start-size, tramp-copy-size-limit)
 +      (tramp-terminal-type, tramp-end-of-output)
 +      (tramp-initial-end-of-output, tramp-completion-function-alist-rsh)
 +      (tramp-completion-function-alist-ssh)
 +      (tramp-completion-function-alist-telnet)
 +      (tramp-completion-function-alist-su)
 +      (tramp-completion-function-alist-putty, tramp-remote-path)
 +      (tramp-remote-process-environment, tramp-sh-extra-args)
 +      (tramp-actions-before-shell, tramp-uudecode)
 +      (tramp-perl-file-truename, tramp-perl-file-name-all-completions)
 +      (tramp-perl-file-attributes)
 +      (tramp-perl-directory-files-and-attributes)
 +      (tramp-perl-encode-with-module, tramp-perl-decode-with-module)
 +      (tramp-perl-encode, tramp-perl-decode)
 +      (tramp-vc-registered-read-file-names, tramp-file-mode-type-map)
 +      (tramp-file-name-handler-alist, tramp-make-tramp-temp-file)
 +      (tramp-handle-make-symbolic-link, tramp-handle-load)
 +      (tramp-handle-file-name-as-directory)
 +      (tramp-handle-file-name-directory)
 +      (tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
 +      (tramp-handle-file-exists-p, tramp-handle-file-attributes)
 +      (tramp-do-file-attributes-with-ls)
 +      (tramp-do-file-attributes-with-perl)
 +      (tramp-do-file-attributes-with-stat)
 +      (tramp-handle-set-visited-file-modtime)
 +      (tramp-handle-verify-visited-file-modtime)
 +      (tramp-handle-set-file-modes, tramp-handle-set-file-times)
 +      (tramp-set-file-uid-gid, tramp-remote-selinux-p)
 +      (tramp-handle-file-selinux-context)
 +      (tramp-handle-set-file-selinux-context)
 +      (tramp-handle-file-executable-p, tramp-handle-file-readable-p)
 +      (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes)
 +      (tramp-handle-file-directory-p, tramp-handle-file-regular-p)
 +      (tramp-handle-file-symlink-p, tramp-handle-file-writable-p)
 +      (tramp-handle-file-ownership-preserved-p)
 +      (tramp-handle-directory-file-name, tramp-handle-directory-files)
 +      (tramp-handle-directory-files-and-attributes)
 +      (tramp-do-directory-files-and-attributes-with-perl)
 +      (tramp-do-directory-files-and-attributes-with-stat)
 +      (tramp-handle-file-name-all-completions)
 +      (tramp-handle-file-name-completion, tramp-handle-add-name-to-file)
 +      (tramp-handle-copy-file, tramp-handle-copy-directory)
 +      (tramp-handle-rename-file, tramp-do-copy-or-rename-file)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-make-directory, tramp-handle-delete-directory)
 +      (tramp-handle-delete-file)
 +      (tramp-handle-dired-recursive-delete-directory)
 +      (tramp-handle-dired-compress-file, tramp-handle-dired-uncache)
 +      (tramp-handle-insert-directory)
 +      (tramp-handle-unhandled-file-name-directory)
 +      (tramp-handle-expand-file-name)
 +      (tramp-handle-substitute-in-file-name)
 +      (tramp-handle-executable-find, tramp-process-sentinel)
 +      (tramp-handle-start-file-process, tramp-handle-process-file)
 +      (tramp-handle-call-process-region, tramp-handle-shell-command)
 +      (tramp-handle-file-local-copy, tramp-handle-file-remote-p)
 +      (tramp-handle-insert-file-contents)
 +      (tramp-handle-insert-file-contents-literally)
 +      (tramp-handle-find-backup-file-name)
 +      (tramp-handle-make-auto-save-file-name, tramp-handle-write-region)
 +      (tramp-vc-registered-file-names, tramp-handle-vc-registered)
 +      (tramp-sh-file-name-handler, tramp-vc-file-name-handler)
 +      (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test)
 +      (tramp-run-test2, tramp-find-executable, tramp-set-remote-path)
 +      (tramp-find-file-exists-command, tramp-open-shell)
 +      (tramp-find-shell, tramp-barf-if-no-shell-prompt)
 +      (tramp-open-connection-setup-interactive-shell)
 +      (tramp-local-coding-commands, tramp-remote-coding-commands)
 +      (tramp-find-inline-encoding, tramp-call-local-coding-command)
 +      (tramp-inline-compress-commands, tramp-find-inline-compress)
 +      (tramp-compute-multi-hops, tramp-maybe-open-connection)
 +      (tramp-send-command, tramp-wait-for-output)
 +      (tramp-send-command-and-check, tramp-barf-unless-okay)
 +      (tramp-send-command-and-read, tramp-mode-string-to-int)
 +      (tramp-convert-file-attributes, tramp-check-cached-permissions)
 +      (tramp-file-mode-from-int, tramp-file-mode-permissions)
 +      (tramp-shell-case-fold, tramp-make-copy-program-file-name)
 +      (tramp-method-out-of-band-p, tramp-local-host-p)
 +      (tramp-get-remote-path, tramp-get-remote-tmpdir)
 +      (tramp-get-ls-command, tramp-get-ls-command-with-dired)
 +      (tramp-get-test-command, tramp-get-test-nt-command)
 +      (tramp-get-file-exists-command, tramp-get-remote-ln)
 +      (tramp-get-remote-perl, tramp-get-remote-stat)
 +      (tramp-get-remote-readlink, tramp-get-remote-trash)
 +      (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid)
 +      (tramp-get-local-uid, tramp-get-local-gid)
 +      (tramp-get-inline-compress, tramp-get-inline-coding): Move to
 +      tramp-sh.el.
 +      (tramp-methods, tramp-default-method-alist)
 +      (tramp-default-user-alist, tramp-foreign-file-name-handler-alist):
 +      Move initialization to tramp-sh.el.
 +      (tramp-temp-name-prefix): Make it a defconst.
 +      (tramp-dissect-file-name): Don't check anymore for multi-hop
 +      methods.
 +      (tramp-debug-outline-regexp): Add a docstring.
 +      (tramp-debug-outline-level): Rename from `tramp-outline-level'.
 +      (tramp-get-debug-buffer): Use it.
 +
 +      * net/tramp-cache.el (top): Set tramp-autoload cookie for
 +      initialization forms.
 +      (tramp-set-connection-property): Don't protect `tramp-message'
 +      call, it isn't necessary any longer.
 +      (tramp-dump-connection-properties): Use `ignore-errors'.
 +
 +      * net/tramp-compat.el (top): Require 'advice, 'format-spec,
 +      'password-cache and 'auth-source.
 +
 +      * net/tramp-gvfs.el (top):
 +      * net/tramp-smb.el (top): Require 'tramp-sh.
 +
 +      * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'.
 +
 +      * net/tramp-sh.el: New file, derived from tramp.el.
 +      (top): Initialize `tramp-methods', `tramp-default-method-alist',
 +      `tramp-default-user-alist', `tramp-foreign-file-name-handler-alist'.
 +      Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old".
 +      Use `ignore-errors' where appropriate.
 +      (tramp-sh-file-name-handler-alist): Rename from
 +      `tramp-file-name-handler-alist'.
 +      (tramp-send-command-and-check): Return t or nil.  Remove all
 +      `zerop' checks, where called.
 +      (tramp-handle-set-file-modes)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-handle-delete-directory, tramp-handle-delete-file)
 +      (tramp-maybe-send-script): Use `tramp-barf-unless-okay'.
 +      (tramp-sh-file-name-handler, tramp-send-command-and-check)
 +      (tramp-get-remote-ln): Set tramp-autoload cookie.
 +
 +      * net/tramp-fish.el: Remove file.
 +
 +2010-09-13  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-file.el (epa-file-insert-file-contents): If visiting, bind
 +      buffer-file-name to avoid file-locking.  (Bug#7026)
 +
 +2010-09-13  Julien Danjou  <julien@danjou.info>
 +
 +      * notifications.el (notifications-notify): Add support for
 +      image-path and sound-name.
 +      (notifications-specification-version): Add this variable.
 +
 +2010-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (y-or-n-p): New function, moved from src/fns.c; use read-key.
 +
 +2010-09-12  Leo  <sdl.web@gmail.com>
 +
 +      * net/rcirc.el (rcirc-server-commands, rcirc-client-commands)
 +      (rcirc-completion-start): New variables.
 +      (rcirc-nick-completions): Rename to rcirc-completions.
 +      (rcirc-nick-completion-start-offset): Delete.
 +      (rcirc-completion-at-point): New function for constructing
 +      completion data for both nicks and irc commands.  Add to
 +      completion-at-point-functions in rcirc mode.
 +      (rcirc-complete): Rename from rcirc-nick-complete; use
 +      rcirc-completion-at-point.
 +      (defun-rcirc-command): Update rcirc-client-commands.
 +
 +2010-09-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-file): Create .elc files
 +      atomically, to avoid parallel build errors.  (Bug#4196)
 +
 +2010-09-11  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.6
 +      (sql-dialect): Synonym for "sql-product".
 +      (sql-find-sqli-buffer, sql-set-sqli-buffer-generally)
 +      (sql-set-sqli-buffer, sql-show-sqli-buffer, sql-interactive-mode):
 +      Set "sql-buffer" to buffer name not buffer object so multiple sql
 +      interactive buffers work properly.  Reverts misguided changes in
 +      earlier work.
 +      (sql-comint): Make sure different buffer name is used if "*SQL*"
 +      buffer is for a different product.
 +      (sql-make-alternate-buffer-name): Fix bug with "sql-database"
 +      login param.
 +      (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
 +      (sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
 +      (sql-db2, sql-linter, sql-product-interactive, sql-rename-buffer):
 +      Accept new buffer name or prompt for one.
 +      (sql-port): Default to zero.
 +      (sql-comint-mysql): Handle "sql-port" as a numeric.
 +      (sql-port-history): Delete unused variable.
 +      (sql-get-login): Default "sql-port" to a number.
 +      (sql-product-alist): Correct Postgres prompt and terminator regexp.
 +      (sql-sqlite-program): Dynamically detect presence of "sqlite" or
 +      "sqlite3" executables.
 +      (sql-sqlite-login-params): Add "*.sqlite[23]?" database name pattern.
 +      (sql-buffer-live-p): New function.
 +      (sql-mode-menu, sql-send-string): Use it.
 +      (sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK
 +      syntax pattern.
 +      (sql-mode-postgres-font-lock-keywords): Support Postgres V9.
 +      (sql-mode-sqlite-font-lock-keywords): Hilight sqlite commands.
 +
 +2010-09-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/netrc.el (netrc-credentials): New convenience function.
 +
 +2010-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/texinfo.el (texinfo-syntax-propertize-function): New fun
 +      to replace texinfo-font-lock-syntactic-keywords.
 +      (texinfo-mode): Use it.
 +
 +      * textmodes/tex-mode.el (tex-common-initialization, doctex-mode):
 +      Use syntax-propertize-function.
 +
 +      * textmodes/sgml-mode.el (sgml-syntax-propertize-function): New var to
 +      replace sgml-font-lock-syntactic-keywords.
 +      (sgml-mode): Use it.
 +
 +      * textmodes/reftex.el (font-lock-syntactic-keywords): Don't declare
 +      since we don't use it.
 +
 +      * textmodes/bibtex.el (bibtex-mode): Use syntax-propertize-function.
 +
 +      * progmodes/vhdl-mode.el (vhdl-mode): Use syntax-propertize-function
 +      if available.
 +      (vhdl-fontify-buffer): Adjust.
 +
 +      * progmodes/tcl.el (tcl-syntax-propertize-function): New var to
 +      replace tcl-font-lock-syntactic-keywords.
 +      (tcl-mode): Use it.
 +
 +      * progmodes/simula.el (simula-syntax-propertize-function): New var to
 +      replace simula-font-lock-syntactic-keywords.
 +      (simula-mode): Use it.
 +
 +      * progmodes/sh-script.el (sh-st-symbol): Remove.
 +      (sh-font-lock-close-heredoc, sh-font-lock-open-heredoc): Add eol arg.
 +      (sh-font-lock-flush-syntax-ppss-cache, sh-font-lock-here-doc): Remove.
 +      (sh-font-lock-quoted-subshell): Assume we've already matched $(.
 +      (sh-font-lock-paren): Set syntax-multiline.
 +      (sh-font-lock-syntactic-keywords): Remove.
 +      (sh-syntax-propertize-function): New function to replace it.
 +      (sh-mode): Use it.
 +
 +      * progmodes/ruby-mode.el (ruby-here-doc-beg-re):
 +      Define while compiling.
 +      (ruby-here-doc-end-re, ruby-here-doc-beg-match)
 +      (ruby-font-lock-syntactic-keywords, ruby-comment-beg-syntax)
 +      (syntax-ppss, ruby-in-ppss-context-p, ruby-in-here-doc-p)
 +      (ruby-here-doc-find-end, ruby-here-doc-beg-syntax)
 +      (ruby-here-doc-end-syntax): Only define when
 +      syntax-propertize is not available.
 +      (ruby-syntax-propertize-function, ruby-syntax-propertize-heredoc):
 +      New functions.
 +      (ruby-in-ppss-context-p): Update to new syntax of heredocs.
 +      (electric-indent-chars): Silence bytecompiler.
 +      (ruby-mode): Use prog-mode, syntax-propertize-function, and
 +      electric-indent-chars.
 +
 +      * progmodes/python.el (python-syntax-propertize-function): New var to
 +      replace python-font-lock-syntactic-keywords.
 +      (python-mode): Use it.
 +      (python-quote-syntax): Simplify and adjust to new use.
 +
 +      * progmodes/perl-mode.el (perl-syntax-propertize-function): New fun to
 +      replace perl-font-lock-syntactic-keywords.
 +      (perl-syntax-propertize-special-constructs): New fun to replace
 +      perl-font-lock-special-syntactic-constructs.
 +      (perl-font-lock-syntactic-face-function): New fun.
 +      (perl-mode): Use it.
 +
 +      * progmodes/octave-mod.el (octave-syntax-propertize-sqs): New function
 +      to replace octave-font-lock-close-quotes.
 +      (octave-syntax-propertize-function): New function to replace
 +      octave-font-lock-syntactic-keywords.
 +      (octave-mode): Use it.
 +
 +      * progmodes/mixal-mode.el (mixal-syntax-propertize-function): New var;
 +      replaces mixal-font-lock-syntactic-keywords.
 +      (mixal-mode): Use it.
 +
 +      * progmodes/make-mode.el (makefile-syntax-propertize-function):
 +      New var; replaces makefile-font-lock-syntactic-keywords.
 +      (makefile-mode): Use it.
 +      (makefile-imake-mode): Adjust.
 +
 +      * progmodes/js.el (js--regexp-literal): Define while compiling.
 +      (js-syntax-propertize-function): New var; replaces
 +      js-font-lock-syntactic-keywords.
 +      (js-mode): Use it.
 +
 +      * progmodes/gud.el (gdb-script-syntax-propertize-function): New var;
 +      replaces gdb-script-font-lock-syntactic-keywords.
 +      (gdb-script-mode): Use it.
 +
 +      * progmodes/fortran.el (fortran-mode): Use syntax-propertize-function.
 +      (fortran--font-lock-syntactic-keywords): New var.
 +      (fortran-line-length): Update syntax-propertize-function and
 +      fortran--font-lock-syntactic-keywords.
 +
 +      * progmodes/cperl-mode.el (cperl-mode): Use syntax-propertize-function.
 +
 +      * progmodes/cfengine.el (cfengine-mode):
 +      Use syntax-propertize-function.
 +      (cfengine-font-lock-syntactic-keywords): Remove.
 +
 +      * progmodes/autoconf.el (autoconf-mode):
 +      Use syntax-propertize-function.
 +      (autoconf-font-lock-syntactic-keywords): Remove.
 +
 +      * progmodes/ada-mode.el (ada-set-syntax-table-properties)
 +      (ada-after-change-function, ada-initialize-syntax-table-properties)
 +      (ada-handle-syntax-table-properties): Only define when
 +      syntax-propertize is not available.
 +      (ada-mode): Use syntax-propertize-function.
 +
 +      * font-lock.el (font-lock-syntactic-keywords): Make obsolete.
 +      (font-lock-fontify-syntactic-keywords-region): Move handling of
 +      font-lock-syntactically-fontified to...
 +      (font-lock-default-fontify-region): ...here.
 +      Let syntax-propertize-function take precedence.
 +      (font-lock-fontify-syntactically-region): Cal syntax-propertize.
 +
 +      * emacs-lisp/syntax.el (syntax-propertize-function)
 +      (syntax-propertize-chunk-size, syntax-propertize--done)
 +      (syntax-propertize-extend-region-functions): New vars.
 +      (syntax-propertize-wholelines, syntax-propertize-multiline)
 +      (syntax-propertize--shift-groups, syntax-propertize-via-font-lock)
 +      (syntax-propertize): New functions.
 +      (syntax-propertize-rules): New macro.
 +      (syntax-ppss-flush-cache): Set syntax-propertize--done.
 +      (syntax-ppss): Call syntax-propertize.
 +
 +      * emacs-lisp/regexp-opt.el (regexp-opt-depth): Skip named groups.
 +
 +2010-09-10  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-init-process): Improve comments.
 +      XEmacs compatibility changes regarding (add-hook) 'local option
 +      and (set-process-query-on-exit-flag).
 +
 +2010-09-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-cache.el (tramp-parse-connection-properties):
 +      Set tramp-autoload cookie.
 +
 +2010-09-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * image.el (imagemagick-types-inhibit): Add :type, :version, :group.
 +      (imagemagick-register-types): Doc fix.
 +
 +2010-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/octave-mod.el (electric-indent-chars): Silence bytecomp.
 +
 +      * progmodes/js.el (require): Require is already "eval-and-compile".
 +      (js--re-search-forward): Avoid `eval'.  Preserve the error data.
 +      (js--re-search-backward): Use js--re-search-forward.
 +
 +      * progmodes/fortran.el (fortran-line-length): Don't recompute
 +      syntactic keywords redundantly a second time.
 +
 +      * progmodes/ada-mode.el: Replace "(set '" with setq.
 +      (ada-mode): Simplify.
 +      (ada-create-case-exception, ada-adjust-case-interactive)
 +      (ada-adjust-case-region, ada-format-paramlist, ada-indent-current)
 +      (ada-search-ignore-string-comment, ada-move-to-start)
 +      (ada-move-to-end): Use with-syntax-table.
 +
 +      * font-lock.el (save-buffer-state): Remove `varlist' arg.
 +      (font-lock-unfontify-region, font-lock-default-fontify-region):
 +      Update usage correspondingly.
 +      (font-lock-fontify-syntactic-keywords-region):
 +      Set parse-sexp-lookup-properties buffer-locally here.
 +      (font-lock-fontify-syntactically-region): Remove unused `ppss' arg.
 +
 +      * simple.el (blink-matching-open): Don't burp if we can't find a match.
 +
 +2010-09-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-report-ops):
 +      Error if not compiled with -DBYTE_CODE_METER.
 +
 +      * emacs-lisp/bytecomp.el (byte-recompile-directory):
 +      Ignore dir-locals-file.
 +
 +2010-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/compile.el (compilation-error-regexp-alist-alist):
 +      Not a const.
 +      (compilation-error-regexp-alist-alist): Rule out ": " in file names
 +      for the `gnu' messages.
 +      (compilation-set-skip-threshold): New command.
 +      (compilation-start): Use \' rather than $.
 +      (compilation-forget-errors): Use clrhash.
 +
 +2010-09-08  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-valid-dictionary-list):
 +      Simplify logic.
 +
 +2010-09-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Migrate to Tramp 2.2.  Rearrange load dependencies.
 +      (Bug#1529, Bug#5448, Bug#5705)
 +
 +      * Makefile.in (TRAMP_DIR, TRAMP_SRC): New variables.
 +      ($(TRAMP_DIR)/tramp-loaddefs.el): New target.
 +      (LOADDEFS): Add $(lisp)/net/tramp-loaddefs.el.
 +
 +      * net/tramp.el (top): Remove all other tramp-* loads except
 +      tramp-compat.el.  Remove all changes to tramp-unload-hook for
 +      other tramp-* packages.  Rearrange defun order.  Change calls of
 +      `tramp-compat-call-process', `tramp-compat-decimal-to-octal',
 +      `tramp-compat-octal-to-decimal' to new function names.
 +      (tramp-terminal-type, tramp-initial-end-of-output)
 +      (tramp-methods, tramp-foreign-file-name-handler-alist)
 +      (tramp-tramp-file-p, tramp-completion-mode-p)
 +      (tramp-send-command-and-check, tramp-get-remote-path)
 +      (tramp-get-remote-tmpdir, tramp-get-remote-ln)
 +      (tramp-shell-quote-argument): Set tramp-autoload cookie.
 +      (with-file-property, with-connection-property): Move to
 +      tramp-cache.el.
 +      (tramp-local-call-process, tramp-decimal-to-octal)
 +      (tramp-octal-to-decimal): Move to tramp-compat.el.
 +      (tramp-handle-shell-command): Do not require 'shell.
 +      (tramp-compute-multi-hops): No special handling for tramp-gw-*
 +      symbols.
 +      (tramp-unload-tramp): Do not call `tramp-unload-file-name-handlers'.
 +
 +      * net/tramp-cache.el (top): Require 'tramp.  Add to
 +      `tramp-unload-hook'.
 +      (tramp-cache-data, tramp-get-file-property)
 +      (tramp-set-file-property, tramp-flush-file-property)
 +      (tramp-flush-directory-property, tramp-get-connection-property)
 +      (tramp-set-connection-property, tramp-flush-connection-property)
 +      (tramp-cache-print, tramp-list-connections): Set tramp-autoload
 +      cookie.
 +      (with-file-property, with-connection-property): New defuns, moved
 +      from tramp.el.
 +      (tramp-flush-file-function): Use `with-parsed-tramp-file-name'
 +      macro.
 +
 +      * net/tramp-cmds.el (top): Add to `tramp-unload-hook'.
 +      (tramp-version): Set tramp-autoload cookie.
 +
 +      * net/tramp-compat.el (top): Require 'tramp-loaddefs.  Remove all
 +      changes to tramp-unload-hook for other tramp-* packages.  Add to
 +      `tramp-unload-hook'.
 +      (tramp-compat-decimal-to-octal, tramp-compat-octal-to-decimal)
 +      (tramp-compat-call-process): New defuns, moved from tramp.el.
 +
 +      * net/tramp-fish.el (top) Require just 'tramp.  Add objects to
 +      `tramp-methods' and `tramp-foreign-file-name-handler-alist'.
 +      Add to `tramp-unload-hook'.  Change call of
 +      `tramp-compat-decimal-to-octal' to new function name.
 +      (tramp-fish-method): Make it a defconst.
 +      (tramp-fish-file-name-p): Make it a defsubst.
 +      (tramp-fish-method, tramp-fish-file-name-handler)
 +      (tramp-fish-file-name-p): Set tramp-autoload cookie.
 +
 +      * net/tramp-ftp.el (top) Add objects to `tramp-methods' and
 +      `tramp-foreign-file-name-handler-alist'.  Add to
 +      `tramp-unload-hook'.
 +      (tramp-ftp-method): Make it a defconst.
 +      (tramp-ftp-file-name-p): Make it a defsubst.
 +      (tramp-ftp-method, tramp-ftp-file-name-handler)
 +      (tramp-ftp-file-name-p): Set tramp-autoload cookie.
 +
 +      * net/tramp-gvfs.el (top) Add objects to `tramp-methods' and
 +      `tramp-foreign-file-name-handler-alist'.  Add to
 +      `tramp-unload-hook'.  Change checks, whether package can be
 +      loaded.
 +      (tramp-gvfs-file-name-p): Make it a defsubst.
 +      (tramp-gvfs-methods, tramp-gvfs-file-name-handler)
 +      (tramp-gvfs-file-name-p): Set tramp-autoload cookie.
 +      (tramp-gvfs-handle-file-directory-p): New defun.
 +      (tramp-gvfs-file-name-handler-alist): Use it.
 +
 +      * net/tramp-gw.el (top) Add objects to `tramp-methods' and
 +      `tramp-foreign-file-name-handler-alist'.  Add to
 +      `tramp-unload-hook'.
 +      (tramp-gw-tunnel-method, tramp-gw-default-tunnel-port)
 +      (tramp-gw-socks-method, tramp-gw-default-socks-port): Make it a
 +      defconst.
 +      (tramp-gw-tunnel-method, tramp-gw-socks-method)
 +      (tramp-gw-open-connection): Set tramp-autoload cookie.
 +
 +      * net/tramp-imap.el (top) Require just 'tramp.  Add objects to
 +      `tramp-methods' and `tramp-foreign-file-name-handler-alist'.
 +      Add to `tramp-unload-hook'.  Change checks, whether package can be
 +      loaded.
 +      (tramp-imap-file-name-p): Make it a defsubst.
 +      (tramp-imap-method, tramp-imaps-method)
 +      (tramp-imap-file-name-handler)
 +      (tramp-imap-file-name-p): Set tramp-autoload cookie.
 +
 +      * net/tramp-smb.el (top) Require just 'tramp.  Add objects to
 +      `tramp-methods' and `tramp-foreign-file-name-handler-alist'.
 +      Add to `tramp-unload-hook'.  Change checks, whether package can be
 +      loaded.  Change call of `tramp-compat-decimal-to-octal' to new
 +      function name.
 +      (tramp-smb-tunnel-method): Make it a defconst.
 +      (tramp-smb-file-name-p): Make it a defsubst.
 +      (tramp-smb-method, tramp-smb-file-name-handler)
 +      (tramp-smb-file-name-p): Set tramp-autoload cookie.
 +
 +      * net/tramp-uu.el (top) Add to `tramp-unload-hook'.
 +      (tramp-uuencode-region): Set tramp-autoload cookie.
 +
 +      * net/trampver.el (top) Add to `tramp-unload-hook'.
 +      (tramp-version, tramp-bug-report-address): Set tramp-autoload
 +      cookie.  Update release number.
 +
 +2010-09-07  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-start-process): Make sure original
 +      arg list is properly initialized (Bug#6993, Bug#6994).
 +
 +2010-09-06  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +
 +      * files.el (directory-abbrev-alist): Use \` as default regexp.
 +
 +      * emacs-lisp/rx.el (rx-any): Don't explode ranges that end in special
 +      chars like - or ] (bug#6984).
 +      (rx-any-condense-range): Explode 2-char ranges.
 +
 +2010-09-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * desktop.el (desktop-path): Bump :version after 2009-09-15 change.
 +
 +2010-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/bibtex.el:
 +      * proced.el: Update to new email for Roland Winkler <winkler@gnu.org>.
 +
 +2010-09-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/imap.el (imap-message-map): Remove optional buffer parameter,
 +      since no callers use it.
 +      (imap-message-get): Ditto.
 +      (imap-message-put): Ditto.
 +      (imap-mailbox-map): Ditto.
 +      (imap-mailbox-put): Ditto.
 +      (imap-mailbox-get): Ditto.
 +      (imap-mailbox-get): Revert last change for this function.
 +
 +2010-09-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/imap.el (imap-fetch-safe): Remove function, and alter all
 +      callers to use `imap-fetch' instead.  According to the comments, this
 +      should be safe, since all other IMAP clients use the 1:* syntax.
 +      (imap-enable-exchange-bug-workaround): Remove.
 +      (imap-debug): Remove -- doesn't seem very useful.
 +
 +2010-09-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/imap.el (imap-log): New convenience function used throughout
 +      instead of repeating the same code all over the place.
 +
 +2010-09-05  David De La Harpe Golden  <david@harpegolden.net>
 +
 +      * mouse.el (mouse-save-then-kill): Save region to kill-ring
 +      when mouse-drag-copy-region is non-nil (Bug#6956).
 +
 +2010-09-05  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * dired.el (dired-ls-sorting-switches, dired-sort-by-name-regexp):
 +      Improve regexps (Bug#6987).
 +      (dired-sort-toggle): Search more robustly for -t flag.
 +
 +      * files.el (get-free-disk-space): Search more robustly for
 +      "available" column.  Suggested by Ehud Karni
 +      <ehud@unix.mvs.co.il>.
 +
 +2010-09-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * international/uni-bidi.el:
 +      * international/uni-category.el:
 +      * international/uni-combining.el:
 +      * international/uni-decimal.el:
 +      * international/uni-mirrored.el:
 +      * international/uni-name.el: Regenerate.
 +
 +2010-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * electric.el (electric-indent-post-self-insert-function):
 +      Don't reindent with a sloppy indentation function.
 +
 +      * emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch
 +      border case in change-log-mode.
 +
 +2010-09-04  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/compile.el (compilation-error-regexp-alist-alist):
 +      Remove ruby regexp; handle Ruby errors with gcc-include and gnu.
 +      Recognize leading tab in gcc-include regexp.  Ignore names with
 +      leading "from" or "in" in gnu regexp (Bug#6937).
 +
 +2010-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Avoid global recursive calls to kill-buffer-hooks; fit into 80 cols.
 +      * textmodes/ispell.el (ispell-process-buffer-name): Remove.
 +      (ispell-start-process): Avoid setq and simplify logic.
 +      (ispell-init-process): Setup kill-buffer-hook locally when needed.
 +      (kill-buffer-hook): Don't use it globally with code that uses
 +      expand-file-name since that may call kill-buffer via
 +      code_conversion_restore.
 +
 +2010-09-04  Noorul Islam K M  <noorul@noorul.com>  (tiny change)
 +
 +      * emacs-lisp/package.el (package-directory-list): Only call
 +      file-name-nondirectory on a string.
 +
 +2010-09-02  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package--download-one-archive):
 +      Ensure that archive-contents is valid before saving it.
 +      (package-activate-1, package-mark-obsolete, define-package)
 +      (package-compute-transaction, package-list-maybe-add): Use push.
 +
 +2010-09-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Use SMIE's blink-paren for octave-mode.
 +      * progmodes/octave-mod.el (octave-font-lock-close-quotes):
 +      Backslashes do not escape single-quotes, single-quotes do.
 +      (octave-block-else-regexp, octave-block-end-regexp)
 +      (octave-block-match-alist): Remove.
 +      (octave-smie-bnf-table): New var, with old content.
 +      (octave-smie-op-levels): Use it.
 +      (octave-smie-closer-alist): New var.
 +      (octave-mode): Use it.  Setup smie-blink-matching and electric-indent.
 +      (octave-blink-matching-block-open): Remove.
 +      (octave-reindent-then-newline-and-indent, octave-electric-semi)
 +      (octave-electric-space): Let self-insert-command run expand-abbrev and
 +      blink parens.
 +
 +      * electric.el (electricity): New group.
 +      (electric-indent-chars): New var.
 +      (electric-indent-post-self-insert-function): New fun.
 +      (electric-indent-mode): New minor mode.
 +      (electric-pair-skip-self): New custom.
 +      (electric-pair-post-self-insert-function): New function.
 +      (electric-pair-mode): New minor mode.
 +
 +      * calc/calc-aent.el (calcAlg-blink-matching-check): New fun, to replace
 +      calcAlg-blink-matching-open.
 +      (calc-alg-ent-map, calc-alg-ent-esc-map): Initialize in the declaration.
 +      (calc-do-alg-entry): Only touch the part of the keymap that varies.
 +      Use the new blink-matching-check-function.
 +
 +      Provide blink-matching support to SMIE.
 +      * emacs-lisp/smie.el (smie-bnf-closer-alist): New function.
 +      (smie-blink-matching-triggers, smie-blink-matching-inners): New vars.
 +      (smie-blink-matching-check, smie-blink-matching-open): New functions.
 +
 +      * simple.el (newline): Fix last change to properly remove itself from
 +      the hook.
 +
 +2010-09-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (newline): Eliminate optimization.
 +      Use post-self-insert-hook to set hard-newline and things before
 +      running post-self-insert-hook.
 +      (blink-matching-check-mismatch): New function.
 +      (blink-matching-check-function): New variable.
 +      (blink-matching-open): Use them.
 +      Skip back forward over prefix chars skipped by forward-sexp.
 +      Don't check if the parens are backslash escaped.
 +      (blink-paren-post-self-insert-function): Check backslash escaping here.
 +
 +2010-09-02  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-menu-mode-map):
 +      Change package-menu-revert bindings to revert-buffer.
 +      (package-menu-mode): Set revert-buffer-function.
 +      (package-menu-revert): Doc fix.
 +
 +2010-09-02  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-init-process): Use "~/" as
 +      `default-directory' unless using Ispell per-directory personal
 +      dictionaries and not in a mini-buffer under XEmacs.
 +      (kill-buffer-hook): Do not kill ispell process on exit when
 +      `ispell-process-directory' is "~/".  (Bug#6143)
 +
 +2010-09-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * simple.el (kill-new): Call interprogram-cut-function with only
 +      one argument.
 +
 +      * term.el (term-mouse-paste): Don't call x-get-cutbuffer.
 +      Remove cut buffer from error message.
 +
 +      * term/x-win.el (x-select-text):
 +      * term/pc-win.el (x-selection-value):
 +      * term/ns-win.el (x-selection-value):
 +      * eshell/em-term.el:
 +      * w32-fns.el (x-get-selection-value):
 +      * mouse-sel.el (mouse-sel-set-selection-function):
 +      * frame.el (display-selections-p): Remove cut-buffer in documentation.
 +
 +      * term/x-win.el: Update documentation for x-last-selected-text-*.
 +      (x-last-selected-text-cut, x-last-selected-text-cut-encoded)
 +      (x-last-cut-buffer-coding, x-cut-buffer-max): Remove.
 +      (x-select-text): Remove argument PUSH, update documentation.
 +      Remove cut-buffer code.
 +      (x-selection-value-internal): Was previously x-selection-value.
 +      (x-selection-value): Rename from x-cut-buffer-or-selection-value.
 +      Update documentation, remove cut-buffer code.
 +      Call x-selection-value-internal.
 +      (x-clipboard-yank): Call x-selection-value-internal.
 +      (x-initialize-window-system): Remove setting of x-cut-buffer-max.
 +
 +      * term/pc-win.el (x-last-selected-text):
 +      x-cut-buffer-or-selection-value renamed to x-selection-value
 +      (x-select-text): Remove argument PUSH, update documentation.
 +
 +      * term/ns-win.el (x-setup-function-keys, ns-last-selected-text):
 +      x-cut-buffer-or-selection-value renamed to x-selection-value
 +      (x-selection-value): Rename from x-cut-buffer-or-selection-value.
 +      (x-select-text): Remove argument PUSH, update documentation.
 +
 +      * emacs-lisp/cl-macs.el (x-get-cutbuffer, x-get-cut-buffer): Remove.
 +
 +      * w32-fns.el (x-last-selected-text):
 +      x-cut-buffer-or-selection-value renamed to x-selection-value.
 +      (x-cut-buffer-max): Remove.
 +      (x-select-text): Remove argument PUSH, update documentation.
 +
 +      * simple.el (interprogram-cut-function): Remove mention of PUSH.
 +
 +      * select.el (x-get-cut-buffer, x-set-cut-buffer): Remove.
 +
 +      * mouse-sel.el (mouse-sel-get-selection-function):
 +      x-cut-buffer-or-selection-value renamed to x-selection-value.
 +      (x-select-text): Remove optional push.
 +
 +2010-09-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (blink-paren-function): Move from C to here.
 +      (blink-paren-post-self-insert-function): New function.
 +      (post-self-insert-hook): Use it.
 +
 +      * emacs-lisp/pcase.el (pcase-split-memq):
 +      Fix overenthusiastic optimisation.
 +      (pcase-u1): Handle the case of a lambda pred.
 +
 +2010-08-31  Kenichi Handa  <handa@m17n.org>
 +
 +      * international/mule-cmds.el (standard-display-european-internal):
 +      Setup standard-display-table for 8-bit characters by storing 8-bit
 +      characters in the element vector.
 +
 +      * disp-table.el (standard-display-8bit):
 +      Setup standard-display-table for 8-bit characters by storing 8-bit
 +      characters in the element vector.
 +      (standard-display-european): Likewise.
 +
 +2010-08-31  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * textmodes/nroff-mode.el (nroff-view): New command.
 +      (nroff-mode-map): Bind it to C-c C-c.
 +
 +2010-08-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-down-list): New command.
 +
 +      Remove old indentation and navigation code on octave-mode.
 +      * progmodes/octave-mod.el (octave-mode-map): Remap down-list to
 +      smie-down-list rather than add a binding for octave-down-block.
 +      (octave-mark-block, octave-blink-matching-block-open):
 +      Rely on forward-sexp-function.
 +      (octave-fill-paragraph): Don't narrow, so you can use
 +      indent-according-to-mode.
 +      (octave-block-begin-regexp, octave-block-begin-or-end-regexp): Remove.
 +      (octave-in-block-p, octave-re-search-forward-kw)
 +      (octave-re-search-backward-kw, octave-indent-calculate)
 +      (octave-end-as-array-index-p, octave-block-end-offset)
 +      (octave-scan-blocks, octave-forward-block, octave-backward-block)
 +      (octave-down-block, octave-backward-up-block, octave-up-block)
 +      (octave-before-magic-comment-p, octave-indent-line): Remove.
 +
 +2010-08-31  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package--read-archive-file): Just use
 +      `read', to avoid copying an additional string.
 +      (package-menu-mode): Set header-line-format here.
 +      (package-menu-refresh, package-menu-revert): Signal an error if
 +      not in the Package Menu.
 +      (package-menu-package-list): New var.
 +      (package--generate-package-list): Operate on the current buffer;
 +      don't assume that it is *Packages*, since the user may rename it.
 +      Allow persistent package listings and sort keys using
 +      package-menu-package-list and package-menu-package-sort-key.
 +      (package-menu--version-predicate): Fix version calculation.
 +      (package-menu-sort-by-column): Don't select the window.
 +      (package--list-packages): Create the *Packages* buffer.
 +      Set package-menu-package-list-key.
 +      (list-packages): Sorting by status is now the default.
 +      (package-buffer-info): Use match-string-no-properties.
 +      (define-package): Add a &rest argument for future proofing, but
 +      don't use it yet.
 +      (package-install-from-buffer, package-install-buffer-internal):
 +      Merge into a single function, package-install-from-buffer.
 +      (package-install-file): Change caller.
 +
 +      * finder.el: Load finder-inf using `require'.
 +      (finder-list-matches): Sorting by status is now the default.
 +      (finder-compile-keywords): Simpify printing.
 +
 +2010-08-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/octave-mod.el (octave-font-lock-keywords): Use regexp-opt.
 +      (octave-mode-map): Remove special bindings for forward/backward-block
 +      and octave-backward-up-block.  Use smie-close-block.
 +      (octave-continuation-marker-regexp): New var.
 +      (octave-continuation-regexp): Use it.
 +      (octave-operator-table, octave-smie-op-levels)
 +      (octave-operator-regexp, octave-smie-indent-rules): New vars.
 +      (octave-smie-backward-token, octave-smie-forward-token): New funs.
 +      (octave-mode): Use SMIE.
 +      (octave-close-block): Delete.
 +
 +2010-08-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * menu-bar.el (menu-bar-edit-menu) <"Paste">: Check selection in
 +      CLIPBOARD, not in PRIMARY.  (Bug#6944)
 +
 +2010-08-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-offset-rule): Let :parent take
 +      a list of parents.
 +      (smie-indent-column): Allow indirection through variables.
 +
 +      * composite.el (save-buffer-state): Delete, unused.
 +      * font-lock.el (save-buffer-state): Use with-silent-modifications.
 +      (font-lock-default-fontify-region): Use with-syntax-table.
 +      * jit-lock.el (with-buffer-unmodified): Remove.
 +      (with-buffer-prepared-for-jit-lock): Use with-silent-modifications.
 +
 +      Use `declare' in defmacros.
 +      * window.el (save-selected-window):
 +      * subr.el (with-temp-file, with-temp-message, with-syntax-table):
 +      * progmodes/python.el (def-python-skeleton):
 +      * net/dbus.el (dbus-ignore-errors):
 +      * jka-cmpr-hook.el (with-auto-compression-mode):
 +      * international/mule.el (with-category-table):
 +      * emacs-lisp/timer.el (with-timeout):
 +      * emacs-lisp/lisp-mnt.el (lm-with-file):
 +      * emacs-lisp/eieio.el (with-slots):
 +      * emacs-lisp/easymenu.el (easy-menu-define):
 +      * emacs-lisp/debug.el (debugger-env-macro):
 +      * emacs-lisp/cl-compat.el (Multiple-value-bind, Multiple-value-setq)
 +      (Multiple-value-call, Multiple-value-prog1):
 +      * emacs-lisp/cl-seq.el (cl-parsing-keywords, cl-check-key)
 +      (cl-check-test-nokey, cl-check-test, cl-check-match): Move indent and
 +      edebug rule to definition.
 +      * emacs-lisp/lisp-mode.el (save-selected-window)
 +      (with-current-buffer, combine-after-change-calls)
 +      (with-output-to-string, with-temp-file, with-temp-buffer)
 +      (with-temp-message, with-syntax-table, read-if, eval-after-load)
 +      (dolist, dotimes, when, unless):
 +      * emacs-lisp/byte-run.el (inline): Remove indent rule, redundant.
 +
 +2010-08-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * finder.el: Require `package'.
 +      (finder-known-keywords): Tweak descriptions.  Retire `oop' keyword.
 +      (finder-package-info): Var deleted.
 +      (finder-keywords-hash, finder--builtins-alist): New vars.
 +      (finder-compile-keywords): Compute package--builtins and
 +      finder-keywords-hash instead of finder-keywords-hash, respecting
 +      the "Package" header.
 +      (finder-unknown-keywords, finder-list-matches):
 +      Use finder-keywords-hash and package--list-packages.
 +      (finder-mode): Don't set font-lock-defaults.
 +      (finder-exit): We don't use "*Finder-package*" and "*Finder
 +      Category*" buffers anymore.
 +
 +      * emacs-lisp/package.el (package--builtins-base): Var deleted.
 +      (package--builtins): Set default value to nil.
 +      (package-initialize): Load precomputed value of package--builtins
 +      from finder-inf.el.
 +      (package-alist, package-compute-transaction)
 +      (package-download-transaction): Improve docstring.
 +      (package-read-all-archive-contents): Do not change
 +      package--builtins here.
 +      (list-packages): Make package-list-packages an alias for this.
 +      Sort by status by default.
 +      (package--list-packages): Add optional PACKAGES arg.
 +      (describe-package-1): Use font-lock-face property.  For built-in
 +      packages, insert file commentary.
 +      (package--generate-package-list): Rename from
 +      package-list-packages-internal; all callers changed.  Add optional
 +      PACKAGES arg.  Add alphabetical sort fallbacks.
 +      (package-menu--version-predicate, package-menu--status-predicate)
 +      (package-menu--description-predicate)
 +      (package-menu--name-predicate): New functions.
 +
 +      * info.el (Info-finder-find-node): Search package-alist instead of
 +      finder-package-info.
 +
 +2010-08-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * subr.el (version-regexp-alist): Don't use "a" and "b" for
 +      "alpha" and "beta".
 +      (version-to-list): Handle versions like "10.3d".
 +
 +2010-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Use pcase.
 +      (macroexp-accumulate): Use `declare'.
 +
 +2010-08-27  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +
 +      * whitespace.el (whitespace-style): Adjust type declaration.
 +
 +2010-08-26  Magnus Henoch  <magnus.henoch@gmail.com>
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass
 +      empty argument to gvfs-copy.
 +
 +2010-08-26  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to
 +      handle new TRASH arg of `delete-file'.
 +
 +2010-08-26  Christian Lynbech  <christian.lynbech@tieto.com>  (tiny change)
 +
 +      * net/tramp.el (tramp-handle-insert-directory): Don't use
 +      `forward-word', its default syntax could be changed.
 +
 +2010-08-26  Toru TSUNEYOSHI  <t_tuneyosi@hotmail.com>
 +            Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Implement compression for inline methods.
 +
 +      * net/tramp.el (tramp-inline-compress-start-size): New defcustom.
 +      (tramp-copy-size-limit): Allow also nil.
 +      (tramp-inline-compress-commands): New defconst.
 +      (tramp-find-inline-compress, tramp-get-inline-compress)
 +      (tramp-get-inline-coding): New defuns.
 +      (tramp-get-remote-coding, tramp-get-local-coding): Remove,
 +      replaced by `tramp-get-inline-coding'.
 +      (tramp-handle-file-local-copy, tramp-handle-write-region)
 +      (tramp-method-out-of-band-p): Use `tramp-get-inline-coding'.
 +
 +2010-08-26  Noah Lavine  <noah549@gmail.com>  (tiny change)
 +
 +      Detect ssh 'ControlMaster' argument automatically in some cases.
 +
 +      * net/tramp.el (tramp-detect-ssh-controlmaster): New defun.
 +      (tramp-default-method): Use it.
 +
 +2010-08-26  Karel Klíč  <kklic@redhat.com>
 +
 +      * net/tramp.el (tramp-file-name-for-operation):
 +      Add file-selinux-context.
 +
 +2010-08-26  Łukasz Stelmach  <lukasz.stelmach@iem.pw.edu.pl>  (tiny change)
 +
 +      * play/cookie1.el (read-cookie): Fix off-by-one error (bug#6921).
 +
 +2010-08-26  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (beginning-of-buffer, end-of-buffer): Doc fix
 +      (Bug#6907).
 +
 +2010-08-26  Nathan Weizenbaum  <nweiz@cressida.sea.corp.google.com>  (tiny change)
 +
 +      * progmodes/js.el: Make indentation more customizable (Bug#6914).
 +      (js-paren-indent-offset, js-square-indent-offset)
 +      (js-curly-indent-offset): New options.
 +      (js--proper-indentation): Use them.
 +
 +2010-08-26  Daniel Colascione  <dan.colascione@gmail.com>
 +
 +      * progmodes/sh-script.el (sh-get-indent-info): Use syntax-ppss
 +      instead of inspecting font-lock properties (Bug#6916).
 +
 +2010-08-26  David Reitter  <david.reitter@gmail.com>
 +
 +      * server.el (server-visit-files): Run pre-command-hook and
 +      post-command-hook for each buffer while it is current (Bug#6910).
 +      (server-execute): Do not run hooks here.
 +
 +2010-08-26  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Sync with Tramp 2.1.19.
 +
 +      * net/tramp-cmds.el (tramp-cleanup-all-connections)
 +      (tramp-reporter-dump-variable, tramp-load-report-modules)
 +      (tramp-append-tramp-buffers): Use `tramp-compat-funcall'.
 +      (tramp-bug): Recommend setting of `tramp-verbose' to 9.
 +
 +      * net/tramp-compat.el (top): Do not autoload
 +      `tramp-handle-file-remote-p'.  Load tramp-util.el and tramp-vc.el
 +      only when `start-file-process' is not bound.
 +      (byte-compile-not-obsolete-vars): Define if not bound.
 +      (tramp-compat-funcall): New defmacro.
 +      (tramp-compat-line-beginning-position)
 +      (tramp-compat-line-end-position)
 +      (tramp-compat-temporary-file-directory)
 +      (tramp-compat-make-temp-file, tramp-compat-file-attributes)
 +      (tramp-compat-copy-file, tramp-compat-copy-directory)
 +      (tramp-compat-delete-file, tramp-compat-delete-directory)
 +      (tramp-compat-number-sequence, tramp-compat-process-running-p):
 +      Use it.
 +      (tramp-advice-file-expand-wildcards): Do not use
 +      `tramp-handle-file-remote-p'.
 +      (tramp-compat-make-temp-file): Simplify fallback implementation.
 +      (tramp-compat-copy-file): Add PRESERVE-SELINUX-CONTEXT.
 +      (tramp-compat-copy-tree): Remove function.
 +      (tramp-compat-delete-file): New defun.
 +      (tramp-compat-delete-directory): Provide implementation for older
 +      Emacsen.
 +      (tramp-compat-file-attributes): Handle only
 +      `wrong-number-of-arguments' error.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-copy-file):
 +      Add PRESERVE_SELINUX_CONTEXT.
 +      (tramp-fish-handle-delete-file): Add TRASH arg.
 +      (tramp-fish-handle-directory-files-and-attributes):
 +      Do not use `tramp-fish-handle-file-attributes.
 +      (tramp-fish-handle-file-local-copy)
 +      (tramp-fish-handle-insert-file-contents)
 +      (tramp-fish-maybe-open-connection): Use `with-progress-reporter'.
 +
 +      * net/tramp-gvfs.el (top): Require url-util.
 +      (tramp-gvfs-mount-point): Remove.
 +      (tramp-gvfs-file-name-handler-alist): Add `file-selinux-context'
 +      and `set-file-selinux-context'.
 +      (tramp-gvfs-stringify-dbus-message, tramp-gvfs-send-command)
 +      (tramp-gvfs-handle-file-selinux-context)
 +      (tramp-gvfs-handle-set-file-selinux-context): New defuns.
 +      (with-tramp-dbus-call-method): Format trace message.
 +      (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT.
 +      (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file):
 +      Implement backup call, when operation on local files fails.
 +      Use progress reporter.  Flush properties of changed files.
 +      (tramp-gvfs-handle-delete-file): Add TRASH arg.
 +      Use `tramp-compat-delete-file'.
 +      (tramp-gvfs-handle-expand-file-name): Expand "~/".
 +      (tramp-gvfs-handle-make-directory): Make more traces.
 +      (tramp-gvfs-handle-write-region): Protect deleting tmpfile.
 +      (tramp-gvfs-url-file-name): Hexify file name in url.
 +      (tramp-gvfs-fuse-file-name): Take also prefix (like dav shares)
 +      into account for the resulting file name.
 +      (tramp-gvfs-handler-askquestion): Preserve current message, in
 +      order to let progress reporter continue afterwards.  (Bug#6257)
 +      Return dummy mountpoint, when the answer is "no".
 +      See `tramp-gvfs-maybe-open-connection'.
 +      (tramp-gvfs-handler-mounted-unmounted)
 +      (tramp-gvfs-connection-mounted-p): Test also for new mountspec
 +      attribute "default_location".  Set "prefix" property.
 +      Handle default-location.
 +      (tramp-gvfs-mount-spec): Return both prefix and mountspec.
 +      (tramp-gvfs-maybe-open-connection): Test, whether mountpoint
 +      exists.  Raise an error, if not (due to a corresponding answer
 +      "no" in interactive questions, for example).
 +      Use `tramp-compat-funcall'.
 +
 +      * net/tramp-imap.el (top): Autoload `epg-make-context'.
 +      (tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT.
 +      (tramp-imap-do-copy-or-rename-file)
 +      (tramp-imap-handle-insert-file-contents)
 +      (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'.
 +      (tramp-imap-handle-delete-file): Add TRASH arg.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file):
 +      Add PRESERVE-SELINUX-CONTEXT.
 +      (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
 +      Use `with-progress-reporter'.
 +      (tramp-smb-handle-delete-file): Add TRASH arg.
 +
 +      * net/tramp.el (tramp-methods): Move hostname to the end in all
 +      ssh `tramp-login-args'.  Add `tramp-async-args' attribute where
 +      appropriate.
 +      (tramp-verbose): Describe verbose level 9.
 +      (tramp-completion-function-alist)
 +      (tramp-file-name-regexp, tramp-chunksize)
 +      (tramp-local-coding-commands, tramp-remote-coding-commands)
 +      (with-connection-property, tramp-completion-mode-p)
 +      (tramp-action-process-alive, tramp-action-out-of-band)
 +      (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote)
 +      (tramp-exists-file-name-handler): Fix docstring.
 +      (tramp-remote-process-environment): Use `format' instead of
 +      `concat'.  Protect version string by apostroph.
 +      (tramp-shell-prompt-pattern): Do not use a shy group in case of
 +      XEmacs.
 +      (tramp-file-name-regexp-unified)
 +      (tramp-completion-file-name-regexp-unified): On W32 systems, do
 +      not regard the volume letter as remote filename.  (Bug#5447)
 +      (tramp-perl-file-attributes)
 +      (tramp-perl-directory-files-and-attributes): Don't pass "$3".
 +      (tramp-vc-registered-read-file-names): Read input as
 +      here-document, otherwise the command could exceed maximum length
 +      of command line.
 +      (tramp-file-name-handler-alist): Add `file-selinux-context' and
 +      `set-file-selinux-context'.
 +      (tramp-debug-message): Add `tramp-compat-funcall' to ignored
 +      backtrace functions.
 +      (tramp-error-with-buffer): Don't show the connection buffer when
 +      we are in completion mode.
 +      (tramp-progress-reporter-update, tramp-remote-selinux-p)
 +      (tramp-handle-file-selinux-context)
 +      (tramp-handle-set-file-selinux-context, tramp-process-sentinel)
 +      (tramp-connectable-p, tramp-open-shell, tramp-get-remote-trash):
 +      New defuns.
 +      (with-progress-reporter): New defmacro.
 +      (tramp-debug-outline-regexp): New defconst.
 +      (top, tramp-rfn-eshadow-setup-minibuffer)
 +      (tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times)
 +      (tramp-handle-dired-compress-file, tramp-handle-shell-command)
 +      (tramp-completion-mode-p, tramp-check-for-regexp)
 +      (tramp-open-connection-setup-interactive-shell)
 +      (tramp-compute-multi-hops, tramp-read-passwd, tramp-clear-passwd)
 +      (tramp-time-diff, tramp-coding-system-change-eol-conversion)
 +      (tramp-set-process-query-on-exit-flag, tramp-unload-tramp):
 +      Use `tramp-compat-funcall'.
 +      (tramp-handle-make-symbolic-link): Flush file properties.
 +      (tramp-handle-load, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-handle-vc-registered, tramp-maybe-send-script)
 +      (tramp-find-shell): Use `with-progress-reporter'.
 +      (tramp-do-file-attributes-with-stat): Add space in format string,
 +      in order to work around a bug in pdksh.  Reported by Gilles Pion
 +      <gpion@lfdj.com>.
 +      (tramp-handle-verify-visited-file-modtime): Do not send a command
 +      when the connection is not established.
 +      (tramp-handle-set-file-times): Simplify the check for utc.
 +      (tramp-handle-directory-files-and-attributes)
 +      (tramp-get-remote-path): Use `copy-tree'.
 +      (tramp-completion-handle-file-name-all-completions): Ensure, that
 +      non remote files are still checked.  Oops.
 +      (tramp-handle-copy-file, tramp-do-copy-or-rename-file):
 +      Handle PRESERVE-SELINUX-CONTEXT.
 +      (tramp-do-copy-or-rename-file): Add progress reporter.
 +      (tramp-do-copy-or-rename-file-directly): Do not use
 +      `tramp-handle-file-remote-p'.
 +      (tramp-do-copy-or-rename-file-out-of-band):
 +      Use `tramp-compat-delete-directory'.
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-compute-multi-hops, tramp-maybe-open-connection):
 +      Use `format-spec-make'.
 +      (tramp-handle-delete-file): Add TRASH arg.
 +      (tramp-handle-dired-uncache): Flush directory cache, not only file
 +      cache.
 +      (tramp-handle-expand-file-name)
        (tramp-completion-handle-file-name-all-completions)
        (tramp-completion-handle-file-name-completion):
        Use `tramp-connectable-p'.
        (tramp-handle-start-file-process): Set connection property "vec".
        Use it, in order to invalidate file caches.  Check only for
        `remote-tty' process property.
 -      Implement tty setting.  (Bug#4604, Bug#6360)
 -      (tramp-file-name-for-operation): Add `call-process-region' and
 -      `set-file-selinux-context'.
 -      (tramp-find-foreign-file-name-handler)
 -      (tramp-advice-make-auto-save-file-name)
 -      (tramp-set-auto-save-file-modes): Remove superfluous check for
 -      `stringp'.  This is done inside `tramp-tramp-file-p'.
 -      (tramp-file-name-handler): Trace 'quit.  Catch the error for some
 -      operations when we are in completion mode.  This gives the user
 -      the chance to correct the file name in the minibuffer.
 -      (tramp-completion-mode-p): Use `non-essential'.
 -      (tramp-handle-file-name-all-completions): Backward/ XEmacs
 -      compatibility: Use `completion-ignore-case' if
 -      `read-file-name-completion-ignore-case' does not exist.
 -      (tramp-get-debug-buffer): Use `tramp-debug-outline-regexp'.
 +      Implement tty setting.  (Bug#4604, Bug#6360)
 +      (tramp-file-name-for-operation): Add `call-process-region' and
 +      `set-file-selinux-context'.
 +      (tramp-find-foreign-file-name-handler)
 +      (tramp-advice-make-auto-save-file-name)
 +      (tramp-set-auto-save-file-modes): Remove superfluous check for
 +      `stringp'.  This is done inside `tramp-tramp-file-p'.
 +      (tramp-file-name-handler): Trace 'quit.  Catch the error for some
 +      operations when we are in completion mode.  This gives the user
 +      the chance to correct the file name in the minibuffer.
 +      (tramp-completion-mode-p): Use `non-essential'.
 +      (tramp-handle-file-name-all-completions): Backward/ XEmacs
 +      compatibility: Use `completion-ignore-case' if
 +      `read-file-name-completion-ignore-case' does not exist.
 +      (tramp-get-debug-buffer): Use `tramp-debug-outline-regexp'.
 +      (tramp-find-shell, tramp-open-connection-setup-interactive-shell):
 +      `tramp-open-shell'.
 +      (tramp-action-password): Hide password prompt before next run.
 +      (tramp-process-actions): Widen connection buffer for the trace.
 +      (tramp-open-connection-setup-interactive-shell): Set `remote-tty'
 +      process property.  Trace stty settings if `tramp-verbose' >= 9.
 +      Apply workaround for IRIX64 bug.  Move argument of last
 +      `tramp-send-command' where it belongs to.
 +      (tramp-maybe-open-connection): Use `async-args' and `gw-args' in
 +      front of `login-args'.
 +      (tramp-get-ls-command, tramp-get-ls-command-with-dired): Run tests
 +      on "/dev/null" instead of "/".
 +      (tramp-get-ls-command-with-dired): Make test for "--dired"
 +      stronger.
 +      (tramp-set-auto-save-file-modes): Adapt version check.
 +      (tramp-set-process-query-on-exit-flag): Fix wrong parentheses.
 +      (tramp-handle-process-file): Call the program in a subshell, in
 +      order to preserve working directory.
 +      (tramp-handle-shell-command): Don't use hard-wired "/bin/sh" but
 +      `tramp-remote-sh' from `tramp-methods'.
 +      (tramp-get-ls-command): Make test for "--color=never" stronger.
 +      (tramp-check-for-regexp): Use (forward-line 1).
 +
 +      * net/trampver.el: Update release number.
 +
 +2010-08-26  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * help.el (help-map): Bind `C-h P' to describe-package.
 +
 +      * menu-bar.el (menu-bar-describe-menu): Add describe-package.
 +
 +      * emacs-lisp/package.el (package-refresh-contents): Catch errors
 +      when downloading archives.
 +      (describe-package-1): Add package commentary.
 +      (package-install-button-action): New function.
 +      (package-menu-mode-map): Bind ? to package-menu-describe-package.
 +      (package-menu-view-commentary): Function removed.
 +      (package-list-packages-internal): Hide the `package' package too.
 +
 +2010-08-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/misc-lang.el ("Arabic"): New language environment.
 +      Setup composition-function-table for Arabic characters.
 +
 +      * international/fontset.el (setup-default-fontset): Fix typo for
 +      arabic OTF spec (fini->fina).
 +
 +2010-08-25  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * menu-bar.el (menu-bar-set-tool-bar-position): Set frame parameter
 +      on all frames.
 +
 +2010-08-24  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +
 +      * whitespace.el: Allow cleaning up blanks without blank
 +      visualization (Bug#6651).  Adjust help window for
 +      whitespace-toggle-options (Bug#6479).  Allow to use fill-column
 +      instead of whitespace-line-column (from EmacsWiki).  New version
 +      13.1.
 +      (whitespace-style): Add new value 'face.  Adjust docstring.
 +      (whitespace-space, whitespace-hspace, whitespace-tab):
 +      Adjust foreground property face.
 +      (whitespace-line-column): Adjust docstring and type declaration.
 +      (whitespace-style-value-list, whitespace-toggle-option-alist)
 +      (whitespace-help-text): Adjust const initialization.
 +      (whitespace-toggle-options, global-whitespace-toggle-options):
 +      Adjust docstring.
 +      (whitespace-display-window, whitespace-interactive-char)
 +      (whitespace-style-face-p, whitespace-color-on): Adjust code.
 +      (whitespace-help-scroll): New fun.
 +
 +2010-08-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (list-packages): Alias for
 +      package-list-packages.
 +
 +2010-08-24  Kevin Ryde  <user42@zip.com.au>
 +
 +      * textmodes/flyspell.el (flyspell-check-tex-math-command): Doc fix
 +      (Bug#5651).
 +
 +      * progmodes/ruby-mode.el (ruby): Add defgroup.
 +
 +2010-08-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/python.el: Add Ipython support (Bug#5390).
 +      (python-shell-prompt-alist)
 +      (python-shell-continuation-prompt-alist): New options.
 +      (python--set-prompt-regexp): New function.
 +      (inferior-python-mode, run-python, python-shell):
 +      Require ansi-color.  Use python--set-prompt-regexp to set the comint
 +      prompt based on the Python interpreter.
 +      (python--prompt-regexp): New var.
 +      (python-check-comint-prompt)
 +      (python-comint-output-filter-function): Use it.
 +      (run-python): Use a pipe (Bug#5694).
 +
 +2010-08-24  Fabian Ezequiel Gallina  <galli.87@gmail.com>  (tiny change)
 +
 +      * progmodes/python.el (python-send-region): Send a different
 +      Python command if Ipython is in use.
 +      (python-check-version): Use a Python command to find the version.
 +
 +2010-08-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-yank-primary): Avoid setting primary when
 +      deactivating the mark (Bug#6872).
 +
 +2010-08-23  Chris Foote  <chris@foote.com.au>  (tiny change)
 +
 +      * progmodes/python.el (python-block-pairs): Allow use of "finally"
 +      with "else" (Bug#3991).
 +
 +2010-08-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/dbus.el: Accept UNIX domain sockets as bus address.
 +      (top): Don't initialize `dbus-registered-objects-table' anymore,
 +      this is done in dbusbind,c.
 +      (dbus-check-event): Adapt test for bus.
 +      (dbus-return-values-table, dbus-unregister-service)
 +      (dbus-event-bus-name, dbus-introspect, dbus-register-property):
 +      Adapt doc string.
 +
 +2010-08-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * ido.el (ido-use-virtual-buffers): Fix typo in docstring.
 +
 +2010-08-22  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (read-extended-command): New function with the logic
 +      for `completing-read' moved to Elisp from `execute-extended-command'.
 +      Use `function-called-at-point' in `minibuffer-default-add-function'
 +      to get a command name for M-n (bug#5364, bug#5214).
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line-1): Issue warning for ignored arguments
 +      --unibyte, etc (Bug#6886).
 +
 +2010-08-22  Leo  <sdl.web@gmail.com>
 +
 +      * net/rcirc.el (rcirc-add-or-remove): Accept a list of elements.
 +      (ignore, bright, dim, keyword): Split list of nicknames before
 +      passing to rcirc-add-or-remove (Bug#6894).
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
 +
 +2010-08-22  Leo  <sdl.web@gmail.com>
 +
 +      Fix buffer-list rename&refresh after killing a buffer in ido.
 +      * ido.el: Revert Óscar's.
 +      (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh.
 +      Remember the buffers at head, rather than their name.
 +      * iswitchb.el (iswitchb-kill-buffer): Re-make the list.
 +
 +2010-08-22  Kirk Kelsey  <kirk.kelsey@0x4b.net>  (tiny change)
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/make-mode.el (makefile-fill-paragraph): Account for the
 +      extra backslash added to each line (bug#6890).
 +
 +2010-08-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (read-key): Don't echo keystrokes (bug#6883).
 +
 +2010-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * menu-bar.el (menu-bar-games-menu): Add landmark.
 +
 +2010-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * align.el (align-regexp): Make group and spacing arguments
 +      use the interactive defaults when non-interactive.  (Bug#6698)
 +
 +      * mail/rmail.el (rmail-forward): Replace mail-text-start with its
 +      expansion, so as not to need sendmail.
 +      (mail-text-start): Remove declaration.
 +      (rmail-retry-failure): Require sendmail.
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * subr.el (read-key): Don't hide the menu-bar entries (bug#6881).
 +
 +2010-08-22  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * progmodes/flymake.el (flymake-start-syntax-check-process):
 +      Use `start-file-process' in order to let it run also on remote hosts.
 +
 +2010-08-22  Kenichi Handa  <handa@m17n.org>
 +
 +      * files.el: Add `word-wrap' as safe local variable.
 +
 +2010-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * woman.el (woman-translate): Case matters.  (Bug#6849)
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (kill-region): Doc fix (Bug#6787).
 +
 +2010-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/diary-lib.el (diary-header-line-format):
 +      Fit it to the window, not the frame.
 +
 +2010-08-22  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * subr.el (ignore-errors): Add debug declaration.
 +
 +2010-08-22  Geoff Gole  <geoffgole@gmail.com>  (tiny change)
 +
 +      * whitespace.el (whitespace-color-off): Remove post-command-hook
 +      locally.
 +
 +2010-08-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/add-log.el (add-log-file-name): Don't get confused by symlinks.
 +
 +2010-08-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (custom-group-value-create): Add extra newline
 +      before end line (Bug#6876).
 +
 +2010-08-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-save-then-kill): Don't save region to kill ring
 +      when extending it.  Before killing on the second click, check if
 +      the buffer is the correct one.  Doc fix.
 +      (mouse-secondary-save-then-kill): Allow usage without first
 +      calling mouse-start-secondary, by defaulting to point.  Don't save
 +      an empty secondary selection.  Doc fix.
 +
 +2010-08-21  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +
 +      * whitespace.el: Fix slow cursor movement (Bug#6172).  Reported by
 +      Christoph Groth <cwg@falma.de> and Liu Xin <x_liu@neusoft.com>.
 +      New version 13.0.
 +      (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp):
 +      Adjust initialization.
 +      (whitespace-bob-marker, whitespace-eob-marker)
 +      (whitespace-buffer-changed): New vars.
 +      (whitespace-cleanup, whitespace-color-on, whitespace-color-off)
 +      (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp)
 +      (whitespace-post-command-hook, whitespace-display-char-on):
 +      Adjust code.
 +      (whitespace-looking-back, whitespace-buffer-changed): New funs.
 +      (whitespace-space-regexp, whitespace-tab-regexp): Fun eliminated.
 +
 +2010-08-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.el (locate-file-completion-table): Only list the .el and .elc
 +      extensions if there's no other choice (bug#5955).
 +
 +      * facemenu.el (facemenu-self-insert-data): New var.
 +      (facemenu-post-self-insert-function, facemenu-set-self-insert-face):
 +      New functions.
 +      (facemenu-add-face): Use them.
 +
 +      * simple.el (blink-matching-open): Obey forward-sexp-function.
 +
 +2010-08-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (prog-mode-map): New var.
 +      (prog-indent-sexp): New command.
 +
 +      * progmodes/octave-mod.el (octave-mode-menu): Make toggle buttons.
 +
 +      * progmodes/prolog.el (smie): Require.
 +
 +      * emacs-lisp/smie.el (smie-default-backward-token)
 +      (smie-default-forward-token): Strip properties.
 +      (smie-next-sexp): Be more careful with associative operators.
 +      (smie-forward-sexp-command): Generalize.
 +      (smie-backward-sexp-command): Simplify.
 +      (smie-closer-alist): New var.
 +      (smie-close-block): New command.
 +      (smie-indent-debug-log): New var.
 +      (smie-indent-offset-rule): Add a few more cases.
 +      (smie-indent-column): New function.
 +      (smie-indent-after-keyword): Use it.
 +      (smie-indent-keyword): Use it.
 +      Fix up the opener code's point position.
 +      (smie-indent-comment): Only applies at BOL.
 +      (smie-indent-debug): New command.
 +
 +      * emacs-lisp/autoload.el (make-autoload): Preload the macros's
 +      declarations that are useful before running the macro.
 +
 +2010-08-18  Joakim Verona  <joakim@verona.se>
 +
 +      * image.el (imagemagick-types-inhibit): New variable.
 +      (imagemagick-register-types): New function.
 +      * image-mode.el (image-transform-properties): New function.
 +      (image-transform-set-scale, image-transform-fit-to-height)
 +      (image-transform-set-rotation, image-transform-set-resize)
 +      (image-transform-fit-to-width, image-transform-fit-to-height):
 +      New functions.
 +      (image-toggle-display-image): Support image transforms.
 +
 +2010-08-18  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * image.el (create-animated-image): Don't add heuristic mask to image
 +      (Bug#6839).
 +
 +2010-08-18  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * term/ns-win.el (ns-get-pasteboard, ns-set-pasteboard):
 +      Use QCLIPBOARD instead of QPRIMARY (Bug#6677).
 +
 +2010-08-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set.
 +
 +      Font-lock '...' strings, plus various simplifications and fixes.
 +      * progmodes/octave-mod.el (octave-font-lock-keywords): Use regexp-opt.
 +      (octave-font-lock-close-quotes): New function.
 +      (octave-font-lock-syntactic-keywords): New var.
 +      (octave-mode): Use it.  Set beginning-of-defun-function.
 +      (octave-mode-map): Don't override the <foo>-defun commands.
 +      (octave-mode-menu): Pass it directly to easy-menu-define;
 +      remove (now generic) <foo>-defun commands; use info-lookup-symbol.
 +      (octave-block-match-alist): Fix up last change so that
 +      octave-close-block uses the more specific keyword.
 +      (info-lookup-mode): Silence byte-compiler.
 +      (octave-beginning-of-defun): Not interactive any more.
 +      Optimize slightly.
 +      (octave-end-of-defun, octave-mark-defun, octave-in-defun-p): Remove.
 +      (octave-indent-defun, octave-send-defun): Use mark-defun instead.
 +      (octave-completion-at-point-function): Make sure point is within
 +      beg..end.
 +      (octave-reindent-then-newline-and-indent):
 +      Use reindent-then-newline-and-indent.
 +      (octave-add-octave-menu): Remove.
 +
 +2010-08-17  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * mail/emacsbug.el (report-emacs-bug-insert-to-mailer)
 +      (report-emacs-bug-can-use-xdg-email): New functions.
 +      (report-emacs-bug): Set can-xdg-email to result of
 +      report-emacs-bug-can-use-xdg-email.  If can-xdg-email bind
 +      \C-cm to report-emacs-bug-insert-to-mailer and add help text
 +      about it.
 +
 +      * net/browse-url.el (browse-url-default-browser): Add cond
 +      for browse-url-xdg-open.
 +      (browse-url-can-use-xdg-open, browse-url-xdg-open): New functions.
 +
 +2010-08-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/cc-engine.el (c-new-BEG, c-new-END)
 +      (c-fontify-recorded-types-and-refs): Define for compiler.
 +      * progmodes/cc-mode.el (c-new-BEG, c-new-END): Move definitions
 +      before use.
 +
 +      * calendar/icalendar.el (icalendar--convert-recurring-to-diary):
 +      Fix format call.
 +
 +2010-08-17  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-make-symbolic-link): Flush file
 +      properties.
 +      (tramp-handle-process-file): Call the program in a subshell, in
 +      order to preserve working directory.
 +      (tramp-action-password): Hide password prompt before next run.
 +      (tramp-process-actions): Widen connection buffer for the trace.
 +
 +2010-08-16  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 +
 +      * net/rcirc.el (rcirc-log-process-buffers): New option.
 +      (rcirc-print): Use it.
 +      (rcirc-generate-log-filename): New function.
 +      (rcirc-log-filename-function): Change default to
 +      rcirc-generate-log-filename (Bug#6828).
 +
 +2010-08-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (deactivate-mark): If select-active-regions is `only',
 +      only set selection for temporarily active regions.
 +
 +      * cus-start.el: Change defcustom for select-active-regions.
 +
 +2010-08-15  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse--drag-set-mark-and-point): New function.
 +      (mouse-drag-track): Use LOCATION arg to push-mark.
 +      Use mouse--drag-set-mark-and-point to take click-count into
 +      consideration when updating point and mark (Bug#6840).
 +
 +2010-08-15  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/compile.el (compilation-error-regexp-alist-alist):
 +      Give the Ruby rule a lower priority than Gnu (Bug#6778).
 +
 +2010-08-14  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 +
 +      * font-lock.el (lisp-font-lock-keywords-2):
 +      Add combine-after-change-calls, condition-case-no-debug,
 +      with-demoted-errors, and with-silent-modifications (Bug#6025).
 +
 +2010-08-14  Kevin Ryde  <user42@zip.com.au>
 +
 +      * emacs-lisp/copyright.el (copyright-update-year)
 +      (copyright-update): Temporary switch-to-buffer to ensure the
 +      buffer change being queried is visible (Bug#5394).
 +
 +2010-08-14  Tom Tromey  <tromey@redhat.com>
 +
 +      * progmodes/etags.el (tags-file-name): Mark safe if stringp
 +      (Bug#6733).
 +
 +2010-08-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * mouse.el (mouse-yank-primary): Fix mouse-2 on MS-Windows and
 +      MS-DOS.  (Bug#6689)
 +
 +2010-08-13  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * menu-bar.el (menu-bar-set-tool-bar-position): New function.
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-left)
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-right)
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-top)
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-bottom):
 +      Call menu-bar-set-tool-bar-position.
 +
 +2010-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c"
 +      comment style (bug#6834).
 +      * progmodes/scheme.el (scheme-mode-syntax-table):
 +      * emacs-lisp/lisp-mode.el (lisp-mode-syntax-table): Remove spurious
 +      "b" flag in "' 14b" syntax.
 +
 +      * progmodes/octave-mod.el (octave-mode-map): Remove special bindings
 +      for (un)commenting the region and performing completion.
 +      (octave-mode-menu): Use standard commands for help and completion.
 +      (octave-mode-syntax-table): Support %{..%} comments (sort of).
 +      (octave-mode): Use define-derived-mode.
 +      Set completion-at-point-functions and don't set columns.
 +      Don't disable adaptive-fill-regexp.
 +      (octave-describe-major-mode, octave-comment-region)
 +      (octave-uncomment-region, octave-comment-indent)
 +      (octave-indent-for-comment): Remove.
 +      (octave-indent-calculate): Rename from calculate-octave-indent.
 +      (octave-indent-line, octave-fill-paragraph): Update caller.
 +      (octave-initialize-completions): No need to make an alist.
 +      (octave-completion-at-point-function): New function.
 +      (octave-complete-symbol): Use it.
 +      (octave-insert-defun): Use define-skeleton.
 +
 +      * progmodes/octave-mod.el (octave-mode): Set comment-add.
 +      (octave-mode-map): Use comment-dwim (bug#6829).
 +
 +2010-08-12  Antoine Levitt  <antoine.levitt@gmail.com>  (tiny change)
 +
 +      * cus-edit.el (custom-save-variables, custom-save-faces): Fix up
 +      indentation of inserted comment.
 +
 +2010-08-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * faces.el (region): Add type gtk that uses gtk colors.
 +
 +      * dynamic-setting.el (dynamic-setting-handle-config-changed-event):
 +      Handle theme-name change.
 +
 +2010-08-10  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.5
 +      (sql-product-alist): Add :prompt-cont-regexp property for several
 +      database products.
 +      (sql-prompt-cont-regexp): New variable.
 +      (sql-output-newline-count, sql-output-by-send):
 +      New variables.  Record number of newlines in input text.
 +      (sql-send-string): Handle multiple filters and count newlines.
 +      (sql-send-magic-terminator): Count terminator newline.
 +      (sql-interactive-remove-continuation-prompt): Filters output to
 +      remove continuation prompts; one for each newline.
 +      (sql-interactive-mode): Set up new variables, prompt regexp and
 +      output filter.
 +      (sql-mode-sqlite-font-lock-keywords): Correct some keywords.
 +      (sql-make-alternate-buffer-name): Correct buffer name in edge cases.
 +
 +2010-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el: New file.
 +
 +2010-08-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-vc-registered-read-file-names): Read input
 +      as here-document, otherwise the command could exceed maximum
 +      length of command line.
 +      (tramp-handle-vc-registered): Call script accordingly.
 +      Reported by Toru TSUNEYOSHI <t_tuneyosi@hotmail.com>.
 +
 +2010-08-10  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el: Exclude U+05C3 (Hebrew SOF PASUQ) from the
 +      composable pattern.
 +
 +2010-08-09  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-version-split)
 +      (package--version-first-nonzero, package-version-compare):
 +      Functions removed.
 +      (package-directory-list, package-load-all-descriptors)
 +      (package--built-in, package-activate, define-package)
 +      (package-installed-p, package-compute-transaction)
 +      (package-read-all-archive-contents)
 +      (package--add-to-archive-contents, package-buffer-info)
 +      (package-tar-file-info, package-list-packages-internal):
 +      Use version-to-list and version-list-*.
 +
 +      * emacs-lisp/package-x.el (package-upload-buffer-internal):
 +      Use version-to-list.
 +      (package-upload-buffer-internal): Use version-list-<=.
 +
 +2010-08-09  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el: Exclude U+05BD (Hebrew MAQAF) from the
 +      composable pattern.
 +
 +2010-08-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * tutorial.el (tutorial--default-keys): C-d is now bound to
 +      delete-forward-char (Bug#6826).
 +
 +      * mouse.el (mouse-drag-track): Remove accidentally-removed check
 +      for `double' value of mouse-1-click-follows-link (Bug#6807).
 +
 +2010-08-08  Johan Bockgård  <bojohan@gnu.org>
 +
 +      * replace.el (replace-highlight): Bind isearch-forward and
 +      isearch-error, ensuring that highlighting is updated if the user
 +      switches the search direction (Bug#6808).
 +
 +      * isearch.el (isearch-lazy-highlight-forward): New var.
 +      (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
 +      (isearch-lazy-highlight-update): Use it.
 +
 +2010-08-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * international/mule.el (define-charset): Store NAME as :base property.
 +      (ctext-non-standard-encodings-table): Pay attention to charset aliases.
 +      (ctext-pre-write-conversion): Sort ctext-standard-encodings by the
 +      current priority.  Force using the designation of the specific
 +      charset by adding `charset' text property.  Improve the whole algorithm.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emulation/pc-select.el (pc-selection-mode-hook)
 +      (copy-region-as-kill-nomark, beginning-of-buffer-mark)
 +      (pc-selection-mode): Fix typos in docstrings.
 +
 +2010-08-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/cyrillic.el: Don't add "microsoft-cp1251" to
 +      ctext-non-standard-encodings-alist here.
 +
 +      * international/mule.el (ctext-non-standard-encodings-alist):
 +      Add "koi8-r" and "microsoft-cp1251".
 +      (ctext-standard-encodings): New variable.
 +      (ctext-non-standard-encodings-table): List only elements for
 +      non-standard encodings.
 +      (ctext-pre-write-conversion): Adjust for the above change.
 +      Check ctext-standard-encodings.
 +
 +      * international/mule-conf.el (compound-text): Doc fix.
 +      (ctext-no-compositions): Doc fix.
 +      (compound-text-with-extensions): Doc fix.
 +
 +2010-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (exchange-dot-and-mark): Mark obsolete, finally.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/which-func.el (which-func-format): Split help-echo text
 +      into lines, like other mode-line tooltips.
 +
 +      * server.el (server-start): When using TCP sockets, force IPv4
 +      and use a literal 127.0.0.1 for localhost.  (Related to bug#6781.)
 +
 +2010-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * bindings.el (complete-symbol): Run completion-at-point as a fallback.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * term.el (term-delimiter-argument-list): Reflow docstring.
 +      (term-read-input-ring, term-write-input-ring, term-send-input)
 +      (term-bol, term-erase-in-display, serial-supported-or-barf):
 +      Fix typos in docstrings.
 +
 +2010-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * bindings.el (function-key-map): Add a S-tab => backtab fallback.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * dabbrev.el (dabbrev-completion): Fix typo in docstring.
 +
 +2010-08-08  MON KEY  <monkey@sandpframing.com>  (tiny change)
 +
 +      * emacs-lisp/syntax.el (syntax-ppss-toplevel-pos):
 +      Fix typo in docstring (bug#6747).
 +
 +2010-08-08  Leo  <sdl.web@gmail.com>
 +
 +      * eshell/esh-io.el (eshell-get-target): Better detection of
 +      read-only file (Bug#6762).
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * align.el (align-default-spacing): Doc fix.
 +      (align-region-heuristic, align-regexp): Fix typos in docstrings.
 +
 +2010-08-08  Stephen Peters  <speters@itasoftware.com>
 +
 +      * calendar/icalendar.el
 +      (icalendar--split-value): Fix splitting regexp.  (Bug#6766)
 +      (icalendar--get-weekday-numbers): New.
 +      (icalendar--convert-recurring-to-diary): Handle multiple byday
 +      values in weekly rules.  (Bug#6766)
 +
 +2010-08-08  Ulf Jasper  <ulf.jasper@web.de>
 +
 +      * calendar/icalendar.el (icalendar-uid-format): Doc fix.
 +      (icalendar--create-uid, icalendar-export-region)
 +      (icalendar--parse-summary-and-rest): Code formatting.
 +
 +2010-08-08  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc.el (calc-trail-mode,calc-refresh): Use `face' property
 +      to italicize headers.
 +      (calc-highlight-selections-with-faces): New variable.
 +      (calc-selected-face, calc-nonselected-face): New faces.
 +
 +      * calc/calccomp.el (math-comp-highlight-string): Use
 +      `calc-highlight-selections-with-faces' to determine how to highlight
 +      sub-formulas.
 +
 +      * calc/calc-sel.el (calc-show-selections): Change message to when
 +      using faces to highlight selections.
 +
 +2010-08-07  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el (sql-mode-sqlite-font-lock-keywords):
 +      Add SQLite 3 keywords, functions and datatypes.
 +      (sql-interactive-mode): Remove `comint-process-echoes' set to t
 +      (Bug#6686).
 +
 +2010-08-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (select-active-regions): Move to keyboard.c.
 +      (deactivate-mark): Used saved-region-selection.
 +      (select-active-region): Function removed.
 +      (activate-mark, set-mark, push-mark-command)
 +      (handle-shift-selection): Don't call it.
 +      (keyboard-quit): Avoid adding the region to the window selection.
 +
 +      * mouse.el (mouse-drag-track): Remove hacks to deal with old
 +      select-active-regions implementation.
 +      (mouse-yank-at-click): Doc fix.
 +
 +      * cus-start.el: Add custom declaration for select-active-regions.
 +
 +2010-08-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * simple.el (delete-forward-char): Doc fix.
 +
 +      * tutorial.el (help-with-tutorial): Hack safe file-local variables
 +      after reading the tutorial.
 +
 +2010-08-06  Alan Mackenzie  <bug-cc-mode@gnu.org>
 +
 +      * progmodes/cc-cmds.el (c-mask-paragraph, c-fill-paragraph):
 +      Fix for the case that a C style comment has its delimiters alone on
 +      their respective lines.
 +
 +2010-08-06  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-start-file-process): Set connection
 +      property "vec".
 +      (tramp-process-sentinel): Use it for flushing the cache.
 +      We cannot do it via the process buffer, the buffer could be deleted
 +      already when running the sentinel.
 +
 +2010-08-06  Jürgen Hötzel  <juergen@archlinux.org>  (tiny change)
 +
 +      * comint.el (comint-mode): Make directory tracking functions
 +      functional on remote files.  (Bug#6764)
 +
 +2010-08-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vc/diff-mode.el (diff-mode-shared-map): Bind g to revert-buffer.
 +
 +2010-08-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * emacs-lisp/find-gc.el (find-gc-source-files):
 +      Rename unexec.c => unexcoff.c.
 +
 +      * emacs-lisp/authors.el (authors-fixed-entries):
 +      Rename unexec.c => unexcoff.c.
 +
 +2010-08-05  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-dired-uncache): Flush directory
 +      cache, not only file cache.
 +      (tramp-process-sentinel): New defun.
 +      (tramp-handle-start-file-process): Use it, in order to invalidate
 +      file caches.
 +
 +2010-08-03  Leo  <sdl.web@gmail.com>
 +
 +      * server.el (server-start): Simplify loop.
 +
 +2010-08-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * frame.el (screen-height, screen-width, set-screen-width)
 +      (set-screen-height): Remove ancient compatibility aliases.
 +
 +      * textmodes/fill.el (justify-current-line): Don't add 1 to nspaces
 +      when justifying.  It seems useless and harmful for ncols=1 (bug#6738).
 +
 +      * emacs-lisp/timer.el (timer-event-handler): Protect against timers
 +      that change current buffer.
 +
 +2010-08-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the
 +      beginning of the string.  Use `string-match-p'.  (Bug#6765)
 +
 +2010-08-01  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * cus-start.el (x-gtk-use-system-tooltips): New variable.
 +
 +2010-08-01  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package--list-packages): Fix column alignment.
 +      (package--builtins): Tweak descriptions.
 +      (package-print-package): Upcase descriptions if necessary.
 +      Show all built-in packages in font-lock-builtin-face.
 +      (package-list-packages-internal): Omit "emacs" package.
 +      Show status of built-in packages as "built-in".
 +
 +2010-07-31  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-save-then-kill): Doc fix.  Deactivate mark
 +      before killing to preserve the primary selection (Bug#6701).
 +
 +      * term/x-win.el (x-select-text): Doc fix.
 +
 +2010-07-31  Nathaniel Flath  <flat0103@gmail.com>
 +
 +      * progmodes/cc-vars.el (c-offsets-alist, c-inside-block-syms)
 +      (objc-font-lock-extra-types):
 +      * progmodes/cc-mode.el (c-basic-common-init):
 +      * progmodes/cc-langs.el (c-make-mode-syntax-table)
 +      (c++-make-template-syntax-table)
 +      (c-identifier-syntax-modifications, c-symbol-start, c-operators)
 +      (c-<-op-cont-regexp, c->-op-cont-regexp, c-class-decl-kwds)
 +      (c-brace-list-decl-kwds, c-modifier-kwds, c-prefix-spec-kwds-re)
 +      (c-type-list-kwds, c-decl-prefix-re, c-opt-type-suffix-key):
 +      * progmodes/cc-fonts.el (c-make-inverse-face)
 +      (c-basic-matchers-after):
 +      * progmodes/cc-engine.el (c-forward-keyword-clause)
 +      (c-forward-<>-arglist, c-forward-<>-arglist-recur)
 +      (c-forward-name, c-forward-type, c-forward-decl-or-cast-1)
 +      (c-guess-continued-construct, c-guess-basic-syntax):
 +      Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
 +      The above functions were modified or created.
 +
 +2010-07-31  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * faces.el (face-all-attributes): Improve documentation (Bug#6767).
 +
 +2010-07-31  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.el (bidi-paragraph-direction): Define safe local values.
 +
 +      * language/hebrew.el ("Hebrew"): Add TUTORIAL.he to
 +      language-info-alist.  Remove outdated FIXME in a comment.
 +
 +2010-07-31  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-cmds.el (c-mask-paragraph): Fix bug #6688:
 +      Auto-fill broken in C/C++ modes.
 +
 +2010-07-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left)
 +      (menu-bar-showhide-tool-bar-menu-customize-disable)
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-right)
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-bottom)
 +      (menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions
 +      (menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
 +      make a menu for Options => toolbar that can move it.
 +
 +2010-07-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package-x.el (package--make-rss-entry):
 +      (package-maint-add-news-item, package--update-news)
 +      (package-upload-buffer-internal): New arg ARCHIVE-URL.
 +
 +      * emacs-lisp/package.el (package-archive-url): Rename from
 +      package-archive-id.
 +      (package-install): Doc fix.
 +      (package-download-single, package-download-tar, package-install)
 +      (package-menu-view-commentary): Callers changed.
 +
 +2010-07-29  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-start-file-process): Check only for
 +      `remote-tty' process property.
 +      (tramp-open-shell): Don't check for tty.
 +      (tramp-open-connection-setup-interactive-shell): Set `remote-tty'
 +      process property.
 +
 +      * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote
 +      host.
 +
 +2010-07-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-load-list, package-archives)
 +      (package-archive-contents, package-user-dir)
 +      (package-directory-list, package--builtins, package-alist)
 +      (package-activated-list, package-obsolete-alist): Mark as risky.
 +
 +2010-07-28  Phil Hagelberg  <phil@evri.com>
 +
 +      Add support for non-default package repositories.
 +      * emacs-lisp/package.el (package-archive-base): Var deleted.
 +      (package-archives): New variable.
 +      (package-archive-contents): Doc fix.
 +      (package-load-descriptor): Do nothing if descriptor file is missing.
 +      (package--write-file-no-coding): New function.
 +      (package-unpack-single): Use it.
 +      (package-archive-id): New function.
 +      (package-download-single, package-download-tar)
 +      (package-menu-view-commentary): Use it.
 +      (package-installed-p): Make second argument optional.
 +      (package-read-all-archive-contents): New function.
 +      (package-initialize): Use it.
 +      (package-read-archive-contents): Add ARCHIVE argument.
 +      (package--add-to-archive-contents): New function.
 +      (package-install): Don't call package-read-archive-contents.
 +      (package--download-one-archive): Store archive file in a
 +      subdirectory of package-user-dir.
 +      (package-menu-execute): Remove spurious line movement.
 +
 +2010-07-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * cus-start.el (tool-bar-style): Add text-image-horiz.
 +
 +2010-07-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * progmodes/gud.el (gud-common-init): Check for remoteness of
 +      `file', and not of `default-directory'.
 +
 +2010-07-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-methods): Move hostname to the end in all
 +      ssh `tramp-login-args'.
 +      (tramp-verbose): Describe verbose level 9.
 +      (tramp-open-shell): Check for tty if `tramp-verbose' >= 9.
 +      (tramp-open-connection-setup-interactive-shell): Trace stty
 +      settings if `tramp-verbose' >= 9.
 +      (tramp-handle-start-file-process): Implement tty setting.
 +      (Bug#4604, Bug#6360)
 +
 +      * net/tramp-cmds.el (tramp-bug): Recommend setting of
 +      `tramp-verbose' to 9.
 +
 +2010-07-27  Aaron S. Hawley  <ashawley@burlingtontelecom.net>
 +
 +      * emacs-lisp/re-builder.el (reb-re-syntax, reb-lisp-mode)
 +      (reb-lisp-syntax-p, reb-change-syntax, reb-cook-regexp):
 +      Remove references to package `lisp-re' (bug#4369).
 +
 +2010-07-27  Tom Tromey  <tromey@redhat.com>
 +
 +      * progmodes/js.el (js-mode):
 +      * progmodes/make-mode.el (makefile-mode):
 +      * progmodes/simula.el (simula-mode):
 +      * progmodes/tcl.el (tcl-mode): Derive from prog-mode.
 +
 +2010-07-27  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * help-fns.el (find-lisp-object-file-name): Doc fix (bug#6494).
 +
 +      * time.el (display-time-day-and-date): Remove spurious * in docstring.
 +      (display-time-world-buffer-name, display-time-world-mode-map):
 +      Fix typos in docstrings.
 +
 +2010-07-27  Shyam Karanatt  <shyam@swathanthran.in>  (tiny change)
 +
 +      * image-mode.el (image-display-size): New function.
 +      (image-forward-hscroll, image-next-line, image-eol, image-eob)
 +      (image-mode-fit-frame): Use it (Bug#6639).
 +
 +2010-07-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * dired.el (dired-buffers-for-dir): Handle list values of
 +      dired-directory (Bug#6636).
 +
 +2010-07-26  Sam Steingold  <sds@gnu.org>
 +
 +      * mouse.el (mouse-yank-primary, mouse-yank-secondary):
 +      Do not call `x-get-selection' the second time, reuse the value.
 +
 +2010-07-26  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-mail.el (epa-mail-mode-map): Add alternative key bindings
 +      which consist of control chars only.  Suggested by Richard Stallman.
 +
 +2010-07-25  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-file.el (epa-file-insert-file-contents): Check if LOCAL-FILE
 +      exists before passing an error to find-file-not-found-functions
 +      (bug#6723).
 +
 +2010-07-23  Lukas Huonker  <l.huonker@gmail.com>
 +
 +      * play/tetris.el (tetris-tty-colors, tetris-x-colors, tetris-blank):
 +      Remove leading nil element, adjust values.
 +      (tetris-shapes, tetris-shape-scores):
 +      Change representation of shapes and remove some redundancy.
 +      (tetris-get-shape-cell, tetris-shape-width, tetris-draw-next-shape)
 +      (tetris-draw-shape, tetris-erase-shape, tetris-test-shape):
 +      Adjust for working with new representation of shapes.
 +      (tetris-shape-rotations): New function.
 +      (tetris-move-bottom, tetris-move-left, tetris-move-right)
 +      (tetris-rotate-prev, tetris-rotate-next):
 +      Adjust for working with the new version of tetris-test-shape.
 +
 +2010-07-23  Markus Triska  <markus.triska@gmx.at>
 +
 +      * progmodes/ps-mode.el: Use comint (bug#5954).
 +      (ps-run-mode-map): Adapt for comint-mode; omit "\r", [return]..
 +      (ps-mode-other-newline): Simplify.
 +      (ps-run-mode): Derive from comint-mode instead of
 +      fundamental-mode, yielding input history etc.
 +      (ps-run-start, ps-run-quit, ps-run-clear, ps-run-region)
 +      (ps-run-send-string): Adapt for comint-mode.
 +      (ps-run-newline): Remove now unneeded function.
 +
 +2010-07-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-methods): Move hostname to the end in all
 +      plink `tramp-login-args'.
 +
 +2010-07-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-open-shell): New defun.
        (tramp-find-shell, tramp-open-connection-setup-interactive-shell):
 -      `tramp-open-shell'.
 -      (tramp-action-password): Hide password prompt before next run.
 -      (tramp-process-actions): Widen connection buffer for the trace.
 -      (tramp-open-connection-setup-interactive-shell): Set `remote-tty'
 -      process property.  Trace stty settings if `tramp-verbose' >= 9.
 +      Use it.
 +
 +2010-07-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-file-name-regexp-unified)
 +      (tramp-completion-file-name-regexp-unified): On W32 systems, do
 +      not regard the volume letter as remote filename.  (Bug#5447)
 +
 +2010-07-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * custom.el (custom-declare-variable): Give a clearer error message
 +      when the docstring is missing (bug#6476).
 +
 +2010-07-22  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.4.  Improved Login prompting.
 +      (sql-login-params): New widget definition.
 +      (sql-oracle-login-params, sql-mysql-login-params)
 +      (sql-solid-login-params, sql-sybase-login-params)
 +      (sql-informix-login-params, sql-ingres-login-params)
 +      (sql-ms-login-params, sql-postgres-login-params)
 +      (sql-interbase-login-params, sql-db2-login-params)
 +      (sql-linter-login-params): Use it.
 +      (sql-sqlite-login-params): Use it; Define "database" parameter as
 +      a file name.
 +      (sql-sqlite-program): Change to "sqlite3".
 +      (sql-comint-sqlite): Make sure database name is complete.
 +      (sql-for-each-login): New function.
 +      (sql-connect, sql-save-connection): Use it.
 +      (sql-get-login-ext): New function.
 +      (sql-get-login): Use it.
 +      (sql-make-alternate-buffer-name): Handle :file parameters.
 +
 +2010-07-22  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * dired.el (dired-no-confirm): Document value t and fix defcustom to
 +      accept it (bug#6597).  Suggested by Drew Adams <drew.adams@oracle.com>.
 +
 +2010-07-22  Teemu Likonen  <tlikonen@iki.fi>  (tiny change)
 +
 +      * dired.el (dired-mode-map): Use command remapping (bug#6632).
 +
 +2010-07-22  Lawrence Mitchell  <wence@gmx.li>
 +
 +      * term/vt100.el (vt100-wide-mode): Fix :init-value keyword (bug#6620).
 +
 +2010-07-21  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-get-ls-command)
 +      (tramp-get-ls-command-with-dired): Run tests on "/dev/null"
 +      instead of "/".
 +
 +2010-07-20  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.3.
 +      (sql-connection-alist): Change keys from symbols to strings;
 +      enhanced the widget definition.
 +      (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--alt-buffer-part, sql--alt-if-not-empty): Removed.
 +      (sql-make-alternate-buffer-name): Simplified.
 +      (sql-product-interactive): Handle missing product.
 +      (sql-connect): Support string keys, minor improvements.
 +      (sql-save-connection): New function.
 +      (sql-connection-menu-filter): New function.
 +
 +2010-07-20  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-file-name-handler): Trace 'quit.
 +      (tramp-open-connection-setup-interactive-shell):
        Apply workaround for IRIX64 bug.  Move argument of last
        `tramp-send-command' where it belongs to.
 +
 +2010-07-20  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-perl-file-attributes)
 +      (tramp-perl-directory-files-and-attributes): Don't pass "$3".
        (tramp-maybe-open-connection): Use `async-args' and `gw-args' in
        front of `login-args'.
 -      (tramp-get-ls-command, tramp-get-ls-command-with-dired): Run tests
 -      on "/dev/null" instead of "/".
 -      (tramp-get-ls-command-with-dired): Make test for "--dired"
 -      stronger.
 -      (tramp-set-auto-save-file-modes): Adapt version check.
 +
 +2010-07-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * time.el (display-time-world-mode): Define with `define-derived-mode'.
 +      Set `show-trailing-whitespace' to nil.
 +      (display-time-world-display): Simplify.
 +
 +2010-07-18  Alan Mackenzie  <acm@muc.de>
 +
 +      Enhance `c-file-style' in file/directory local variables.
 +      * progmodes/cc-mode.el (c-count-cfss): New function.
 +      (c-before-hack-hook): Call `c-set-style' differently according to
 +      whether c-file-style was set in file or directory local
 +      variables.
 +
 +2010-07-18  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.2.
 +      (sql-product, sql-user, sql-database, sql-server, sql-port):
 +      Use defcustom :safe keyword rather than putting safe-local-variable
 +      property.
 +      (sql-password): Use defcustom :risky keyword rather than putting
 +      risky-local-variable property.
 +      (sql-oracle-login-params, sql-sqlite-login-params)
 +      (sql-solid-login-params, sql-sybase-login-params)
 +      (sql-informix-login-params, sql-ingres-login-params)
 +      (sql-ms-login-params, sql-postgres-login-params)
 +      (sql-interbase-login-params, sql-db2-login-params)
 +      (sql-linter-login-params): Add `port' option.
 +      (sql-get-product-feature): Add NO-INDIRECT parameter.
 +      (sql-comint-oracle, sql-comint-sybase)
 +      (sql-comint-informix, sql-comint-sqlite, sql-comint-mysql)
 +      (sql-comint-solid, sql-comint-ingres, sql-comint-ms)
 +      (sql-comint-postgres, sql-comint-interbase, sql-comint-db2)
 +      (sql-comint-linter): Rename sql-connect-* functions to
 +      sql-comint-*.
 +      (sql-product-alist, sql-mode-menu): Rename as above and
 +      :sqli-connect-func to :sqli-comint-func.
 +      (sql-connection): New variable.
 +      (sql-interactive-mode): Set it.
 +      (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.
 +
 +2010-07-17  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * image-mode.el (image-bookmark-make-record): Do not set context
 +      in an image (Bug#6650).
 +
 +2010-07-17  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (select-active-region): New function.
 +      (push-mark-command, set-mark, activate-mark)
 +      (handle-shift-selection): Use it.
 +      (deactivate-mark): Don't check for size of region.
 +
 +      * mouse.el (mouse-drag-track): Use select-active-region.
 +
 +2010-07-17  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-get-ls-command-with-dired): Make test for
 +      "--dired" stronger.
 +
 +2010-07-17  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * term/x-win.el (x-select-enable-primary): Change default to nil.
 +      (x-select-enable-clipboard): Add :version keyword.
 +
 +      * mouse.el (mouse-drag-copy-region):
 +      * simple.el (select-active-regions): Likewise.
 +
 +2010-07-16  Reiner Steib  <Reiner.Steib@gmx.de>
 +
 +      * vc/vc.el (vc-coding-system-inherit-eol): New defvar.
 +      (vc-coding-system-for-diff): Use it to decide whether to inherit
 +      from the file the EOL format for reading the diffs of that file.
 +      (Bug#4451)
 +
 +2010-07-16  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * mail/rmailmm.el (rmail-mime-save): Make the temp buffer
 +      unibyte, so compressed attachments are not compressed again.
 +
 +2010-07-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired
 +      "/bin/sh" but `tramp-remote-sh' from `tramp-methods'.
 +      (tramp-find-shell): Simplify setting connection property.
 +      (tramp-get-ls-command): Make test for "--color=never" stronger.
 +
 +2010-07-15  Simon South  <ssouth@member.fsf.org>
 +
 +      * progmodes/delphi.el (delphi-previous-indent-of): Indent case
 +      blocks within record declarations (i.e. variant parts) correctly.
 +
 +2010-07-15  Simon South  <ssouth@member.fsf.org>
 +
 +      * progmodes/delphi.el (delphi-token-at): Give newlines precedence
 +      over literal tokens when parsing so newlines aren't "absorbed" by
 +      single-line comments.  Corrects the indentation of case blocks
 +      that have a comment on the first line.
 +
 +2010-07-14  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * bookmark.el (bookmark-load-hook): Fix doc string as suggested
 +      by Drew Adams (Bug#5504).
 +
 +2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127
 +      now that Unicode is used (Bug#6594).
 +
 +2010-07-14  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * term/x-win.el (x-select-enable-clipboard): Default to t.
 +      (x-initialize-window-system): Don't overwrite Paste menu item.
 +
 +      * simple.el (select-active-regions): Default to t.
 +      (push-mark-command): Don't overwrite primary with empty string.
 +
 +      * mouse.el: Bind mouse-2 to mouse-yank-primary.
 +      (mouse-drag-copy-region): Default to nil.
 +
 +      * menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
 +      Cut/Copy/Paste menu bar items.
 +
 +2010-07-13  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
 +      Patch applied by Karl Fogel.
 +
 +      * bookmark.el (bookmark-set): Don't set `bookmark-yank-point'
 +      and `bookmark-current-buffer' if they have been already set in
 +      another buffer (e.g gnus-art).
 +
 +2010-07-13  Karl Fogel  <kfogel@red-bean.com>
 +            Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      Preparation for setting bookmarks in Gnus article buffers (Bug#5975).
 +
 +      * bookmark.el (bookmark-make-record-default): Allow unneeded
 +      information to be omitted from the record.
 +
 +      Adjust declarations and calls:
 +
 +      * info.el (bookmark-make-record-default): Adjust declaration.
 +      (Info-bookmark-make-record): Adjust call.
 +
 +      * woman.el (bookmark-make-record-default): Adjust declaration.
 +      (woman-bookmark-make-record): Adjust call.
 +
 +      * man.el (bookmark-make-record-default): Adjust declaration.
 +      (Man-bookmark-make-record): Adjust call.
 +
 +      * image-mode.el (bookmark-make-record-default): Adjust declaration.
 +
 +      * doc-view.el (bookmark-make-record-default): Adjust declaration.
 +
 +2010-07-13  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'.
 +      This is also from Thierry Volpiatto's patch in bug #6444.  However,
 +      because it was extraneous to the functional change in that patch,
 +      and causes a re-indendation, I am committing it separately.
 +
 +2010-07-13  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * bookmark.el (bookmark-show-annotation): Ensure annotations show,
 +      e.g. in Info bookmarks, by using `switch-to-buffer-other-window'.
 +      Patch applied by Karl Fogel (Bug#6444).
 +
 +2010-07-13  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.el (make-frame): Fix typo in 2010-06-30 change (Bug#6625).
 +
 +2010-07-13  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +
 +      * term/ns-win.el: Bind M-~ to 'ns-prev-frame (due to Matthew
 +      Dempsky; bug#5084).  Remove incorrect binding for S-tab.
 +      (ns-alternatives-map): Change S-tab binding to backtab
 +      (bug#6616).
 +
 +      * simple.el (normal-erase-is-backspace-setup-frame): Set mode on
 +      under ns.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * language/tai-viet.el ("TaiViet"): Try to fix re-encoding bugs.
 +      (Bug#5806)
 +
 +      * language/tv-util.el (tai-viet-re): Remove format.
 +
 +2010-07-12  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el: Remove no-byte-compile declaration.
 +      Change coding: tag to utf-8.  Register hebrew-shape-gstring in
 +      composition-function-table for 3-character looking back.
 +      (hebrew-font-get-precomposed): New function.
 +      (hebrew-shape-gstring): Utilize precomposed glyphs if available.
 +
 +2010-07-11  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-drag-track): Handle select-active-regions
 +      (Bug#6612).
 +
 +2010-07-11  Magnus Henoch  <magnus.henoch@gmail.com>
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass
 +      empty argument to gvfs-copy.
 +
 +2010-07-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/calendar.el (calendar-week-end-day): New function.
 +      * calendar/cal-tex.el (cal-tex-cursor-month): Remove unused vars.
 +      Respect calendar-week-start-day.  (Bug#6606)
 +      (cal-tex-insert-day-names, cal-tex-insert-blank-days)
 +      (cal-tex-insert-blank-days-at-end): Respect calendar-week-start-day.
 +      (cal-tex-first-blank-p, cal-tex-last-blank-p): Simplify, and
 +      respect calendar-week-start-day.
 +
 +2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (use-region-p): Doc fix (Bug#6607).
 +
 +2010-07-10  Aleksei Gusev  <aleksei.gusev@gmail.com>  (tiny change)
 +
 +      * progmodes/compile.el (compilation-error-regexp-alist-alist):
 +      Add regexps for cucumber and ruby.
 +
 +2010-07-08  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-file.el (epa-file-error, epa-file--find-file-not-found-function)
 +      (epa-file-insert-file-contents): Hack to prevent
 +      find-file from opening empty buffer when decryption failed
 +      (bug#6568).
 +
 +2010-07-07  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-alternate-dictionary):
 +      Use file-readable-p.
 +      Return nil if no word-list is found at default locations.
 +      (ispell-complete-word-dict): Default to nil.
 +      (ispell-command-loop): Use 'word-list' when using lookup-words.
 +      (lookup-words): Use ispell-complete-word-dict or
 +      ispell-alternate-dictionary.  Check for word-list availability
 +      and handle errors if needed with better messages (Bug#6539).
 +      (ispell-complete-word): Use ispell-complete-word-dict or
 +      ispell-alternate-dictionary.
 +
 +2010-07-07  Christoph Scholtes  <cschol2112@gmail.com>
 +
 +      * progmodes/python.el (python-font-lock-keywords): Add Python 2.7
 +      builtins (BufferError, BytesWarning, WindowsError; callables
 +      bin, bytearray, bytes, format, memoryview, next, print; __package__).
 +
 +2010-07-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * play/zone.el (top-level): Do not require timer, tabify, or cl.
 +      (zone-shift-left): Ignore intangibility, and any errors from
 +      forward-char.
 +      (zone-shift-right): Remove no-op end-of-line.  Ignore intangibility.
 +      (zone-pgm-putz-with-case): Use upcase-region rather than inserting,
 +      deleting, and copying text properties.
 +      (zone-line-specs, zone-pgm-stress): Check forward-line exit status.
 +      (zone-pgm-rotate): Handle odd buffers like that of gomoku, where getting
 +      to point-max is hard.
 +      (zone-fret, zone-fill-out-screen): Replace cl's do with dotimes.
 +      (zone-fill-out-screen): Ignore intangibility.
 +
 +2010-07-05  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * menu-bar.el (menu-bar-mode):
 +      * tool-bar.el (tool-bar-mode): Replace default-frame-alist element
 +      if it has been set.
 +
 +      * mouse.el (mouse-drag-track): Call mouse-start-end to handle
 +      word/line selection (Bug#6565).
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * net/dbus.el (dbus-send-signal): Declare function.
 +
 +2010-07-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/dbus.el: Implement signal "PropertiesChanged" (from D-Bus 1.3.1).
 +      (dbus-register-property): New optional argument EMITS-SIGNAL.
 +      (dbus-property-handler): Send signal "PropertiesChanged" if requested.
 +
 +2010-07-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-drag-overlay): Variable deleted.
 +      (mouse-move-drag-overlay, mouse-show-mark): Functions deleted.
 +      (mouse--remap-link-click-p): New function.
 +      (mouse-drag-track): Handle dragging by using temporary Transient
 +      Mark mode, instead of a special overlay.
 +      (mouse-kill-ring-save, mouse-save-then-kill): Don't call
 +      mouse-show-mark.
 +
 +      * mouse-sel.el (mouse-sel-selection-alist): mouse-drag-overlay
 +      deleted.
 +
 +2010-07-02  Juri Linkov  <juri@jurta.org>
 +
 +      * autoinsert.el (auto-insert-alist): Fix readability
 +      by using dotted pair notation for lambda.
 +
 +2010-07-02  Juri Linkov  <juri@jurta.org>
 +
 +      * faces.el (read-face-name): Rename arg `string-describing-default'
 +      to `default'.  Doc fix.  Display the default value in quotes
 +      in the prompt.  With empty input, return the `default' arg,
 +      unless the default value is a string (in which case return nil).
 +      (describe-face): Replace the string `default' arg of `read-face-name'
 +      with the symbol `default'.
 +
 +2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emulation/viper-cmd.el (viper-delete-backward-char)
 +      (viper-del-backward-char-in-insert)
 +      (viper-del-backward-char-in-replace, viper-change)
 +      (viper-backward-indent): Replace delete-backward-char with
 +      delete-char (Bug#6552).
 +
 +2010-07-01  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ruler-mode.el (ruler--save-header-line-format): Fix typos.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.el (make-frame): Add default-frame-alist to the PARAMETERS
 +      argument passed to frame-creation-function (Bug#5378).
 +
 +      * faces.el (x-handle-named-frame-geometry)
 +      (x-handle-reverse-video, x-create-frame-with-faces)
 +      (face-set-after-frame-default, tty-create-frame-with-faces):
 +      Don't separately consult default-frame-alist.  It is now passed as the
 +      PARAMETER argument.
 +
 +2010-06-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * startup.el (command-line): Don't call tool-bar-setup in a
 +      tty-only build.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ruler-mode.el (ruler--save-header-line-format): New fun.
 +      (ruler-mode): Use it as a setter function, so as not to overwrite
 +      ruler-mode-header-line-format-old if Ruler mode is on (Bug#5370).
 +
 +2010-06-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * vc/vc.el (vc-deduce-backend): New fun.  Handle diff buffers.
 +      (vc-root-diff, vc-print-root-log, vc-log-incoming)
 +      (vc-log-outgoing): Use it.
 +      (vc-diff-internal): Set diff-vc-backend.
 +
 +      * vc/diff-mode.el (diff-vc-backend): New var.
 +
 +2010-06-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * dynamic-setting.el (font-setting-change-default-font):
 +      Remove call to message.
 +
 +2010-06-28  Kenichi Handa  <handa@m17n.org>
 +
 +      * international/quail.el (quail-insert-kbd-layout): Fix the
 +      showing of untranslated characters.
 +
 +2010-06-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (delete-active-region): New option.
 +      (delete-backward-char): Implement in Lisp.
 +      (delete-forward-char): New command.
 +
 +      * mouse.el (mouse-region-delete-keys): Deleted.
 +      (mouse-show-mark): Simplify.
 +
 +      * bindings.el (global-map): Bind delete and DEL, the former to
 +      delete-forward-char.
 +
 +2010-06-27  Lennart Borgman  <lennart.borgman@gmail.com>
 +
 +      * progmodes/ruby-mode.el (ruby-mode-map): Don't bind TAB.
 +      (ruby-mode): Bind indent-line-function (Bug#5119).
 +
 +2010-06-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line): Recognize "0" X resource value.
 +
 +2010-06-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line): Use X resources to set the value of
 +      menu-bar-mode and tool-bar-mode, before calling frame-initialize.
 +
 +      * menu-bar.el (menu-bar-mode):
 +      * tool-bar.el (tool-bar-mode): Don't change default-frame-alist.
 +      Set init-value to t.
 +
 +      * frame.el (frame-notice-user-settings): Don't change
 +      default-frame-alist based on menu-bar-mode and tool-bar-mode, or
 +      vice versa (Bug#2249).
 +
 +2010-06-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32-fns.el (w32-convert-standard-filename): Doc fix.
 +
 +2010-06-25  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/flyspell.el (flyspell-check-previous-highlighted-word):
 +      Make sure `flyspell-word' re-checks word after function run (Bug#6504).
 +
 +      * textmodes/ispell.el (ispell-init-process): Make sure ispell and
 +      default directories are expanded (Bug#6143).
 +
 +2010-06-24  Juri Linkov  <juri@jurta.org>
 +
 +      * minibuffer.el (completions-format): Change default from nil to
 +      `horizontal'.  Remove `nil' value from :type.  Doc fix.  (Bug#6459)
 +
 +2010-06-24  Juri Linkov  <juri@jurta.org>
 +
 +      * vc/vc.el (vc-diff-internal): Set `revert-buffer-function'
 +      buffer-locally to lambda that re-runs the vc diff command.
 +      (Bug#6447)
 +
 +2010-06-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * kmacro.el (kmacro-call-macro): Don't issue hint message if the
 +      echo area is in use (Bug#3412).
 +
 +2010-06-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * textmodes/texinfmt.el (texinfo-format-region)
 +      (texinfo-raise-lower-sections, texinfo-format-separate-node)
 +      (texinfo-itemize-item, texinfo-multitable-item, texinfo-alias)
 +      (texinfo-format-option, texinfo-noindent):
 +      Use line-beginning-position and line-end-position.
 +
 +      * calc/calc-aent.el, calc/calc-ext.el, calc/calc-lang.el:
 +      * calc/calc-store.el, calc/calc-units.el, calc/calc.el:
 +      * calc/calccomp.el: Add explicit utf-8 coding cookies to files with
 +      utf-8 characters.
 +
 +2010-06-21  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * play/zone.el (zone-fall-through-ws): Fix next-line ->
 +      forward-line fallout.
 +
 +2010-07-06  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-appearance-menu): Add docstring.
 +
 +      * help.el (describe-key): Print up-event using key-description.
 +
 +2010-07-03  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/zeroconf.el (zeroconf-resolve-service)
 +      (zeroconf-service-resolver-handler): Use `dbus-byte-array-to-string'.
 +      (zeroconf-publish-service): Use `dbus-string-to-byte-array'.
 +
 +2010-07-03  Jan Moringen  <jan.moringen@uni-bielefeld.de>
 +
 +      * net/zeroconf.el (zeroconf-service-remove-hook): New defun.
 +
 +2010-06-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Avoid displaying files with a nil state in vc-dir.
 +      * vc/vc-dir.el (vc-dir-update): Obey the noinsert argument in all
 +      cases that cause insertion.
 +      (vc-dir-resynch-file): Tell vc-dir-update to avoid inserting files
 +      with a nil state.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xml.el (xml-parse-region): Avoid infloop (Bug#5281).
 +
 +2010-06-29  Leo  <sdl.web@gmail.com>
 +
 +      * emacs-lisp/rx.el (rx): Doc fix.  (Bug#6537)
 +
 +2010-06-27  Oleksandr Gavenko  <gavenkoa@gmail.com>  (tiny change)
 +
 +      * generic-x.el (bat-generic-mode): Fix regexp for command line
 +      switches (Bug#5719).
 +
 +2010-06-27  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * htmlfontify.el (hfy-face-attr-for-class): Use append instead
 +      of nconc to avoid pure storage error (Bug#6239).
 +
 +2010-06-27  Christoph  <cschol2112@googlemail.com>  (tiny change)
 +
 +      * bookmark.el (bookmark-bmenu-2-window, bookmark-bmenu-other-window)
 +      (bookmark-bmenu-other-window-with-mouse): Remove unnecessary
 +      bindings of bookmark-automatically-show-annotations (Bug#6515).
 +
 +2010-06-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * arc-mode.el (archive-zip-extract): Don't quote the file name on
 +      MS-Windows and MS-DOS.  (Bug#6467, Bug#6144)
 +
 +2010-06-24  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 +
 +      * comint.el (make-comint, make-comint-in-buffer): Mention return
 +      value in the docstrings.  (Bug#6498)
 +
 +2010-06-24  Yoni Rabkin  <yoni@rabkins.net>
 +
 +      * bs.el (bs-mode-font-lock-keywords): Remove "by" from Dired pattern,
 +      since it is not present when using some non-default switches.
 +
 +2010-06-23  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * simple.el (compose-mail): Fix doc string to refer to
 +      `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>
 +
 +      Fix an indentation bug:
 +
 +      * progmodes/cc-mode.el (c-common-init): Initialise c-new-BEG/END.
 +      (c-neutralize-syntax-in-and-mark-CPP): c-new-BEG/END: Take account
 +      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
 +      cleared properties, nil otherwise.
 +      (c-before-change-check-<>-operators): Set c-new-beg/end correctly
 +      by taking account of the existing value.
 +
 +      * progmodes/cc-defs.el
 +      (c-clear-char-property-with-value-function): Fix this to clear the
 +      property rather than overwriting it with nil.
 +
 +2010-06-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-print-package): Add link to
 +      package description via describe-package.
 +      (describe-package-1): List package requirements.  Add button to
 +      perform installation.
 +      (package-menu-describe-package): New command.
 +
 +      * help-mode.el (help-package): New button type.
 +
 +2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el: Move package-list-packages binding to
 +      menu-bar.el.
 +      (describe-package, describe-package-1, package--dir): New funs.
 +      (package-activate-1): Use package--dir.
 +
 +      * emacs-lisp/package-x.el (gnus-article-buffer): Require package.
 +
 +      * help-mode.el (help-package-def): New button type.
 +
 +      * menu-bar.el: Move package-list-packages binding here from
 +      package.el.
 +
 +2010-06-19  Gustav Hållberg  <gustav@gmail.com>  (tiny change)
 +
 +      * descr-text.el (describe-char): Avoid trailing whitespace.  (Bug#6423)
 +
 +2010-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/edebug.el (edebug-read-list):
 +      Phase out old-style backquotes.
 +
 +2010-06-17  Juri Linkov  <juri@jurta.org>
 +
 +      * help-mode.el (help-mode): Set buffer-local variable
 +      revert-buffer-function to help-mode-revert-buffer.
 +      (help-mode-revert-buffer): New function.
 +
 +      * info.el (Info-revert-find-node): Check for major-mode Info-mode
 +      before popping to "*info*" (like in other Info functions).
 +      Keep buffer-name in old-buffer-name.  Keep Info-history-forward in
 +      old-history-forward.  Pop to old-buffer-name or "*info*" to
 +      recreate the killed buffer.  Set Info-history-forward from
 +      old-history-forward.
 +      (Info-breadcrumbs-depth): Add :group and :version.
 +
 +2010-06-17  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * emacs-lisp/package.el (package-menu-mode-map): Add a menu.
 +
 +2010-06-17  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-aspell-find-dictionary): Fix regexp
 +      for languages like Portuguese with pt_{BR,PT} and no plain pt.
 +
 +2010-06-17  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/package.el (package-menu-mode-map):
 +      Move initialization into declaration.
 +
 +      * menu-bar.el (menu-bar-options-menu): Fix typo in menu entry.
 +
 +2010-06-17  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-archive-base): Point to
 +      elpa.gnu.org.
 +      (package-enable, package-load-list): New defcustoms.
 +      (package-user-dir, package-directory-list): Turn into defcustoms.
 +      Don't include package-user-dir in package-directory-list.
 +      (package--builtins-base): Don't include Emacs as a "package".
 +      (package-subdirectory-regexp): New var.
 +      (package-load-all-descriptors, package-compute-transaction)
 +      (package-download-transaction): Obey package-load-list.
 +      (package-activate-1): Rename from package-do-activate.
 +      (package-list-packages-internal): Check package-load-list.
 +      (package-load-descriptor, package-generate-autoloads)
 +      (package-unpack, package-unpack-single)
 +      (package--read-archive-file, package-delete):
 +      Use expand-file-name.
 +
 +      * emacs-lisp/package-x.el: New file.  Package uploading
 +      functionality split out from package.el.
 +
 +      * startup.el (command-line): Load packages after reading init file.
 +
 +2010-06-17  Tom Tromey  <tromey@redhat.com>
 +
 +      * emacs-lisp/package.el: New file.
 +
 +2010-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix vc-annotate for renamed files when using Git.
 +      * vc/vc-git.el (vc-git-find-revision): Deal with empty results from
 +      ls-files.  Doe not pass the object as a file name to cat-file, it
 +      is not a file name.
 +      (vc-git-annotate-command): Pass the file name using -- to avoid
 +      ambiguity with the revision.
 +      (vc-git-previous-revision): Pass a relative file name.
 +
 +2010-06-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/js.el (js-mode-map): Use standard capitalization and
 +      ellipses for menu entries.
 +
 +      * wid-edit.el (widget-complete): Doc fix.
 +
 +2010-06-22  Jürgen Hötzel  <juergen@hoetzel.info>  (tiny change)
 +
 +      * wid-edit.el (widget-complete): Fix typo in 2009-12-02 change.
 +
 +2010-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix annotating other revisions for renamed files in vc-annotate.
 +      * vc/vc-annotate.el (vc-annotate): Add an optional argument for the
 +      VC backend.  Use it when non-nil.
 +      (vc-annotate-warp-revision): Pass the VC backend to vc-annotate.
 +      (Bug#6487).
 +
 +      Fix vc-annotate-show-changeset-diff-revision-at-line for git.
 +      * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
 +      Do not pass the file name to the 'previous-revision call when we
 +      don't want a file diff.  (Bug#6489)
 +
 +2010-06-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix finding revisions for renamed files in vc-annotate.
 +      * vc/vc.el (vc-find-revision): Add an optional argument for
 +      the VC backend.  Use it when non-nil.
 +      * vc/vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC
 +      backend to vc-find-revision.  (Bug#6487)
 +
 +2010-06-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix reading file names in Git annotate buffers.
 +      * vc/vc-git.el (vc-git-annotate-extract-revision-at-line):
 +      Remove trailing whitespace.  Suggested by Eric Hanchrow.  (Bug#6481)
 +
 +2010-06-20  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set
 +      in file local variables, set it first.
 +
 +2010-06-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * descr-text.el (describe-char-unicode-data): Insert separating
 +      space when needed.  (Bug#6422)
 +
 +      * progmodes/idlwave.el (idlwave-action-and-binding):
 +      Fix typo in 2009-12-03 change.  (Bug#6450)
 +
 +2010-06-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Put back special
 +      handling for `lambda' (misunderstanding).
 +
 +2010-06-16  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-poly.el (math-accum-factors): Make sure that
 +      constants aren't distributed after they are factored out.
 +
 +2010-06-16  Juri Linkov  <juri@jurta.org>
 +
 +      * facemenu.el (list-colors-display): Call `pop-to-buffer' before
 +      `list-colors-print'.  (Bug#6332)
 +
 +      * subr.el (read-quoted-char): Fix up last change (bug#6290).
 +
 +2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Don't handle `lambda'
 +      specially, since it's a macro.  Fix up wrong hint passed to maybe-cons.
 +
 +      * font-lock.el (font-lock-major-mode): Rename from
 +      font-lock-mode-major-mode to distinguish it from
 +      global-font-lock-mode's own font-lock-mode-major-mode (bug#6135).
 +      (font-lock-set-defaults):
 +      * font-core.el (font-lock-default-function): Adjust users.
 +      (font-lock-mode): Don't set it at all.
 +
 +2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/vc-annotate.el (vc-annotate): Use vc-read-revision.
 +
 +2010-06-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/appt.el (appt-time-msg-list): Doc fix.
 +      (appt-check): Let-bind appt-warn-time.
 +      (appt-add): Make the 3rd argument optional.
 +      Simplify argument names.  Doc fix.  Check for integer WARNTIME.
 +      Only add WARNTIME to the output list if non-nil.
 +
 +2010-06-16  Ivan Kanis  <apple@kanis.eu>
 +
 +      * calendar/appt.el (appt-check): Let the 3rd element of
 +      appt-time-msg-list specify the warning time.
 +      (appt-add): Add new argument with the warning time.  (Bug#5176)
 +
 +2010-06-16  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 +
 +      * vc/vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions
 +      older than version 1.6.  (Bug#6361)
 +
 +2010-06-16  Helmut Eller  <eller.helmut@gmail.com>
 +
 +      * emacs-lisp/cl-macs.el (destructuring-bind): Bind `bind-enquote',
 +      used by cl-do-arglist.  (Bug#6408)
 +
 +2010-06-16  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-dictionary-base-alist):
 +      Fix portuguese casechars/not-casechars for missing 'çÇ'.
 +      Suggested by Rolando Pereira (bug#6434).
 +
 +2010-06-15  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * facemenu.el (list-colors-sort): Doc fix.
 +
 +2010-06-15  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 +
 +      * progmodes/sql.el (sql-connect-mysql): Fix typo.
 +
 +2010-06-14  Juri Linkov  <juri@jurta.org>
 +
 +      Add sort option `list-colors-sort'.  (Bug#6332)
 +      * facemenu.el (color-rgb-to-hsv): New function.
 +      (list-colors-sort): New defcustom.
 +      (list-colors-sort-key): New function.
 +      (list-colors-display): Doc fix.  Sort list according to the option
 +      `list-colors-sort'.
 +      (list-colors-print): Add HSV values to `help-echo' property of
 +      RGB strings.
 +
 +2010-06-14  Juri Linkov  <juri@jurta.org>
 +
 +      * compare-w.el: Move to the "vc" subdirectory.
 +
 +2010-06-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * image-mode.el (image-mode-map): Remap left-char and right-char.
 +
 +      * nxml/nxml-mode.el (nxml-indent-line): Standardize indent behavior.
 +
 +2010-06-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * term/common-win.el (x-colors): Add all the color names defined
 +      in rgb.txt (Bug#6332).
 +
 +      * facemenu.el (list-colors-print): Don't print extra names if it
 +      will overflow the window width.
 +
 +      * vc/log-edit.el (log-edit-font-lock-keywords): Revert 2010-06-02
 +      change (Bug#6343).
 +
 +2010-06-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.el (make-directory): Doc fix (bug#6396).
 +
 +2010-06-12  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-remote-process-environment): Protect version
 +      string by apostroph.
 +      (tramp-shell-prompt-pattern): Do not use a shy group in case of
 +      XEmacs.
 +      (tramp-file-name-for-operation): Add `call-process-region'.
        (tramp-set-process-query-on-exit-flag): Fix wrong parentheses.
 -      (tramp-handle-process-file): Call the program in a subshell, in
 -      order to preserve working directory.
 -      (tramp-handle-shell-command): Don't use hard-wired "/bin/sh" but
 -      `tramp-remote-sh' from `tramp-methods'.
 -      (tramp-get-ls-command): Make test for "--color=never" stronger.
 -      (tramp-check-for-regexp): Use (forward-line 1).
  
 -      * net/trampver.el: Update release number.
 +      * net/tramp-compat.el (top): Do not autoload
 +      `tramp-handle-file-remote-p'.  Load tramp-util.el and tramp-vc.el
 +      only when `start-file-process' is not bound.
 +      (tramp-advice-file-expand-wildcards): Do not use
 +      `tramp-handle-file-remote-p'.
 +      (tramp-compat-make-temp-file): Handle the case, that
 +      `make-temp-file' has no third argument EXTENSION.
 +
 +2010-06-11  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (WINS_BASIC): Include new directory vc.
 +
 +      * loadup.el ("vc-hooks", "ediff-hook"): Load from lisp/vc/.
 +
 +2010-06-11  Juri Linkov  <juri@jurta.org>
 +
 +      * finder.el (finder-known-keywords): Add keyword "vc"
 +      for version control.
 +
 +      * add-log.el, cvs-status.el, diff.el, diff-mode.el, ediff.el,
 +      * emerge.el, log-edit.el, log-view.el, pcvs.el, smerge-mode.el,
 +      * vc-annotate.el, vc-bzr.el, vc-dir.el, vc-dispatcher.el, vc-git.el,
 +      * vc-hg.el, vc-mtn.el, vc.el: Add keyword "vc".
 +
 +2010-06-11  Juri Linkov  <juri@jurta.org>
 +
 +      Move version control related files to the "vc" subdirectory.
 +      * add-log.el, cvs-status.el, diff.el, diff-mode.el, ediff-diff.el,
 +      * ediff.el, ediff-help.el, ediff-hook.el, ediff-init.el,
 +      * ediff-merg.el, ediff-mult.el, ediff-ptch.el, ediff-util.el,
 +      * ediff-vers.el, ediff-wind.el, emerge.el, log-edit.el, log-view.el,
 +      * pcvs-defs.el, pcvs.el, pcvs-info.el, pcvs-parse.el, pcvs-util.el,
 +      * smerge-mode.el, vc-annotate.el, vc-arch.el, vc-bzr.el, vc-cvs.el,
 +      * vc-dav.el, vc-dir.el, vc-dispatcher.el, vc.el, vc-git.el,
 +      * vc-hg.el, vc-hooks.el, vc-mtn.el, vc-rcs.el, vc-sccs.el, vc-svn.el:
 +      Move files to the "vc" subdirectory.
 +
 +2010-06-11  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * comint.el (comint-password-prompt-regexp): Fix 2010-04-10 change
 +      (Bug#6367).
 +
 +2010-06-11  Stephen Eglen  <stephen@gnu.org>
 +
 +      * shell.el: Bind `shell-resync-dirs' to M-RET.
 +
 +2010-06-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * notifications.el: Move file from lisp/net, because it is
 +      supposed to talk locally to the user.
 +
 +2010-06-10  Julien Danjou  <julien@danjou.info>
 +
 +      * net/notifications.el (notifications-on-action-signal)
 +      (notifications-on-closed-signal): Pass notification id as first
 +      argument to the callback functions.  Add docstrings.
 +      (notifications-notify): Fix docstring.
 +
 +2010-06-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/authors.el (authors-ignored-files)
 +      (authors-valid-file-names): Add some files.
 +
 +2010-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * net/rcirc.el (rcirc-server-alist, rcirc, rcirc-connect): Resolve
 +      merge conflict, giving preference to the emacs-23 version of the code.
 +
 +2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/advice.el (ad-compile-function):
 +      Define warning-suppress-types before we let-bind it (bug#6275).
 +
 +      * vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;
 +      declare it, make it buffer-local and permanent-local (bug#6324).
 +      (vc-resynch-window): Adjust name.
 +      * vc-hooks.el (vc-find-file-hook): Adjust name.
 +
 +2010-06-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/notifications.el (notifications-notify): Fix docstring.
 +
 +2010-06-09  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Update to Unicode 6.0.0 beta.
 +      * international/charprop.el: Update copyright.
 +      * international/mule-cmds.el (ucs-names): Update character ranges.
 +      * 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: Regenerate.
 +
 +2010-06-09  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/smie.el (comment-string-strip): Declare function.
 +      (smie-precs-precedence-table): Fix typo in docstring.
 +
 +      * vc-mtn.el (log-edit-extract-headers): Declare function.
 +
 +      * vc-hg.el (log-edit-extract-headers): Remove duplicate declaration.
 +
 +      * net/notifications.el (dbus-register-signal): Declare function.
 +      (notifications-notify): Fix typos and reflow docstring.
 +
 +2010-06-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Improve VC create/retrieve tag/branch.
 +      * vc.el (vc-create-tag): Do not read the directory name for VCs
 +      with repository revision granularity.  Adjust the tag/branch
 +      prompt.  Reset VC properties.
 +      (vc-retrieve-tag): Do not read the directory name for VCs
 +      with repository revision granularity.  Reset VC properties.
 +
 +2010-06-09  Julien Danjou  <julien@danjou.info>
 +
 +      * net/notifications.el: New file.
 +
 +2010-06-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add optional support for resetting VC properties.
 +      * vc-dispatcher.el (vc-resynch-window): Add new optional argument,
 +      call vc-file-clearprops when true.
 +      (vc-resynch-buffer): Add new optional argument, pass it down.
 +      (vc-resynch-buffers-in-directory): Likewise.
 +
 +      Improve support for special markup in the VC commit message.
 +      * vc-mtn.el (vc-mtn-checkin): Add support for Author: and Date: markup.
 +      * vc-hg.el (vc-hg-checkin): Add support for Date:.
 +      * vc-git.el (vc-git-checkin):
 +      * vc-bzr.el (vc-bzr-checkin): Likewise.
 +
 +2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
 +      can be handled with a ((:before "fn") (:prev "=>" parent)) rule.
 +
 +2010-06-07  Martin Pohlack  <mp26@os.inf.tu-dresden.de>
 +
 +      * iimage.el: Remove images as soon as the underlying text is modified.
 +      (iimage-modification-hook): New function.
 +      (iimage-mode-buffer): Use it.
 +
 +2010-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-offset-rule): Rename from
 +      smie-indent-offset-after.  Add :prev case.  Make a bit more generic.
 +      (smie-indent-virtual): Remove `virtual' arg.  Update callers.
 +      (smie-indent-keyword): Add handling of open-paren keywords.
 +      (smie-indent-comment-continue): Don't assume comment-continue.
 +
 +2010-06-07  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (pop-to-buffer): Remove the conditional that
 +      compares new-window and old-window, so it will reselect
 +      the selected window unconditionally.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html
 +
 +2010-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-offset-after)
 +      (smie-indent-forward-token, smie-indent-backward-token): New functions.
 +      (smie-indent-after-keyword): Use them.
 +      (smie-indent-fixindent): Only applies to the indentation of the BOL.
 +      (smie-indent-keyword): Tweak the black magic.
 +      (smie-indent-comment-continue): Strip comment-continue before use.
 +      (smie-indent-functions): Indent comments before keywords.
 +
 +2010-06-06  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-lazy-highlight-search): Fix looping
 +      by checking for empty match.  This syncs this loop with the
 +      similar loop in `isearch-search'.  (Bug#6362)
 +
 +2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * net/dbus.el (dbus-register-method): Declare function.
 +      (dbus-handle-event, dbus-property-handler): Fix typos in docstrings.
 +      (dbus-introspect): Doc fix.
 +      (dbus-event-bus-name, dbus-introspect-get-interface)
 +      (dbus-introspect-get-argument): Reflow docstrings.
 +
 +2010-06-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      vc-log-incoming/vc-log-outgoing fixes for Git.
 +      * vc-git.el (vc-git-log-view-mode): Fix font lock for
 +      incoming/outgoing logs.
 +      (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream}
 +      instead of vc-git-compute-remote.
 +      (vc-git-compute-remote): Remove.
 +
 +2010-06-04  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * term/common-win.el (x-colors): Add "dark green" and "dark
 +      turquoise" (Bug#6332).
 +
 +2010-06-04  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (kill-new): Fix logic of kill-do-not-save-duplicates.
 +      Instead of setting `replace' to t and replacing the same string
 +      with itself, don't do certain actions when
 +      kill-do-not-save-duplicates is non-nil and string is equal to car
 +      of kill-ring: don't call menu-bar-update-yank-menu, don't push
 +      interprogram-paste strings to kill-ring, and don't push the input
 +      argument `string' to kill-ring.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html
 +
 +2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * subr.el (directory-sep-char): Move from fileio.c and make a defconst.
 +
 +2010-06-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Expand "~/".
 +      (tramp-gvfs-handler-mounted-unmounted)
 +      (tramp-gvfs-connection-mounted-p): Handle default-location.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-delete-directory): Don't try to
 +      move files to trash.
 +
 +2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * international/mule-cmds.el (nonascii-insert-offset)
 +      (nonascii-translation-table): Add obsolescence information.
 +
 +      * international/mule.el (make-translation-table-from-vector): Doc fix.
 +
 +2010-06-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * desktop.el (desktop-clear-preserve-buffers):
 +      Add "*Warnings*" buffer.  (Bug#6336)
 +
 +2010-06-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      vc-log-incoming/vc-log-outgoing improvements for Git.
 +      * vc-git.el (vc-git-log-outgoing): Use the same format as the
 +      short log.
 +      (vc-git-log-incoming): Likewise.  Run "git fetch" before the log command.
 +
 +      Add bindings for vc-log-incoming and vc-log-outgoing.
 +      * vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming
 +      and vc-log-outgoing.
 +      * vc-dir.el (vc-dir-menu-map): Add menu bindings for vc-log-incoming
 +      and vc-log-outgoing.
 +
 +2010-06-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * net/rcirc.el (rcirc-sort-nicknames): Remove.
 +      (rcirc-handler-366): Always sort nicknames.
 +
 +2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/smie.el (comment-continue): Declare for byte-compiler.
 +
 +2010-06-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * net/rcirc.el (rcirc-nickname<, rcirc-sort-nicknames-join): Doc fix.
 +
 +2010-06-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * net/rcirc.el (rcirc-sort-nicknames): Change default.
 +      (rcirc-sort-nicknames-join): Avoid setq.
 +
 +2010-06-03  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 +
 +      * net/rcirc.el (rcirc-sort-nicknames): New custom.
 +      (rcirc-nickname<, rcirc-sort-nicknames-join): New funs.
 +      (rcirc-handler-366): Use them.
 +
 +2010-06-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Split smie-indent-calculate into more manageable chunks.
 +      * emacs-lisp/smie.el (smie-indent-virtual, smie-indent-fixindent)
 +      (smie-indent-comment, smie-indent-after-keyword, smie-indent-keyword)
 +      (smie-indent-close, smie-indent-comment-continue, smie-indent-bob)
 +      (smie-indent-exps): Extract from smie-indent-calculate.
 +      (smie-indent-functions): New var.
 +      (smie-indent-functions): Use them.
 +
 +2010-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-hanging-p): Use smie-bolp.
 +      (smie-indent-calculate): Simplify and cleanup.
 +
 +2010-06-02  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-gvfs.el (top): Require url-util.
 +      (tramp-gvfs-mount-point): Remove.
 +      (tramp-gvfs-stringify-dbus-message, tramp-gvfs-send-command):
 +      New defuns.
 +      (with-tramp-dbus-call-method): Format trace message.
 +      (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file):
 +      Implement backup call, when operation on local files fails.
 +      Use progress reporter.  Flush properties of changed files.
 +      (tramp-gvfs-handle-make-directory): Make more traces.
 +      (tramp-gvfs-url-file-name): Hexify file name in url.
 +      (tramp-gvfs-fuse-file-name): Take also prefix (like dav shares)
 +      into account for the resulting file name.
 +      (tramp-gvfs-handler-askquestion): Return dummy mountpoint, when
 +      the answer is "no".  See `tramp-gvfs-maybe-open-connection'.
 +      (tramp-gvfs-handler-mounted-unmounted)
 +      (tramp-gvfs-connection-mounted-p): Test also for new mountspec
 +      attribute "default_location".  Set "prefix" property.
 +      (tramp-gvfs-mount-spec): Return both prefix and mountspec.
 +      (tramp-gvfs-maybe-open-connection): Test, whether mountpoint
 +      exists.  Raise an error, if not (due to a corresponding answer
 +      "no" in interactive questions, for example).
 +
 +2010-06-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * log-edit.el (log-edit-font-lock-keywords): Make group 4 match lax.
 +
 +2010-06-01  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/eldoc.el: Add completions for new commands left-* and
 +      right-*.  (Bug#6265)
 +
 +2010-06-01  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add support for vc-log-incoming, improve vc-log-outgoing for Git.
 +      * vc-git.el (vc-git-compute-remote): New function.
 +      (vc-git-log-outgoing): Use it instead of hard coding a value.
 +      (vc-git-log-incoming): New function.
 +
 +      Improve state updating for VC tag commands.
 +      * vc.el (vc-create-tag, vc-retrieve-tag): Call vc-resynch-buffer
 +      to update the state of all buffers in the directory.
 +
 +      * vc-dir.el (vc-dir-update): Remove entries with a nil state (bug#5539).
 +
 +2010-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-bzr.el (vc-bzr-revision-completion-table): Apply
 +      `file-directory-p' to the filename part rather than to the whole text.
 +
 +2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * man.el (Man-completion-table): Let the user type "-k " (bug#6319).
 +
 +2010-05-31  Drew Adams  <drew.adams@oracle.com>
 +
 +      * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298).
 +
 +2010-05-31  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * subr.el (momentary-string-display): Just use read-event to read
 +      the exit event (Bug#6238).
 +
 +2010-05-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/mule.el (define-coding-system): Doc fix (bug#6313).
 +
 +2010-05-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emulation/cua-base.el: Recognize also `right-word' and `left-word'.
 +      Suggested by Eli Zaretskii <eliz@gnu.org>.
 +
 +2010-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-file-name-table): Don't return a boundary
 +      past the end of `string' (bug#6299).
 +      (completion--file-name-table): Delegate to completion-file-name-table
 +      for the `boundaries' case.
 +
 +2010-05-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emulation/cua-base.el: Recognize `right-char' and `left-char' as
 +      movement commands.
 +
 +      * progmodes/ada-xref.el (ada-prj-ada-project-path-sep): Set from
 +      `path-separator', but maintain compatibility with Emacs 20.2.
 +
 +2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * server.el (server-process-filter): Receive parent-id argument
 +      from emacsclient.
 +      (server-create-window-system-frame): New arg.  Pass parent-id as
 +      frame parameter.
 +
 +2010-05-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Bidi-sensitive word movement with arrow keys.
 +      * subr.el (right-arrow-command, left-arrow-command): Move to
 +      bindings.el.
 +
 +      * bindings.el (right-char, left-char): Move from subr.el and
 +      rename from right-arrow-command and left-arrow-command.
 +      (right-word, left-word): New functions.
 +      (global-map) <right>: Bind to right-char.
 +      (global-map) <left>: Bind to left-char.
 +      (global-map) <C-right>: Bind to right-word.
 +      (global-map) <C-left>: Bind to left-word.
 +
 +      * ls-lisp.el (ls-lisp-classify-file): New function.
 +      (ls-lisp-insert-directory): Call it if switches include -F (bug#6294).
 +      (ls-lisp-classify): Call ls-lisp-classify-file.
 +      (insert-directory): Remove blanks from switches.
 +
 +2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ansi-color.el: Delete unused escape sequences (Bug#6085).
 +      (ansi-color-drop-regexp): New constant.
 +      (ansi-color-apply, ansi-color-filter-region)
 +      (ansi-color-apply-on-region): Delete unrecognized control sequences.
 +      (ansi-color-apply): Build string list before calling concat.
 +
 +2010-05-28  Juri Linkov  <juri@jurta.org>
 +
 +      * image-dired.el (image-dired-dired-toggle-marked-thumbs):
 +      Replace LOCALP arg of `dired-get-filename' 'no-dir with nil.
 +      (Bug#5270)
 +
 +2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall'
 +      to ignored backtrace functions.
 +      (with-progress-reporter): Expand docstring.
 +      (tramp-handle-delete-file): Implement TRASH argument.
 +      (tramp-get-remote-trash): New defun.
 +
 +2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file):
 +      Use `symbol-value' for backward compatibility.
 +
 +      * net/tramp.el (tramp-handle-make-symbolic-link)
 +      (tramp-handle-load)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-process-file, tramp-handle-call-process-region)
 +      (tramp-handle-shell-command, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-delete-temp-file-function): Use `delete-file' instead
 +      of `tramp-compat-delete-file'.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-delete-directory)
 +      (tramp-fish-handle-make-symbolic-link)
 +      (tramp-fish-handle-process-file): Use `delete-file' instead
 +      of `tramp-compat-delete-file'.
 +
 +      * net/tramp-ftp.el (tramp-ftp-file-name-handler):
 +      Use `delete-file' instead of `tramp-compat-delete-file'.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
 +      (tramp-gvfs-handle-write-region): Use `delete-file' instead of
 +      `tramp-compat-delete-file'.
 +
 +      * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file):
 +      Use `delete-file' instead of `tramp-compat-delete-file'.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region): Use `delete-file' instead of
 +      `tramp-compat-delete-file'.
 +      (tramp-smb-handle-delete-directory): Use 'trash as arg.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * dired.el (dired-delete-file): New arg TRASH.
 +      (dired-internal-do-deletions): New arg TRASH.  Use progress reporter.
 +      (dired-do-flagged-delete, dired-do-delete): Use trash.
 +
 +      * speedbar.el (speedbar-item-delete): Allow trashing.
 +
 +      * files.el (delete-directory): New arg TRASH.
 +
 +      * net/ange-ftp.el (ange-ftp-del-tmp-name, ange-ftp-delete-file)
 +      (ange-ftp-rename-remote-to-remote)
 +      (ange-ftp-rename-local-to-remote)
 +      (ange-ftp-rename-remote-to-local, ange-ftp-load)
 +      (ange-ftp-compress, ange-ftp-uncompress): Remove optional arg from
 +      `delete-file'.
 +      (ange-ftp-delete-directory): Add optional arg to `delete-file', to
 +      allow trashing.
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to
 +      handle new TRASH arg of `delete-file'.
 +
 +      * net/tramp.el (tramp-handle-delete-file): Change FORCE arg to TRASH.
 +      (tramp-handle-make-symbolic-link, tramp-handle-load)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-process-file, tramp-handle-call-process-region)
 +      (tramp-handle-shell-command, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-delete-temp-file-function): Use null TRASH arg in
 +      tramp-compat-delete-file call.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-delete-directory)
 +      (tramp-fish-handle-delete-file)
 +      (tramp-fish-handle-make-symbolic-link)
 +      (tramp-fish-handle-process-file): Use null TRASH arg in
 +      `tramp-compat-delete-file' call.
 +
 +      * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use null TRASH
 +      arg in `tramp-compat-delete-file' call.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
 +      (tramp-gvfs-handle-write-region): Use null TRASH arg in
 +      `tramp-compat-delete-file' call.
 +
 +      * net/tramp-imap.el (tramp-imap-handle-delete-file): Rename arg.
 +      (tramp-imap-do-copy-or-rename-file): Use null TRASH arg in
 +      `tramp-compat-delete-file' call.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region): Use null TRASH arg in
 +      tramp-compat-delete-file call.
 +      (tramp-smb-handle-delete-directory): Use tramp-compat-delete-file.
 +      (tramp-smb-handle-delete-file): Rename arg.
 +
 +      * diff.el (diff-sentinel):
 +      * epg.el (epg--make-temp-file, epg-decrypt-string)
 +      (epg-verify-string, epg-sign-string, epg-encrypt-string):
 +      * jka-compr.el (jka-compr-partial-uncompress)
 +      (jka-compr-call-process, jka-compr-write-region):
 +      * server.el (server-sentinel): Remove optional arg from
 +      delete-file, reverting 2010-05-03 change.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/verilog-mode.el (verilog-type-font-keywords):
 +      Use font-lock-constant-face, not obsolete font-lock-reference-face.
 +
 +2010-05-27  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el (hebrew-shape-gstring): Check if a glyph
 +      element of GSTRING is nil.
 +
 +2010-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-forward-token-function)
 +      (smie-backward-token-function): New vars.
 +      (smie-backward-sexp, smie-forward-sexp)
 +      (smie-indent-hanging-p, smie-indent-calculate): Use them.
 +      (smie-default-backward-token): Rename from smie-backward-token and
 +      skip comments.
 +      (smie-default-forward-token): Rename from smie-forward-token and
 +      skip comments.
 +      (smie-next-sexp): Handle nil results from next-token.
 +      (smie-indent-calculate): Add a new case for special `fixindent' comments.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/verilog-mode.el (verilog-type-font-keywords):
 +      Use font-lock-constant-face, not obsolete font-lock-reference-face.
 +
 +2010-05-27  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * htmlfontify.el (hfy-face-resolve-face): New function.
 +      (hfy-face-to-style): Use it (Bug#6279).
 +
 +2010-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/ada-xref.el (ada-gnat-parse-gpr):
 +      * emulation/edt.el (edt-load-keys): Avoid (expand-file-name ".").
 +
 +2010-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * emulation/edt.el (edt-load-keys): Use locate-library.
 +
 +2010-05-25  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * log-edit.el (log-edit-strip-single-file-name): Default to nil.
 +      (log-edit-changelog-entries): Doc fix.
 +      (log-edit-changelog-insert-entries): Args changed.
 +      Rename relative filenames in ChangeLog entries.  Delete tabs.
 +      (log-edit-insert-changelog-entries): Reorganize return value of
 +      `log-edit-changelog-entries' to pass filenames to
 +      log-edit-changelog-insert-entries.
 +
 +2010-05-25  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * dired.el (dired-mode-map): Rebind "\C-t\C-t" from
 +      `image-dired-dired-insert-marked-thumbs' to
 +      `image-dired-dired-toggle-marked-thumbs'.
 +
 +      * image-dired.el: Require cl when compiling.
 +      (image-dired-dired-toggle-marked-thumbs): Rename from
 +      `image-dired-dired-insert-marked-thumbs'.  Add ARG.  Doc fix.
 +      Use interactive spec "P".  Set LOCALP arg of `dired-get-filename'
 +      to 'no-dir.  Skip files whose names don't match
 +      `image-file-name-regexp'.  When file has a thumbnail overlay,
 +      delete it.  (Bug#5270)
 +
 +2010-05-25  Juri Linkov  <juri@jurta.org>
 +
 +      * image-mode.el (image-mode): Add image-after-revert-hook to
 +      after-revert-hook.
 +      (image-after-revert-hook): New function.  (Bug#5669)
 +
 +2010-05-25  Juri Linkov  <juri@jurta.org>
 +
 +      * image.el (image-animated-p): When delay between animated images
 +      is 0, set it to 10 (0.1 sec).  (Bug#6258)
 +
 +2010-05-25  Christian Lynbech  <christian.lynbech@tieto.com>  (tiny change)
 +
 +      * net/tramp.el (tramp-handle-insert-directory): Don't use
 +      `forward-word', its default syntax could be changed.
 +
 +2010-05-25  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-progress-reporter-update): New defun.
 +      (with-progress-reporter): Use it.
 +      (tramp-process-actions):
 +      * net/tramp-gvfs.el (tramp-gvfs-handler-askquestion):
 +      Preserve current message, in order to let progress reporter continue
 +      afterwards.  (Bug#6257)
 +
 +2010-05-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * net/rcirc.el (rcirc-default-user-name, rcirc-default-full-name):
 +      Add :version.
 +
 +2010-05-25  Ryan Yeske  <rcyeske@gmail.com>
 +
 +      * net/rcirc.el (rcirc-default-user-name): Change to "user".
 +      (rcirc-default-full-name): Change to "unknown".
 +      (rcirc-user-name-history): Add variable.
 +
 +2010-05-25  Ryan Yeske  <rcyeske@gmail.com>
 +            Jonathan Rockway  <jon@jrock.us>
 +
 +      * net/rcirc.el (rcirc-server-alist): Add :pass.
 +      (rcirc): When prompting for connection parameters, also prompt for
 +      username and password.
 +      (rcirc-connect): Take a PASS argument.  If PASS is non-nil, send
 +      value to server when connecting.
 +
 +2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-set-prec2tab): Check override before use.
 +      (smie-merge-prec2s): Pass the tables as separate args.
 +      (smie-bnf-precedence-table): Adjust call accordingly.
 +      (smie-prec2-levels): Set levels at the end.
 +
 +      Replace Lisp calls to delete-backward-char by delete-char.
 +      * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
 +      * skeleton.el, term.el, time.el, wid-edit.el, woman.el,
 +      * calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
 +      * calc/calc.el, emacs-lisp/cl-extra.el, emacs-lips/cl-loaddefs.el,
 +      * emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
 +      * eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
 +      * gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
 +      * language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
 +      * net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
 +      * progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
 +      * progmodes/ps-mode.el, progmodes/verilog-mode.el,
 +      * progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
 +      * textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
 +      * textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
 +      delete-backward-char by calls to delete-char.
 +
 +2010-05-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el (hebrew-shape-gstring): New function.
 +      Register it in composition-function-table for all Hebrew combining
 +      characters.
 +
 +2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * epa.el (epa--select-keys): Don't explicitly delete the window since
 +      that can fail (e.g. sole window in frame).  Use dedication instead.
 +
 +2010-05-24  Uday S Reddy  <u.s.reddy@cs.bham.ac.uk>  (tiny change)
 +
 +      * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
 +
 +2010-05-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.el (image-refresh): Define as an alias for image-flush.
 +
 +      * image-mode.el (image-toggle-display-image): Caller changed.
 +
 +2010-05-21  Juri Linkov  <juri@jurta.org>
 +
 +      * progmodes/grep.el (grep-read-files): Fix multi-pattern aliases.
 +      Remove "all" from grep-files-aliases.  Split grep-files-aliases by
 +      whitespace, call wildcard-to-regexp on substrings and concat them
 +      with "\\|".  (Bug#6114)
 +
 +2010-05-21  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-parse-state-get-strategy):
 +      Replace parameter `here' with `here-' and `here-plus', which sandwich
 +      any pertinent CPP construct.
 +      (c-remove-stale-state-cache-backwards): Fix a bug which happens
 +      when doing (c-parse-state) in a CPP construct: Exclude any "new"
 +      CPP construct from taking part in the scanning.
 +
 +2010-05-21  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-do-copy-or-rename-file)
 +      (tramp-handle-file-local-copy, tramp-maybe-open-connection):
 +      Tune `with-progress-reporter' messages.
 +      (tramp-handle-vc-registered):
 +      * net/tramp-fish.el (tramp-fish-handle-file-local-copy)
 +      (tramp-fish-handle-insert-file-contents)
 +      (tramp-fish-maybe-open-connection):
 +      * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
 +      * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file)
 +      (tramp-imap-handle-insert-file-contents)
 +      (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'.
 +
 +2010-05-21  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * add-log.el (change-log-font-lock-keywords):
 +      Highlight all authors in multi-author entries.
 +
 +      * smerge-mode.el (smerge-refine-ignore-whitespace)
 +      (smerge-refine-weight-hack, smerge-refine, smerge-makeup-conflict):
 +      Fix typos in docstrings.
 +      (smerge-resolve, smerge-refine-subst): Reflow docstrings.
 +
 +2010-05-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/fortran.el (fortran-mode):
 +      * progmodes/f90.el (f90-mode): Derive from prog-mode.
 +
 +      * loadup.el [CANNOT_DUMP]: Update for bootstrap-emacs no longer
 +      having a relative path in src/Makefile.in.
 +
 +2010-05-20  Kevin Ryde  <user42@zip.com.au>
 +
 +      * help-mode.el (help-make-xrefs): For Info node links turn
 +      newlines into spaces.  Link node names with newlines are matched
 +      by help-xref-info-regexp and buttonized, this change ensures they
 +      can be followed successfully with RET.  (Bug#6206)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * locate.el (locate): Use pop-to-buffer instead of
 +      switch-to-buffer-other-window.  (Bug#6204)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (replace-highlight): Fix lazy-highlighting
 +      for `M-s w str M-% str RET'.
 +
 +2009-12-15  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * isearch.el (isearch-yank-word-or-char): Pull next subword
 +      when `subword-mode' is activated.  (Bug#6220)
 +
 +2010-05-20  Mark A. Hershberger  <mah@everybody.org>
 +
 +      * isearch.el (isearch-update-post-hook): New hook.
 +      (isearch-update): Use the new hook.  (Bug#6225)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-mode-map): Bind more keys to isearch-help-map:
 +      [f1], [help], and (char-to-string help-char) instead of "\C-h".
 +      (Bug#6222)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-yank-string): Use isearch-process-search-string.
 +      (Bug#6223)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-x.el (dired-jump, dired-jump-other-window): Add arg
 +      FILE-NAME to read from the minibuffer when called interactively
 +      with prefix argument instead of using buffer-file-name.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00534.html
 +
 +      * dired.el: Update autoloads.
 +
 +2010-05-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * nxml/nxml-mode.el (nxml-mode-map): Bind C-c / to
 +      nxml-finish-element, for consistency with SGML mode.
 +
 +      * progmodes/octave-mod.el (octave-mode-map): Bind C-c / to
 +      octave-close-block.
 +
 +2010-05-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * composite.el: Require cl when compiling.
 +      (reference-point-alist, compose-gstring-for-graphic)
 +      (compose-gstring-for-terminal): Fix typos in docstrings.
 +
 +2010-05-19  Juri Linkov  <juri@jurta.org>
 +
 +      * emacs-lisp/cl-macs.el (window-parameter): Add defsetf with
 +      set-window-parameter.
 +
 +2010-05-19  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-methods): Add `tramp-async-args' attribute
 +      where appropriate.
 +      (tramp-maybe-open-connection): Use it.
 +
 +2010-05-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * simple.el (move-end-of-line): Make sure we are at line beginning
 +      before backing up to end of previous line.
 +
 +2010-05-19  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * password-cache.el (password-cache-remove): Fix docstring.
 +
 +      * net/secrets.el: Autoload the widget functions.
 +      (secrets-search-items, secrets-create-item)
 +      (secrets-get-attributes, secrets-expand-item): Attributes will be
 +      stored on the password database without leading ":", as all other
 +      clients do as well.
 +      (secrets-mode): Fix docstring.
 +      (secrets-show-secrets): Provide it as autoloaded command only when
 +      D-Bus support is available.  Check existence of Secret Service API.
 +
 +2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * indent.el (indent-region): Deactivate region (bug#6200).
 +
 +2010-05-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc-dir.el (vc-dir): Don't pop-up-windows.  (Bug#6204)
 +
 +2010-05-19  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.el: Register compose-gstring-for-graphic in
 +      composition-function-table only for combining characters (Mn, Mc, Me).
 +
 +2010-05-18  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-trail.el (calc-trail-isearch-forward)
 +      (calc-trail-isearch-backward): Ensure that the new window
 +      point is set correctly.
 +
 +2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (read-quoted-char): Resolve modifiers after key
 +      remapping (bug#6212).
 +
 +2010-05-18  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Add visualization code for secrets.
 +      * net/secrets.el (secrets-mode): New major mode.
 +      (secrets-show-secrets, secrets-show-collections)
 +      (secrets-expand-collection, secrets-expand-item)
 +      (secrets-tree-widget-after-toggle-function)
 +      (secrets-tree-widget-show-password): New defuns.
 +
 +2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-next-sexp): Break inf-loop at BOB.
 +      (smie-backward-sexp, smie-forward-sexp): Remove boundary condition now
 +      handled in smie-next-sexp.
 +      (smie-indent-calculate): Provide a starting indentation (so the
 +      recursion is well-founded ;-).
 +
 +      Fix handling of non-associative equal levels.
 +      * emacs-lisp/smie.el (smie-prec2-levels): Choose distinct levels even
 +      when it's not needed.
 +      (smie-op-left, smie-op-right): New functions.
 +      (smie-next-sexp): New function, extracted from smie-backward-sexp.
 +      Better handle equal levels to distinguish the associative case from
 +      the "multi-keyword construct" case.
 +      (smie-backward-sexp, smie-forward-sexp): Use it.
 +
 +2010-05-18  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/prolog.el (smie-indent-basic): Declare for byte-compiler.
 +
 +      * emacs-lisp/smie.el (smie-precs-precedence-table, smie-backward-sexp)
 +      (smie-forward-sexp, smie-indent-calculate): Fix typos in docstrings.
 +
 +2010-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Provide a simple generic indentation engine and use it for Prolog.
 +      * emacs-lisp/smie.el: New file.
 +      * progmodes/prolog.el (prolog-smie-op-levels)
 +      (prolog-smie-indent-rules): New var.
 +      (prolog-mode-variables): Use them to configure SMIE.
 +      (prolog-indent-line, prolog-indent-level): Remove.
 +
 +2010-05-17  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-vec.el (math-vector-avg): Put the vector elements in
 +      order before computing the averages.
 +
 +2010-05-16  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-vec.el (calc-histogram):
 +      (calcFunc-histogram): Allow vectors as inputs.
 +      (math-vector-avg): New function.
 +
 +      * calc/calc-ext.el (math-group-float): Have the number of digits
 +      being grouped depend on the radix (Bug#6189).
 +
 +2010-05-15  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * version.el (emacs-copyright, emacs-version): Don't define here,
 +      now that emacs.c defines it.
 +
 +2010-05-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/mule-cmds.el (mule-menu-keymap): Fix definition of
 +      "Describe Language Environment" menu item.
 +
 +      * language/hebrew.el ("Hebrew", "Windows-1255"): Doc fix.
 +
 +      Bidi-sensitive movement with arrow keys.
 +      * subr.el (right-arrow-command, left-arrow-command): New functions.
 +
 +      * bindings.el (global-map): Bind them to right and left arrow keys.
 +
 +      Don't override standard definition of convert-standard-filename.
 +      * files.el (convert-standard-filename):
 +      Call w32-convert-standard-filename and dos-convert-standard-filename on
 +      the corresponding systems.
 +
 +      * w32-fns.el (w32-convert-standard-filename): Rename from
 +      convert-standard-filename.  Doc fix.
 +
 +      * dos-fns.el (dos-convert-standard-filename): Doc fix.
 +      (convert-standard-filename): Don't defalias.
 +      (register-name-alist, make-register, register-value)
 +      (set-register-value, intdos): Obsolete aliases for the
 +      corresponding dos-* functions and variables.
 +      (dos-intdos): Add a doc string.
 +
 +2010-05-15  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-aent.el (math-read-token, math-find-user-tokens):
 +      * calc/calc-lang.el (math-read-big-rec, math-lang-read-symbol):
 +      (math-compose-tex-func):
 +      * calc/calccomp.el (math-compose-expr):
 +      * calc/calc-ext.el (math-format-flat-expr-fancy):
 +      * calc/calc-store.el (calc-read-var-name):
 +      * calc/calc-units.el (calc-explain-units-rec): Allow Greek letters.
 +
 +      * calc/calc.el (var-π, var-φ, var-γ): New variables.
 +      * calc/calc-aent.el (math-read-replacement-list): Add "micro" symbol.
 +      * calc/calc-units.el (math-unit-prefixes): Add mu for micro.
 +      (math-standard-units): Add units.
 +
 +2010-05-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/asm-mode.el (asm-mode):
 +      * progmodes/prolog.el (prolog-mode): Use define-derived-mode.
 +
 +      * pcomplete.el (pcomplete-completions-at-point): New function,
 +      extracted from pcomplete-std-complete.
 +      (pcomplete-std-complete): Use it.
 +
 +2010-05-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
 +      Remove references to CVS, RCS and Old directories.
 +
 +2010-05-14  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-bin.el (math-format-twos-complement): Group digits when
 +      appropriate.
 +
 +2010-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/sh-script.el (sh-mode-default-syntax-table): Remove.
 +      (sh-mode-syntax-table): Give it a default value instead.
 +      (sh-header-marker): Make buffer-local.
 +      (sh-mode): Move make-local-variable to the corresponding setq.
 +      (sh-add-completer): Avoid gratuitously let-binding a buffer-local var.
 +      Use complete-with-action.
 +
 +      * simple.el (prog-mode): New (abstract) major mode.
 +      * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
 +      * progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
 +
 +2010-05-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/sql.el (sql-oracle-program): Reflow docstring.
 +      (sql-oracle-scan-on, sql-sybase-program, sql-product-font-lock)
 +      (sql-add-product-keywords, sql-highlight-product, sql-set-product)
 +      (sql-make-alternate-buffer-name, sql-placeholders-filter)
 +      (sql-escape-newlines-filter, sql-input-sender)
 +      (sql-send-magic-terminator, sql-sybase): Fix typos in docstrings.
 +
 +2010-05-13  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      Add TeX open-block and close-block keybindings to SGML, and vice versa.
 +
 +      * textmodes/tex-mode.el (tex-mode-map): Bind C-c C-t to
 +      latex-open-block and C-c / to latex-close-block.
 +
 +      * textmodes/sgml-mode.el (sgml-mode-map): Bind C-c C-o to sgml-tag
 +      and C-c C-e to sgml-close-tag.
 +
 +2010-05-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (with-progress-reporter): Create reporter object
 +      only when the message would be displayed.  Handle nested calls.
 +      (tramp-handle-load, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-maybe-send-script, tramp-find-shell):
 +      Use `with-progress-reporter'.
 +      (tramp-handle-dired-compress-file, tramp-maybe-open-connection):
 +      Fix message text.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
 +      Use `with-progress-reporter'.
 +
 +2010-05-13  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-init-process): Do not kill ispell
 +      process everytime when spellchecking from the minibuffer (bug#6143).
 +
 +2010-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/sh-script.el (sh-mode): Use define-derived-mode.
 +
 +      * dos-fns.el: Add "dos-" prefix for namespace control.
 +      (convert-standard-filename): Define as alias for
 +      dos-convert-standard-filename but only if applicable.
 +
 +2010-05-12  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
 +      Push the mark at the start of these functions when appropriate.
 +
 +2010-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-cycle-threshold): New custom var.
 +      (completion--do-completion): Use it.
 +      (minibuffer-complete): Use cycling if appropriate.
 +
 +2010-05-11  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * dirtrack.el (dirtrackp): Remove defcustom; don't make automatically
 +      buffer-local (it's an obsolete alias for `dirtrack-mode') (bug#6173).
 +
 +2010-05-11  Juri Linkov  <juri@jurta.org>
 +
 +      * scroll-all.el (scroll-all-check-to-scroll):
 +      Add `scroll-up-command' and `scroll-down-command' (bug#6164).
 +
 +2010-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * iimage.el (iimage-mode-map): Move initialization into declaration.
 +      (iimage-mode-buffer): Use with-silent-modifications.
 +      Simplify calling convention.  Adjust callers.
 +      (iimage-mode): Don't run hook redundantly.
 +
 +      * minibuffer.el (completion-pcm--pattern->regex):
 +      Fix last change (bug#6160).
 +
 +2010-05-10  Juri Linkov  <juri@jurta.org>
 +
 +      Remove nodes visited during Isearch from the Info history.
 +      * info.el (Info-isearch-initial-history)
 +      (Info-isearch-initial-history-list): New variables.
 +      (Info-isearch-start): Record initial values of
 +      Info-isearch-initial-history and Info-isearch-initial-history-list.
 +      Add Info-isearch-end to isearch-mode-end-hook.
 +      (Info-isearch-end): New function.
 +
 +2010-05-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-do-file-attributes-with-stat): Add space in
 +      format string, in order to work around a bug in pdksh.
 +      Reported by Gilles Pion <gpion@lfdj.com>.
 +      (tramp-handle-verify-visited-file-modtime): Do not send a command
 +      when the connection is not established.
 +      (tramp-handle-set-file-times): Simplify the check for utc.
 +
 +2010-05-10  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Fix use of `filter-buffer-substring' (rework previous change).
 +      * emulation/cua-base.el (cua--filter-buffer-noprops): New function.
 +      (cua-repeat-replace-region):
 +      * emulation/cua-rect.el (cua--extract-rectangle, cua-incr-rectangle):
 +      * emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
 +      (cua-cut-region-to-global-mark): Use it.
 +
 +2010-05-09  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.1.
 +      (sql-product-alist): Redesign structure of product info.
 +      (sql-product, sql-user, sql-server, sql-database): Safe variables.
 +      (sql-port, sql-port-history): New variables.
 +      (sql-interactive-product): New variable.
 +      (sql-send-terminator): New variable.
 +      (sql-imenu-generic-expression): Add "Types" imenu entry.
 +      (sql-oracle-login-params, sql-sqlite-login-params)
 +      (sql-mysql-login-params, sql-solid-login-params)
 +      (sql-sybase-login-params, sql-informix-login-params)
 +      (sql-ingres-login-params, sql-ms-login-params)
 +      (sql-postgres-login-params, sql-interbase-login-params)
 +      (sql-db2-login-params, sql-linter-login-params)
 +      (sql-oracle-scan-on): New variables.
 +      (sql-mode-map): Add C-c C-i to start interactive mode.
 +      (sql-mode-menu): Update existing menu entries.
 +      (sql-font-lock-keywords-builder): Compile-time font-lock optimization.
 +      (sql-mode-oracle-font-lock-keywords)
 +      (sql-mode-postgres-font-lock-keywords)
 +      (sql-mode-ms-font-lock-keywords)
 +      (sql-mode-sybase-font-lock-keywords)
 +      (sql-mode-informix-font-lock-keywords)
 +      (sql-mode-interbase-font-lock-keywords)
 +      (sql-mode-ingres-font-lock-keywords)
 +      (sql-mode-solid-font-lock-keywords)
 +      (sql-mode-mysql-font-lock-keywords)
 +      (sql-mode-sqlite-font-lock-keywords)
 +      (sql-mode-db2-font-lock-keywords)
 +      (sql-mode-linter-font-lock-keywords): Update initialization to
 +      reduce run-time complexity.
 +      (sql-add-product, sql-del-product): New functions.
 +      (sql-set-product-feature, sql-get-product-feature): New functions.
 +      (sql-product-font-lock): Update product API.
 +      (sql-add-product-keywords): New function.
 +      (sql-highlight-product): Update product API.
 +      (sql-help-list-products): New function.
 +      (sql-help): Dynamically lists free and non-free products.
 +      (sql-get-login): Correct bug in handling history and added
 +      prompt for port.
 +      (sql-copy-column): Copy without properties.
 +      (sqli-input-sender): Apply filters to SQLi input.
 +      (sql-query-placeholders-and-send): Obey `sql-oracle-scan-on' setting.
 +      Implement as a filter.
 +      (sql-escape-newlines-filter): Implement as a filter.
 +      (sql-remove-tabs-filter): New function.
 +      (sql-send-magic-terminator): New function.
 +      (sql-send-string): Implement magic terminator.
 +      (sql-send-region): Use `sql-send-string'.
 +      (sql-interactive-mode): Use product API.
 +      (sql-product-interactive): Use product API.
 +      (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
 +      (sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
 +      (sql-db2, sql-linter): Use `sql-product-interactive'.
 +      (sql-connect): New function.
 +      (sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
 +      (sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
 +      (sql-connect-ingres, sql-connect-ms, sql-connect-postgres)
 +      (sql-connect-interbase, sql-connect-db2, sql-connect-linter):
 +      Use `sql-connect'.
 +
 +2010-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-pcm-complete-word-inserts-delimiters):
 +      New custom variable.
 +      (completion-pcm--string->pattern): Use it.
 +      (completion-pcm--pattern->regex, completion-pcm--pattern->string):
 +      Make it handle any symbol as `any'.
 +      (completion-pcm--merge-completions): Extract common suffix for the new
 +      `prefix' symbol as well.
 +      (completion-substring--all-completions): Use the new `prefix' symbol.
 +
 +2010-05-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
 +      not bound.
 +      (tramp-compat-copy-file): Add PRESERVE-SELINUX-CONTEXT.
 +      (tramp-compat-funcall): New defmacro.
 +      (tramp-compat-line-beginning-position)
 +      (tramp-compat-line-end-position)
 +      (tramp-compat-temporary-file-directory)
 +      (tramp-compat-make-temp-file, tramp-compat-file-attributes)
 +      (tramp-compat-copy-file, tramp-compat-copy-directory)
 +      (tramp-compat-delete-file, tramp-compat-delete-directory)
 +      (tramp-compat-number-sequence, tramp-compat-process-running-p)
 +      * net/tramp.el (top, with-progress-reporter)
 +      (tramp-rfn-eshadow-setup-minibuffer)
 +      (tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times)
 +      (tramp-handle-dired-compress-file, tramp-handle-shell-command)
 +      (tramp-completion-mode-p, tramp-check-for-regexp)
 +      (tramp-open-connection-setup-interactive-shell)
 +      (tramp-compute-multi-hops, tramp-read-passwd, tramp-clear-passwd)
 +      (tramp-time-diff, tramp-coding-system-change-eol-conversion)
 +      (tramp-set-process-query-on-exit-flag, tramp-unload-tramp)
 +      * net/tramp-cmds.el (tramp-cleanup-all-connections)
 +      (tramp-reporter-dump-variable, tramp-load-report-modules)
 +      (tramp-append-tramp-buffers)
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-file-selinux-context): Use it.
 +
 +      * net/tramp-imap.el (top): Autoload `epg-make-context'.
 +
 +2010-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/compile.el (compilation-buffer-modtime): Rename from
 +      buffer-modtime.  Adjust users.
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * international/mule.el (auto-coding-alist): Only purecopy
 +      car of each item, not the whole list (Bug#6083).
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/js.el (js-mode): Make paragraph variables local before
 +      calling c-setup-paragraph-variables (Bug#6071).
 +
 +2010-05-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * composite.el (compose-region, reference-point-alist): Fix typos
 +      in the doc strings.
 +
 +2010-05-08  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +
 +      * calc/calc-graph.el (calc-graph-plot): Use the proper form for
 +      gnuplot's "set" command.
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * abbrev.el (last-abbrev-text): Doc fix.
 +      (abbrev-prefix-mark): Don't escape parenthesis.
 +
 +2010-05-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * composite.el (find-composition): Doc fix.
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/sql.el (sql-electric-stuff): Fix typo in tag.
 +      (sql-oracle-program, sql-sqlite-options)
 +      (sql-query-placeholders-and-send): Doc fixes.
 +      (sql-set-product, sql-interactive-mode): Reflow docstrings.
 +      (sql-imenu-generic-expression, sql-buffer)
 +      (sql-mode-ansi-font-lock-keywords, sql-mode-oracle-font-lock-keywords)
 +      (sql-mode-postgres-font-lock-keywords, sql-mode-ms-font-lock-keywords)
 +      (sql-mode-sybase-font-lock-keywords)
 +      (sql-mode-informix-font-lock-keywords)
 +      (sql-mode-interbase-font-lock-keywords)
 +      (sql-mode-ingres-font-lock-keywords, sql-mode-solid-font-lock-keywords)
 +      (sql-mode-mysql-font-lock-keywords, sql-mode-sqlite-font-lock-keywords)
 +      (sql-mode-db2-font-lock-keywords, sql-mode-font-lock-keywords)
 +      (sql-product-feature, sql-highlight-product)
 +      (comint-line-beginning-position, sql-rename-buffer)
 +      (sql-toggle-pop-to-buffer-after-send-region sql-oracle)
 +      (sql-sybase, sql-informix, sql-sqlite, sql-mysql, sql-solid)
 +      (sql-ingres, sql-ms, sql-postgres, sql-interbase, sql-db2, sql-linter):
 +      Fix typos in docstrings.
 +
 +2010-05-08  Juri Linkov  <juri@jurta.org>
 +
 +      * info.el (Info-fontify-node): Put Info-breadcrumbs to the `display'
 +      property instead of `invisible' and `after-string' (bug#5998).
 +
 +2010-05-08  Juri Linkov  <juri@jurta.org>
 +
 +      * image-mode.el (image-mode-as-text): Fix typo in docstring.
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * filecache.el (file-cache-add-directory-list)
 +      (file-cache-add-directory-recursively): Fix typos in docstrings.
 +
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/indian.el (gurmukhi-composable-pattern): Fix typo.
 +      (gujarati-composable-pattern): Fix typo.
 +
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/indian.el (oriya-composable-pattern)
 +      (tamil-composable-pattern, malayalam-composable-pattern):
 +      Add two-part vowels to "v" (vowel sign).
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * files.el (copy-directory): Handle symlinks (Bug#5982).
 +
 +2010-05-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vc-hg.el (vc-hg-state): Use HGRCPATH, not HGRC.
 +      (vc-hg-working-revision): Likewise.  Use hg parents, not hg parent
 +      (Bug#5846).
 +
 +2010-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/lisp.el (lisp-completion-at-point): Give it a doc string.
 +
 +      * minibuffer.el (completion-at-point): Doc fix.
 +
 +2010-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * electric.el (Electric-command-loop): Minor tweak.
 +
 +      * ebuff-menu.el (electric-buffer-list): Try and make it behave a bit
 +      better with dedicated windows.
 +
 +2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-05-07  Deniz Dogan  <deniz.a.m.dogan@gmail.com>  (tiny change)
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Highlight vendor specific properties.
 +      * textmodes/css-mode.el (css-proprietary-nmstart-re): New var.
 +      (css-proprietary-property): New face.
 +      (css-font-lock-keywords): Use them.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-08-26  Magnus Henoch  <magnus.henoch@gmail.com>
 +      * cus-start.el (all): Add native condition for tool-bar-* symbols.
  
 -      * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass
 -      empty argument to gvfs-copy.
 +2010-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-08-26  Chong Yidong  <cyd@stupidchicken.com>
 +      * textmodes/dns-mode.el (auto-mode-alist): Add entry for .zone files.
 +      * files.el (auto-mode-alist): Remove redundant entries.
  
 -      * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to
 -      handle new TRASH arg of `delete-file'.
 +      * files.el (auto-save-mode): Move to simple.el to fix bootstrap.
 +      * simple.el (auto-save-mode): Move from files.el.
 +      * minibuffer.el (completion--common-suffix): Fix copy&paste error.
  
 -2010-08-26  Christian Lynbech  <christian.lynbech@tieto.com>  (tiny change)
 +2010-05-07  Christian von Roques  <roques@mti.ag>  (tiny change)
  
 -      * net/tramp.el (tramp-handle-insert-directory): Don't use
 -      `forward-word', its default syntax could be changed.
 +      * epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592).
  
 -2010-08-26  Toru TSUNEYOSHI  <t_tuneyosi@hotmail.com>
 +2010-05-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * mail/binhex.el (binhex-decode-region-internal)
 +      * mail/uudecode.el (uudecode-decode-region-internal)
 +      * net/dns.el (dns-read-string-name, dns-write, dns-read)
 +      (dns-read-type, dns-query)
 +      * pgg-parse.el (pgg-parse-armor)
 +      * pgg.el (pgg-verify-region)
 +      * sha1.el (sha1-string-external): Don't run set-buffer-multibyte for
 +      XEmacs.
 +
 +      * net/imap.el (imap-disable-multibyte): Redefine it as a macro.
 +
 +2010-05-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/cperl-mode.el (cperl-mode-unload-function): New function.
 +
 +      Fix use of `filter-buffer-substring' (4th arg NOPROPS removed).
 +      * emulation/cua-base.el (cua-repeat-replace-region):
 +      * emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
 +      (cua-cut-region-to-global-mark):
 +      Remove text properties with `set-text-properties'.
 +
 +2010-05-06  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (top, with-progress-reporter):
 +      Use `symbol-function' inside `funcall'.
 +
 +      * net/tramp-compat.el (tramp-compat-file-attributes)
 +      (tramp-compat-delete-file, tramp-compat-delete-directory):
 +      Handle only `wrong-number-of-arguments' error.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Fix typo.
 +      (tramp-gvfs-handle-file-selinux-context): Use `symbol-function'
 +      inside `funcall'.
 +
 +2010-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion--sreverse, completion--common-suffix):
 +      New functions.
 +      (completion-pcm--merge-completions): Extract common suffix when safe.
 +
 +      * emacs-lisp/easy-mmode.el (define-minor-mode):
 +      Make :variable more flexible.
 +      * files.el (auto-save-mode): Use it to define using define-minor-mode.
 +
 +2010-05-05  Juri Linkov  <juri@jurta.org>
 +
 +      Add `slow' and `history' tags to the desktop data.
 +
 +      * info.el (Info-virtual-nodes) [*Index*]: Add `slow' tag.
 +      (Info-virtual-files) [*Apropos*]: Add `slow' tag.
 +      (Info-finder-find-node): Require `finder.el' to be able
 +      to restore node from the desktop.
 +      (Info-desktop-buffer-misc-data): Save all nodes.  Save additional
 +      data `Info-history' and `slow' tag in the assoc list.
 +      (Info-restore-desktop-buffer): Don't restore nodes with the
 +      `slow' tag.  Restore `Info-history'.
 +
 +2010-05-05  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Add FORCE argument to `delete-file'.
 +
 +      * net/ange-ftp.el (ange-ftp-del-tmp-name): Make it a defun,
 +      forcing to delete the temporary file.
 +      (ange-ftp-delete-file): Add FORCE arg.
 +      (ange-ftp-rename-remote-to-remote)
 +      (ange-ftp-rename-local-to-remote, ange-ftp-rename-remote-to-local)
 +      (ange-ftp-load, ange-ftp-compress, ange-ftp-uncompress):
 +      Force file deletion.
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file): New defun.
 +
 +      * net/tramp.el (tramp-handle-delete-file): Add FORCE arg.
 +      (tramp-handle-make-symbolic-link, tramp-handle-load)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-process-file, tramp-handle-call-process-region)
 +      (tramp-handle-shell-command, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-delete-temp-file-function): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-delete-file): Add FORCE arg.
 +      (tramp-fish-handle-make-symbolic-link)
 +      (tramp-fish-handle-process-file): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-ftp.el (tramp-ftp-file-name-handler):
 +      Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Add FORCE arg.
 +      (tramp-gvfs-handle-write-region): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-imap.el (tramp-imap-handle-delete-file): Add FORCE arg.
 +      (tramp-imap-do-copy-or-rename-file): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-delete-file): Add FORCE arg.
 +      (tramp-smb-handle-copy-file, tramp-smb-handle-file-local-copy)
 +      (tramp-smb-handle-rename-file, tramp-smb-handle-write-region):
 +      Use `tramp-compat-delete-file'.
 +
 +2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Minor cleanups.
 +      * subr.el (add-minor-mode): Use push.
 +      * mail/supercite.el (sc-electric-mode): Use more descriptive arg name.
 +      * emulation/edt.el (edt-select-mode): Simplify.
 +
 +      Use define-minor-mode in more cases.
 +      * term/tvi970.el (tvi970-set-keypad-mode):
 +      * simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
 +      (normal-erase-is-backspace-mode):
 +      * scroll-bar.el (scroll-bar-mode): Use it and define-minor-mode.
 +      (set-scroll-bar-mode-1): (Re)move to its sole caller.
 +      (get-scroll-bar-mode): New function.
 +      * emacs-lisp/cl-macs.el (eq): Handle a non-variable first arg.
 +
 +      Use define-minor-mode for less obvious cases.
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Add :variable keyword.
 +      * emacs-lisp/cl-macs.el (terminal-parameter, eq): Add setf method.
 +      * international/iso-ascii.el (iso-ascii-mode):
 +      * frame.el (auto-raise-mode, auto-lower-mode):
 +      * composite.el (global-auto-composition-mode): Use define-minor-mode.
 +
 +2010-05-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-methods): Remove "-q" from `tramp-login-args'
 +      in order to see error messages for failed logins.
 +
 +2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * diff.el (diff-sentinel):
 +
 +      * epg.el (epg--make-temp-file, epg-decrypt-string)
 +      (epg-verify-string, epg-sign-string, epg-encrypt-string):
 +
 +      * jka-compr.el (jka-compr-partial-uncompress)
 +      (jka-compr-call-process, jka-compr-write-region, jka-compr-load):
 +
 +      * server.el (server-sentinel): Use delete-file's new FORCE arg
 +      (Bug#6070).
 +
 +2010-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Use define-minor-mode where applicable.
 +      * view.el (view-mode):
 +      * type-break.el (type-break-query-mode)
 +      (type-break-mode-line-message-mode):
 +      * textmodes/reftex.el (reftex-mode):
 +      * term/vt100.el (vt100-wide-mode):
 +      * tar-mode.el (tar-subfile-mode):
 +      * savehist.el (savehist-mode):
 +      * ibuf-ext.el (ibuffer-auto-mode):
 +      * composite.el (auto-composition-mode):
 +      * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
 +      Use define-minor-mode.
 +      (vhdl-mode): Use static mode-line format.
 +      (vhdl-mode-line-update): Delete.
 +      (vhdl-create-mode-menu, vhdl-activate-customizations)
 +      (vhdl-hs-minor-mode): Don't bother calling it.
 +
 +2010-05-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (with-wrapper-hook): Move.
 +      (buffer-substring-filters): Mark obsolete.
 +      (filter-buffer-substring-functions): New variable.
 +      (filter-buffer-substring): Use it.  Remove unused arg `noprops'.
 +
 +2010-05-01  Toru TSUNEYOSHI  <t_tuneyosi@hotmail.com>
              Michael Albinus  <michael.albinus@gmx.de>
  
        Implement compression for inline methods.
        (tramp-handle-file-local-copy, tramp-handle-write-region)
        (tramp-method-out-of-band-p): Use `tramp-get-inline-coding'.
  
 -2010-08-26  Noah Lavine  <noah549@gmail.com>  (tiny change)
 -
 -      Detect ssh 'ControlMaster' argument automatically in some cases.
 +2010-05-01  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * net/tramp.el (tramp-detect-ssh-controlmaster): New defun.
 -      (tramp-default-method): Use it.
 +      * bindings.el (mode-line-abbrev-mode, mode-line-auto-fill-mode):
 +      Remove unused functions.
  
 -2010-08-26  Karel Klíč  <kklic@redhat.com>
 +      * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode.
 +      Set find-tag-default-function as a variable rather than a property.
  
 -      * net/tramp.el (tramp-file-name-for-operation):
 -      Add file-selinux-context.
 +      * minibuffer.el (tags-completion-at-point-function): Move to etags.el.
 +      * progmodes/etags.el (tags-completion-at-point-function):
 +      Remove left over interactive spec.  Add autoloading stub.
 +      (complete-tag): Use tags-completion-at-point-function.
  
 -2010-08-26  Łukasz Stelmach  <lukasz.stelmach@iem.pw.edu.pl>  (tiny change)
 +2010-04-30  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * play/cookie1.el (read-cookie): Fix off-by-one error (bug#6921).
 +      * minibuffer.el (tags-completion-at-point-function): Fix return value.
  
 -2010-08-26  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-29  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * simple.el (beginning-of-buffer, end-of-buffer): Doc fix
 -      (Bug#6907).
 +      * ido.el (ido-init-completion-maps): Remove C-v binding.
 +      (ido-minibuffer-setup): Don't set cua-inhibit-cua-keys (Bug#5765).
  
 -2010-08-23  Chris Foote <chris@foote.com.au>  (tiny change)
 +2010-04-29  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * progmodes/python.el (python-block-pairs): Allow use of "finally"
 -      with "else" (Bug#3991).
 +      * minibuffer.el (tags-completion-at-point-function): New function.
 +      (completion-at-point-functions): Use it.
  
 -2010-08-22  Leo  <sdl.web@gmail.com>
 +      * progmodes/etags.el (complete-tag): Revert last change.
  
 -      * net/rcirc.el (rcirc-add-or-remove): Accept a list of elements.
 -      (ignore, bright, dim, keyword): Split list of nicknames before
 -      passing to rcirc-add-or-remove (Bug#6894).
 +2010-04-29  Alan Mackenzie  <acm@muc.de>
  
 -2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +      * progmodes/cc-mode.el (c-extend-region-for-CPP): Fix an
 +      off-by-one error (in end of macro position).
  
 -      * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
 +2010-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-08-21  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 +      * net/browse-url.el (browse-url-firefox-program): Use iceweasel if
 +      firefox is absent.  Don't autoload.
 +      (browse-url-galeon-program): Don't autoload.
  
 -      * whitespace.el: Fix slow cursor movement (Bug#6172).  Reported by
 -      Christoph Groth <cwg@falma.de> and Liu Xin <x_liu@neusoft.com>.
 -      New version 13.0.
 -      (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp):
 -      Adjust initialization.
 -      (whitespace-bob-marker, whitespace-eob-marker)
 -      (whitespace-buffer-changed): New vars.
 -      (whitespace-cleanup, whitespace-color-on, whitespace-color-off)
 -      (whitespace-empty-at-bob-regexp, whitespace-empty-at-eob-regexp)
 -      (whitespace-post-command-hook, whitespace-display-char-on):
 -      Adjust code.
 -      (whitespace-looking-back, whitespace-buffer-changed): New funs.
 -      (whitespace-space-regexp, whitespace-tab-regexp): Eliminate funs.
 +2010-04-28  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-08-21  Leo  <sdl.web@gmail.com>
 +      * bindings.el (complete-symbol): Move into minibuffer.el.
  
 -      Fix buffer-list rename&refresh after killing a buffer in ido.
 -      * lisp/ido.el: Revert Óscar's.
 -      (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh.
 -      Remember the buffers at head, rather than their name.
 -      * lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list.
 +      * minibuffer.el (complete-tag): Move from etags.el.  If tags
 +      completion cannot be performed, return nil instead of signalling
 +      an error.
 +      (completion-at-point): Make it an alias for complete-symbol.
 +      (complete-symbol): Move from bindings.el, and replace with the
 +      body of completion-at-point.
  
 -2010-08-21  Kirk Kelsey  <kirk.kelsey@0x4b.net>  (tiny change)
 -            Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * progmodes/etags.el (complete-tag): Move to minibuffer.el.
  
 -      * progmodes/make-mode.el (makefile-fill-paragraph): Account for the
 -      extra backslash added to each line (bug#6890).
 +2010-04-28  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-08-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * net/tramp.el (tramp-remote-selinux-p): New defun.
 +      (tramp-handle-file-selinux-context)
 +      (tramp-handle-set-file-selinux-context): Use it.
  
 -      * subr.el (read-key): Don't echo keystrokes (bug#6883).
 +2010-04-28  Sam Steingold  <sds@gnu.org>
  
 -2010-08-21  Glenn Morris  <rgm@gnu.org>
 +      * progmodes/bug-reference.el (bug-reference-url-format): Mark as
 +      `safe-local-variable' if the value is a string or a symbol with
 +      the property `bug-reference-url-format'.
  
 -      * menu-bar.el (menu-bar-games-menu): Add landmark.
 +2010-04-28  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-08-20  Glenn Morris  <rgm@gnu.org>
 +      * progmodes/bug-reference.el (bug-reference-url-format):
 +      Revert 2010-04-27 change due to security risk.
  
 -      * align.el (align-regexp): Make group and spacing arguments
 -      use the interactive defaults when non-interactive.  (Bug#6698)
 +2010-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * mail/rmail.el (rmail-forward): Replace mail-text-start with its
 -      expansion, so as not to need sendmail.
 -      (mail-text-start): Remove declaration.
 -      (rmail-retry-failure): Require sendmail.
 +      Make it possible to locally disable a globally enabled mode.
 +      * simple.el (fundamental-mode): Run fundamental-mode-hook.
 +      * emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
 +      rather than kill-all-local-variables so it runs fundamental-mode-hook.
 +      * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
 +      Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
 +      that subsequent hooks get a chance to disable it.
  
 -2010-08-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-27  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * subr.el (read-key): Don't hide the menu-bar entries (bug#6881).
 +      * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
 +      Avoid re-enabling a minor mode after the user turned the minor mode
 +      off if MODE-enable-in-buffers is run twice (typically once from
 +      fundamental-mode's after-change-major-mode-hook and a second time from
 +      run-mode-hook's own after-change-major-mode-hook).
  
 -2010-08-18  Michael Albinus  <michael.albinus@gmx.de>
 +      * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully.
  
 -      * progmodes/flymake.el (flymake-start-syntax-check-process):
 -      Use `start-file-process' in order to let it run also on remote hosts.
 +2010-04-27  Sam Steingold  <sds@gnu.org>
  
 -2010-08-18  Kenichi Handa  <handa@m17n.org>
 +      * progmodes/bug-reference.el (bug-reference-url-format): Mark as
 +      `safe-local-variable' if the value is a string or a function, as
 +      documented and implemented on 2010-04-02.
  
 -      * files.el: Add `word-wrap' as safe local variable.
 +2010-04-27  Juanma Barranquero  <lekktu@gmail.com>
  
 -2010-08-18  Glenn Morris  <rgm@gnu.org>
 +      * ido.el (ido-buffer-internal): Bind `ido-use-virtual-buffers' to nil
 +      when method is 'kill.
  
 -      * woman.el (woman-translate): Case matters.  (Bug#6849)
 +2010-04-27  Agustín Martín  <agustin.martin@hispalinux.es>
  
 -2010-08-14  Chong Yidong  <cyd@stupidchicken.com>
 +      * textmodes/ispell.el (ispell-init-process): Fix personal dictionary
 +      condition in default directory check.
 +      (ispell-init-process,ispell-kill-ispell,kill-buffer-hook):
 +      Kill ispell process when killing its associated buffer.
  
 -      * simple.el (kill-region): Doc fix (Bug#6787).
 +2010-04-27  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-08-14  Glenn Morris  <rgm@gnu.org>
 +      * desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists,
 +      but we aren't using it.
  
 -      * calendar/diary-lib.el (diary-header-line-format):
 -      Fit it to the window, not the frame.
 +2010-04-25  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-08-11  Andreas Schwab  <schwab@linux-m68k.org>
 +      * tool-bar.el (tool-bar-local-item-from-menu): Revert unintended
 +      checkin in 2010-04-23T16:26:11Z!monnier@iro.umontreal.ca.
  
 -      * subr.el (ignore-errors): Add debug declaration.
 +2010-04-24  Glenn Morris  <rgm@gnu.org>
  
 -2010-08-09  Geoff Gole  <geoffgole@gmail.com>  (tiny change)
 +      * emacs-lisp/authors.el (authors-obsolete-files-regexps):
 +      Ignore VCS-ignore files, and deleted nextstep preferences files.
 +      (authors-ignored-files): Ignore deleted cedet test files, and "*.el".
 +      (authors-ambiguous-files): New list.
 +      (authors-valid-file-names): Add some deleted files.
 +      (authors-renamed-files-alist): Add font-setting.el, edt-user.doc.
 +      (authors-disambiguate-file-name): New function.  (Bug#5501)
 +      (authors-canonical-file-name): Doc fix.
 +      Don't warn about obsolete files.
 +      (authors-canonical-file-name, authors-scan-el):
 +      Use authors-disambiguate-file-name.
  
 -      * whitespace.el (whitespace-color-off): Remove post-command-hook
 -      locally.
 +      * hfy-cmap.el (htmlfontify-load-rgb-file, hfy-fallback-colour-values):
 +      Add autoload cookies.
 +      (htmlfontify-unload-rgb-file, hfy-fallback-colour-values): Add docs.
 +      (generated-autoload-file): Set file-local value to "htmlfontify.el".
 +      * htmlfontify.el (caddr, cadddr): Remove fallback definitions.
 +      They have definitions / compiler macros in cl.el.
 +      (htmlfontify-load-rgb-file, hfy-fallback-colour-values):
 +      Replace manual autoloads with generated ones.
 +      (htmlfontify-unload-rgb-file): Remove autoload.
 +      * Makefile.in (autoloads): Ensure htmlfontify.el is writable.
  
 -2010-08-08  Johan Bockgård  <bojohan@gnu.org>
 +2010-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * replace.el (replace-highlight): Bind isearch-forward and
 -      isearch-error, ensuring that highlighting is updated if the user
 -      switches the search direction (Bug#6808).
 +      * emacs-lisp/bytecomp.el (byte-compile-set-default): New function.
 +      (byte-compile-setq-default): Optimize for the
 +      single-var case and don't call byte-compile-form in this case to avoid
 +      inf-loop with byte-compile-set-default.
  
 -      * isearch.el (isearch-lazy-highlight-forward): New var.
 -      (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
 -      (isearch-lazy-highlight-update): Use it.
 +      * progmodes/compile.el (compilation-start): Abbreviate default directory.
  
 -2010-08-06  Kenichi Handa  <handa@m17n.org>
 +2010-04-23  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * international/mule.el (define-charset): Store NAME as :base property.
 -      (ctext-non-standard-encodings-table): Pay attention to charset aliases.
 -      (ctext-pre-write-conversion): Sort ctext-standard-encodings by the
 -      current priority.  Force using the designation of the specific
 -      charset by adding `charset' text property.  Improve the whole
 -      algorithm.
 +      Implement SELINUX backends.
  
 -2010-08-05  Juanma Barranquero  <lekktu@gmail.com>
 +      * net/tramp.el (tramp-file-name-handler-alist):
 +      Add `file-selinux-context' and `set-file-selinux-context'.
 +      (tramp-handle-file-selinux-context)
 +      (tramp-handle-set-file-selinux-context): New defuns.
 +      (tramp-handle-copy-file, tramp-do-copy-or-rename-file):
 +      Handle PRESERVE-SELINUX-CONTEXT.
  
 -      * emulation/pc-select.el (pc-selection-mode-hook)
 -      (copy-region-as-kill-nomark, beginning-of-buffer-mark)
 -      (pc-selection-mode): Fix typos in docstrings.
 +      * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
 +      Add `file-selinux-context' and `set-file-selinux-context'.
 +      (tramp-gvfs-handle-file-selinux-context)
 +      (tramp-gvfs-handle-set-file-selinux-context): New defuns.
 +      (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT.
  
 -2010-08-04  Kenichi Handa  <handa@m17n.org>
 +      * net/ange-ftp.el (ange-ftp-copy-file):
 +      * net/tramp-fish.el (tramp-fish-handle-copy-file):
 +      * net/tramp-imap.el (tramp-imap-handle-copy-file):
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file):
 +      Add PRESERVE-SELINUX-CONTEXT.
  
 -      * language/cyrillic.el: Don't add "microsoft-cp1251" to
 -      ctext-non-standard-encodings-alist here.
 +2010-04-22  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * international/mule.el (ctext-non-standard-encodings-alist):
 -      Add "koi8-r" and "microsoft-cp1251".
 -      (ctext-standard-encodings): New variable.
 -      (ctext-non-standard-encodings-table): List only elements for
 -      non-standard encodings.
 -      (ctext-pre-write-conversion): Adjust for the above change.
 -      Check ctext-standard-encodings.
 +      Synchronize with Tramp repository.
  
 -      * international/mule-conf.el (compound-text): Doc fix.
 -      (ctext-no-compositions): Doc fix.
 -      (compound-text-with-extensions): Doc fix.
 +      * net/tramp.el (with-connection-property, tramp-completion-mode-p)
 +      (tramp-action-process-alive, tramp-action-out-of-band)
 +      (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote)
 +      (tramp-exists-file-name-handler): Fix docstring.
 +      (with-progress-reporter): New defmacro.
 +      (tramp-do-copy-or-rename-file, tramp-handle-dired-compress-file)
 +      (tramp-maybe-open-connection): Use it.
  
 -2010-08-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-22  Noah Lavine  <noah549@gmail.com>  (tiny change)
  
 -      * simple.el (exchange-dot-and-mark): Mark obsolete, finally.
 +      Detect ssh 'ControlMaster' argument automatically in some cases.
  
 -2010-08-03  Juanma Barranquero  <lekktu@gmail.com>
 +      * net/tramp.el (tramp-detect-ssh-controlmaster): New defun.
 +      (tramp-default-method): Use it.
  
 -      * progmodes/which-func.el (which-func-format): Split help-echo text
 -      into lines, like other mode-line tooltips.
 +2010-04-22  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * server.el (server-start): When using TCP sockets, force IPv4
 -      and use a literal 127.0.0.1 for localhost.  (Related to bug#6781.)
 +      * net/tramp.el (tramp-handle-copy-file): Add new optional
 +      parameter `preserve-selinux-context'.
 +      (tramp-file-name-for-operation): Add `set-file-selinux-context'.
  
 -2010-08-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-22  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * bindings.el (complete-symbol): Run completion-at-point as a fallback.
 +      * net/tramp.el (tramp-completion-handle-file-name-all-completions):
 +      Ensure, that non remote files are still checked.  Oops.
  
 -2010-08-02  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-21  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * term.el (term-delimiter-argument-list): Reflow docstring.
 -      (term-read-input-ring, term-write-input-ring, term-send-input)
 -      (term-bol, term-erase-in-display, serial-supported-or-barf):
 -      Fix typos in docstrings.
 +      Fix Bug#5840.
  
 -2010-08-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * icomplete.el (icomplete-completions): Use `non-essential'.
  
 -      * bindings.el (function-key-map): Add a S-tab => backtab fallback.
 +      * net/tramp.el (tramp-connectable-p): New defun.
 +      (tramp-handle-expand-file-name)
 +      (tramp-completion-handle-file-name-all-completions)
 +      (tramp-completion-handle-file-name-completion): Use it.
  
 -2010-08-01  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * dabbrev.el (dabbrev-completion): Fix typo in docstring.
 +      * emacs-lisp/lisp.el (lisp-completion-at-point): Try and handle errors.
  
 -2010-08-01  MON KEY  <monkey@sandpframing.com>  (tiny change)
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * emacs-lisp/syntax.el (syntax-ppss-toplevel-pos):
 -      Fix typo in docstring (bug#6747).
 +      * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items.
  
 -2010-07-30  Leo  <sdl.web@gmail.com>
 +      * tool-bar.el (tool-bar-setup): Add :label on some tool bar items.
  
 -      * eshell/esh-io.el (eshell-get-target): Better detection of
 -      read-only file (Bug#6762).
 +      * loadup.el: Load dynamic-setting.el if feature dynamic-setting
 +      is present.
  
 -2010-07-30  Juanma Barranquero  <lekktu@gmail.com>
 +      * info.el (info-tool-bar-map): Add labels.
  
 -      * align.el (align-default-spacing): Doc fix.
 -      (align-region-heuristic, align-regexp): Fix typos in docstrings.
 +      * cus-start.el (all): Add tool-bar-style and tool-bar-max-label-size.
  
 -2010-07-23  Juanma Barranquero  <lekktu@gmail.com>
 +      * cus-edit.el (custom-commands): Add labels for tool bar.
 +      (custom-buffer-create-internal, Custom-mode): Adjust for
 +      labels in custom-commands.
  
 -      * help-fns.el (find-lisp-object-file-name): Doc fix (bug#6494).
 +      * dynamic-setting.el: Renamed from font-setting.el.
  
 -2010-07-19  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-21  John Wiegley  <jwiegley@gmail.com>
  
 -      * time.el (display-time-day-and-date): Remove spurious * in docstring.
 -      (display-time-world-buffer-name, display-time-world-mode-map):
 -      Fix typos in docstrings.
 +      * ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o
 +      toggles the use of virtual buffers.
 +      (ido-buffer-internal): Guard `ido-use-virtual-buffers' global value.
 +      (ido-toggle-virtual-buffers): New function.
  
 -2010-07-17  Shyam Karanatt  <shyam@swathanthran.in>  (tiny change)
 +2010-04-21  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * image-mode.el (image-display-size): New function.
 -      (image-forward-hscroll, image-next-line, image-eol, image-eob)
 -      (image-mode-fit-frame): Use it (Bug#6639).
 +      Use `define-derived-mode'; fix window selection; doc fixes.
 +      * play/tetris.el (tetris, tetris-update-speed-function)
 +      (tetris-tty-colors, tetris-x-colors, tetris-move-bottom)
 +      (tetris-move-left, tetris-move-right, tetris-rotate-prev)
 +      (tetris-rotate-next, tetris-end-game, tetris-start-game)
 +      (tetris-pause-game): Fix typos in docstrings.
 +      (tetris-mode-map, tetris-null-map):
 +      Move initialization into declaration.
 +      (tetris-mode): Define with `define-derived-mode';
 +      set show-trailing-whitespace to nil.
 +      (tetris): Prefer window already displaying the "*Tetris*" buffer.
  
 -2010-07-17  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-21  Karel Klíč  <kklic@redhat.com>
  
 -      * dired.el (dired-buffers-for-dir): Handle list values of
 -      dired-directory (Bug#6636).
 +      * files.el (backup-buffer): Handle SELinux context, and return it
 +      if a backup was made by renaming.
 +      (backup-buffer-copy): Set SELinux context to the target file.
 +      (basic-save-buffer): Set SELinux context of the newly written file.
 +      (basic-save-buffer-1): Now it also returns any SELinux context.
 +      (basic-save-buffer-2): Set SELinux context of the newly created file,
 +      and return it.
 +      * net/tramp.el (tramp-file-name-for-operation):
 +      Add file-selinux-context.
  
 -2010-07-16  Reiner Steib  <Reiner.Steib@gmx.de>
 +2010-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * vc.el (vc-coding-system-inherit-eol): New defvar.
 -      (vc-coding-system-for-diff): Use it to decide whether to inherit
 -      from the file the EOL format for reading the diffs of that file.
 -      (Bug#4451)
 +      Make the log-edit comments use RFC822 format throughout.
  
 -2010-07-16  Eli Zaretskii  <eliz@gnu.org>
 +      * vc.el (vc-checkin, vc-modify-change-comment):
 +      Adjust to new vc-start/finish-logentry.
 +      (vc-find-conflicted-file): New command.
 +      (vc-transfer-file): Adjust to new vc-checkin.
 +      (vc-next-action): Improve scoping.
  
 -      * mail/rmailmm.el (rmail-mime-save): Make the temp buffer
 -      unibyte, so compressed attachments are not compressed again.
 +      * vc-hg.el (vc-hg-log-edit-mode): Remove.
 +      (vc-hg-checkin): Remove extra arg.  Use log-edit-extract-headers.
  
 -2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +      * vc-git.el (vc-git-log-edit-mode): Remove.
 +      (vc-git-checkin): Remove extra arg.  Use log-edit-extract-headers.
 +      (vc-git-commits-coding-system): Rename from git-commits-coding-system.
  
 -      * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127
 -      now that unicode is used (Bug#6594).
 +      * vc-dispatcher.el (vc-log-edit): Shorten names for log-edit-show-files.
 +      (vc-start-logentry): Remove argument `extra'.
 +      (vc-finish-logentry): Remove extra args.
  
 -2010-07-14  Chong Yidong  <cyd@stupidchicken.com>
 +      * vc-bzr.el (vc-bzr-log-edit-mode): Remove.
 +      (vc-bzr-checkin): Remove extra arg.  Use log-edit-extract-headers.
 +      (vc-bzr-conflicted-files): New function.
  
 -      * simple.el (push-mark-command): Set the selection if
 -      select-active-regions is non-nil.
 +      * log-edit.el (log-edit-extra-flags)
 +      (log-edit-before-checkin-process): Remove.
 +      (log-edit-summary, log-edit-header, log-edit-unknown-header): New faces.
 +      (log-edit-headers-alist): New var.
 +      (log-edit-header-contents-regexp): New const.
 +      (log-edit-match-to-eoh): New function.
 +      (log-edit-font-lock-keywords): Use them.
 +      (log-edit): Insert a "Summary:" header as default.
 +      (log-edit-mode): Mark font-lock rules as case-insensitive.
 +      (log-edit-done): Cleanup headers.
 +      (log-view-process-buffer): Remove.
 +      (log-edit-extract-headers): New function to replace it.
  
 -2010-07-10  Glenn Morris  <rgm@gnu.org>
 +2010-04-20  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * calendar/calendar.el (calendar-week-end-day): New function.
 -      * calendar/cal-tex.el (cal-tex-cursor-month): Remove unused vars.
 -      Respect calendar-week-start-day.  (Bug#6606)
 -      (cal-tex-insert-day-names, cal-tex-insert-blank-days)
 -      (cal-tex-insert-blank-days-at-end): Respect calendar-week-start-day.
 -      (cal-tex-first-blank-p, cal-tex-last-blank-p): Simplify, and
 -      respect calendar-week-start-day.
 +      * subr.el (default-direction-reversed): Remove obsolescence info.
  
 -2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * simple.el (use-region-p): Doc fix (Bug#6607).
 +      * vc-dispatcher.el (vc-finish-logentry): Don't mess so badly with the
 +      windows/frames.
  
 -2010-07-07  Christoph Scholtes  <cschol2112@gmail.com>
 +      * emacs-lisp/lisp.el (lisp-completion-at-point): Complete around point.
 +      I.e. include text after point in the completion region.
 +      Also, return nil when we're not after/in a symbol.
  
 -      * progmodes/python.el (python-font-lock-keywords): Add Python 2.7
 -      builtins (BufferError, BytesWarning, WindowsError; callables
 -      bin, bytearray, bytes, format, memoryview, next, print; __package__).
 +      * international/mule-cmds.el (view-hello-file): Don't fiddle with the
 +      default enable-multibyte-characters.
  
 -2010-07-07  Glenn Morris  <rgm@gnu.org>
 +2010-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * play/zone.el (zone-fall-through-ws): Fix next-line ->
 -      forward-line fallout.
 +      * international/mule.el: Help the user choose a valid coding-system.
 +      (read-buffer-file-coding-system): New function.
 +      (set-buffer-file-coding-system): Use it.  Prompt the user if the
 +      coding-system cannot encode all the chars.
  
 -2010-07-06  Chong Yidong  <cyd@stupidchicken.com>
 +      * vc-bzr.el: Use standard *vc* and *vc-diff* buffers.
 +      (vc-bzr-shelve-show, vc-bzr-shelve-apply)
 +      (vc-bzr-shelve-apply-and-keep, vc-bzr-shelve-snapshot):
 +      Don't use *vc-bzr-shelve*.
  
 -      * mouse.el (mouse-appearance-menu): Add docstring.
 +2010-04-19  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * help.el (describe-key): Print up-event using key-description.
 +      Fix the version number for added files.
 +      * vc-hg.el (vc-hg-working-revision): Check if the file is
 +      registered after hg parent fails (Bug#5961).
  
 -2010-07-03  Michael Albinus  <michael.albinus@gmx.de>
 +2010-04-19  Glenn Morris  <rgm@gnu.org>
  
 -      * net/zeroconf.el (zeroconf-resolve-service)
 -      (zeroconf-service-resolver-handler): Use `dbus-byte-array-to-string'.
 -      (zeroconf-publish-service): Use `dbus-string-to-byte-array'.
 +      * htmlfontify.el (htmlfontify-buffer)
 +      (htmlfontify-copy-and-link-dir): Autoload entry points.
  
 -2010-07-03  Jan Moringen  <jan.moringen@uni-bielefeld.de>
 +2010-04-19  Magnus Henoch  <magnus.henoch@gmail.com>
  
 -      * net/zeroconf.el (zeroconf-service-remove-hook): New defun.
 +      * vc-hg.el (vc-hg-annotate-extract-revision-at-line): Expand file
 +      name relative to the project root (Bug#5960).
  
 -2010-06-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-04-19  Glenn Morris  <rgm@gnu.org>
  
 -      Avoid displaying files with a nil state in vc-dir.
 -      * vc-dir.el (vc-dir-update): Obey the noinsert argument in all
 -      cases that cause insertion.
 -      (vc-dir-resynch-file): Tell vc-dir-update to avoid inserting files
 -      with a nil state.
 +      * vc-git.el (vc-git-print-log): Doc fix.
  
 -2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-19  Óscar Fuentes  <ofv@wanadoo.es>
  
 -      * xml.el (xml-parse-region): Avoid infloop (Bug#5281).
 +      * ido.el (ido-file-internal): Fix 2009-12-02 change.
  
 -2010-06-29  Leo  <sdl.web@gmail.com>
 +2010-04-19  Christoph  <cschol2112@googlemail.com>  (tiny change)
  
 -      * emacs-lisp/rx.el (rx): Doc fix.  (Bug#6537)
 +      * progmodes/grep.el (grep-compute-defaults): Fix handling of host
 +      default settings (Bug#5928).
  
 -2010-06-27  Oleksandr Gavenko  <gavenkoa@gmail.com>  (tiny change)
 +2010-04-19  Glenn Morris  <rgm@gnu.org>
  
 -      * generic-x.el (bat-generic-mode): Fix regexp for command line
 -      switches (Bug#5719).
 +      * progmodes/fortran.el (fortran-match-and-skip-declaration):
 +      New function.
 +      (fortran-font-lock-keywords-3): Use it.  (Bug#1385)
  
 -2010-06-27  Masatake YAMATO  <yamato@redhat.com>
 +2010-04-19  Kenichi Handa  <handa@m17n.org>
  
 -      * htmlfontify.el (hfy-face-attr-for-class): Use append instead
 -      of nconc to avoid pure storage error (Bug#6239).
 +      * language/indian.el (malayalam-composable-pattern): Fix previous
 +      change (add U+0D4D "SIGN VIRAMA").
 +      (oriya-composable-pattern): Add U+0B30 and fix typo in the regexp.
 +      (tamil-composable-pattern): Fix typo in the regexp.
 +      (telugu-composable-pattern): Fix U+0C4D and typo in the regexp.
 +      (kannada-composable-pattern): Fix U+0CB0 and typo in the regexp.
 +      (malayalam-composable-pattern): Fix U+0D4D and typo in the regexp.
  
 -2010-06-27  Christoph  <cschol2112@googlemail.com>  (tiny change)
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * bookmark.el (bookmark-bmenu-2-window, bookmark-bmenu-other-window)
 -      (bookmark-bmenu-other-window-with-mouse): Remove unnecessary
 -      bindings of bookmark-automatically-show-annotations (Bug#6515).
 +      * textmodes/tex-mode.el (latex-mode): Revert 2008-03-03 change to
 +      paragraph-separate (Bug#5821).
  
 -2010-06-25  Eli Zaretskii  <eliz@gnu.org>
 +2010-04-19  Juri Linkov  <juri@jurta.org>
  
 -      * arc-mode.el (archive-zip-extract): Don't quote the file name on
 -      MS-Windows and MS-DOS.  (Bug#6467, Bug#6144)
 +      Put breadcrumbs on overlay instead of inserting to buffer (bug#5809).
  
 -2010-06-24  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 +      * info.el (Info-find-node-2): Comment out code that skips
 +      breadcrumbs line.
 +      (Info-mouse-follow-link): New command.
 +      (Info-link-keymap): New keymap.
 +      (Info-breadcrumbs): Rename from `Info-insert-breadcrumbs'.
 +      Return a string with links instead of inserting breadcrumbs
 +      to the Info buffer.
 +      (Info-fontify-node): Comment out code that inserts breadcrumbs.
 +      Instead of putting the `invisible' text property over the Info
 +      header, make an overlay over the Info header with the `invisible'
 +      property and `after-string' set to the string returned by
 +      `Info-breadcrumbs'.
  
 -      * comint.el (make-comint, make-comint-in-buffer): Mention return
 -      value in the docstrings.  (Bug#6498)
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-06-24  Yoni Rabkin  <yoni@rabkins.net>
 +      * help.el (help-window-setup-finish): Doc fix (Bug#5830).
 +      Reported by monkey@sandpframing.com.
  
 -      * bs.el (bs-mode-font-lock-keywords): Remove "by" from Dired pattern,
 -      since it is not present when using some non-default switches.
 +2010-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-06-23  Karl Fogel  <kfogel@red-bean.com>
 +      * tmm.el (tmm-prompt): Remove obsolete call to x-popup-menu.
 +      (tmm-get-keymap): Add key-binding shortcuts now that they're not
 +      available in the "keyseq cache" any more.
  
 -      * simple.el (compose-mail): Fix doc string to refer to
 -      `compose-mail-user-agent-warnings', instead of to the
 -      nonexistent `compose-mail-check-user-agent'.
 +      * custom.el (defcustom): Add edebug spec.
  
 -2010-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-04-18  Juri Linkov  <juri@jurta.org>
  
 -      Fix vc-annotate for renamed files when using Git.
 -      * vc-git.el (vc-git-find-revision): Deal with empty results from
 -      ls-files.  Doe not pass the object as a file name to cat-file, it
 -      is not a file name.
 -      (vc-git-annotate-command): Pass the file name using -- to avoid
 -      ambiguity with the revision.
 -      (vc-git-previous-revision): Pass a relative file name.
 +      Test for special mode-class in view-buffer instead of view-file (bug#5513).
  
 -2010-06-22  Glenn Morris  <rgm@gnu.org>
 +      * view.el (view-file, view-buffer): Move test for special mode-class
 +      from view-file to view-buffer.
  
 -      * progmodes/js.el (js-mode-map): Use standard capitalization and
 -      ellipses for menu entries.
 +      * tar-mode.el (tar-extract): Turn if's into one cond
 +      like in arc-mode.el.
  
 -      * wid-edit.el (widget-complete): Doc fix.
 +2010-04-18  Juri Linkov  <juri@jurta.org>
  
 -2010-06-22  Jürgen Hötzel  <juergen@hoetzel.info>  (tiny change)
 +      Add 7z archive format support (bug#5475).
  
 -      * wid-edit.el (widget-complete): Fix typo in 2009-12-02 change.
 +      * arc-mode.el (archive-zip-extract): Try to find 7z executable.
 +      (archive-7z-extract): New defcustom.
 +      (archive-find-type): Add magic string for 7z.
 +      (archive-extract-by-stdout): Add new optional arg `stderr-file'.
 +      If `stderr-file' is non-nil, use `(t stderr-file)' for the
 +      `buffer' arg of `call-process'.
 +      (archive-zip-extract): Check `archive-zip-extract' for "7z" and
 +      call the function `archive-7z-extract' with the variable
 +      `archive-7z-extract' let-bound to `archive-zip-extract'.
 +      (archive-7z-summarize, archive-7z-extract): New functions.
  
 -2010-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +      * international/mule.el (auto-coding-alist):
 +      * files.el (auto-mode-alist): Add 7z file extension.
  
 -      Fix annotating other revisions for renamed files in vc-annotate.
 -      * vc-annotate.el (vc-annotate): Add an optional argument for the
 -      VC backend.  Use it when non-nil.
 -      (vc-annotate-warp-revision): Pass the VC backend to vc-annotate
 -      (Bug#6487).
 +2010-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      Fix vc-annotate-show-changeset-diff-revision-at-line for git.
 -      * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
 -      Do not pass the file name to the 'previous-revision call when we
 -      don't want a file diff.  (Bug#6489)
 +      * loadup.el: Setup hash-cons for pure data.
  
 -2010-06-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +      Fix duplicate entries in cedet's loaddefs.el files.
 +      * emacs-lisp/autoload.el (autoload-file-load-name): Be more clever.
 +      Should make most file-local generated-autoload-file unnecessary.
 +      (print-readably): Silence warnings.
 +      (autoload-find-destination): Take load-name as an arg to make sure
 +      it's the same as the one that will be in the file.
 +      (autoload-generate-file-autoloads): Adjust to above changes.
 +      Try to make the dataflow a bit simpler.
  
 -      Fix finding revisions for renamed files in vc-annotate.
 -      * vc.el (vc-find-revision): Add an optional argument for
 -      the VC backend.  Use it when non-nil.
 -      * vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC
 -      backend to vc-find-revision.  (Bug#6487)
 +      * cvs-status.el (cvs-refontify): Remove unused.
  
 -2010-06-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-04-18  Jay Belanger  <jay.p.belanger@gmail.com>
  
 -      Fix reading file names in Git annotate buffers.
 -      * vc-git.el (vc-git-annotate-extract-revision-at-line):
 -      Remove trailing whitespace.  Suggested by Eric Hanchrow.  (Bug#6481)
 +      * calc/calc.el (calc-mode-map): Bind "O" to `calc-missing-key'.
  
 -2010-06-20  Alan Mackenzie  <acm@muc.de>
 +      * calc/calc-bin.el (calc-radix): Have the "O" option turn on
 +      twos-complement mode.
  
 -      * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set
 -      in file local variables, set it first.
 +2010-04-17  Jay Belanger  <jay.p.belanger@gmail.com>
  
 -2010-06-19  Glenn Morris  <rgm@gnu.org>
 +      * calc/calc-ext.el (calc-init-extensions): Add keybinding for
 +      'calc-option'.  Add `calc-option-prefix-help' to calc-help autoloads.
 +      (calc-inverse): Add "Option" to message, as appropriate.
 +      (calc-hyperbolic): Add "Option" to message, as appropriate.
 +      (calc-option, calc-is-option): New functions.
  
 -      * descr-text.el (describe-char-unicode-data): Insert separating
 -      space when needed.  (Bug#6422)
 +      * calc/calc-help.el (calc-full-help): Add `calc-option-help'.
 +      (calc-option-prefix-help): New function.
  
 -      * progmodes/idlwave.el (idlwave-action-and-binding):
 -      Fix typo in 2009-12-03 change.  (Bug#6450)
 +      * calc/calc-misc.el (calc-help): Add "Option" entry.
  
 -2010-06-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * calc/calc.el (calc-local-var-list): Add `calc-option-flag'.
 +      (calc-option-flag): New variable.
 +      (calc-do): Set `calc-option-flag to nil.
 +      (calc-set-mode-line): Add "Opt " as appropriate.
  
 -      * subr.el (read-quoted-char): Fix up last change (bug#6290).
 +2010-04-16  Juri Linkov  <juri@jurta.org>
  
 -2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      Move scrolling commands from simple.el to window.el
 +      because their primitives are implemented in window.c.
  
 -      * font-lock.el (font-lock-major-mode): Rename from
 -      font-lock-mode-major-mode to distinguish it from
 -      global-font-lock-mode's own font-lock-mode-major-mode (bug#6135).
 -      (font-lock-set-defaults):
 -      * font-core.el (font-lock-default-function): Adjust users.
 -      (font-lock-mode): Don't set it at all.
 +      * simple.el (scroll-error-top-bottom)
 +      (scroll-up-command, scroll-down-command, scroll-up-line)
 +      (scroll-down-line, scroll-other-window-down)
 +      (beginning-of-buffer-other-window, end-of-buffer-other-window):
 +      * window.el (scroll-error-top-bottom)
 +      (scroll-up-command, scroll-down-command, scroll-up-line)
 +      (scroll-down-line, scroll-other-window-down)
 +      (beginning-of-buffer-other-window, end-of-buffer-other-window):
 +      Move from simple.el to window.el because their primitives are
 +      implemented in window.c.
  
 -2010-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-16  Juri Linkov  <juri@jurta.org>
  
 -      * vc-annotate.el (vc-annotate): Use vc-read-revision.
 +      * isearch.el (isearch-lookup-scroll-key): Check both
 +      `isearch-scroll' and `scroll-command' properties.
 +      (scroll-up, scroll-down): Remove `isearch-scroll' property.
  
 -2010-06-15  Glenn Morris  <rgm@gnu.org>
 +      * mwheel.el (mwheel-scroll): Remove `isearch-scroll' property.
  
 -      * calendar/appt.el (appt-time-msg-list): Doc fix.
 -      (appt-check): Let-bind appt-warn-time.
 -      (appt-add): Make the 3rd argument optional.
 -      Simplify argument names.  Doc fix.  Check for integer WARNTIME.
 -      Only add WARNTIME to the output list if non-nil.
 +      * simple.el (scroll-up-command, scroll-down-command)
 +      (scroll-up-line, scroll-down-line): Remove `isearch-scroll' property.
  
 -2010-06-15  Ivan Kanis  <apple@kanis.eu>
 +2010-04-15  Juri Linkov  <juri@jurta.org>
  
 -      * calendar/appt.el (appt-check): Let the 3rd element of
 -      appt-time-msg-list specify the warning time.
 -      (appt-add): Add new argument with the warning time.  (Bug#5176)
 +      * simple.el (scroll-up-command, scroll-down-command)
 +      (scroll-up-line, scroll-down-line): Put `scroll-command'
 +      property on the these symbols.  Remove them from
 +      `scroll-preserve-screen-position-commands'.
  
 -2010-06-12  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
 +      * mwheel.el (mwheel-scroll): Put `scroll-command' and
 +      `isearch-scroll' properties on the `mwheel-scroll' symbol.
 +      Remove it from `scroll-preserve-screen-position-commands'.
  
 -      * vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions
 -      older than version 1.6.  (Bug#6361)
 +      * isearch.el (isearch-allow-scroll): Doc fix.
  
 -2010-06-12  Helmut Eller  <eller.helmut@gmail.com>
 +2010-04-15  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * emacs-lisp/cl-macs.el (destructuring-bind): Bind `bind-enquote',
 -      used by cl-do-arglist.  (Bug#6408)
 +      * net/tramp.el (tramp-error-with-buffer): Don't show the
 +      connection buffer when we are in completion mode.
 +      (tramp-file-name-handler): Catch the error for some operations
 +      when we are in completion mode.  This gives the user the chance to
 +      correct the file name in the minibuffer.
  
 -2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-15  Glenn Morris  <rgm@gnu.org>
  
 -      * emacs-lisp/advice.el (ad-compile-function):
 -      Define warning-suppress-types before we let-bind it (bug#6275).
 +      * progmodes/verilog-mode.el (verilog-forward-sexp): Avoid free variable.
  
 -      * vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;
 -      declare it, make it buffer-local and permanent-local (bug#6324).
 -      (vc-resynch-window): Adjust name.
 -      * vc-hooks.el (vc-find-file-hook): Adjust name.
 +2010-04-15  Juanma Barranquero  <lekktu@gmail.com>
  
 -2010-06-07  Jonathan Rockway  <jon@jrock.us>
 +      Simplify by using `define-derived-mode'.
 +      * info.el (Info-mode):
 +      * calendar/todo-mode.el (todo-mode):
 +      * play/gomoku.el (gomoku-mode): Define with `define-derived-mode'.
 +      (gomoku-mode-map): Move initialization into declaration.
  
 -      * net/rcirc.el: Add support for password authentication.
 -      (rcirc-server-alist): Add :password keyword.
 -      (rcirc): Ask for a password, or get it from the server's alist.
 -      (rcirc-connect): Add password argument.  Pass it to server.
 +2010-04-14  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
 +      Fix Bug#5840.
 +      * ido.el (ido-file-name-all-completions-1):
 +      * minibuffer.el (minibuffer-completion-help):
 +      * net/tramp.el (tramp-completion-mode-p): Use `non-essential'.
  
 -      * net/dbus.el (dbus-register-method): Declare function.
 -      (dbus-handle-event, dbus-property-handler): Fix typos in docstrings.
 -      (dbus-introspect): Doc fix.
 -      (dbus-event-bus-name, dbus-introspect-get-interface)
 -      (dbus-introspect-get-argument): Reflow docstrings.
 +2010-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-06-04  Chong Yidong  <cyd@stupidchicken.com>
 +      * simple.el (non-essential): New var.
  
 -      * term/common-win.el (x-colors): Add "dark green" and "dark
 -      turquoise" (Bug#6332).
 +      Add a new field `location' to bookmarks for non-file bookmarks.
 +      * bookmark.el (bookmark-location): Use the new field, if present.
 +      (bookmark-insert-location): Undo last change, not needed any more.
 +      * man.el (Man-bookmark-make-record):
 +      * woman.el (woman-bookmark-make-record): Add `location' field.
  
 -2010-06-03  Glenn Morris  <rgm@gnu.org>
 +2010-04-14  Juri Linkov  <juri@jurta.org>
  
 -      * desktop.el (desktop-clear-preserve-buffers):
 -      Add "*Warnings*" buffer.  (Bug#6336)
 +      * simple.el (scroll-error-top-bottom): New defcustom.
 +      (scroll-up-command, scroll-down-command): Use it.  Doc fix.
  
 -2010-06-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +      * emulation/pc-select.el (pc-select-override-scroll-error):
 +      Obsolete in favor of `scroll-error-top-bottom'.
  
 -      * vc-dir.el (vc-dir-update): Remove entries with a nil state (bug#5539).
 +2010-04-14  Juri Linkov  <juri@jurta.org>
  
 -2010-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * tutorial.el (tutorial--default-keys): Rebind `C-v' to
 +      `scroll-up-command' and `M-v' to `scroll-down-command'.
  
 -      * vc-bzr.el (vc-bzr-revision-completion-table): Apply
 -      `file-directory-p' to the filename part rather than to the whole text.
 +      * emulation/cua-rect.el (cua--init-rectangles):
 +      * forms.el (forms--change-commands):
 +      * image-mode.el (image-mode-map):
 +      Remap scroll-down-command and scroll-up-command
 +      in addition to scroll-down and scroll-up.
  
 -2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-14  Juri Linkov  <juri@jurta.org>
  
 -      * man.el (Man-completion-table): Let the user type "-k " (bug#6319).
 +      * mwheel.el (scroll-preserve-screen-position-commands):
 +      Add mwheel-scroll to this list of commands.
  
 -2010-05-31  Drew Adams  <drew.adams@oracle.com>
 +      * simple.el (scroll-preserve-screen-position-commands):
 +      Add scroll-up-command, scroll-down-command, scroll-up-line,
 +      scroll-down-line to this list of commands.
  
 -      * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298).
 +2010-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-05-31  Juanma Barranquero  <lekktu@gmail.com>
 +      * obsolete/complete.el: Move from lisp/complete.el.
  
 -      * subr.el (momentary-string-display): Just use read-event to read
 -      the exit event (Bug#6238).
 +      * pcomplete.el (pcomplete-here*): Fix mistaken change (bug#5935).
  
 -2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Passing a nil argument
 +      to the minor mode function now turns the mode ON unconditionally.
  
 -      * ansi-color.el: Delete unused escape sequences (Bug#6085).
 -      (ansi-color-drop-regexp): New constant.
 -      (ansi-color-apply, ansi-color-filter-region)
 -      (ansi-color-apply-on-region): Delete unrecognized control sequences.
 -      (ansi-color-apply): Build string list before calling concat.
 +2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +      * vc-dir.el (vc-dir-kill-line): New command.
 +      (vc-dir-mode-map): Bind it to C-k.
  
 -      * progmodes/verilog-mode.el (verilog-type-font-keywords):
 -      Use font-lock-constant-face, not obsolete font-lock-reference-face.
 +      * bookmark.el (bookmark-insert-location): Handle a nil filename.
 +
 +      * woman.el: Add bookmark declarations to silence the compiler.
 +      (bookmark-prop-get): Use `man-args' rather than `filename' as a first
 +      step to compatibility between man and woman bookmarks.
 +      Adjust for Man-default-bookmark-title renaming.
 +      (woman-bookmark-jump): Adjust accordingly.  Don't forget to autoload.
 +
 +      * man.el: Add bookmark declarations to silence the compiler.
 +      (Man-name-local-regexp): Make it match NAME as well.
 +      (Man-getpage-in-background): Return the buffer.
 +      (Man-notify-when-ready): Use `case'.
 +      (man-set-default-bookmark-title): Rename to Man-default-bookmark-title.
 +      Don't hardcode "NAME".  Simplify.
 +      (Man-bookmark-make-record): Use Man-arguments rather than buffer-name.
 +      Rename from Man-bookmark-make-record.
 +      (Man-bookmark-jump): Rename from man-bookmark-jump.  Simplify now that
 +      we have the actual man-args.  Use Man-getpage-in-background rather
 +      than `man' since the arg is already processed.  Let bookmark.el do the
 +      window handling.  Only wait for the relevant process.
 +      Don't forget to autoload.
 +
 +      * bookmark.el (bookmark-default-file): Use locate-user-emacs-file.
 +
 +2010-04-12  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * woman.el (woman-bookmark-make-record, woman-bookmark-jump):
 +      New functions.
 +      (woman-mode): Setup bookmark support.
  
 -2010-05-27  Masatake YAMATO  <yamato@redhat.com>
 +      * man.el (man-set-default-bookmark-title, man-bookmark-make-record)
 +      (man-bookmark-jump): New functions.
 +      (Man-mode): Setup bookmark support.
  
 -      * htmlfontify.el (hfy-face-resolve-face): New function.
 -      (hfy-face-to-style): Use it (Bug#6279).
 +2010-04-10  Jari Aalto  <jari.aalto@cante.net>
  
 -2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * comint.el (comint-password-prompt-regexp): Use regexp-opt, and
 +      recognize ssh-keygen prompt (Bug#2817).
  
 -      * epa.el (epa--select-keys): Don't explicitly delete the window since
 -      that can fail (e.g. sole window in frame).  Use dedication instead.
 +2010-04-10  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-05-19  Uday S Reddy  <u.s.reddy@cs.bham.ac.uk>  (tiny change)
 +      * net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter.
  
 -      * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
 +2010-04-10  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      Synchronize with Tramp repository.
  
 -      * subr.el (read-quoted-char): Resolve modifiers after key
 -      remapping (bug#6212).
 +      * net/tramp.el (tramp-completion-function-alist)
 +      (tramp-file-name-regexp, tramp-chunksize)
 +      (tramp-local-coding-commands, tramp-remote-coding-commands):
 +      Fix docstring.
 +      (tramp-remote-process-environment): Use `format' instead of `concat'.
 +      (tramp-handle-directory-files-and-attributes)
 +      (tramp-get-remote-path): Use `copy-tree'.
 +      (tramp-handle-file-name-all-completions): Backward/ XEmacs
 +      compatibility: Use `completion-ignore-case' if
 +      `read-file-name-completion-ignore-case' does not exist.
 +      (tramp-do-copy-or-rename-file-directly): Do not use
 +      `tramp-handle-file-remote-p'.
 +      (tramp-do-copy-or-rename-file-out-of-band):
 +      Use `tramp-compat-delete-directory'.
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-compute-multi-hops, tramp-maybe-open-connection):
 +      Use `format-spec-make'.
 +      (tramp-find-foreign-file-name-handler)
 +      (tramp-advice-make-auto-save-file-name)
 +      (tramp-set-auto-save-file-modes): Remove superfluous check for
 +      `stringp'.  This is done inside `tramp-tramp-file-p'.
 +      (tramp-debug-outline-regexp): New defconst.
 +      (tramp-get-debug-buffer): Use it.
 +      (tramp-check-for-regexp): Use (forward-line 1).
 +      (tramp-set-auto-save-file-modes): Adapt version check.
  
 -2010-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * net/tramp-compat.el (tramp-advice-file-expand-wildcards):
 +      Wrap call of `featurep' for 2nd argument.
 +      (tramp-compat-make-temp-file): Simplify fallback implementation.
 +      (tramp-compat-copy-tree): Remove function.
 +      (tramp-compat-delete-directory): Provide implementation for older
 +      Emacsen.
  
 -      * tmm.el (tmm-prompt): Don't try to precompute bindings.
 -      (tmm-get-keymap): Compute shortcuts (bug#6171).
 +      * net/tramp-fish.el (tramp-fish-handle-directory-files-and-attributes):
 +      Do not use `tramp-fish-handle-file-attributes.
  
 -2010-05-10  Glenn Morris  <rgm@gnu.org>
 +      * net/trampver.el: Update release number.
  
 -      * desktop.el (desktop-save-buffer-p): Don't mistakenly include
 -      all dired buffers, even tramp ones.  (Bug#5755)  [Backport from trunk]
 +2010-04-10  Glenn Morris  <rgm@gnu.org>
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +      * progmodes/compile.el (compilation-save-buffers-predicate):
 +      Add missing :version tag.
  
 -      * Version 23.2 released.
 +2010-04-09  Sam Steingold  <sds@gnu.org>
  
 -2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
 +      * progmodes/compile.el (compilation-save-buffers-predicate):
 +      Remove the "autoload" cookie.
  
 -      * international/mule.el (auto-coding-alist): Only purecopy
 -      car of each item, not the whole list (Bug#6083).
 +      * progmodes/bug-reference.el (turn-on-bug-reference-mode)
 +      (turn-on-bug-reference-prog-mode): Remove, `bug-reference-mode'
 +      and `bug-reference-prog-mode' can be used in hooks directly.
  
 -2010-05-02  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-09  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * progmodes/js.el (js-mode): Make paragraph variables local before
 -      calling c-setup-paragraph-variables (Bug#6071).
 +      Add --author support to git commit.
 +      * vc-git.el (vc-git-checkin): Pass extra-args to the commit command.
 +      (vc-git-log-edit-mode): New minor mode.
 +      (log-edit-mode, log-edit-extra-flags, log-edit-mode):
 +      New declarations.
  
 -2010-05-01  Eli Zaretskii  <eliz@gnu.org>
 +2010-04-09  Eric Raymond  <esr@snark.thyrsus.com>
  
 -      * composite.el (compose-region, reference-point-alist): Fix typos
 -      in the doc strings.
 +      * vc-hooks.el, vc-git.el: Improve documentation comments.
  
 -2010-04-28  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +2010-04-08  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * calc/calc-graph.el (calc-graph-plot): Use the proper form for
 -      gnuplot's "set" command.
 +      Fix some of the problems in defsubst* (bug#5728).
 +      * emacs-lisp/cl-macs.el (defsubst*): Don't substitute non-trivial args.
 +      (cl-defsubst-expand): Do the substitutions simultaneously (bug#5728).
  
 -2010-04-26  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-07  Sam Steingold  <sds@gnu.org>
  
 -      * abbrev.el (last-abbrev-text): Doc fix.
 -      (abbrev-prefix-mark): Don't escape parenthesis.
 +      * progmodes/compile.el (compilation-save-buffers-predicate):
 +      New custom variable.
 +      (compile, recompile): Pass it to `save-some-buffers'.
  
 -2010-04-24  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-07  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * composite.el (find-composition): Doc fix.
 +      * wid-edit.el (widget-choose): Move cursor to the second line of
 +      the buffer (Bug#5695).
  
 -2010-04-24  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * progmodes/sql.el (sql-electric-stuff): Fix typo in tag.
 -      (sql-oracle-program, sql-sqlite-options)
 -      (sql-query-placeholders-and-send): Doc fixes.
 -      (sql-set-product, sql-interactive-mode): Reflow docstrings.
 -      (sql-imenu-generic-expression, sql-buffer)
 -      (sql-mode-ansi-font-lock-keywords, sql-mode-oracle-font-lock-keywords)
 -      (sql-mode-postgres-font-lock-keywords, sql-mode-ms-font-lock-keywords)
 -      (sql-mode-sybase-font-lock-keywords)
 -      (sql-mode-informix-font-lock-keywords)
 -      (sql-mode-interbase-font-lock-keywords)
 -      (sql-mode-ingres-font-lock-keywords, sql-mode-solid-font-lock-keywords)
 -      (sql-mode-mysql-font-lock-keywords, sql-mode-sqlite-font-lock-keywords)
 -      (sql-mode-db2-font-lock-keywords, sql-mode-font-lock-keywords)
 -      (sql-product-feature, sql-highlight-product)
 -      (comint-line-beginning-position, sql-rename-buffer)
 -      (sql-toggle-pop-to-buffer-after-send-region)
 -      (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql, sql-solid)
 -      (sql-ingres, sql-ms, sql-postgres, sql-interbase, sql-db2, sql-linter):
 -      Fix typos in docstrings.
 +      Add new VC methods: vc-log-incoming and vc-log-outgoing.
 +      * vc.el (vc-print-log-setup-buttons): New function split out from
 +      vc-print-log-internal.
 +      (vc-log-internal-common): New function, a parametrized version of
 +      vc-print-log-internal.
 +      (vc-print-log-internal): Just call vc-log-internal-common with the
 +      right arguments.
 +      (vc-incoming-outgoing-internal):
 +      (vc-log-incoming, vc-log-outgoing): New functions.
 +      (vc-log-view-type): New permanent local variable.
  
 -2010-04-23  Juri Linkov  <juri@jurta.org>
 +      * vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing.
  
 -      * info.el (Info-fontify-node): Put Info-breadcrumbs to the `display'
 -      property instead of `invisible' and `after-string' (bug#5998).
 +      * vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead
 +      of the dynamic bound vc-short-log.
 +      (vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions.
  
 -2010-04-23  Juri Linkov  <juri@jurta.org>
 +      * vc-git.el (vc-git-log-outgoing): New function.
 +      (vc-git-log-view-mode): Use vc-log-view-type instead
 +      of the dynamic bound vc-short-log.
  
 -      * image-mode.el (image-mode-as-text): Fix typo in docstring.
 +      * vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead
 +      of the dynamic bound vc-short-log.  Highlight the tag.
 +      (vc-hg-log-incoming, vc-hg-log-outgoing): New functions.
 +      (vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode):
 +      (vc-hg-incoming-mode): Remove.
 +      (vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing.
  
 -2010-04-23  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * filecache.el (file-cache-add-directory-list)
 -      (file-cache-add-directory-recursively): Fix typos in docstrings.
 +      Fix default-directory for vc-root-diff.
 +      * vc.el (vc-root-diff): Bind default-directory to the root
 +      directory for the diff command.
  
 -2010-04-22  Kenichi Handa  <handa@m17n.org>
 +2010-04-07  Michael McNamara  <mac@mail.brushroad.com>
 +
 +      * progmodes/verilog-mode.el (verilog-forward-sexp):
 +      (verilog-calc-1): Support "disable fork" and "fork wait" multi
 +      word keywords, suggested by Steve Pearlmutter.
 +      (verilog-pretty-declarations): Support lineup of declarations in
 +      port lists.
 +      (verilog-skip-backward-comments, verilog-skip-forward-comment-p):
 +      fix bug for /* / comments.
 +      (verilog-backward-syntactic-ws, verilog-forward-syntactic-ws):
 +      Speed up and simplfy as this is never called with a bound.
 +      (verilog-pretty-declarations): Enhance to line up declarations
 +      inside a parameter list, suggested by Alan Morgan.
 +      (verilog-pretty-expr): Tune assignment regular expression match
 +      string for corner cases; also use markers instead of character
 +      number as indent changes the later.
 +
 +2010-04-07  Wilson Snyder  <wsnyder@wsnyder.org>
 +
 +      * progmodes/verilog-mode.el (verilog-type-keywords): Fix pulldown
 +      as missing keyword.
 +      (verilog-read-sub-decls-line): Fix comments in AUTO_TEMPLATE
 +      causing truncation of AUTOWIRE signals.  Reported by Bruce Tennant.
 +      (verilog-auto-inst, verilog-auto-inst-port): Add vl_mbits for
 +      AUTO_TEMPLATEs needing multiple array bits.  Suggested by Bruce
 +      Tennant.
 +      (verilog-keywords):
 +      (verilog-1800-2005-keywords, verilog-1800-2009-keywords): Add IEEE
 +      1800-2009 keywords, including "global.".
 +
 +2010-04-06  John Wiegley  <jwiegley@gmail.com>
 +
 +      * ido.el (ido-add-virtual-buffers-to-list): Fix duplicated names
 +      appearing in buffer list (if a live buffer name matched a recentf
 +      file basename).  Should use uniquify to offer a real solution.
 +
 +2010-04-06  John Wiegley  <jwiegley@gmail.com>
 +
 +      * ido.el (ido-use-virtual-buffers, ido-virtual): Move a ChangeLog
 +      comment to code, and add a :version tag.
 +      (ido-virtual-buffers): Move defvar to fix byte-compiler warning.
 +
 +2010-04-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Enable recentf-mode if using virtual buffers.
 +      * ido.el (recentf-list): Declare for byte-compiler.
 +      (ido-virtual-buffers): Move up to silence byte-compiler.  Add docstring.
 +      (ido-make-buffer-list): Simplify.
 +      (ido-add-virtual-buffers-to-list): Simplify.  Enable recentf-mode.
  
 -      * language/indian.el (gurmukhi-composable-pattern): Fix typo.
 -      (gujarati-composable-pattern): Fix typo.
 +2010-04-05  Juri Linkov  <juri@jurta.org>
  
 -2010-04-20  Kenichi Handa  <handa@m17n.org>
 +      Scrolling commands which scroll a line instead of full screen.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
  
 -      * language/indian.el (oriya-composable-pattern)
 -      (tamil-composable-pattern, malayalam-composable-pattern):
 -      Add two-part vowels to "v" (vowel sign).
 +      * simple.el (scroll-up-line, scroll-down-line): New commands.
 +      Put property isearch-scroll=t on them.
  
 -2010-04-20  Chong Yidong  <cyd@stupidchicken.com>
 +      * emulation/ws-mode.el (scroll-down-line, scroll-up-line):
 +      Remove commands.
  
 -      * files.el (copy-directory): Handle symlinks (Bug#5982).
 +2010-04-05  Juri Linkov  <juri@jurta.org>
  
 -      * progmodes/compile.el (compilation-next-error-function):
 -      Revert 2009-10-12 change (Bug#5983).
 +      Scrolling commands which do not signal errors at top/bottom.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
  
 -2010-04-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +      * simple.el (scroll-up-command, scroll-down-command): New commands.
 +      Put property isearch-scroll=t on them.
  
 -      * vc-hg.el (vc-hg-state): Use HGRCPATH, not HGRC.
 -      (vc-hg-working-revision): Likewise.  Use hg parents, not hg parent
 -      (Bug#5846).
 +      * bindings.el (global-map): Rebind [prior] from `scroll-down' to
 +      `scroll-down-command' and [next] from `scroll-up' to
 +      `scroll-up-command'.
  
 -2010-04-20  Glenn Morris  <rgm@gnu.org>
 +      * emulation/cua-base.el: Put property CUA=move on
 +      `scroll-up-command' and `scroll-down-command'.
 +      (cua--init-keymaps): Remap `scroll-up-command' to `cua-scroll-up'
 +      and `scroll-down-command' to `cua-scroll-down'.
  
 -      * emacs-lisp/lisp.el (lisp-completion-at-point): Give it a doc string.
 +2010-04-05  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * minibuffer.el (completion-at-point): Doc fix.
 +      * help.el (describe-mode): Return nil.
  
 -2010-04-17  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-04-04  John Wiegley  <jwiegley@gmail.com>
  
 -      Fix the version number for added files.
 -      * vc-hg.el (vc-hg-working-revision): Check if the file is
 -      registered after hg parent fails (Bug#5961).
 +      * ido.el (ido-use-virtual-buffers): New variable to indicate
 +      whether "virtual buffer" support is enabled for IDO.
 +      (ido-virtual): Face used to indicate virtual buffers in the list.
 +      (ido-buffer-internal): If a buffer is chosen, and no such buffer
 +      exists, but a virtual buffer of that name does (which would be why
 +      it was in the list), recreate the buffer by reopening the file.
 +      (ido-make-buffer-list): If virtual buffers are being used, call
 +      `ido-add-virtual-buffers-to-list' before the make list hook.
 +      (ido-virtual-buffers): New variable which contains a copy of the
 +      current contents of the `recentf-list', albeit pared down for the
 +      sake of speed, and with proper faces applied.
 +      (ido-add-virtual-buffers-to-list): Using the `recentf-list',
 +      create a list of "virtual buffers" to present to the user in
 +      addition to the currently open set.  Note that this logic could
 +      get rather slow if that list is too large.  With the default
 +      `recentf-max-saved-items' of 200, there is little speed penalty.
  
 -2010-04-17  Glenn Morris  <rgm@gnu.org>
 +2010-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * htmlfontify.el (htmlfontify-buffer)
 -      (htmlfontify-copy-and-link-dir): Autoload entry points.
 +      * font-lock.el: Require CL when compiling.
 +      (font-lock-turn-on-thing-lock): Use `case'.
  
 -2010-04-17  Magnus Henoch  <magnus.henoch@gmail.com>
 +2010-04-03  Eli Zaretskii  <eliz@gnu.org>
  
 -      * vc-hg.el (vc-hg-annotate-extract-revision-at-line): Expand file
 -      name relative to the project root (Bug#5960).
 +      * emacs-lisp/authors.el (authors-fixed-entries): Add entry for Eli
 +      Zaretskii.
  
 -2010-04-16  Glenn Morris  <rgm@gnu.org>
 +2010-04-02  Juri Linkov  <juri@jurta.org>
  
 -      * vc-git.el (vc-git-print-log): Doc fix.
 +      * ehelp.el (electric-help-orig-major-mode):
 +      New buffer-local variable.
 +      (electric-help-mode): Set it to original major-mode.  Doc fix.
 +      (with-electric-help): Use `electric-help-orig-major-mode' instead
 +      of (default-value 'major-mode).  Doc fix.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00069.html
  
 -2010-04-14  Óscar Fuentes  <ofv@wanadoo.es>
 +2010-04-02  Sam Steingold  <sds@gnu.org>
  
 -      * ido.el (ido-file-internal): Fix 2009-12-02 change.
 +      * vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling
 +      `vc-hg-command' with a list of flags.
  
 -2010-04-14  Christoph  <cschol2112@googlemail.com>  (tiny change)
 +      * progmodes/bug-reference.el (bug-reference-bug-regexp):
 +      Also accept "patch" and "RFE".
 +      (bug-reference-fontify): `bug-reference-url-format' can also be a
 +      function to be able to handle the bug kind.
 +      (turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode): Add.
  
 -      * progmodes/grep.el (grep-compute-defaults): Fix handling of host
 -      default settings (Bug#5928).
 +2010-04-02  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-04-10  Glenn Morris  <rgm@gnu.org>
 +      * tmm.el (tmm-get-keymap): Check with symbolp before passing
 +      value to fboundp, it may not be a symbol.
  
 -      * progmodes/fortran.el (fortran-match-and-skip-declaration):
 -      New function.
 -      (fortran-font-lock-keywords-3): Use it.  (Bug#1385)
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-04-07  Kenichi Handa  <handa@m17n.org>
 +      * cus-edit.el (custom-buffer-sort-alphabetically): Update :version.
  
 -      * language/indian.el (malayalam-composable-pattern): Fix previous
 -      change (add U+0D4D "SIGN VIRAMA").
 -      (oriya-composable-pattern): Add U+0B30 and fix typo in the regexp.
 -      (tamil-composable-pattern): Fix typo in the regexp.
 -      (telugu-composable-pattern): Fix U+0C4D and typo in the regexp.
 -      (kannada-composable-pattern): Fix U+0CB0 and typo in the regexp.
 -      (malayalam-composable-pattern): Fix U+0D4D and typo in the regexp.
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -2010-04-06  Chong Yidong  <cyd@stupidchicken.com>
 +      * simple.el (next-line, previous-line): Re-throw a signal
 +      with `signal' instead of using `ding'.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html
  
 -      * textmodes/tex-mode.el (latex-mode): Revert 2008-03-03 change to
 -      paragraph-separate (Bug#5821).
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -2010-04-05  Juri Linkov  <juri@jurta.org>
 +      * simple.el (keyboard-escape-quit): Raise deselecting the active
 +      region higher than exiting the minibuffer.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html
  
 -      Put breadcrumbs on overlay instead of inserting to buffer (bug#5809).
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -      * info.el (Info-find-node-2): Comment out code that skips
 -      breadcrumbs line.
 -      (Info-mouse-follow-link): New command.
 -      (Info-link-keymap): New keymap.
 -      (Info-breadcrumbs): Rename from `Info-insert-breadcrumbs'.
 -      Return a string with links instead of inserting breadcrumbs
 -      to the Info buffer.
 -      (Info-fontify-node): Comment out code that inserts breadcrumbs.
 -      Instead of putting the `invisible' text property over the Info
 -      header, make an overlay over the Info header with the `invisible'
 -      property and `after-string' set to the string returned by
 -      `Info-breadcrumbs'.
 +      * image.el (image-animated-p): Use `image-metadata' instead of
 +      `image-extension-data'.  Get GIF extenstion data from metadata
 +      property `extension-data'.
  
 -2010-04-03  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * help.el (help-window-setup-finish): Doc fix (Bug#5830).
 -      Reported by monkey@sandpframing.com.
 +      * simple.el (append-to-buffer): Simplify.
  
 -2010-03-30  Tomas Abrahamsson  <tab@lysator.liu.se>
 +2010-03-31  Tomas Abrahamsson  <tab@lysator.liu.se>
  
        * textmodes/artist.el (artist-mode): Fix typo in docstring.
        Reported by Alex Schröder <kensanata@gmail.com>.  (Bug#5807)
  
 -2010-03-30  Kenichi Handa  <handa@m17n.org>
 +2010-03-31  Kenichi Handa  <handa@m17n.org>
  
        * language/sinhala.el (composition-function-table): Fix regexp for
        the new Unicode specification.
        (telugu-composable-pattern): New variables to cope with the new
        Unicode specification.  Use them in composition-function-table.
  
 -2010-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        Make tmm-menubar work for the Buffers menu again (bug#5726).
        * tmm.el (tmm-prompt): Also handle keymap entries in the form of
        vectors rather than cons cells, as used in menu-bar-update-buffers.
  
 -2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * progmodes/js.el (js-auto-indent-flag, js-mode-map)
        (js-insert-and-indent): Revert 2009-08-15 change, restoring
  
        * mail/sendmail.el (mail-default-directory): Doc fix.
  
 -2010-03-27  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * mail/sendmail.el (mail-default-directory): Doc fix.
  
 -2010-03-27  Eli Zaretskii  <eliz@gnu.org>
 +2010-03-31  Eli Zaretskii  <eliz@gnu.org>
  
        * subr.el (version-regexp-alist, version-to-list)
        (version-list-<, version-list-=, version-list-<=)
        (version-list-not-zero, version<, version<=, version=): Doc fix.
        (Bug#5744).
  
 -2010-03-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 -            Nick Roberts  <nickrob@snap.net.nz>
 -
 -      * progmodes/gdb-ui.el (gdb-apple-test): New function.
 -      (gdb-init-1): Use it.
 -
 -2010-02-10  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-02-31  Dan Nicolaescu  <dann@ics.uci.edu>
  
        * vc.el (vc-root-diff): Doc fix.
  
 -2010-03-25  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * vc.el (vc-print-log, vc-print-root-log): Doc fix.
  
        * simple.el (append-to-buffer): Fix last change.
  
 -2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * simple.el (append-to-buffer): Ensure that point is preserved if
        BUFFER is the current buffer.  Suggested by YAMAMOTO Mitsuharu.
        (Bug#5749)
  
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.el (auto-mode-case-fold): Change default to t.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-x.el (dired-omit-mode): Doc fix.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (occur-accumulate-lines): Move occur-engine related
 +      functions `occur-accumulate-lines' and `occur-engine-add-prefix'
 +      to be located after `occur-engine'.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      Make occur handle multi-line matches cleanly with context.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html
 +
 +      * replace.el (occur-accumulate-lines): Add optional arg `pt'.
 +      (occur-engine): Add local variables `ret', `prev-after-lines',
 +      `prev-lines'.  Use more arguments for `occur-context-lines'.
 +      Set first elem of its returned list to `data', and the second elem
 +      to `prev-after-lines'.  Don't print the separator line.
 +      In the end, print remaining context after-lines.
 +      (occur-context-lines): Add new arguments `begpt', `endpt',
 +      `lines', `prev-lines', `prev-after-lines'.  Rewrite to combine
 +      after-lines of the previous match with before-lines of the
 +      current match and not overlap them.  Return a list with two
 +      values: the output line and the list of context after-lines.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (occur-accumulate-lines): Fix a bug where the first
 +      context line at the beginning of the buffer was missing.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.el: Make bidi-display-reordering safe variable for boolean
 +      values.
 +
 +2010-03-29  Phil Hagelberg  <phil@evri.com>
 +            Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * subr.el: Extend progress reporters to perform "spinning".
 +      (progress-reporter-update, progress-reporter-do-update):
 +      Handle non-numeric value arguments.
 +      (progress-reporter--pulse-characters): New var.
 +
 +2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/compile.el (compilation-start): Fix regexp detection
 +      of initial cd command (Bug#5771).
 +
 +2010-03-28  Stefan Guath  <stefan@automata.se>  (tiny change)
 +
 +      * find-dired.el (find-dired): Use read-directory-name (Bug#5777).
 +
 +2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
 +
 +      Restore GDB/MI fuctionality removed by 2009-12-29T07:15:34Z!nickrob@snap.net.nz.
 +      * progmodes/gdb-mi.el: Restore.
 +      * progmodes/gdb-ui.el: Remove.
 +      * progmodes/gud.el: Re-accommodate for gdb-mi.el.
 +
 +2010-03-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * desktop.el (desktop-save-buffer-p): Don't mistakenly include
 +      all dired buffers, even tramp ones.  (Bug#5755)
 +
 +2010-03-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Add "union tags" in mpc.el.
 +      * mpc.el: Remove backward compatibility code.
 +      (mpc-browser-tags): Change default.
 +      (mpc--find-memoize-union-tags): New var.
 +      (mpc-cmd-flush, mpc-cmd-special-tag-p): New fun.
 +      (mpc-cmd-find): Handle the case where the playlist does not exist.
 +      Handle union-tags.
 +      (mpc-cmd-list): Use mpc-cmd-special-tag-p.  Handle union-tags.
 +      (mpc-cmd-add): Use mpc-cmd-flush.
 +      (mpc-tagbrowser-tag-name): New fun.
 +      (mpc-tagbrowser-buf): Use it.
 +      (mpc-songs-refresh): Use cond.  Move to point-min as a fallback.
 +
  2010-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 +      Misc cleanup.
 +      * progmodes/make-mode.el (makefile-bsdmake-rule-action-regex):
 +      Use replace-regexp-in-string.
 +      (makefile-mode-abbrev-table): Merge defvar and define-abbrev-table.
 +      (makefile-imake-mode-syntax-table): Move init into defvar.
 +      (makefile-mode): Use define-derived-mode.
 +
        * progmodes/make-mode.el (makefile-rule-action-regex): Backtrack less.
        (makefile-make-font-lock-keywords): Adjust rule since submatch 1 may
        not be present any more.
        * faces.el (set-face-attribute): Fix typo in docstring.
        (face-valid-attribute-values): Reflow docstring.
  
 -2010-03-23  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * textmodes/flyspell.el (sgml-lexical-context): Autoload it (Bug#5752).
  
 -2010-03-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * indent.el (indent-for-tab-command): Doc fix.
  
 -2010-03-22  Juanma Barranquero  <lekktu@gmail.com>
 +2010-03-24  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-remove-stale-state-cache):
 +      Fix off-by-one error.  Fixes bug #5747.
 +
 +2010-03-24  Juanma Barranquero  <lekktu@gmail.com>
  
        * image-dired.el (image-dired-display-thumbs): Fix typo in docstring.
        (image-dired-read-comment): Doc fix.
        (reftex-cite-punctuation, reftex-search-unrecursed-path-first)
        (reftex-highlight-selection): Fix typos in docstrings.
  
 -2010-03-19  Juanma Barranquero  <lekktu@gmail.com>
 +2010-03-24  Juanma Barranquero  <lekktu@gmail.com>
  
        * minibuffer.el (completion-in-region-functions): Fix docstring typos.
  
 -2010-03-18  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * mail/rmail.el (rmail-highlight-face): Restore option deleted
        2008-02-13 without comment; mark it obsolete.
        (rmail-highlight-headers): Use rmail-highlight-face once more.
  
 -2010-03-16  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * woman.el (woman2-process-escapes): Only consume the newline if
        the filler character is on a line by itself (Bug#5729).
  
 -2010-03-16  Kenichi Handa  <handa@m17n.org>
 +2010-03-24  Kenichi Handa  <handa@m17n.org>
  
        * language/indian.el (devanagari-composable-pattern): Add more
        consonants.
  
 -2010-03-14  Michael Albinus  <michael.albinus@gmx.de>
 +2010-03-24  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/trampver.el: Update release number.
  
 -2010-03-13  Glenn Morris  <rgm@gnu.org>
 -
 -      * Makefile.in (ELCFILES): Add cedet/semantic/imenu.el.
 -
 -2010-03-13  Michael Albinus  <michael.albinus@gmx.de>
 +2010-03-24  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-find-executable):
        Use `tramp-get-connection-buffer'.  Make the regexp for checking
        (tramp-open-connection-setup-interactive-shell): Remove workaround
        for OpenSolaris bug, it is not needed anymore.
  
 -2010-03-12  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * emacs-lisp/cl-macs.el (defsubst*): Add autoload cookie.  (Bug#4427)
  
 -2010-03-11  Wilson Snyder  <wsnyder@wsnyder.org>
 +2010-03-24  Wilson Snyder  <wsnyder@wsnyder.org>
  
        * files.el (auto-mode-alist): Accept more verilog file patterns.
  
 +2010-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-dir.el (vc-dir-headers): Abbreviate the working dir.
 +
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc-bzr.el (vc-bzr-log-edit-mode): Add --fixes support to
 +      log-edit-before-checkin-process.
 +
 +      * vc.el (vc-modify-change-comment): Pass MODE to vc-start-logentry.
 +
 +      * vc.el, vc-bzr.el, vc-hg.el (log-edit-mode): Declare.
 +
 +      * vc-dispatcher.el (vc-start-logentry): Doc fix.
 +      (log-view-process-buffer, log-edit-extra-flags): Declare.
 +
 +      * log-edit.el (log-edit-before-checkin-process): Doc fix.
 +
 +2010-03-23  Sam Steingold  <sds@gnu.org>
 +
 +      Fix bug#5620: recalculate all markers on compilation buffer
 +      modifications, not on file modifications.
 +      * progmodes/compile.el (compilation-buffer-modtime): New buffer-local
 +      variable: the buffer modification time, for buffers not associated with
 +      files.
 +      (compilation-mode): Create it.
 +      (compilation-filter): Update it.
 +      (compilation-next-error-function): Use it instead of
 +      `visited-file-modtime' for timestamp.
 +
 +2010-03-23  Juri Linkov  <juri@jurta.org>
 +
 +      Implement Occur multi-line matches.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01044.html
 +
 +      * replace.el (occur): Doc fix.
 +      (occur-engine): Set `begpt' to the beginning of the first line.
 +      Set `endpt' to the end of the last match line.  At first, count
 +      line numbers between `origpt' and `begpt'.  Split out code from
 +      `out-line' variable to new let-bindings `match-prefix' and
 +      `match-str'.  In `out-line' add non-numeric prefix to all
 +      non-first lines of multi-line matches.  Finally, count lines
 +      between `begpt' and `endpt' and add to `lines'.
 +
 +2010-03-23  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (occur-accumulate-lines, occur-engine):
 +      Use `occur-engine-line' instead of duplicate code.
 +      (occur-engine-line): New function created from duplicate code
 +      in `occur-accumulate-lines' and `occur-engine'.
 +
 +      * replace.el (occur-engine-line): Add optional arg `keep-props'.
 +      (occur-accumulate-lines, occur-engine): Add arg `keep-props'.
 +
 +2010-03-23  Juri Linkov  <juri@jurta.org>
 +
 +      * finder.el: Remove TODO tasks.
 +
 +      * info.el (Info-finder-find-node): Add node "all"
 +      with all package info.  Handle a list of multiple keywords
 +      separated by comma.
 +      (info-finder): In interactive use with a prefix argument,
 +      use `completing-read-multiple' to read a list of keywords
 +      separated by comma.
 +
 +2010-03-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Add a new completion style `substring'.
 +      * minibuffer.el (completion-basic--pattern): New function.
 +      (completion-basic-try-completion, completion-basic-all-completions):
 +      Use it.
 +      (completion-substring--all-completions)
 +      (completion-substring-try-completion)
 +      (completion-substring-all-completions): New functions.
 +      (completion-styles-alist): New style `substring'.
 +
 +2010-03-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Get rid of .elc files after removal of the corresponding .el.
 +      * Makefile.in (compile-clean): New target.
 +      (compile-main): Use it.
 +
 +2010-03-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * Makefile.in (compile-main): cd to $(lisp) in a sub-shell, so we
 +      don't do make there.  When compiling with separate object dir, there
 +      is no Makefile there.
 +
 +2010-03-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Get rid of the ELCFILES abomination, again.
 +      * Makefile.in (update-elclist, ELCFILES, compile-last): Remove.
 +      (all, compile): Don't call compile-last.
 +      (compile-main): Build the "elcfiles" list dynamically.
 +      (compile-targets): New (internal) target.
 +
 +2010-03-21  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (top_srcdir): Define.
 +      (abs_top_builddir): Define.
 +      (srcdir): Don't append `/..'.
 +      (EMACS): Use ${abs_top_builddir}.
 +      (all, compile, compile-always, compile-last): Don't set emacswd.
 +      (update-subdirs, update-authors): Use $(top_srcdir) instead of
 +      $(srcdir).
 +      (lisp): Use $(srcdir) instead of @srcdir@.
 +
 +2010-03-21  Juri Linkov  <juri@jurta.org>
 +
 +      Fix message of multi-line occur regexps and multi-buffer header lines.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00457.html
 +
 +      * replace.el (occur-1): Don't display regexp if it is longer
 +      than window-width.  Use `query-replace-descr' to display regexp.
 +      (occur-engine): Don't display regexp in the buffer header for
 +      multi-buffer occur.  Display a separate header line with total
 +      match count and regexp for multi-buffer occur.
 +      Use `query-replace-descr' to display regexp.
 +
 +2010-03-20  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/secrets.el: Fix parenthesis.
 +      (secrets-enabled): Fix parenthesis.
 +
 +2010-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Use more relative file and directory names.
 +      * Makefile.in (EMACS): Arrange for it to work when we chdir.
 +      (setwins, setwins_almost, setwins_for_subdirs):
 +      Don't `cd'; output relative names.
 +      (all, compile, compile-always, compile-last): Set emacswd.
 +      (custom-deps, finder-data, autoloads, update-subdirs, compile-last):
 +      Just cd to the lisp source dir so we can use relative file names.
 +
 +      * outline.el (hide-sublevels): Unfix the paren non-typo! (bug#5738).
 +
 +2010-03-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * textmodes/rst.el: Use faces for font-lock customization, and make the
 +      old -face variables obsolete.
 +      (rst-block, rst-external, rst-definition, rst-directive, rst-comment)
 +      (rst-emphasis1, rst-emphasis2, rst-literal, rst-reference): New faces.
 +      (rst-block-face, rst-external-face, rst-definition-face)
 +      (rst-directive-face, rst-comment-face, rst-emphasis1-face)
 +      (rst-emphasis2-face, rst-literal-face, rst-reference-face):
 +      Make obsolete.
 +      (rst-font-lock-keywords-function): Update for above changes.
 +
 +2010-03-20  Juri Linkov  <juri@jurta.org>
 +
 +      * s-region.el:
 +      * obsolete/s-region.el: Move to obsolete.
 +
 +2010-03-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * vc-dispatcher.el (vc-do-command): Remove reference to `vc-path'.
 +
 +2010-03-19  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vc-hooks.el (vc-path): Remove variable and obsolete declaration.
 +
 +2010-03-19  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add special markup processing for commit logs.
 +      * log-edit.el (log-edit-extra-flags): New variable.
 +      (log-edit): Add new argument MODE.  Use that mode when non-nil
 +      instead of the log-view-mode.
 +      (log-view-process-buffer): New function.
 +
 +      * vc.el: Document that the checkin method takes optional
 +      arguments.  Document new backend specific method: log-view-mode.
 +      (vc-default-log-edit-mode): New function.
 +      (vc-checkin): Use a backend specific log-view-mode.
 +      Pass extra arguments to the checkin method.
 +      (vc-modify-change-comment): Pass a dummy extra argument.
 +
 +      * vc-dispatcher.el (vc-log-edit): Add a mode argument, pass it to
 +      log-edit.
 +      (vc-start-logentry): Add a mode argument, pass it to vc-log-edit.
 +      (vc-finish-logentry): Process the log buffer before passing it
 +      down.  Pass log-edit-extra-flags.
 +
 +      * vc-bzr.el (vc-bzr-checkin): Pass extra arguments to the commit
 +      command.
 +      (log-edit-extra-flags, log-edit-before-checkin-process):
 +      New declarations.
 +
 +      * vc-hg.el (vc-hg-checkin): Pass extra arguments to the commit
 +      command.
 +      (log-edit-extra-flags, log-edit-before-checkin-process):
 +      New declarations.
 +      (vc-hg-log-edit-mode): New derived mode.
 +
 +      * vc-arch.el (vc-arch-checkin):
 +      * vc-cvs.el (vc-cvs-checkin):
 +      * vc-git.el (vc-git-checkin):
 +      * vc-mtn.el (vc-mtn-checkin):
 +      * vc-rcs.el (vc-rcs-checkin):
 +      * vc-sccs.el (vc-sccs-checkin):
 +      * vc-svn.el (vc-svn-checkin): Add an optional ignored argument.
 +
 +2010-03-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * outline.el (hide-sublevels): Don't hide trailing newline (and fix
 +      parent typo).
 +
 +2010-03-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * password-cache.el (password-cache, password-cache-expiry): Autoload.
 +
 +2010-03-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/autoload.el (autoload-rubric): Doc fix.
 +
 +      * replace.el (query-replace-history): Give it a doc string.
 +      (map-query-replace-regexp): Use query-replace-from-history-variable
 +      and query-replace-to-history-variable.
 +
 +      * mail/hashcash.el (declare-function): Remove duplicate definition.
 +
 +      * mail/emacsbug.el (report-emacs-bug-pretest-address):
 +      Make it an obsolete alias for report-emacs-bug-address.
 +      (message-strip-special-text-properties): Declare.
 +      (report-emacs-bug): Remove test for a pretest bug address.
 +      Combine message-mode-specific code.
 +
 +      * mail/supercite.el: Don't require sendmail.
 +      (mh-in-header-p): Declare rather than using with-no-warnings.
 +      (sc-no-blank-line-or-header): Use rfc822-goto-eoh rather than
 +      mail-header-end.  Don't bind mysterious variable `kill-lines-magic'.
 +
 +      * calendar/cal-french.el: Convert to utf-8.
 +
 +      * files.el (interpreter-mode-alist): Use emacs-lisp-mode for
 +      Emacs scripts.
 +
 +2010-03-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/secrets.el (secrets-enabled): New variable.  Use it instead
 +      of a subfeature.
 +
 +2010-03-15  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/secrets.el (top): Register the D-Bus signals only when the
 +      service "org.freedesktop.secrets" can be pinged.
 +      Provide subfeature `enabled'.
 +
 +2010-03-14  Juri Linkov  <juri@jurta.org>
 +
 +      Add finder unknown keywords.
 +
 +      * finder.el (finder-unknown-keywords): New function.
 +
 +      * info.el (Info-finder-find-node): Use `finder-unknown-keywords'
 +      to create a Finder node with unknown keywords.
 +
 +2010-03-14  Juri Linkov  <juri@jurta.org>
 +
 +      * finder.el (finder-compile-keywords): Replace `princ' with
 +      `prin1' on a list of symbols interned from keyword strings.
 +
 +      * emacs-lisp/lisp-mnt.el (lm-keywords-list): If `keywords' contains
 +      a comma, then split keywords using a comma and optional whitespace.
 +      Otherwise, split by whitespace.
 +
 +      * complete.el:
 +      * face-remap.el:
 +      * log-view.el:
 +      * net/hmac-def.el:
 +      * net/hmac-md5.el:
 +      * net/netrc.el:
 +      * progmodes/mixal-mode.el: Fix keywords.
 +
 +2010-03-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * Makefile.in (ELCFILES): Add net/secrets.elc.
 +
 +      * net/secrets.el: New file.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * facemenu.el (list-colors-display, list-colors-print): New arg
 +      callback.  Use it to allow selecting colors.
 +
 +      * wid-edit.el (widget-image-insert): Insert image prop even if the
 +      current display is non-graphic.
 +      (widget-field-value-set): New fun.
 +      (editable-field): Use it.
 +      (widget-field-value-get): Clean up unused var.
 +      (widget-color-value-create, widget-color--choose-action):
 +      New funs.  Allow using list-colors-display to choose color.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el: Resort topmost custom groups.
 +      (custom-buffer-sort-alphabetically): Default to t.
 +      (customize-apropos): Use apropos-parse-pattern.
 +      (custom-search-field): New var.
 +      (custom-buffer-create-internal): Add custom-apropos search field.
 +      (custom-add-parent-links): Don't display parent doc.
 +      (custom-group-value-create): Don't sort top-level custom group.
 +      (custom-magic-value-create): Show visibility button before option name.
 +
 +      (custom-variable-state): New fun, from custom-variable-state-set.
 +      (custom-variable-state-set): Use it.
 +      (custom-group-value-create): Hide options with standard values
 +      using the :hidden-states property.  Use progress reporter.
 +
 +      (custom-show): Simplify.
 +      (custom-visibility): Disable images by default.
 +      (custom-variable): New property :hidden-states.
 +      (custom-variable-value-create): Enable images for
 +      custom-visibility widgets.  Use :hidden-states property to
 +      determine initial visibility.
 +
 +      * wid-edit.el (widget-image-find): Give images center ascent.
 +      (visibility): Add :on-image and :off-image properties.
 +      (widget-visibility-value-create): Use them.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (processes): Remove from development group.
 +      (oop, hypermedia): Delete group.
 +      (comm): Promote to top-level group.
 +
 +      * net/browse-url.el (browse-url):
 +      * net/xesam.el (xesam):
 +      * net/tramp.el (tramp):
 +      * net/goto-addr.el (goto-address):
 +      * net/ange-ftp.el (ange-ftp): Put in comm group.
 +
 +      * view.el (view): Remove from editing group.
 +
 +      * uniquify.el (uniquify): Put in files group.
 +
 +      * net/browse-url.el (browse-url):
 +      * ps-print.el (postscript): Put in external group.
 +
 +      * cus-edit.el (outlines):
 +      * textmodes/text-mode.el (text-mode-hook):
 +      * textmodes/table.el (table):
 +      * textmodes/picture.el (picture):
 +      * outline.el (outlines): Put in wp group.
 +
 +      * nxml/nxml-mode.el (nxml): Remove from wp group.
 +
 +      * net/tramp-imap.el (tramp-imap): Put in tramp group.
 +
 +      * mail/metamail.el (metamail): Remove from hypermedia group.
 +
 +      * cus-edit.el (abbrev):
 +      * whitespace.el (whitespace):
 +      * vcursor.el (vcursor):
 +      * reveal.el (reveal):
 +      * hl-line.el (hl-line): Put in convenience group.
 +
 +      * epg-config.el (epg): Put in data group.
 +
 +      * emulation/pc-select.el (pc-select): Put in emulations group.
 +
 +      * calculator.el (calculator): Put in applications group.
 +
 +2010-03-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add .dir-locals.el support for file-less buffers.
 +      * files.el (hack-local-variables): Split out code to apply local
 +      variable settings ...
 +      (hack-local-variables-apply): ... here.  New function.
 +      (hack-dir-local-variables): Use the default directory for when the
 +      buffer does not have an associated file.
 +      (hack-dir-local-variables-non-file-buffer): New function.
 +      * diff-mode.el (diff-mode):
 +      * vc-annotate.el (vc-annotate-mode):
 +      * vc-dir.el (vc-dir-mode):
 +      * log-edit.el (log-edit-mode):
 +      * log-view.el (log-view-mode): Call hack-dir-local-variables-non-file-buffer.
 +
 +2010-03-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add support for shelving snapshots and for showing shelves.
 +      * vc-bzr.el (vc-bzr-shelve-show, vc-bzr-shelve-show-at-point)
 +      (vc-bzr-shelve-apply-and-keep-at-point, vc-bzr-shelve-snapshot):
 +      New functions.
 +      (vc-bzr-shelve-map, vc-bzr-shelve-menu-map)
 +      (vc-bzr-extra-menu-map): Map them.
 +
 +2010-03-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * cus-edit.el (customize-changed-options-previous-release):
 +      Bump to 23.1.
 +
 +      * image.el (image-animate-max-time): Fix :version tag.
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
 +2010-03-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-git.el (vc-git-revision-table): Include remote branches.
 +
 +2010-03-10  Kim F. Storm  <storm@cua.dk>
 +
 +      Animated image API.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00211.html
 +
 +      * image.el (image-animate-max-time): New defcustom.
 +      (image-animated-types): New defconst.
 +      (create-animated-image, image-animate-timer)
 +      (image-animate-start, image-animate-stop, image-animate-timeout)
 +      (image-animated-p): New functions.
 +
 +      * image-mode.el (image-toggle-display-image):
 +      Replace `create-image' with `create-animated-image'.
 +
  2010-03-09  Miles Bader  <miles@gnu.org>
  
        * vc-git.el (vc-git-print-log): Use "tformat:" for shortlog,
        * files.el (hack-local-variables-filter): For eval forms, also
        check safe-local-variable-p (Bug#5636).
  
 -2010-02-24  Eduard Wiebe  <usenet@pusto.de>
 -
 -      * javascript.el (wisent-javascript-jv-expand-tag): Avoid c(ad)ddr
 -      and use c(ad)r of cddr (Bug#5640).
 -
  2010-02-22  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect
  2010-02-03  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/ange-ftp.el (ange-ftp-insert-directory): Parse directory
 -      also in case of (and (not full) (not wildcard)). This is needed,
 +      also in case of (and (not full) (not wildcard)).  This is needed
        when dired is called with a list of files, which are not in
        `default-directory'.  (Bug#5478)
  
  
        * vc-bzr.el (vc-bzr-revision-table): New function.
  
 -2010-01-25  Eric Hanchrow  <eric.hanchrow@gmail.com>  (tiny change)
 +2010-01-25  Eric Hanchrow  <eric.hanchrow@gmail.com>
  
        * vc-git.el (vc-git-dir-status-goto-stage): Pass --relative to the
        diff-index command.  This requires at least git-1.5.5.  (Bug#1589).
  
  2010-01-02  Karl Fogel  <kfogel@red-bean.com>
  
 -      * bookmark.el (bookmark-bmenu-any-marks): New function
 +      * bookmark.el (bookmark-bmenu-any-marks): New function.
        (bookmark-bmenu-save): Clear buffer modification if no marks.
  
  2010-01-02  Karl Fogel  <kfogel@red-bean.com>
  
  2009-12-17  Juri Linkov  <juri@jurta.org>
  
 -      Make `dired-diff' more safe.  (Bug#5225)
 +      Make `dired-diff' safer.  (Bug#5225)
  
        * dired-aux.el (dired-diff): Signal an error when `file' equals to
        `current' or when `file' is a directory of the `current' file.
  
  2009-12-09  Vivek Dasmohapatra  <vivek@etla.org>
  
 -      Drop some properties to avoid surprises.
 +      Drop some properties to avoid surprises (bug#5002).
        * htmlfontify.el (hfy-ignored-properties): New defcustom.
        (hfy-fontify-buffer): Use it.
  
        * Makefile.in (ELCFILES): Adapt to subword.el move.
  
  2009-11-21  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 -          Stefan Monnier  <monnier@iro.umontreal.ca>
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * bookmark.el (bookmark-bmenu-bookmark-column): Remove var.
        (bookmark-bmenu-list): Save name on `bookmark-name-prop' text-prop.
        (tar-header-block-tokenize): Decode the username and groupname.
        (tar-chown-entry, tar-chgrp-entry): Encode the names (bug#4730).
  
 +2009-10-17  Eric Ludlam  <zappo@gnu.org>
 +
 +      * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer
 +      contains multibyte characters, choose first applicable coding
 +      system automatically.
 +
  2009-10-17  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * international/mule-cmds.el (select-safe-coding-system): If the file
        * term/w32-win.el (setup-default-fontset, set-fontset-font):
        Remove unused declarations.
  
 +2009-09-30  Eric Ludlam  <zappo@gnu.org>
 +
 +      * emacs-lisp/eieio.el (boolean-p): Delete.
 +
  2009-09-30  Glenn Morris  <rgm@gnu.org>
  
        * emacs-lisp/authors.el (authors-ignored-files): Add "js2-mode.el".
  
        * net/tramp-imap.el: New package.
  
 +2009-09-28  Eric Ludlam  <zappo@gnu.org>
 +
 +      * emacs-lisp/chart.el:
 +      * emacs-lisp/eieio-base.el:
 +      * emacs-lisp/eieio-comp.el:
 +      * emacs-lisp/eieio-custom.el:
 +      * emacs-lisp/eieio-datadebug.el:
 +      * emacs-lisp/eieio-opt.el:
 +      * emacs-lisp/eieio-speedbar.el:
 +      * emacs-lisp/eieio.el: New files.
 +
  2009-09-27  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
  
        * whitespace.el (whitespace-trailing-regexp)
  
        * textmodes/fill.el: Convert to utf-8 encoding.
        (fill-french-nobreak-p): Remove redundant » and « inherited from our
 -      pre-unicode days.
 +      pre-Unicode days.
  
        * add-log.el (change-log-fill-forward-paragraph): New function.
        (change-log-mode): Use it so fill-region DTRT.
        indent buffer only if called interactively (Bug#4452).
  
  2009-09-19  Juanma Barranquero  <lekktu@gmail.com>
 -          Eli Zaretskii  <eliz@gnu.org>
 +            Eli Zaretskii  <eliz@gnu.org>
  
        This fixes bug#4197 (merged to bug#865, though not identical).
        * server.el (server-auth-dir): Add docstring note about FAT32.
        Don't call substitute-in-file-name on diary-file.
  
  2009-09-03  Eduard Wiebe  <usenet@pusto.de>
 -          Stefan Monnier  <monnier@iro.umontreal.ca>
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * mail/footnote.el (footnote-prefix): Make it a defcustom.
        (footnote-mode-map): Move initialization into the declaration.
        * progmodes/hideshow.el (hs-special-modes-alist): Add js-mode entry.
  
  2009-08-14  Daniel Colascione  <dan.colascione@gmail.com>
 -          Karl Landstrom  <karl.landstrom@brgeight.se>
 +            Karl Landstrom  <karl.landstrom@brgeight.se>
  
        * progmodes/js.el: New file.
  
        XZ is the successor to LZMA: <http://tukaani.org/xz/>
  
  2009-06-22  Dmitry Dzhus  <dima@sphinx.net.ru>
 -          Nick Roberts  <nickrob@snap.net.nz>
 +            Nick Roberts  <nickrob@snap.net.nz>
  
        * progmodes/gdb-mi.el: Pull further modified changes from Dmitry's
        repository (http://sphinx.net.ru/hg/gdb-mi/).
@@@ -20285,7 -12343,7 +20401,7 @@@ See ChangeLog.14 for earlier changes
  ;; coding: utf-8
  ;; End:
  
-   Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011  Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
  
    You should have received a copy of the GNU General Public License
    along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 -
index 6bf50db5442559cae03555eb98c87dabfbaca42a,ec2847fafe09277fcecb0f18b7195398b58fd985..09b28cca7fe9e209c8884acf04e6caa83d56d41f
@@@ -6,7 -6,6 +6,7 @@@
  ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com>
  ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com>
  ;; Keywords: emulations
 +;; Package: edt
  
  ;; This file is part of GNU Emacs.
  
      (setq edt-term nil)
    (setq edt-term (getenv "TERM")))
  
+ ;;;
+ ;;; Implements a workaround for a feature that was added to simple.el.
+ ;;;
+ ;;; Many function keys have no Emacs functions assigned to them by
+ ;;; default. A subset of these are typically assigned functions in the
+ ;;; EDT emulation. This includes all the keypad keys and a some others
+ ;;; like Delete.
+ ;;;
+ ;;; Logic in simple.el maps some of these unassigned function keys to
+ ;;; ordinary typing keys.  Where this is the case, a call to
+ ;;; read-key-sequence, below, does not return the name of the function
+ ;;; key pressd by the user but, instead, it returns the name of the
+ ;;; key to which it has been mapped.  It needs to know the name of the
+ ;;; key pressed by the user. As a workaround, we assign a function to
+ ;;; each of the unassigned function keys of interest, here.  These
+ ;;; assignments override the mapping to other keys and are only
+ ;;; temporary since, when edt-mapper is finished executing, it causes
+ ;;; Emacs to exit.
+ ;;;
+ (mapc
+  (lambda (function-key)
+    (if (not (lookup-key (current-global-map) function-key))
+        (define-key (current-global-map) function-key 'forward-char)))
+  '([kp-0] [kp-1] [kp-2] [kp-3] [kp-4]
+    [kp-5] [kp-6] [kp-7] [kp-8] [kp-9]
+    [kp-space]
+    [kp-tab]
+    [kp-enter]
+    [kp-multiply]
+    [kp-add]
+    [kp-separator]
+    [kp-subtract]
+    [kp-decimal]
+    [kp-divide]
+    [kp-equal]
+    [backspace]
+    [delete]
+    [tab]
+    [linefeed]
+    [clear]))
  ;;;
  ;;;  Make sure the window is big enough to display the instructions,
  ;;;  except where window cannot be re-sized.
diff --combined lisp/eshell/em-hist.el
index 1f6442613378860b66add8cf3791d2370ba2ca9d,7f2e3b4b1a5f381c6f71b4953353996abe1899e1..82c9b0ccfc31df6cd711bc84e051320f9b9d2a08
@@@ -72,7 -72,7 +72,7 @@@
  ;;; User Variables:
  
  (defcustom eshell-hist-load-hook '(eshell-hist-initialize)
 -  "*A list of functions to call when loading `eshell-hist'."
 +  "A list of functions to call when loading `eshell-hist'."
    :type 'hook
    :group 'eshell-hist)
  
     (function
      (lambda ()
        (remove-hook 'kill-emacs-hook 'eshell-save-some-history))))
 -  "*A hook that gets run when `eshell-hist' is unloaded."
 +  "A hook that gets run when `eshell-hist' is unloaded."
    :type 'hook
    :group 'eshell-hist)
  
  (defcustom eshell-history-file-name
    (expand-file-name "history" eshell-directory-name)
 -  "*If non-nil, name of the file to read/write input history.
 +  "If non-nil, name of the file to read/write input history.
  See also `eshell-read-history' and `eshell-write-history'.
  If it is nil, Eshell will use the value of HISTFILE."
    :type 'file
    :group 'eshell-hist)
  
  (defcustom eshell-history-size 128
 -  "*Size of the input history ring.  If nil, use envvar HISTSIZE."
 +  "Size of the input history ring.  If nil, use envvar HISTSIZE."
    :type 'integer
    :group 'eshell-hist)
  
  (defcustom eshell-hist-ignoredups nil
 -  "*If non-nil, don't add input matching the last on the input ring.
 +  "If non-nil, don't add input matching the last on the input ring.
  This mirrors the optional behavior of bash."
    :type 'boolean
    :group 'eshell-hist)
  
  (defcustom eshell-save-history-on-exit t
 -  "*Determine if history should be automatically saved.
 +  "Determine if history should be automatically saved.
  History is always preserved after sanely exiting an Eshell buffer.
  However, when Emacs is being shut down, this variable determines
  whether to prompt the user.
@@@ -121,7 -121,7 +121,7 @@@ If set to t, history will always be sav
    (function
     (lambda (str)
       (not (string-match "\\`\\s-*\\'" str))))
 -  "*Predicate for filtering additions to input history.
 +  "Predicate for filtering additions to input history.
  Takes one argument, the input.  If non-nil, the input may be saved on
  the input history list.  Default is to save anything that isn't all
  whitespace."
  (put 'eshell-input-filter 'risky-local-variable t)
  
  (defcustom eshell-hist-match-partial t
 -  "*If non-nil, movement through history is constrained by current input.
 +  "If non-nil, movement through history is constrained by current input.
  Otherwise, typing <M-p> and <M-n> will always go to the next history
  element, regardless of any text on the command line.  In that case,
  <C-c M-r> and <C-c M-s> still offer that functionality."
    :group 'eshell-hist)
  
  (defcustom eshell-hist-move-to-end t
 -  "*If non-nil, move to the end of the buffer before cycling history."
 +  "If non-nil, move to the end of the buffer before cycling history."
    :type 'boolean
    :group 'eshell-hist)
  
  (defcustom eshell-hist-event-designator
    "^!\\(!\\|-?[0-9]+\\|\\??[^:^$%*?]+\\??\\|#\\)"
 -  "*The regexp used to identifier history event designators."
 +  "The regexp used to identifier history event designators."
    :type 'regexp
    :group 'eshell-hist)
  
  (defcustom eshell-hist-word-designator
    "^:?\\([0-9]+\\|[$^%*]\\)?\\(\\*\\|-[0-9]*\\|[$^%*]\\)?"
 -  "*The regexp used to identify history word designators."
 +  "The regexp used to identify history word designators."
    :type 'regexp
    :group 'eshell-hist)
  
  (defcustom eshell-hist-modifier
    "^\\(:\\([hretpqx&g]\\|s/\\([^/]*\\)/\\([^/]*\\)/\\)\\)*"
 -  "*The regexp used to identity history modifiers."
 +  "The regexp used to identity history modifiers."
    :type 'regexp
    :group 'eshell-hist)
  
      ([(meta ?n)]      . eshell-next-matching-input-from-input)
      ([up]             . eshell-previous-matching-input-from-input)
      ([down]           . eshell-next-matching-input-from-input))
 -  "*History keys to bind differently if point is in input text."
 +  "History keys to bind differently if point is in input text."
    :type '(repeat (cons (vector :tag "Keys to bind"
                               (repeat :inline t sexp))
                       (function :tag "Command")))
@@@ -837,6 -837,8 +837,8 @@@ With prefix argument N, search for Nth 
  If N is negative, find the next or Nth next match."
    (interactive (eshell-regexp-arg "Previous input matching (regexp): "))
    (setq arg (eshell-search-arg arg))
+   (if (> eshell-last-output-end (point))
+       (error "Point not located after prompt"))
    (let ((pos (eshell-previous-matching-input-string-position regexp arg)))
      ;; Has a match been found?
      (if (null pos)
        (setq eshell-history-index pos)
        (unless (minibuffer-window-active-p (selected-window))
        (message "History item: %d" (- (ring-length eshell-history-ring) pos)))
-        ;; Can't use kill-region as it sets this-command
+       ;; Can't use kill-region as it sets this-command
        (delete-region eshell-last-output-end (point))
        (insert-and-inherit (eshell-get-history pos)))))
  
diff --combined lisp/files.el
index 76526de1c0a931f16ce041a72949860d47370c36,690caf1396051dcb091b3a2568a891dbee389e2b..1383c90dcb6ae0ed0189839fa84ff5772c43ea66
@@@ -1,11 -1,10 +1,11 @@@
  ;;; files.el --- file input and output commands for Emacs
  
  ;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996,
- ;;   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- ;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+ ;;   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ ;;   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
  
  ;; Maintainer: FSF
 +;; Package: emacs
  
  ;; This file is part of GNU Emacs.
  
@@@ -115,14 -114,13 +115,14 @@@ This variable is relevant only if `back
    :type 'boolean
    :group 'backup)
  
 -(defcustom backup-by-copying-when-mismatch nil
 +(defcustom backup-by-copying-when-mismatch t
    "Non-nil means create backups by copying if this preserves owner or group.
  Renaming may still be used (subject to control of other variables)
  when it would not result in changing the owner or group of the file;
  that is, for files which are owned by you and whose group matches
  the default for a new file created there by you.
  This variable is relevant only if `backup-by-copying' is nil."
 +  :version "24.1"
    :type 'boolean
    :group 'backup)
  (put 'backup-by-copying-when-mismatch 'permanent-local t)
@@@ -190,6 -188,17 +190,6 @@@ If the buffer is visiting a new file, t
    "Non-nil if visited file was read-only when visited.")
  (make-variable-buffer-local 'buffer-file-read-only)
  
 -(defcustom temporary-file-directory
 -  (file-name-as-directory
 -   (cond ((memq system-type '(ms-dos windows-nt))
 -        (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp"))
 -       (t
 -        (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
 -  "The directory for writing temporary files."
 -  :group 'files
 -  :initialize 'custom-initialize-delay
 -  :type 'directory)
 -
  (defcustom small-temporary-file-directory
    (if (eq system-type 'ms-dos) (getenv "TMPDIR"))
    "The directory for writing small temporary files.
@@@ -566,9 -575,6 +566,9 @@@ Runs the usual ange-ftp hook, but only 
          (inhibit-file-name-operation op))
        (apply op args))))
  
 +(declare-function dos-convert-standard-filename "dos-fns.el" (filename))
 +(declare-function w32-convert-standard-filename "w32-fns.el" (filename))
 +
  (defun convert-standard-filename (filename)
    "Convert a standard file's name to something suitable for the OS.
  This means to guarantee valid names and perhaps to canonicalize
@@@ -586,20 -592,15 +586,20 @@@ and also turn slashes into backslashes 
  `w32-shell-dos-semantics').
  
  See Info node `(elisp)Standard File Names' for more details."
 -  (if (eq system-type 'cygwin)
 -      (let ((name (copy-sequence filename))
 -          (start 0))
 -      ;; Replace invalid filename characters with !
 -      (while (string-match "[?*:<>|\"\000-\037]" name start)
 -             (aset name (match-beginning 0) ?!)
 -        (setq start (match-end 0)))
 -      name)
 -    filename))
 +  (cond
 +   ((eq system-type 'cygwin)
 +    (let ((name (copy-sequence filename))
 +        (start 0))
 +      ;; Replace invalid filename characters with !
 +      (while (string-match "[?*:<>|\"\000-\037]" name start)
 +      (aset name (match-beginning 0) ?!)
 +      (setq start (match-end 0)))
 +      name))
 +   ((eq system-type 'windows-nt)
 +    (w32-convert-standard-filename filename))
 +   ((eq system-type 'ms-dos)
 +    (dos-convert-standard-filename filename))
 +   (t filename)))
  
  (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial)
    "Read directory name, prompting with PROMPT and completing in directory DIR.
@@@ -749,45 -750,21 +749,45 @@@ one or more of those symbols.
               (let ((x (file-name-directory suffix)))
                 (if x (1- (length x)) (length suffix))))))
     (t
 -    (let ((names nil)
 +    (let ((names '())
 +          ;; If we have files like "foo.el" and "foo.elc", we could load one of
 +          ;; them with "foo.el", "foo.elc", or "foo", where just "foo" is the
 +          ;; preferred way.  So if we list all 3, that gives a lot of redundant
 +          ;; entries for the poor soul looking just for "foo".  OTOH, sometimes
 +          ;; the user does want to pay attention to the extension.  We try to
 +          ;; diffuse this tension by stripping the suffix, except when the
 +          ;; result is a single element (i.e. usually we only list "foo" unless
 +          ;; it's the only remaining element in the list, in which case we do
 +          ;; list "foo", "foo.elc" and "foo.el").
 +          (fullnames '())
          (suffix (concat (regexp-opt suffixes t) "\\'"))
          (string-dir (file-name-directory string))
            (string-file (file-name-nondirectory string)))
        (dolist (dir dirs)
 -      (unless dir
 -        (setq dir default-directory))
 -      (if string-dir (setq dir (expand-file-name string-dir dir)))
 -      (when (file-directory-p dir)
 -        (dolist (file (file-name-all-completions
 -                       string-file dir))
 -          (push file names)
 -          (when (string-match suffix file)
 -            (setq file (substring file 0 (match-beginning 0)))
 -              (push file names)))))
 +        (unless dir
 +          (setq dir default-directory))
 +        (if string-dir (setq dir (expand-file-name string-dir dir)))
 +        (when (file-directory-p dir)
 +          (dolist (file (file-name-all-completions
 +                         string-file dir))
 +            (if (not (string-match suffix file))
 +                (push file names)
 +              (push file fullnames)
 +              (push (substring file 0 (match-beginning 0)) names)))))
 +      ;; Switching from names to names+fullnames creates a non-monotonicity
 +      ;; which can cause problems with things like partial-completion.
 +      ;; To minimize the problem, filter out completion-regexp-list, so that
 +      ;; M-x load-library RET t/x.e TAB finds some files.  Also remove elements
 +      ;; from `names' which only matched `string' when they still had
 +      ;; their suffix.
 +      (setq names (all-completions string names))
 +      ;; Remove duplicates of the first element, so that we can easily check
 +      ;; if `names' really only contains a single element.
 +      (when (cdr names) (setcdr names (delete (car names) (cdr names))))
 +      (unless (cdr names)
 +        ;; There's no more than one matching non-suffixed element, so expand
 +        ;; the list by adding the suffixed elements as well.
 +        (setq names (nconc names fullnames)))
        (completion-table-with-context
         string-dir names string-file pred action)))))
  
@@@ -926,36 -903,6 +926,36 @@@ to that remote system
        (funcall handler 'file-remote-p file identification connected)
        nil)))
  
 +(defcustom remote-file-name-inhibit-cache 10
 +  "Whether to use the remote file-name cache for read access.
 +
 +When `nil', always use the cached values.
 +When `t', never use them.
 +A number means use them for that amount of seconds since they were
 +cached.
 +
 +File attributes of remote files are cached for better performance.
 +If they are changed out of Emacs' control, the cached values
 +become invalid, and must be invalidated.
 +
 +In case a remote file is checked regularly, it might be
 +reasonable to let-bind this variable to a value less then the
 +time period between two checks.
 +Example:
 +
 +  \(defun display-time-file-nonempty-p \(file)
 +    \(let \(\(remote-file-name-inhibit-cache \(- display-time-interval 5)))
 +      \(and \(file-exists-p file)
 +           \(< 0 \(nth 7 \(file-attributes \(file-chase-links file)))))))"
 +  :group 'files
 +  :version "24.1"
 +  :type `(choice
 +        (const   :tag "Do not inhibit file name cache" nil)
 +        (const   :tag "Do not use file name cache" t)
 +        (integer :tag "Do not use file name cache"
 +                 :format "Do not use file name cache older then %v seconds"
 +                 :value 10)))
 +
  (defun file-local-copy (file)
    "Copy the file FILE into a temporary file on this machine.
  Returns the name of the local copy, or nil, if FILE is directly
@@@ -2213,7 -2160,7 +2213,7 @@@ in that case, this function acts as if 
    (if (fboundp 'ucs-set-table-for-input) ; don't lose when building
        (ucs-set-table-for-input)))
  
 -(defcustom auto-mode-case-fold nil
 +(defcustom auto-mode-case-fold t
    "Non-nil means to try second pass through `auto-mode-alist'.
  This means that if the first case-sensitive search through the alist fails
  to find a matching major mode, a second case-insensitive search is made.
@@@ -2232,16 -2179,7 +2232,16 @@@ since only a single case-insensitive se
     (lambda (elt)
       (cons (purecopy (car elt)) (cdr elt)))
     `(;; do this first, so that .html.pl is Polish html, not Perl
 -     ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
 +     ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
 +     ("\\.svgz?\\'" . image-mode)
 +     ("\\.svgz?\\'" . xml-mode)
 +     ("\\.x[bp]m\\'" . image-mode)
 +     ("\\.x[bp]m\\'" . c-mode)
 +     ("\\.p[bpgn]m\\'" . image-mode)
 +     ("\\.tiff?\\'" . image-mode)
 +     ("\\.gif\\'" . image-mode)
 +     ("\\.png\\'" . image-mode)
 +     ("\\.jpe?g\\'" . image-mode)
       ("\\.te?xt\\'" . text-mode)
       ("\\.[tT]e[xX]\\'" . tex-mode)
       ("\\.ins\\'" . tex-mode)         ;Installation files for TeX packages.
       ("\\.te?xi\\'" . texinfo-mode)
       ("\\.[sS]\\'" . asm-mode)
       ("\\.asm\\'" . asm-mode)
 +     ("\\.css\\'" . css-mode)
 +     ("\\.mixal\\'" . mixal-mode)
 +     ("\\.gcov\\'" . compilation-mode)
 +     ;; Besides .gdbinit, gdb documents other names to be usable for init
 +     ;; files, cross-debuggers can use something like
 +     ;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files
 +     ;; don't interfere with each other.
 +     ("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode)
       ("[cC]hange\\.?[lL]og?\\'" . change-log-mode)
       ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode)
       ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
       ("\\.cl[so]\\'" . latex-mode)            ;LaTeX 2e class option
       ("\\.bbl\\'" . latex-mode)
       ("\\.bib\\'" . bibtex-mode)
 +     ("\\.bst\\'" . bibtex-style-mode)
       ("\\.sql\\'" . sql-mode)
       ("\\.m[4c]\\'" . m4-mode)
       ("\\.mf\\'" . metafont-mode)
       ;; The list of archive file extensions should be in sync with
       ;; `auto-coding-alist' with `no-conversion' coding system.
       ("\\.\\(\
 -arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|\
 -ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" . archive-mode)
 +arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|\
 +ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
       ("\\.\\(sx[dmicw]\\|od[fgpst]\\|oxt\\)\\'" . archive-mode) ;OpenOffice.org
       ("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode) ; Debian/Opkg packages.
       ;; Mailer puts message to be edited in
       ;; /tmp/Re.... or Message
       ("\\`/tmp/Re" . text-mode)
       ("/Message[0-9]*\\'" . text-mode)
 -     ("\\.zone\\'" . zone-mode)
       ;; some news reader is reported to use this
       ("\\`/tmp/fol/" . text-mode)
       ("\\.oak\\'" . scheme-mode)
       ("[:/]_emacs\\'" . emacs-lisp-mode)
       ("/crontab\\.X*[0-9]+\\'" . shell-script-mode)
       ("\\.ml\\'" . lisp-mode)
 +     ;; Linux-2.6.9 uses some different suffix for linker scripts:
 +     ;; "ld", "lds", "lds.S", "lds.in", "ld.script", and "ld.script.balo".
 +     ;; eCos uses "ld" and "ldi".  Netbsd uses "ldscript.*".
 +     ("\\.ld[si]?\\'" . ld-script-mode)
 +     ("ld\\.?script\\'" . ld-script-mode)
 +     ;; .xs is also used for ld scripts, but seems to be more commonly
 +     ;; associated with Perl .xs files (C with Perl bindings).  (Bug#7071)
 +     ("\\.xs\\'" . c-mode)
 +     ;; Explained in binutils ld/genscripts.sh.  Eg:
 +     ;; A .x script file is the default script.
 +     ;; A .xr script is for linking without relocation (-r flag).  Etc.
 +     ("\\.x[abdsru]?[cnw]?\\'" . ld-script-mode)
 +     ("\\.zone\\'" . dns-mode)
 +     ("\\.soa\\'" . dns-mode)
       ;; Common Lisp ASDF package system.
       ("\\.asd\\'" . lisp-mode)
       ("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode)
       ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
       ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG
       ("\\.[eE]?[pP][sS]\\'" . ps-mode)
 -     ("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
 +     ("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
       ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode)
       ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode)
       ("BROWSE\\'" . ebrowse-tree-mode)
       ("#\\*mail\\*" . mail-mode)
       ("\\.g\\'" . antlr-mode)
       ("\\.ses\\'" . ses-mode)
 -     ("\\.\\(soa\\|zone\\)\\'" . dns-mode)
       ("\\.docbook\\'" . sgml-mode)
       ("\\.com\\'" . dcl-mode)
       ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode)
@@@ -2489,8 -2406,7 +2489,8 @@@ and `magic-mode-alist', which determine
       ("pg" . text-mode)
       ("make" . makefile-gmake-mode)           ; Debian uses this
       ("guile" . scheme-mode)
 -     ("clisp" . lisp-mode)))
 +     ("clisp" . lisp-mode)
 +     ("emacs" . emacs-lisp-mode)))
    "Alist mapping interpreter names to major modes.
  This is used for files whose first lines match `auto-mode-interpreter-regexp'.
  Each element looks like (INTERPRETER . MODE).
@@@ -2853,19 -2769,15 +2853,19 @@@ asking you for confirmation.
  
  (mapc (lambda (pair)
        (put (car pair) 'safe-local-variable (cdr pair)))
 -      '((buffer-read-only     . booleanp)   ;; C source code
 -      (default-directory    . stringp)    ;; C source code
 -      (fill-column          . integerp)   ;; C source code
 -      (indent-tabs-mode     . booleanp)   ;; C source code
 -      (left-margin          . integerp)   ;; C source code
 -      (no-update-autoloads  . booleanp)
 -      (tab-width            . integerp)   ;; C source code
 -      (truncate-lines       . booleanp)   ;; C source code
 -      (word-wrap            . booleanp))) ;; C source code
 +      '((buffer-read-only        . booleanp)   ;; C source code
 +      (default-directory       . stringp)    ;; C source code
 +      (fill-column             . integerp)   ;; C source code
 +      (indent-tabs-mode        . booleanp)   ;; C source code
 +      (left-margin             . integerp)   ;; C source code
 +      (no-update-autoloads     . booleanp)
 +      (tab-width               . integerp)   ;; C source code
 +      (truncate-lines          . booleanp)   ;; C source code
 +      (word-wrap               . booleanp) ;; C source code
 +      (bidi-display-reordering . booleanp))) ;; C source code
 +
 +(put 'bidi-paragraph-direction 'safe-local-variable
 +     (lambda (v) (memq v '(nil right-to-left left-to-right))))
  
  (put 'c-set-style 'safe-local-eval-function t)
  
@@@ -2876,6 -2788,7 +2876,7 @@@ is a file-local variable (a symbol) an
  specified.  The actual value in the buffer may differ from VALUE,
  if it is changed by the major or minor modes, or by the user.")
  (make-variable-buffer-local 'file-local-variables-alist)
+ (put 'file-local-variables-alist 'permanent-local t)
  
  (defvar dir-local-variables-alist nil
    "Alist of directory-local variable settings in the current buffer.
@@@ -3203,17 -3116,14 +3204,17 @@@ is specified, returning t if it is spec
          ;; Otherwise, set the variables.
          (enable-local-variables
           (hack-local-variables-filter result nil)
 -         (when file-local-variables-alist
 -           ;; Any 'evals must run in the Right sequence.
 -           (setq file-local-variables-alist
 -                 (nreverse file-local-variables-alist))
 -           (run-hooks 'before-hack-local-variables-hook)
 -           (dolist (elt file-local-variables-alist)
 -             (hack-one-local-variable (car elt) (cdr elt))))
 -         (run-hooks 'hack-local-variables-hook)))))
 +         (hack-local-variables-apply)))))
 +
 +(defun hack-local-variables-apply ()
 +  (when file-local-variables-alist
 +    ;; Any 'evals must run in the Right sequence.
 +    (setq file-local-variables-alist
 +        (nreverse file-local-variables-alist))
 +    (run-hooks 'before-hack-local-variables-hook)
 +    (dolist (elt file-local-variables-alist)
 +      (hack-one-local-variable (car elt) (cdr elt))))
 +  (run-hooks 'hack-local-variables-hook))
  
  (defun safe-local-variable-p (sym val)
    "Non-nil if SYM is safe as a file-local variable with value VAL.
@@@ -3371,29 -3281,22 +3372,29 @@@ ROOT is the root directory of the proje
  Return the new variables list."
    (let* ((file-name (buffer-file-name))
         (sub-file-name (if file-name
 +                            ;; FIXME: Why not use file-relative-name?
                            (substring file-name (length root)))))
 -    (dolist (entry class-variables variables)
 -      (let ((key (car entry)))
 -      (cond
 -       ((stringp key)
 -        ;; Don't include this in the previous condition, because we
 -        ;; want to filter all strings before the next condition.
 -        (when (and sub-file-name
 -                   (>= (length sub-file-name) (length key))
 -                   (string= key (substring sub-file-name 0 (length key))))
 -          (setq variables (dir-locals-collect-variables
 -                           (cdr entry) root variables))))
 -       ((or (not key)
 -            (derived-mode-p key))
 -        (setq variables (dir-locals-collect-mode-variables
 -                         (cdr entry) variables))))))))
 +    (condition-case err
 +        (dolist (entry class-variables variables)
 +          (let ((key (car entry)))
 +            (cond
 +             ((stringp key)
 +              ;; Don't include this in the previous condition, because we
 +              ;; want to filter all strings before the next condition.
 +              (when (and sub-file-name
 +                         (>= (length sub-file-name) (length key))
 +                         (string-prefix-p key sub-file-name))
 +                (setq variables (dir-locals-collect-variables
 +                                 (cdr entry) root variables))))
 +             ((or (not key)
 +                  (derived-mode-p key))
 +              (setq variables (dir-locals-collect-mode-variables
 +                               (cdr entry) variables))))))
 +      (error
 +       ;; The file's content might be invalid (e.g. have a merge conflict), but
 +       ;; that shouldn't prevent the user from opening the file.
 +       (message ".dir-locals error: %s" (error-message-string err))
 +       nil))))
  
  (defun dir-locals-set-directory-class (directory class &optional mtime)
    "Declare that the DIRECTORY root is an instance of CLASS.
@@@ -3517,16 -3420,15 +3518,16 @@@ is found.  Returns the new class name.
  Store the directory-local variables in `dir-local-variables-alist'
  and `file-local-variables-alist', without applying them."
    (when (and enable-local-variables
 -           (buffer-file-name)
 -           (not (file-remote-p (buffer-file-name))))
 +           (not (file-remote-p (or (buffer-file-name) default-directory))))
      ;; Find the variables file.
 -    (let ((variables-file (dir-locals-find-file (buffer-file-name)))
 +    (let ((variables-file (dir-locals-find-file (or (buffer-file-name) default-directory)))
          (class nil)
          (dir-name nil))
        (cond
         ((stringp variables-file)
 -      (setq dir-name (file-name-directory (buffer-file-name)))
 +      (setq dir-name (if (buffer-file-name)
 +                           (file-name-directory (buffer-file-name))
 +                         default-directory))
        (setq class (dir-locals-read-from-file variables-file)))
         ((consp variables-file)
        (setq dir-name (nth 0 variables-file))
              (push elt dir-local-variables-alist))
            (hack-local-variables-filter variables dir-name)))))))
  
 +(defun hack-dir-local-variables-non-file-buffer ()
 +  (hack-dir-local-variables)
 +  (hack-local-variables-apply))
 +
  \f
  (defcustom change-major-mode-with-file-name t
    "Non-nil means \\[write-file] should set the major mode from the file name.
@@@ -3726,13 -3624,10 +3727,13 @@@ variable `make-backup-files'.  If it's 
  no longer accessible under its old name.
  
  The value is non-nil after a backup was made by renaming.
 -It has the form (MODES . BACKUPNAME).
 +It has the form (MODES SELINUXCONTEXT BACKUPNAME).
  MODES is the result of `file-modes' on the original
  file; this means that the caller, after saving the buffer, should change
  the modes of the new file to agree with the old modes.
 +SELINUXCONTEXT is the result of `file-selinux-context' on the original
 +file; this means that the caller, after saving the buffer, should change
 +the SELinux context of the new file to agree with the old context.
  BACKUPNAME is the backup file name, which is the old file renamed."
    (if (and make-backup-files (not backup-inhibited)
           (not buffer-backed-up)
                            (or delete-old-versions
                                (y-or-n-p (format "Delete excess backup versions of %s? "
                                                  real-file-name)))))
 -                    (modes (file-modes buffer-file-name)))
 +                    (modes (file-modes buffer-file-name))
 +                    (context (file-selinux-context buffer-file-name)))
                  ;; Actually write the back up file.
                  (condition-case ()
                      (if (or file-precious-flag
                                                   (<= (nth 2 attr) backup-by-copying-when-privileged-mismatch)))
                                          (or (nth 9 attr)
                                              (not (file-ownership-preserved-p real-file-name)))))))
 -                        (backup-buffer-copy real-file-name backupname modes)
 +                        (backup-buffer-copy real-file-name backupname modes context)
                        ;; rename-file should delete old backup.
                        (rename-file real-file-name backupname t)
 -                      (setq setmodes (cons modes backupname)))
 +                      (setq setmodes (list modes context backupname)))
                    (file-error
                     ;; If trouble writing the backup, write it in ~.
                     (setq backupname (expand-file-name
                     (message "Cannot write backup file; backing up in %s"
                              backupname)
                     (sleep-for 1)
 -                   (backup-buffer-copy real-file-name backupname modes)))
 +                   (backup-buffer-copy real-file-name backupname modes context)))
                  (setq buffer-backed-up t)
                  ;; Now delete the old versions, if desired.
                  (if delete-old-versions
                  setmodes)
            (file-error nil))))))
  
 -(defun backup-buffer-copy (from-name to-name modes)
 +(defun backup-buffer-copy (from-name to-name modes context)
    (let ((umask (default-file-modes)))
      (unwind-protect
        (progn
        ;; Reset the umask.
        (set-default-file-modes umask)))
    (and modes
 -       (set-file-modes to-name (logand modes #o1777))))
 +       (set-file-modes to-name (logand modes #o1777)))
 +  (and context
 +       (set-file-selinux-context to-name context)))
 +
 +(defvar file-name-version-regexp
 +  "\\(?:~\\|\\.~[-[:alnum:]:#@^._]+~\\)"
 +  "Regular expression matching the backup/version part of a file name.
 +Used by `file-name-sans-versions'.")
  
  (defun file-name-sans-versions (name &optional keep-backup-version)
    "Return file NAME sans backup versions or strings.
  This is a separate procedure so your site-init or startup file can
  redefine it.
  If the optional argument KEEP-BACKUP-VERSION is non-nil,
 -we do not remove backup version numbers, only true file version numbers."
 +we do not remove backup version numbers, only true file version numbers.
 +See also `file-name-version-regexp'."
    (let ((handler (find-file-name-handler name 'file-name-sans-versions)))
      (if handler
        (funcall handler 'file-name-sans-versions name keep-backup-version)
        (substring name 0
 -               (if keep-backup-version
 -                   (length name)
 -                 (or (string-match "\\.~[-[:alnum:]:#@^._]+~\\'" name)
 -                     (string-match "~\\'" name)
 -                     (length name)))))))
 +               (unless keep-backup-version
 +                   (string-match (concat file-name-version-regexp "\\'")
 +                                 name))))))
  
  (defun file-ownership-preserved-p (file)
    "Return t if deleting FILE and rewriting it would preserve the owner."
@@@ -4386,9 -4274,7 +4387,9 @@@ Before and after saving the buffer, thi
                  (nthcdr 10 (file-attributes buffer-file-name)))
            (if setmodes
                (condition-case ()
 -                  (set-file-modes buffer-file-name (car setmodes))
 +                  (progn
 +                    (set-file-modes buffer-file-name (car setmodes))
 +                    (set-file-selinux-context buffer-file-name (nth 1 setmodes)))
                  (error nil))))
          ;; If the auto-save file was recent before this command,
          ;; delete it now.
  ;; This does the "real job" of writing a buffer into its visited file
  ;; and making a backup file.  This is what is normally done
  ;; but inhibited if one of write-file-functions returns non-nil.
 -;; It returns a value (MODES . BACKUPNAME), like backup-buffer.
 +;; It returns a value (MODES SELINUXCONTEXT BACKUPNAME), like backup-buffer.
  (defun basic-save-buffer-1 ()
    (prog1
        (if save-buffer-coding-system
        (setq buffer-file-coding-system-explicit
            (cons last-coding-system-used nil)))))
  
 -;; This returns a value (MODES . BACKUPNAME), like backup-buffer.
 +;; This returns a value (MODES SELINUXCONTEXT BACKUPNAME), like backup-buffer.
  (defun basic-save-buffer-2 ()
    (let (tempsetmodes setmodes)
      (if (not (file-writable-p buffer-file-name))
            ;; Since we have created an entirely new file,
            ;; make sure it gets the right permission bits set.
            (setq setmodes (or setmodes
 -                             (cons (or (file-modes buffer-file-name)
 +                             (list (or (file-modes buffer-file-name)
                                         (logand ?\666 umask))
 +                                   (file-selinux-context buffer-file-name)
                                     buffer-file-name)))
            ;; We succeeded in writing the temp file,
            ;; so rename it.
        ;; (setmodes is set) because that says we're superseding.
        (cond ((and tempsetmodes (not setmodes))
               ;; Change the mode back, after writing.
 -             (setq setmodes (cons (file-modes buffer-file-name) buffer-file-name))
 -             (set-file-modes buffer-file-name (logior (car setmodes) 128))))
 +             (setq setmodes (list (file-modes buffer-file-name)
 +                                  (file-selinux-context buffer-file-name)
 +                                  buffer-file-name))
 +             (set-file-modes buffer-file-name (logior (car setmodes) 128))
 +             (set-file-selinux-context buffer-file-name (nth 1 setmodes)))))
        (let (success)
          (unwind-protect
              (progn
            ;; the backup by renaming, undo the backing-up.
            (and setmodes (not success)
                 (progn
 -                 (rename-file (cdr setmodes) buffer-file-name t)
 -                 (setq buffer-backed-up nil)))))))
 +                 (rename-file (nth 2 setmodes) buffer-file-name t)
 +                 (setq buffer-backed-up nil))))))
      setmodes))
  
 -(defun diff-buffer-with-file (&optional buffer)
 -  "View the differences between BUFFER and its associated file.
 -This requires the external program `diff' to be in your `exec-path'."
 -  (interactive "bBuffer: ")
 -  (with-current-buffer (get-buffer (or buffer (current-buffer)))
 -    (if (and buffer-file-name
 -           (file-exists-p buffer-file-name))
 -      (let ((tempfile (make-temp-file "buffer-content-")))
 -        (unwind-protect
 -            (progn
 -              (write-region nil nil tempfile nil 'nomessage)
 -              (diff buffer-file-name tempfile nil t)
 -              (sit-for 0))
 -          (when (file-exists-p tempfile)
 -            (delete-file tempfile))))
 -      (message "Buffer %s has no associated file on disc" (buffer-name))
 -      ;; Display that message for 1 second so that user can read it
 -      ;; in the minibuffer.
 -      (sit-for 1)))
 -  ;; return always nil, so that save-buffers-kill-emacs will not move
 -  ;; over to the next unsaved buffer when calling `d'.
 -  nil)
 +(declare-function diff-no-select "diff"
 +                (old new &optional switches no-async buf))
  
  (defvar save-some-buffers-action-alist
    `((?\C-r
      (?d ,(lambda (buf)
             (if (null (buffer-file-name buf))
                 (message "Not applicable: no file")
 -             (save-window-excursion (diff-buffer-with-file buf))
 -             (if (not enable-recursive-minibuffers)
 -                 (progn (display-buffer (get-buffer-create "*Diff*"))
 -                        (setq other-window-scroll-buffer "*Diff*"))
 -               (view-buffer (get-buffer-create "*Diff*")
 -                            (lambda (_) (exit-recursive-edit)))
 -               (recursive-edit)))
 +             (require 'diff)            ;for diff-no-select.
 +             (let ((diffbuf (diff-no-select (buffer-file-name buf) buf
 +                                            nil 'noasync)))
 +               (if (not enable-recursive-minibuffers)
 +                   (progn (display-buffer diffbuf)
 +                          (setq other-window-scroll-buffer diffbuf))
 +                 (view-buffer diffbuf (lambda (_) (exit-recursive-edit)))
 +                 (recursive-edit))))
             ;; Return nil to ask about BUF again.
             nil)
        ,(purecopy "view changes in this buffer")))
@@@ -4733,17 -4634,16 +4734,17 @@@ or multiple mail buffers, etc.
        (force-mode-line-update))))
  
  (defun make-directory (dir &optional parents)
 -  "Create the directory DIR and any nonexistent parent dirs.
 -If DIR already exists as a directory, signal an error, unless PARENTS is set.
 +  "Create the directory DIR and optionally any nonexistent parent dirs.
 +If DIR already exists as a directory, signal an error, unless
 +PARENTS is non-nil.
  
 -Interactively, the default choice of directory to create
 -is the current default directory for file names.
 -That is useful when you have visited a file in a nonexistent directory.
 +Interactively, the default choice of directory to create is the
 +current buffer's default directory.  That is useful when you have
 +visited a file in a nonexistent directory.
  
 -Noninteractively, the second (optional) argument PARENTS says whether
 -to create parent directories if they don't exist.  Interactively,
 -this happens by default."
 +Noninteractively, the second (optional) argument PARENTS, if
 +non-nil, says whether to create parent directories that don't
 +exist.  Interactively, this happens by default."
    (interactive
     (list (read-file-name "Make directory: " default-directory default-directory
                         nil nil)
    "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"
    "Regexp matching any file name except \".\" and \"..\".")
  
 -(defun delete-directory (directory &optional recursive)
 +(defun delete-directory (directory &optional recursive trash)
    "Delete the directory named DIRECTORY.  Does not follow symlinks.
 -If RECURSIVE is non-nil, all files in DIRECTORY are deleted as well."
 +If RECURSIVE is non-nil, all files in DIRECTORY are deleted as well.
 +TRASH non-nil means to trash the directory instead, provided
 +`delete-by-moving-to-trash' is non-nil.
 +
 +When called interactively, TRASH is t if no prefix argument is
 +given.  With a prefix argument, TRASH is nil."
    (interactive
 -   (let ((dir (expand-file-name
 -             (read-file-name
 -              "Delete directory: "
 -              default-directory default-directory nil nil))))
 +   (let* ((trashing (and delete-by-moving-to-trash
 +                       (null current-prefix-arg)))
 +        (dir (expand-file-name
 +              (read-file-name
 +               (if trashing
 +                   "Move directory to trash: "
 +                 "Delete directory: ")
 +               default-directory default-directory nil nil))))
       (list dir
           (if (directory-files dir nil directory-files-no-dot-files-regexp)
               (y-or-n-p
 -              (format "Directory `%s' is not empty, really delete? " dir))
 -           nil))))
 +              (format "Directory `%s' is not empty, really %s? "
 +                      dir (if trashing "trash" "delete")))
 +           nil)
 +         (null current-prefix-arg))))
    ;; If default-directory is a remote directory, make sure we find its
    ;; delete-directory handler.
    (setq directory (directory-file-name (expand-file-name directory)))
      (cond
       (handler
        (funcall handler 'delete-directory directory recursive))
 -     (delete-by-moving-to-trash
 +     ((and delete-by-moving-to-trash trash)
        ;; Only move non-empty dir to trash if recursive deletion was
        ;; requested.  This mimics the non-`delete-by-moving-to-trash'
        ;; case, where the operation fails in delete-directory-internal.
                  ;; (and (file-directory-p fn) (not (file-symlink-p fn)))
                  ;; but more efficient
                  (if (eq t (car (file-attributes file)))
 -                    (delete-directory file recursive)
 -                  (delete-file file)))
 +                    (delete-directory file recursive nil)
 +                  (delete-file file nil)))
                ;; We do not want to delete "." and "..".
                (directory-files
                 directory 'full directory-files-no-dot-files-regexp)))
@@@ -5270,6 -5159,30 +5271,6 @@@ The optional second argument indicates 
          (kill-buffer-ask buffer)))))
  
  \f
 -(defun auto-save-mode (arg)
 -  "Toggle auto-saving of contents of current buffer.
 -With prefix argument ARG, turn auto-saving on if positive, else off."
 -  (interactive "P")
 -  (setq buffer-auto-save-file-name
 -        (and (if (null arg)
 -               (or (not buffer-auto-save-file-name)
 -                   ;; If auto-save is off because buffer has shrunk,
 -                   ;; then toggling should turn it on.
 -                   (< buffer-saved-size 0))
 -             (or (eq arg t) (listp arg) (and (integerp arg) (> arg 0))))
 -           (if (and buffer-file-name auto-save-visited-file-name
 -                    (not buffer-read-only))
 -               buffer-file-name
 -             (make-auto-save-file-name))))
 -  ;; If -1 was stored here, to temporarily turn off saving,
 -  ;; turn it back on.
 -  (and (< buffer-saved-size 0)
 -       (setq buffer-saved-size 0))
 -  (if (called-interactively-p 'interactive)
 -      (message "Auto-save %s (in this buffer)"
 -             (if buffer-auto-save-file-name "on" "off")))
 -  buffer-auto-save-file-name)
 -
  (defun rename-auto-save-file ()
    "Adjust current buffer's auto save file name for current conditions.
  Also rename any existing auto save file, if it was made in this session."
@@@ -5633,14 -5546,12 +5634,14 @@@ preference to the program given by thi
  
  (defun get-free-disk-space (dir)
    "Return the amount of free space on directory DIR's file system.
 -The result is a string that gives the number of free 1KB blocks,
 -or nil if the system call or the program which retrieve the information
 -fail.  It returns also nil when DIR is a remote directory.
 -
 -This function calls `file-system-info' if it is available, or invokes the
 -program specified by `directory-free-space-program' if that is non-nil."
 +The return value is a string describing the amount of free
 +space (normally, the number of free 1KB blocks).
 +
 +This function calls `file-system-info' if it is available, or
 +invokes the program specified by `directory-free-space-program'
 +and `directory-free-space-args'.  If the system call or program
 +is unsuccessful, or if DIR is a remote directory, this function
 +returns nil."
    (unless (file-remote-p dir)
      ;; Try to find the number of free blocks.  Non-Posix systems don't
      ;; always have df, but might have an equivalent system call.
                                         directory-free-space-args
                                         dir)
                           0)))
 -          ;; Usual format is a header line followed by a line of
 -          ;; numbers.
 +          ;; Assume that the "available" column is before the
 +          ;; "capacity" column.  Find the "%" and scan backward.
            (goto-char (point-min))
            (forward-line 1)
 -          (if (not (eobp))
 -              (progn
 -                ;; Move to the end of the "available blocks" number.
 -                (skip-chars-forward "^ \t")
 -                (forward-word 3)
 -                ;; Copy it into AVAILABLE.
 -                (let ((end (point)))
 -                  (forward-word -1)
 -                  (buffer-substring (point) end))))))))))
 +          (when (re-search-forward
 +                 "[[:space:]]+[^[:space:]]+%[^%]*$"
 +                 (line-end-position) t)
 +            (goto-char (match-beginning 0))
 +            (let ((endpt (point)))
 +              (skip-chars-backward "^[:space:]")
 +              (buffer-substring-no-properties (point) endpt)))))))))
  
  ;; The following expression replaces `dired-move-to-filename-regexp'.
  (defvar directory-listing-before-filename-regexp
@@@ -6462,4 -6375,5 +6463,4 @@@ Otherwise, trash FILENAME using the fre
  (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame)
  (define-key ctl-x-5-map "\C-o" 'display-buffer-other-frame)
  
 -;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
  ;;; files.el ends here
diff --combined lisp/help-fns.el
index b100a4e471dd55f3024159dec8d2bc9a0d143600,5050244237d4d72d8e766f91125830b4345a1bbb..9b8e7f1458c1f983b79d2d73ef6e3d4ec00bf3d6
@@@ -6,7 -6,6 +6,7 @@@
  
  ;; Maintainer: FSF
  ;; Keywords: help, internal
 +;; Package: emacs
  
  ;; This file is part of GNU Emacs.
  
@@@ -289,19 -288,13 +289,19 @@@ suitable file is found, return nil.
       ((not (stringp file-name))
        ;; If we don't have a file-name string by now, we lost.
        nil)
 +     ;; Now, `file-name' should have become an absolute file name.
 +     ;; For files loaded from ~/.emacs.elc, try ~/.emacs.
 +     ((let (fn)
 +      (and (string-equal file-name
 +                         (expand-file-name ".emacs.elc" "~"))
 +           (file-readable-p (setq fn (expand-file-name ".emacs" "~")))
 +           fn)))
 +     ;; When the Elisp source file can be found in the install
 +     ;; directory, return the name of that file.
       ((let ((lib-name
             (if (string-match "[.]elc\\'" file-name)
                 (substring-no-properties file-name 0 -1)
               file-name)))
 -      ;; When the Elisp source file can be found in the install
 -      ;; directory return the name of that file - `file-name' should
 -      ;; have become an absolute file name ny now.
        (or (and (file-readable-p lib-name) lib-name)
            ;; The library might be compressed.
            (and (file-readable-p (concat lib-name ".gz")) lib-name))))
@@@ -639,34 -632,17 +639,30 @@@ it is displayed along with the global v
                (if valvoid
                    (princ " is void as a variable.")
                  (princ "'s "))))
-           (if valvoid
-               nil
+           (unless valvoid
              (with-current-buffer standard-output
                (setq val-start-pos (point))
                (princ "value is ")
-               (terpri)
                (let ((from (point)))
+                 (terpri)
                  (pp val)
-                 ;; Hyperlinks in variable's value are quite frequently
-                 ;; inappropriate e.g C-h v <RET> features <RET>
-                 ;; (help-xref-on-pp from (point))
-                 (if (< (point) (+ from 20))
-                     (delete-region (1- from) from))
+                 (if (< (point) (+ 68 (line-beginning-position 0)))
+                     (delete-region from (1+ from))
 -                  (delete-region (1- from) from)))))
++                  (delete-region (1- from) from))
 +                (let* ((sv (get variable 'standard-value))
 +                       (origval (and (consp sv)
 +                                     (condition-case nil
 +                                         (eval (car sv))
 +                                       (error :help-eval-error)))))
 +                  (when (and (consp sv)
 +                               (not (equal origval val))
 +                               (not (equal origval :help-eval-error)))
 +                    (princ "\nOriginal value was \n")
 +                    (setq from (point))
 +                    (pp origval)
 +                    (if (< (point) (+ from 20))
 +                        (delete-region (1- from) from)))))))
            (terpri)
            (when locus
              (if (bufferp locus)
                  (princ (format "%socal in buffer %s; "
@@@ -893,111 -869,7 +889,111 @@@ BUFFER should be a buffer or a buffer n
          (insert "\nThe parent category table is:")
          (describe-vector table 'help-describe-category-set))))))
  
 +\f
 +;;; Replacements for old lib-src/ programs.  Don't seem especially useful.
 +
 +;; Replaces lib-src/digest-doc.c.
 +;;;###autoload
 +(defun doc-file-to-man (file)
 +  "Produce an nroff buffer containing the doc-strings from the DOC file."
 +  (interactive (list (read-file-name "Name of DOC file: " doc-directory
 +                                     internal-doc-file-name t)))
 +  (or (file-readable-p file)
 +      (error "Cannot read file `%s'" file))
 +  (pop-to-buffer (generate-new-buffer "*man-doc*"))
 +  (setq buffer-undo-list t)
 +  (insert ".TH \"Command Summary for GNU Emacs\"\n"
 +          ".AU Richard M. Stallman\n")
 +  (insert-file-contents file)
 +  (let (notfirst)
 +    (while (search-forward "\1f" nil 'move)
 +      (if (looking-at "S")
 +          (delete-region (1- (point)) (line-end-position))
 +        (delete-char -1)
 +        (if notfirst
 +            (insert "\n.DE\n")
 +          (setq notfirst t))
 +        (insert "\n.SH ")
 +        (insert (if (looking-at "F") "Function " "Variable "))
 +        (delete-char 1)
 +        (forward-line 1)
 +        (insert ".DS L\n"))))
 +  (insert "\n.DE\n")
 +  (setq buffer-undo-list nil)
 +  (nroff-mode))
 +
 +;; Replaces lib-src/sorted-doc.c.
 +;;;###autoload
 +(defun doc-file-to-info (file)
 +  "Produce a texinfo buffer with sorted doc-strings from the DOC file."
 +  (interactive (list (read-file-name "Name of DOC file: " doc-directory
 +                                     internal-doc-file-name t)))
 +  (or (file-readable-p file)
 +      (error "Cannot read file `%s'" file))
 +  (let ((i 0) type name doc alist)
 +    (with-temp-buffer
 +      (insert-file-contents file)
 +      ;; The characters "@{}" need special treatment.
 +      (while (re-search-forward "[@{}]" nil t)
 +        (backward-char)
 +        (insert "@")
 +        (forward-char 1))
 +      (goto-char (point-min))
 +      (while (search-forward "\1f" nil t)
 +        (unless (looking-at "S")
 +          (setq type (char-after)
 +                name (buffer-substring (1+ (point)) (line-end-position))
 +                doc (buffer-substring (line-beginning-position 2)
 +                                      (if (search-forward  "\1f" nil 'move)
 +                                          (1- (point))
 +                                        (point)))
 +                alist (cons (list name type doc) alist))
 +          (backward-char 1))))
 +    (pop-to-buffer (generate-new-buffer "*info-doc*"))
 +    (setq buffer-undo-list t)
 +    ;; Write the output header.
 +    (insert "\\input texinfo  @c -*-texinfo-*-\n"
 +            "@setfilename emacsdoc.info\n"
 +            "@settitle Command Summary for GNU Emacs\n"
 +            "@finalout\n"
 +            "\n@node Top\n"
 +            "@unnumbered Command Summary for GNU Emacs\n\n"
 +            "@table @asis\n\n"
 +            "@iftex\n"
 +            "@global@let@ITEM@item\n"
 +            "@def@item{@filbreak@vskip5pt@ITEM}\n"
 +            "@font@tensy cmsy10 scaled @magstephalf\n"
 +            "@font@teni cmmi10 scaled @magstephalf\n"
 +            "@def\\{{@tensy@char110}}\n" ; this backslash goes with cmr10
 +            "@def|{{@tensy@char106}}\n"
 +            "@def@{{{@tensy@char102}}\n"
 +            "@def@}{{@tensy@char103}}\n"
 +            "@def<{{@teni@char62}}\n"
 +            "@def>{{@teni@char60}}\n"
 +            "@chardef@@64\n"
 +            "@catcode43=12\n"
 +            "@tableindent-0.2in\n"
 +            "@end iftex\n")
 +    ;; Sort the array by name; within each name, by type (functions first).
 +    (setq alist (sort alist (lambda (e1 e2)
 +                              (if (string-equal (car e1) (car e2))
 +                                  (<= (cadr e1) (cadr e2))
 +                                (string-lessp (car e1) (car e2))))))
 +    ;; Print each function.
 +    (dolist (e alist)
 +      (insert "\n@item "
 +              (if (char-equal (cadr e) ?\F) "Function" "Variable")
 +              " @code{" (car e) "}\n@display\n"
 +              (nth 2 e)
 +              "\n@end display\n")
 +      ;; Try to avoid a save size overflow in the TeX output routine.
 +      (if (zerop (setq i (% (1+ i) 100)))
 +          (insert "\n@end table\n@table @asis\n")))
 +    (insert "@end table\n"
 +            "@bye\n")
 +    (setq buffer-undo-list nil)
 +    (texinfo-mode)))
 +
  (provide 'help-fns)
  
 -;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3
  ;;; help-fns.el ends here
diff --combined lisp/isearch.el
index ebe2e8fa0097b6393618a4faca66218fc6a22518,afc18cae12728cac938a74a3ea1f2d2822185146..70508735f83a2426638ad1e6bf9455c4d459b408
@@@ -7,7 -7,6 +7,7 @@@
  ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
  ;; Maintainer: FSF
  ;; Keywords: matching
 +;; Package: emacs
  
  ;; This file is part of GNU Emacs.
  
@@@ -157,9 -156,6 +157,9 @@@ command history.
  (defvar isearch-mode-hook nil
    "Function(s) to call after starting up an incremental search.")
  
 +(defvar isearch-update-post-hook nil
 +  "Function(s) to call after isearch has found matches in the buffer.")
 +
  (defvar isearch-mode-end-hook nil
    "Function(s) to call after terminating an incremental search.
  When these functions are called, `isearch-mode-end-hook-quit'
@@@ -239,7 -235,7 +239,7 @@@ Default value, nil, means edit the stri
    "Face for highlighting Isearch matches."
    :group 'isearch
    :group 'basic-faces)
 -(defvar isearch 'isearch)
 +(defvar isearch-face 'isearch)
  
  (defface isearch-fail
    '((((class color) (min-colors 88) (background light))
@@@ -468,9 -464,7 +468,9 @@@ This is like `describe-bindings', but d
      (define-key map "\M-\C-y" 'isearch-yank-char)
      (define-key map    "\C-y" 'isearch-yank-line)
  
 -    (define-key map "\C-h" isearch-help-map)
 +    (define-key map (char-to-string help-char) isearch-help-map)
 +    (define-key map [help] isearch-help-map)
 +    (define-key map [f1] isearch-help-map)
  
      (define-key map "\M-n" 'isearch-ring-advance)
      (define-key map "\M-p" 'isearch-ring-retreat)
@@@ -878,8 -872,7 +878,8 @@@ It is called by the function `isearch-f
      (isearch-lazy-highlight-new-loop))
    ;; We must prevent the point moving to the end of composition when a
    ;; part of the composition has just been searched.
 -  (setq disable-point-adjustment t))
 +  (setq disable-point-adjustment t)
 +  (run-hooks 'isearch-update-post-hook))
  
  (defun isearch-done (&optional nopush edit)
    "Exit Isearch mode.
@@@ -1487,10 -1480,14 +1487,10 @@@ If search string is empty, just beep.
           (eq 'not-yanks search-upper-case))
        (setq string (downcase string)))
    (if isearch-regexp (setq string (regexp-quote string)))
 -  (setq isearch-string (concat isearch-string string)
 -      isearch-message
 -      (concat isearch-message
 -              (mapconcat 'isearch-text-char-description
 -                         string ""))
 -      ;; Don't move cursor in reverse search.
 -      isearch-yank-flag t)
 -  (isearch-search-and-update))
 +  ;; Don't move cursor in reverse search.
 +  (setq isearch-yank-flag t)
 +  (isearch-process-search-string
 +   string (mapconcat 'isearch-text-char-description string "")))
  
  (defun isearch-yank-kill ()
    "Pull string from kill ring into search string."
@@@ -1545,18 -1542,14 +1545,18 @@@ or it might return the position of the 
    (interactive "p")
    (isearch-yank-internal (lambda () (forward-char arg) (point))))
  
 +(declare-function subword-forward "subword" (&optional arg))
  (defun isearch-yank-word-or-char ()
 -  "Pull next character or word from buffer into search string."
 +  "Pull next character, subword or word from buffer into search string.
 +Subword is used when `subword-mode' is activated. "
    (interactive)
    (isearch-yank-internal
     (lambda ()
       (if (or (= (char-syntax (or (char-after) 0)) ?w)
               (= (char-syntax (or (char-after (1+ (point))) 0)) ?w))
 -         (forward-word 1)
 +       (if (and (boundp 'subword-mode) subword-mode)
 +           (subword-forward 1)
 +         (forward-word 1))
         (forward-char 1)) (point))))
  
  (defun isearch-yank-word ()
@@@ -1719,10 -1712,9 +1719,10 @@@ Scroll-bar or mode-line events are proc
  ;; attempts this, we scroll the text back again.
  ;;
  ;; We implement this feature with a property called `isearch-scroll'.
 -;; If a command's symbol has the value t for this property it is a
 -;; scrolling command.  The feature needs to be enabled by setting the
 -;; customizable variable `isearch-allow-scroll' to a non-nil value.
 +;; If a command's symbol has the value t for this property or for the
 +;; `scroll-command' property, it is a scrolling command.  The feature
 +;; needs to be enabled by setting the customizable variable
 +;; `isearch-allow-scroll' to a non-nil value.
  ;;
  ;; The universal argument commands (e.g. C-u) in simple.el are marked
  ;; as scrolling commands, and isearch.el has been amended to allow
  (if (fboundp 'w32-handle-scroll-bar-event)
      (put 'w32-handle-scroll-bar-event 'isearch-scroll t))
  
 -;; Commands which scroll the window:
 +;; Commands which scroll the window (some scroll commands
 +;; already have the `scroll-command' property on them):
  (put 'recenter 'isearch-scroll t)
  (put 'recenter-top-bottom 'isearch-scroll t)
  (put 'reposition-window 'isearch-scroll t)
 -(put 'scroll-up 'isearch-scroll t)
 -(put 'scroll-down 'isearch-scroll t)
  
  ;; Commands which act on the other window
  (put 'list-buffers 'isearch-scroll t)
    "Whether scrolling is allowed during incremental search.
  If non-nil, scrolling commands can be used in Isearch mode.
  However, the current match will never scroll offscreen.
 -If nil, scolling commands will first cancel Isearch mode."
 +If nil, scrolling commands will first cancel Isearch mode."
    :type 'boolean
    :group 'isearch)
  
@@@ -1832,8 -1825,7 +1832,8 @@@ Otherwise return nil.
    (let* ((overriding-terminal-local-map nil)
           (binding (key-binding key-seq)))
      (and binding (symbolp binding) (commandp binding)
 -         (eq (get binding 'isearch-scroll) t)
 +         (or (eq (get binding 'isearch-scroll) t)
 +           (eq (get binding 'scroll-command) t))
           binding)))
  
  (defalias 'isearch-other-control-char 'isearch-other-meta-char)
@@@ -1994,6 -1986,12 +1994,6 @@@ Isearch mode.
           (setq char (unibyte-char-to-multibyte char)))
        (isearch-process-search-char char))))
  
 -(defun isearch-return-char ()
 -  "Convert return into newline for incremental search."
 -  (interactive)
 -  (isearch-process-search-char ?\n))
 -(make-obsolete 'isearch-return-char 'isearch-printing-char "19.7")
 -
  (defun isearch-printing-char ()
    "Add this ordinary printing character to the search string and search."
    (interactive)
@@@ -2535,7 -2533,7 +2535,7 @@@ since they have special meaning in a re
        (setq isearch-overlay (make-overlay beg end))
        ;; 1001 is higher than lazy's 1000 and ediff's 100+
        (overlay-put isearch-overlay 'priority 1001)
 -      (overlay-put isearch-overlay 'face isearch))))
 +      (overlay-put isearch-overlay 'face isearch-face))))
  
  (defun isearch-dehighlight ()
    (when isearch-overlay
  (defvar isearch-lazy-highlight-regexp nil)
  (defvar isearch-lazy-highlight-space-regexp nil)
  (defvar isearch-lazy-highlight-forward nil)
+ (defvar isearch-lazy-highlight-error nil)
  
  (defun lazy-highlight-cleanup (&optional force)
    "Stop lazy highlighting and remove extra highlighting from current buffer.
@@@ -2622,9 -2621,13 +2623,13 @@@ by other Emacs features.
                   (not (= (window-end)   ; Window may have been split/joined.
                         isearch-lazy-highlight-window-end))
                 (not (eq isearch-forward
-                         isearch-lazy-highlight-forward))))
+                         isearch-lazy-highlight-forward))
+                ;; In case we are recovering from an error.
+                (not (equal isearch-error
+                            isearch-lazy-highlight-error))))
      ;; something important did indeed change
      (lazy-highlight-cleanup t) ;kill old loop & remove overlays
+     (setq isearch-lazy-highlight-error isearch-error)
      (when (not isearch-error)
        (setq isearch-lazy-highlight-start-limit beg
            isearch-lazy-highlight-end-limit end)
@@@ -2671,8 -2674,6 +2676,8 @@@ Attempt to do the search exactly the wa
          ;; Clear RETRY unless the search predicate says
          ;; to skip this search hit.
          (if (or (not success)
 +                (= (point) bound) ; like (bobp) (eobp) in `isearch-search'.
 +                (= (match-beginning 0) (match-end 0))
                  (funcall isearch-filter-predicate
                           (match-beginning 0) (match-end 0)))
              (setq retry nil)))
diff --combined lisp/mail/binhex.el
index 42d2f35baedc7a8d9b7e10be877f76e3ab61b7fd,5769aa3125d0741a6608e5a1bb6af4ba27d8b56b..d866fed371e99f12dfb965bfb881a80d8670287c
@@@ -1,4 -1,4 +1,4 @@@
- ;;; binhex.el --- elisp native binhex decode
+ ;;; binhex.el --- decode BinHex-encoded text
  
  ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  ;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
  
  ;;; Commentary:
  
+ ;; BinHex is a binary-to-text encoding scheme similar to uuencode.
+ ;; The command `binhex-decode-region' decodes BinHex-encoded text, via
+ ;; the external program "hexbin" if that is available, or an Emacs
+ ;; Lisp implementation if not.
  ;;; Code:
  
  (eval-when-compile (require 'cl))
@@@ -221,8 -226,7 +226,8 @@@ If HEADER-ONLY is non-nil only decode h
          (goto-char start)
          (when (re-search-forward binhex-begin-line end t)
              (setq work-buffer (generate-new-buffer " *binhex-work*"))
 -            (with-current-buffer work-buffer (set-buffer-multibyte nil))
 +          (unless (featurep 'xemacs)
 +            (with-current-buffer work-buffer (set-buffer-multibyte nil)))
            (beginning-of-line)
            (setq bits 0 counter 0)
            (while tmp
  
  (provide 'binhex)
  
 -;; arch-tag: 8476badd-1e76-4f1d-a640-f9a38c72eed8
  ;;; binhex.el ends here
diff --combined lisp/mail/mail-utils.el
index a8d845146f6475b18eafe00b01988e454bf76ed4,bbc94256fb784bcce124f5dac210a20e68b3401d..81a2bd4944177f0b6a0b8a4e9d1352c24a5683dc
@@@ -1,7 -1,7 +1,7 @@@
  ;;; mail-utils.el --- utility functions used both by rmail and rnews
  
  ;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- ;;   2009, 2010  Free Software Foundation, Inc.
+ ;;   2009, 2010, 2011  Free Software Foundation, Inc.
  
  ;; Maintainer: FSF
  ;; Keywords: mail, news
  
  ;;; Code:
  
 -;;; We require lisp-mode to make sure that lisp-mode-syntax-table has
 -;;; been initialized.
 -(require 'lisp-mode)
 -
  ;;;###autoload
  (defcustom mail-use-rfc822 nil
    "If non-nil, use a full, hairy RFC822 parser on mail addresses.
@@@ -185,8 -189,7 +185,7 @@@ Return a modified address list.
         ;; Detect nested comments.
         (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address)
           ;; Strip nested comments.
-          (with-current-buffer (get-buffer-create " *temp*")
-            (erase-buffer)
+          (with-temp-buffer
             (insert address)
             (set-syntax-table lisp-mode-syntax-table)
             (goto-char 1)
                                    (forward-sexp 1)
                                  (error (goto-char (point-max))))
                                  (point))))
-            (setq address (buffer-string))
-            (erase-buffer))
+            (setq address (buffer-string)))
         ;; Strip non-nested comments an easier way.
         (while (setq pos (string-match
                            ;; This doesn't hack rfc822 nested comments
                                      nil 'literal address 2)))
         address))))
  
- ;;; The following piece of ugliness is legacy code.  The name was an
- ;;; unfortunate choice --- a flagrant violation of the Emacs Lisp
- ;;; coding conventions.  `mail-dont-reply-to' would have been
- ;;; infinitely better.  Also, `rmail-dont-reply-to-names' might have
- ;;; been better named `mail-dont-reply-to-names' and sourced from this
- ;;; file instead of in rmail.el.  Yuck.  -pmr
+ ;; The following piece of ugliness is legacy code.  The name was an
+ ;; unfortunate choice --- a flagrant violation of the Emacs Lisp
+ ;; coding conventions.  `mail-dont-reply-to' would have been
+ ;; infinitely better.  Also, `rmail-dont-reply-to-names' might have
+ ;; been better named `mail-dont-reply-to-names' and sourced from this
+ ;; file instead of in rmail.el.  Yuck.  -pmr
  (defun rmail-dont-reply-to (destinations)
    "Prune addresses from DESTINATIONS, a list of recipient addresses.
  All addresses matching `rmail-dont-reply-to-names' are removed from
@@@ -394,13 -396,19 +392,19 @@@ matches may be returned from the messag
  (defun mail-mbox-from ()
    "Return an mbox \"From \" line for the current message.
  The buffer should be narrowed to just the header."
-   (let ((from (or (mail-fetch-field "from")
-                 (mail-fetch-field "really-from")
-                 (mail-fetch-field "sender")
-                 (mail-fetch-field "return-path")
-                 "unknown"))
-       (date (mail-fetch-field "date")))
-     (format "From %s %s\n" (mail-strip-quoted-names from)
+   (let* ((from (mail-strip-quoted-names (or (mail-fetch-field "from")
+                                           (mail-fetch-field "really-from")
+                                           (mail-fetch-field "sender")
+                                           (mail-fetch-field "return-path")
+                                           "unknown")))
+        (date (mail-fetch-field "date"))
+        ;; A From: header can contain multiple addresses, a "From "
+        ;; line must contain only one.  (Bug#7760)
+        ;; See eg RFC 5322, 3.6.2. Originator Fields.
+        (end (string-match "[ \t]*[,\n]" from)))
+     (format "From %s %s\n" (if end
+                              (substring from 0 end)
+                            from)
            (or (and date
                     (ignore-errors
                      (current-time-string (date-to-time date))))
diff --combined lisp/mail/rmail.el
index 7b896e579bcb9bde1057b14f42461592c24ddf3d,1e41363a750993c6835295da6b305fb0f4ae93c4..250481c20b5f3d747c4d9ec288d4888055616740
@@@ -2691,75 -2691,72 +2691,72 @@@ The current mail message becomes the me
          (message "Showing message %d" msg))
        (narrow-to-region beg end)
        (goto-char beg)
-       (if (and rmail-enable-mime
-                (re-search-forward "mime-version: 1.0" nil t))
-           (let ((rmail-buffer mbox-buf)
-                 (rmail-view-buffer view-buf))
-             (funcall rmail-show-mime-function))
-       (setq body-start (search-forward "\n\n" nil t))
-       (narrow-to-region beg (point))
-       (goto-char beg)
-       (save-excursion
-         (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
-             (setq coding-system (intern (match-string 1)))
-           (setq coding-system (rmail-get-coding-system))))
-       (setq character-coding (mail-fetch-field "content-transfer-encoding")
-             is-text-message (rmail-is-text-p))
-       (if character-coding
-           (setq character-coding (downcase character-coding)))
-       (narrow-to-region beg end)
-       ;; Decode the message body into an empty view buffer using a
-       ;; unibyte temporary buffer where the character decoding takes
-       ;; place.
-       (with-current-buffer rmail-view-buffer
-         (erase-buffer))
-       (if (null character-coding)
-           ;; Do it directly since that is fast.
-           (rmail-decode-region body-start end coding-system view-buf)
-         ;; Can this be done directly, skipping the temp buffer?
-         (with-temp-buffer
-           (set-buffer-multibyte nil)
-           (insert-buffer-substring mbox-buf body-start end)
-           (cond
-            ((string= character-coding "quoted-printable")
-             ;; See bug#5441.
-             (or (mail-unquote-printable-region (point-min) (point-max)
-                                                nil t 'unibyte)
-                 (message "Malformed MIME quoted-printable message")))
-            ((and (string= character-coding "base64") is-text-message)
-             (condition-case err
-                 (base64-decode-region (point-min) (point-max))
-               (error (message "%s" (cdr err)))))
-            ((eq character-coding 'uuencode)
-             (error "uuencoded messages are not supported yet"))
-            (t))
-           (rmail-decode-region (point-min) (point-max)
-                                coding-system view-buf))))
        (with-current-buffer rmail-view-buffer
          ;; We give the view buffer a buffer-local value of
          ;; rmail-header-style based on the binding in effect when
          ;; this function is called; `rmail-toggle-headers' can
          ;; inspect this value to determine how to toggle.
-         (set (make-local-variable 'rmail-header-style) header-style)
-         ;; Unquote quoted From lines
-         (goto-char (point-min))
-         (while (re-search-forward "^>+From " nil t)
-           (beginning-of-line)
-           (delete-char 1)
-           (forward-line))
-         (goto-char (point-min)))
-       ;; Copy the headers to the front of the message view buffer.
-       (rmail-copy-headers beg end)
-       ;; Add the separator (blank line) between headers and body;
+         (set (make-local-variable 'rmail-header-style) header-style))
+       (if (and rmail-enable-mime
+                (re-search-forward "mime-version: 1.0" nil t))
+           (let ((rmail-buffer mbox-buf)
+                 (rmail-view-buffer view-buf))
+             (funcall rmail-show-mime-function))
+         (setq body-start (search-forward "\n\n" nil t))
+         (narrow-to-region beg (point))
+         (goto-char beg)
+         (save-excursion
+           (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
+               (setq coding-system (intern (match-string 1)))
+             (setq coding-system (rmail-get-coding-system))))
+         (setq character-coding (mail-fetch-field "content-transfer-encoding")
+               is-text-message (rmail-is-text-p))
+         (if character-coding
+             (setq character-coding (downcase character-coding)))
+         (narrow-to-region beg end)
+         ;; Decode the message body into an empty view buffer using a
+         ;; unibyte temporary buffer where the character decoding takes
+         ;; place.
+         (with-current-buffer rmail-view-buffer
+           (erase-buffer))
+         (if (null character-coding)
+             ;; Do it directly since that is fast.
+             (rmail-decode-region body-start end coding-system view-buf)
+           ;; Can this be done directly, skipping the temp buffer?
+           (with-temp-buffer
+             (set-buffer-multibyte nil)
+             (insert-buffer-substring mbox-buf body-start end)
+             (cond
+              ((string= character-coding "quoted-printable")
+               ;; See bug#5441.
+               (or (mail-unquote-printable-region (point-min) (point-max)
+                                                  nil t 'unibyte)
+                   (message "Malformed MIME quoted-printable message")))
+              ((and (string= character-coding "base64") is-text-message)
+               (condition-case err
+                   (base64-decode-region (point-min) (point-max))
+                 (error (message "%s" (cdr err)))))
+              ((eq character-coding 'uuencode)
+               (error "uuencoded messages are not supported yet"))
+              (t))
+             (rmail-decode-region (point-min) (point-max)
+                                  coding-system view-buf)))
+         (with-current-buffer rmail-view-buffer
+           ;; Prepare the separator (blank line) before the body.
+           (goto-char (point-min))
+           (insert "\n")
+           ;; Unquote quoted From lines
+           (while (re-search-forward "^>+From " nil t)
+             (beginning-of-line)
+             (delete-char 1)
+             (forward-line))
+           (goto-char (point-min)))
+         ;; Copy the headers to the front of the message view buffer.
+         (rmail-copy-headers beg end))
        ;; highlight the message, activate any URL like text and add
        ;; special highlighting for and quoted material.
        (with-current-buffer rmail-view-buffer
-         (insert "\n")
          (goto-char (point-min))
-         ;; Decode the headers according to RFC2047.
-         (save-excursion
-           (search-forward "\n\n" nil 'move)
-           (rfc2047-decode-region (point-min) (point)))
          (rmail-highlight-headers)
                                        ;(rmail-activate-urls)
                                        ;(rmail-process-quoted-material)
@@@ -3834,7 -3831,9 +3831,7 @@@ The message should be narrowed to just 
                           (1- (point))
                         (point-max)))))))
  
 -(declare-function mail-sendmail-delimit-header "sendmail" ())
 -(declare-function mail-header-end "sendmail" ())
 -(declare-function mail-position-on-field "sendmail" (field &optional soft))
 +(autoload 'mail-position-on-field "sendmail")
  
  (defun rmail-retry-failure ()
    "Edit a mail message which is based on the contents of the current message.
@@@ -3920,19 -3919,18 +3917,19 @@@ specifying headers which should not be 
          ;; Insert original text as initial text of new draft message.
          ;; Bind inhibit-read-only since the header delimiter
          ;; of the previous message was probably read-only.
 -        (let ((inhibit-read-only t))
 +        (let ((inhibit-read-only t)
 +              eoh)
            (erase-buffer)
            (insert-buffer-substring rmail-this-buffer
                                     bounce-start bounce-end)
            (goto-char (point-min))
            (if bounce-indent
                (indent-rigidly (point-min) (point-max) bounce-indent))
 -          ;; FIXME better to replace sendmail functions.
 -          (require 'sendmail)
 -          (mail-sendmail-delimit-header)
 +          (rfc822-goto-eoh)
 +          (setq eoh (point))
 +          (insert mail-header-separator)
            (save-restriction
 -            (narrow-to-region (point-min) (mail-header-end))
 +            (narrow-to-region (point-min) eoh)
              (rmail-delete-headers rmail-retry-ignored-headers)
              (rmail-delete-headers "^\\(sender\\|return-path\\|received\\):")
              (setq resending (mail-fetch-field "resent-to"))
@@@ -4234,7 -4232,7 +4231,7 @@@ encoded string (and the same mask) wil
  ;;; Start of automatically extracted autoloads.
  \f
  ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el"
 -;;;;;;  "60db8013bf16d7999914a16cda435287")
 +;;;;;;  "4bf8a5cdfc921b9e30680ee71b7f9ca6")
  ;;; Generated autoloads from rmailedit.el
  
  (autoload 'rmail-edit-current-message "rmailedit" "\
@@@ -4246,7 -4244,7 +4243,7 @@@ Edit the contents of this message
  \f
  ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message
  ;;;;;;  rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd"
 -;;;;;;  "rmailkwd.el" "7027ce1ac922c0dd51262b641e4d42c1")
 +;;;;;;  "rmailkwd.el" "112240cbb53c402294013cc49987771a")
  ;;; Generated autoloads from rmailkwd.el
  
  (autoload 'rmail-add-label "rmailkwd" "\
@@@ -4289,23 -4287,33 +4286,33 @@@ With prefix argument N moves forward N 
  
  ;;;***
  \f
- ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "b1ce015fd919b54cc7b1d0b2155489f9")
 -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "6c12c2d0563ae855f1069d7a80b8244a")
++;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "3735f9bfe6ff3e612091857cc6b401b6")
  ;;; Generated autoloads from rmailmm.el
  
  (autoload 'rmail-mime "rmailmm" "\
- Process the current Rmail message as a MIME message.
- This creates a temporary \"*RMAIL*\" buffer holding a decoded
- copy of the message.  Inline content-types are handled according to
+ Toggle displaying of a MIME message.
+ The actualy behavior depends on the value of `rmail-enable-mime'.
+ If `rmail-enable-mime' is t (default), this command change the
+ displaying of a MIME message between decoded presentation form
+ and raw data.
+ With ARG, toggle the displaying of the current MIME entity only.
+ If `rmail-enable-mime' is nil, this creates a temporary
+ \"*RMAIL*\" buffer holding a decoded copy of the message.  Inline
+ content-types are handled according to
  `rmail-mime-media-type-handlers-alist'.  By default, this
  displays text and multipart messages, and offers to download
  attachments as specfied by `rmail-mime-attachment-dirs-alist'.
  
- \(fn)" t nil)
+ \(fn &optional ARG)" t nil)
  
  ;;;***
  \f
  ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "rmailmsc.el"
 -;;;;;;  "b2a72d4e370f2d2b31b6f8f0794820e4")
 +;;;;;;  "c3575020691d5769bcf08ecc932304c3")
  ;;; Generated autoloads from rmailmsc.el
  
  (autoload 'set-rmail-inbox-list "rmailmsc" "\
@@@ -4321,7 -4329,7 +4328,7 @@@ This applies only to the current sessio
  \f
  ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent
  ;;;;;;  rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject
 -;;;;;;  rmail-sort-by-date) "rmailsort" "rmailsort.el" "5a3b5ee477d2fbf79d0c566d776a7fd4")
 +;;;;;;  rmail-sort-by-date) "rmailsort" "rmailsort.el" "b96e85edd736f23f1e9d54a299268d1e")
  ;;; Generated autoloads from rmailsort.el
  
  (autoload 'rmail-sort-by-date "rmailsort" "\
@@@ -4380,7 -4388,7 +4387,7 @@@ If prefix argument REVERSE is non-nil, 
  \f
  ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
  ;;;;;;  rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
 -;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" "d855683972baef7111d4508dffbb54b6")
 +;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" "666a5db1021cdcba6e68a18a553d65f1")
  ;;; Generated autoloads from rmailsum.el
  
  (autoload 'rmail-summary "rmailsum" "\
@@@ -4451,4 -4459,5 +4458,4 @@@ following the containing message
  
  (provide 'rmail)
  
 -;; arch-tag: 65d257d3-c281-4a65-9c38-e61af95af2f0
  ;;; rmail.el ends here
diff --combined lisp/mail/rmailmm.el
index 708ec64706ed1320d45334adcc6058eb7e1ea4f1,307ec0632bce804f26f742e1d70d15116bf74295..70c4ca36c63814c72b4d481208b4c53ee912e0f0
@@@ -6,7 -6,6 +6,7 @@@
  ;;    Alex Schroeder
  ;; Maintainer: FSF
  ;; Keywords: mail
 +;; Package: rmail
  
  ;; This file is part of GNU Emacs.
  
@@@ -53,7 -52,7 +53,7 @@@
  ;;
  ;; rmail-mime
  ;;  +- rmail-mime-show <----------------------------------+
--;;       +- rmail-mime-process                            | 
++;;       +- rmail-mime-process                            |
  ;;            +- rmail-mime-handle                        |
  ;;                 +- rmail-mime-text-handler             |
  ;;                 +- rmail-mime-bulk-handler             |
@@@ -97,7 -96,9 +97,9 @@@ The first item is a regular expression 
  The remaining elements are handler functions to run, in order of
  decreasing preference.  These are called until one returns non-nil.
  Note that this only applies to items with an inline Content-Disposition,
- all others are handled by `rmail-mime-bulk-handler'."
+ all others are handled by `rmail-mime-bulk-handler'.
+ Note also that this alist is ignored when the variable
+ `rmail-enable-mime' is non-nil."
    :type '(alist :key-type regexp :value-type (repeat function))
    :version "23.1"
    :group 'rmail-mime)
@@@ -131,18 -132,36 +133,36 @@@ automatically display the image in the 
  
  ;;; End of user options.
  
+ ;;; Global variables that always have let-binding when referred.
+ (defvar rmail-mime-mbox-buffer nil
+   "Buffer containing the mbox data.
+ The value is usually nil, and bound to a proper value while
+ processing MIME.")
+ (defvar rmail-mime-view-buffer nil
+   "Buffer showing a message.
+ The value is usually nil, and bound to a proper value while
+ processing MIME.")
+ (defvar rmail-mime-coding-system nil
+   "The first coding-system used for decoding a MIME entity.
+ The value is usually nil, and bound to non-nil while inserting
+ MIME entities.")
  ;;; MIME-entity object
  
  (defun rmail-mime-entity (type disposition transfer-encoding
-                              header body children)
-   "Retrun a newly created MIME-entity object.
+                              display header tagline body children handler)
+   "Retrun a newly created MIME-entity object from arguments.
  
- A MIME-entity is a vector of 6 elements:
+ A MIME-entity is a vector of 9 elements:
  
-   [ TYPE DISPOSITION TRANSFER-ENCODING HEADER BODY CHILDREN ]
-   
- TYPE and DISPOSITION correspond to MIME headers Content-Type: and
- Cotent-Disposition: respectively, and has this format:
+   [TYPE DISPOSITION TRANSFER-ENCODING DISPLAY HEADER TAGLINE BODY
+    CHILDREN HANDLER]
 -  
++
+ TYPE and DISPOSITION correspond to MIME headers Content-Type and
+ Cotent-Disposition respectively, and has this format:
  
    \(VALUE (ATTRIBUTE . VALUE) (ATTRIBUTE . VALUE) ...)
  
@@@ -161,31 -180,61 +181,61 @@@ The corresponding TYPE argument must be
  TRANSFER-ENCODING corresponds to MIME header
  Content-Transfer-Encoding, and is a lowercased string.
  
- HEADER and BODY are a cons (BEG . END), where BEG and END specify
- the region of the corresponding part in RMAIL's data (mbox)
- buffer.  BODY may be nil.  In that case, the current buffer is
- narrowed to the body part.
- CHILDREN is a list of MIME-entities for a \"multipart\" entity, and
- nil for the other types."
-   (vector type disposition transfer-encoding header body children))
+ DISPLAY is a vector [CURRENT NEW], where CURRENT indicates how
+ the header, tagline, and body of the entity are displayed now,
+ and NEW indicates how their displaying should be updated.
+ Both elements are vector [HEADER-DISPLAY TAGLINE-DISPLAY BODY-DISPLAY],
+ where each element is a symbol for the corresponding item that
+ has these values:
+   nil: not displayed
+   t: displayed by the decoded presentation form
+   raw: displayed by the raw MIME data (for the header and body only)
+ HEADER and BODY are vectors [BEG END DISPLAY-FLAG], where BEG and
+ END specify the region of the header or body lines in RMAIL's
+ data (mbox) buffer, and DISPLAY-FLAG non-nil means that the
+ header or body is, by default, displayed by the decoded
+ presentation form.
+ TAGLINE is a vector [TAG BULK-DATA DISPLAY-FLAG], where TAG is a
+ string indicating the depth and index number of the entity,
+ BULK-DATA is a cons (SIZE . TYPE) indicating the size and type of
+ an attached data, DISPLAY-FLAG non-nil means that the tagline is,
+ by default, displayed.
+ CHILDREN is a list of child MIME-entities.  A \"multipart/*\"
+ entity have one or more children.  A \"message/rfc822\" entity
+ has just one child.  Any other entity has no child.
+ HANDLER is a function to insert the entity according to DISPLAY.
+ It is called with one argument ENTITY."
+   (vector type disposition transfer-encoding
+         display header tagline body children handler))
  
  ;; Accessors for a MIME-entity object.
  (defsubst rmail-mime-entity-type (entity) (aref entity 0))
  (defsubst rmail-mime-entity-disposition (entity) (aref entity 1))
  (defsubst rmail-mime-entity-transfer-encoding (entity) (aref entity 2))
- (defsubst rmail-mime-entity-header (entity) (aref entity 3))
- (defsubst rmail-mime-entity-body (entity) (aref entity 4))
- (defsubst rmail-mime-entity-children (entity) (aref entity 5))
+ (defsubst rmail-mime-entity-display (entity) (aref entity 3))
+ (defsubst rmail-mime-entity-header (entity) (aref entity 4))
+ (defsubst rmail-mime-entity-tagline (entity) (aref entity 5))
+ (defsubst rmail-mime-entity-body (entity) (aref entity 6))
+ (defsubst rmail-mime-entity-children (entity) (aref entity 7))
+ (defsubst rmail-mime-entity-handler (entity) (aref entity 8))
+ (defsubst rmail-mime-message-p ()
+   "Non-nil if and only if the current message is a MIME."
+   (or (get-text-property (point) 'rmail-mime-entity)
+       (get-text-property (point-min) 'rmail-mime-entity)))
  
  ;;; Buttons
  
  (defun rmail-mime-save (button)
    "Save the attachment using info in the BUTTON."
-   (let* ((filename (button-get button 'filename))
+   (let* ((rmail-mime-mbox-buffer rmail-view-buffer)
+        (filename (button-get button 'filename))
         (directory (button-get button 'directory))
         (data (button-get button 'data))
-        (mbox-buf rmail-view-buffer)
         (ofilename filename))
      (setq filename (expand-file-name
                    (read-file-name (format "Save as (default: %s): " filename)
        ;; DATA is a MIME-entity object.
        (let ((transfer-encoding (rmail-mime-entity-transfer-encoding data))
              (body (rmail-mime-entity-body data)))
-         (insert-buffer-substring mbox-buf (car body) (cdr body))
+         (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")
  
  (define-button-type 'rmail-mime-save 'action 'rmail-mime-save)
  
 -A MIME entity has three items; header, tagline, and body. 
+ (defun rmail-mime-entity-segment (pos &optional entity)
+   "Return a vector describing the displayed region of a MIME-entity at POS.
+ Optional 2nd argument ENTITY is the MIME-entity at POS.
+ The value is a vector [ INDEX HEADER TAGLINE BODY END], where
+   HEADER: the position of the beginning of a header
+   TAGLINE: the position of the beginning of a tagline
+   BODY: the position of the beginning of a body
+   END: the position of the end of the entity.
+   INDEX: index into the returned vector indicating where POS is."
+   (save-excursion
+     (or entity
+       (setq entity (get-text-property pos 'rmail-mime-entity)))
+     (if (not entity)
+       (vector 1 (point) (point) (point) (point))
+       (let ((current (aref (rmail-mime-entity-display entity) 0))
+           (beg (if (and (> pos (point-min))
+                         (eq (get-text-property (1- pos) 'rmail-mime-entity)
+                             entity))
+                    (previous-single-property-change pos 'rmail-mime-entity
+                                                     nil (point-min))
+                  pos))
+           (index 1)
+           tagline-beg body-beg end)
+       (goto-char beg)
+       (if (aref current 0)
+           (search-forward "\n\n" nil t))
+       (setq tagline-beg (point))
+       (if (>= pos tagline-beg)
+           (setq index 2))
+       (if (aref current 1)
+           (forward-line 1))
+       (setq body-beg (point))
+       (if (>= pos body-beg)
+           (setq index 3))
+       (if (aref current 2)
+           (let ((tag (aref (rmail-mime-entity-tagline entity) 0))
+                 tag2)
+             (setq end (next-single-property-change beg 'rmail-mime-entity
+                                                    nil (point-max)))
+             (while (and (< end (point-max))
+                         (setq entity (get-text-property end 'rmail-mime-entity)
+                               tag2 (aref (rmail-mime-entity-tagline entity) 0))
+                         (and (> (length tag2) 0)
+                              (eq (string-match tag tag2) 0)))
+               (setq end (next-single-property-change end 'rmail-mime-entity
+                                                      nil (point-max)))))
+         (setq end body-beg))
+       (vector index beg tagline-beg body-beg end)))))
+ (defun rmail-mime-next-item ()
+   "Move point to the next displayed item of the current MIME entity.
 -  
++A MIME entity has three items; header, tagline, and body.
+ If we are in the last item of the entity, move point to the first
+ item of the next entity.  If we reach the end of buffer, move
+ point to the first item of the first entity (i.e. the beginning
+ of buffer)."
+   (interactive)
+   (if (rmail-mime-message-p)
+       (let* ((segment (rmail-mime-entity-segment (point)))
+            (next-pos (aref segment (1+ (aref segment 0))))
+            (button (next-button (point))))
+       (goto-char (if (and button (< (button-start button) next-pos))
+                      (button-start button)
+                    next-pos))
+       (if (eobp)
+           (goto-char (point-min))))))
+ (defun rmail-mime-previous-item ()
+   "Move point to the previous displayed item of the current MIME message.
+ A MIME entity has three items; header, tagline, and body.
+ If we are at the beginning of the first item of the entity, move
+ point to the last item of the previous entity.  If we reach the
+ beginning of buffer, move point to the last item of the last
+ entity."
+   (interactive)
+   (when (rmail-mime-message-p)
+     (if (bobp)
+       (goto-char (point-max)))
+     (let* ((segment (rmail-mime-entity-segment (1- (point))))
+          (prev-pos (aref segment (aref segment 0)))
+          (button (previous-button (point))))
+       (goto-char (if (and button (> (button-start button) prev-pos))
+                    (button-start button)
+                  prev-pos)))))
+ (defun rmail-mime-shown-mode (entity)
+   "Make MIME-entity ENTITY displayed by the default way."
+   (let ((new (aref (rmail-mime-entity-display entity) 1)))
+     (aset new 0 (aref (rmail-mime-entity-header entity) 2))
+     (aset new 1 (aref (rmail-mime-entity-tagline entity) 2))
+     (aset new 2 (aref (rmail-mime-entity-body entity) 2))))
++
+ (defun rmail-mime-hidden-mode (entity top)
+   "Make MIME-entity ENTITY displayed in the hidden mode.
+ If TOP is non-nil, display ENTITY only by the tagline.
+ Otherwise, don't display ENTITY."
+   (if top
+       (let ((new (aref (rmail-mime-entity-display entity) 1)))
+       (aset new 0 nil)
+       (aset new 1 top)
+       (aset new 2 nil)
+       (aset (rmail-mime-entity-body entity) 2 nil))
+     (let ((current (aref (rmail-mime-entity-display entity) 0)))
+       (aset current 0 nil)
+       (aset current 1 nil)
+       (aset current 2 nil)))
+   (dolist (child (rmail-mime-entity-children entity))
+     (rmail-mime-hidden-mode child nil)))
+ (defun rmail-mime-raw-mode (entity)
+   "Make MIME-entity ENTITY displayed in the raw mode."
+   (let ((new (aref (rmail-mime-entity-display entity) 1)))
+     (aset new 0 'raw)
+     (aset new 1 nil)
+     (aset new 2 'raw)
+     (dolist (child (rmail-mime-entity-children entity))
+       (rmail-mime-hidden-mode child nil))))
+ (defun rmail-mime-toggle-raw (entity)
+   "Toggle on and off the raw display mode of MIME-entity ENTITY."
+   (let* ((pos (if (eobp) (1- (point-max)) (point)))
+        (entity (get-text-property pos 'rmail-mime-entity))
+        (current (aref (rmail-mime-entity-display entity) 0))
+        (segment (rmail-mime-entity-segment pos entity)))
+     (if (not (eq (aref current 0) 'raw))
+       ;; Enter the raw mode.
+       (rmail-mime-raw-mode entity)
+       ;; Enter the shown mode.
+       (rmail-mime-shown-mode entity))
+     (let ((inhibit-read-only t)
+         (modified (buffer-modified-p)))
+       (save-excursion
+       (goto-char (aref segment 1))
+       (rmail-mime-insert entity)
+       (restore-buffer-modified-p modified)))))
+ (defun rmail-mime-toggle-hidden ()
+   "Toggle on and off the hidden display mode of MIME-entity ENTITY."
+   (interactive)
+   (when (rmail-mime-message-p)
+     (let* ((rmail-mime-mbox-buffer rmail-view-buffer)
+          (rmail-mime-view-buffer (current-buffer))
+          (pos (if (eobp) (1- (point-max)) (point)))
+          (entity (get-text-property pos 'rmail-mime-entity))
+          (current (aref (rmail-mime-entity-display entity) 0))
+          (segment (rmail-mime-entity-segment pos entity)))
+       (if (aref current 2)
+         ;; Enter the hidden mode.
+         (progn
+           ;; If point is in the body part, move it to the tagline
+           ;; (or the header if headline is not displayed).
+           (if (= (aref segment 0) 3)
+               (goto-char (aref segment 2)))
+           (rmail-mime-hidden-mode entity t)
+           ;; If the current entity is the topmost one, display the
+           ;; header.
+           (if (and rmail-mime-mbox-buffer (= (aref segment 1) (point-min)))
+               (let ((new (aref (rmail-mime-entity-display entity) 1)))
+                 (aset new 0 t))))
+       ;; Enter the shown mode.
+       (aset (rmail-mime-entity-body entity) 2 t)
+       (rmail-mime-shown-mode entity))
+       (let ((inhibit-read-only t)
+           (modified (buffer-modified-p))
+           (rmail-mime-mbox-buffer rmail-view-buffer)
+           (rmail-mime-view-buffer rmail-buffer))
+       (save-excursion
+         (goto-char (aref segment 1))
+         (rmail-mime-insert entity)
+         (restore-buffer-modified-p modified))))))
+ (define-key rmail-mode-map "\t" 'rmail-mime-next-item)
+ (define-key rmail-mode-map [backtab] 'rmail-mime-previous-item)
+ (define-key rmail-mode-map "\r" 'rmail-mime-toggle-hidden)
  ;;; Handlers
  
 -  
+ (defun rmail-mime-insert-tagline (entity &rest item-list)
+   "Insert a tag line for MIME-entity ENTITY.
+ ITEM-LIST is a list of strings or button-elements (list) to be added
+ to the tag line."
+   (insert "[")
+   (let ((tag (aref (rmail-mime-entity-tagline entity) 0)))
+     (if (> (length tag) 0) (insert (substring tag 1) ":")))
+   (insert (car (rmail-mime-entity-type entity)))
+   (dolist (item item-list)
+     (when item
+       (if (stringp item)
+         (insert item)
+       (apply 'insert-button item))))
+   (insert "]\n"))
++
+ (defun rmail-mime-insert-header (header)
+   "Decode and insert a MIME-entity header HEADER in the current buffer.
+ HEADER is a vector [BEG END DEFAULT-STATUS].
+ See `rmail-mime-entity' for the detail."
+   (let ((pos (point))
+       (last-coding-system-used nil))
+     (save-restriction
+       (narrow-to-region pos pos)
+       (with-current-buffer rmail-mime-mbox-buffer
+       (let ((rmail-buffer rmail-mime-mbox-buffer)
+             (rmail-view-buffer rmail-mime-view-buffer))
+         (save-excursion
+           (goto-char (aref header 0))
+           (rmail-copy-headers (point) (aref header 1)))))
+       (rfc2047-decode-region pos (point))
+       (if (and last-coding-system-used (not rmail-mime-coding-system))
+         (setq rmail-mime-coding-system last-coding-system-used))
+       (goto-char (point-min))
+       (rmail-highlight-headers)
+       (goto-char (point-max))
+       (insert "\n"))))
  (defun rmail-mime-text-handler (content-type
                                content-disposition
                                content-transfer-encoding)
    "Handle the current buffer as a plain text MIME part."
-   (let* ((charset (cdr (assq 'charset (cdr content-type))))
-        (coding-system (when charset
-                         (intern (downcase charset)))))
-     (when (coding-system-p coding-system)
-       (decode-coding-region (point-min) (point-max) coding-system))))
- (defun rmail-mime-insert-text (entity)
-   "Insert MIME-entity ENTITY as a plain text MIME part in the current buffer."
+   (rmail-mime-insert-text
+    (rmail-mime-entity content-type content-disposition
+                     content-transfer-encoding
+                     (vector (vector nil nil nil) (vector nil nil t))
+                     (vector nil nil nil) (vector "" (cons nil nil) t)
+                     (vector nil nil nil) nil 'rmail-mime-insert-text))
+   t)
+ (defun rmail-mime-insert-decoded-text (entity)
+   "Decode and insert the text body of MIME-entity ENTITY."
    (let* ((content-type (rmail-mime-entity-type entity))
         (charset (cdr (assq 'charset (cdr content-type))))
-        (coding-system (if charset (intern (downcase charset))))
-        (transfer-encoding (rmail-mime-entity-transfer-encoding entity))
-        (body (rmail-mime-entity-body entity)))
-     (save-restriction
-       (narrow-to-region (point) (point))
-       (insert-buffer-substring rmail-buffer (car body) (cdr body))
-       (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))))
-       (if (coding-system-p coding-system)
-         (decode-coding-region (point-min) (point-max) coding-system)))))
+        (coding-system (if charset
+                           (coding-system-from-name charset)))
+        (body (rmail-mime-entity-body entity))
+        (pos (point)))
+     (or (and coding-system (coding-system-p coding-system))
+       (setq coding-system 'undecided))
+     (if (stringp (aref body 0))
+       (insert (aref body 0))
+       (let ((transfer-encoding (rmail-mime-entity-transfer-encoding entity)))
+       (insert-buffer-substring rmail-mime-mbox-buffer
+                                (aref body 0) (aref body 1))
+       (cond ((string= transfer-encoding "base64")
+              (ignore-errors (base64-decode-region pos (point))))
+             ((string= transfer-encoding "quoted-printable")
+              (quoted-printable-decode-region pos (point))))))
+     (decode-coding-region pos (point) coding-system)
+     (or rmail-mime-coding-system
+       (setq rmail-mime-coding-system coding-system))
+     (or (bolp) (insert "\n"))))
+ (defun rmail-mime-insert-text (entity)
+   "Presentation handler for a plain text MIME entity."
+   (let ((current (aref (rmail-mime-entity-display entity) 0))
+       (new (aref (rmail-mime-entity-display entity) 1))
+       (header (rmail-mime-entity-header entity))
+       (tagline (rmail-mime-entity-tagline entity))
+       (body (rmail-mime-entity-body entity))
+       (beg (point))
+       (segment (rmail-mime-entity-segment (point) entity)))
+     (or (integerp (aref body 0))
+       (let ((data (buffer-string)))
+         (aset body 0 data)
+         (delete-region (point-min) (point-max))))
+     ;; header
+     (if (eq (aref current 0) (aref new 0))
+       (goto-char (aref segment 2))
+       (if (aref current 0)
+         (delete-char (- (aref segment 2) (aref segment 1))))
+       (if (aref new 0)
+         (rmail-mime-insert-header header)))
+     ;; tagline
+     (if (eq (aref current 1) (aref new 1))
+       (forward-char (- (aref segment 3) (aref segment 2)))
+       (if (aref current 1)
+         (delete-char (- (aref segment 3) (aref segment 2))))
+       (if (aref new 1)
+         (rmail-mime-insert-tagline entity)))
+     ;; body
+     (if (eq (aref current 2) (aref new 2))
+       (forward-char (- (aref segment 4) (aref segment 3)))
+       (if (aref current 2)
+         (delete-char (- (aref segment 4) (aref segment 3))))
+       (if (aref new 2)
+         (rmail-mime-insert-decoded-text entity)))
+     (put-text-property beg (point) 'rmail-mime-entity entity)))
  
  ;; FIXME move to the test/ directory?
  (defun test-rmail-mime-handler ()
@@@ -265,35 -574,35 +575,35 @@@ MIME-Version: 1.
      (set-buffer-multibyte t)))
  
  
- (defun rmail-mime-insert-image (type data)
-   "Insert an image of type TYPE, where DATA is the image data.
- If DATA is not a string, it is a MIME-entity object."
-   (end-of-line)
-   (let ((modified (buffer-modified-p)))
-     (insert ?\n)
-     (unless (stringp data)
-       ;; DATA is a MIME-entity.
-       (let ((transfer-encoding (rmail-mime-entity-transfer-encoding data))
-           (body (rmail-mime-entity-body data))
-           (mbox-buffer rmail-view-buffer))
+ (defun rmail-mime-insert-image (entity)
+   "Decode and insert the image body of MIME-entity ENTITY."
+   (let* ((content-type (car (rmail-mime-entity-type entity)))
+        (bulk-data (aref (rmail-mime-entity-tagline entity) 1))
+        (body (rmail-mime-entity-body entity))
+        data)
+     (if (stringp (aref body 0))
+       (setq data (aref body 0))
+       (let ((rmail-mime-mbox-buffer rmail-view-buffer)
+           (transfer-encoding (rmail-mime-entity-transfer-encoding entity)))
        (with-temp-buffer
          (set-buffer-multibyte nil)
          (setq buffer-undo-list t)
-         (insert-buffer-substring mbox-buffer (car body) (cdr body))
+         (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))))
          (setq data
                (buffer-substring-no-properties (point-min) (point-max))))))
-     (insert-image (create-image data type t))
-     (set-buffer-modified-p modified)))
+     (insert-image (create-image data (cdr bulk-data) t))
+     (insert "\n")))
  
  (defun rmail-mime-image (button)
    "Display the image associated with BUTTON."
-   (let ((inhibit-read-only t))
-     (rmail-mime-insert-image (button-get button 'image-type)
-                            (button-get button 'image-data))))
+   (save-excursion
+     (goto-char (button-end button))
+     (rmail-mime-toggle-hidden)))
  
  (define-button-type 'rmail-mime-image 'action 'rmail-mime-image)
  
@@@ -306,15 -615,60 +616,60 @@@ For images that Emacs is capable of dis
  depends upon the value of `rmail-mime-show-images'."
    (rmail-mime-insert-bulk
     (rmail-mime-entity content-type content-disposition content-transfer-encoding
-                     nil nil nil)))
+                     (vector (vector nil nil nil) (vector nil t nil))
+                     (vector nil nil nil) (vector "" (cons nil nil) t)
+                     (vector nil nil nil) nil 'rmail-mime-insert-bulk)))
+ (defun rmail-mime-set-bulk-data (entity)
+   "Setup the information about the attachment object for MIME-entity ENTITY.
+ The value is non-nil if and only if the attachment object should be shown
+ directly."
+   (let ((content-type (car (rmail-mime-entity-type entity)))
+       (size (cdr (assq 'size (cdr (rmail-mime-entity-disposition entity)))))
+       (bulk-data (aref (rmail-mime-entity-tagline entity) 1))
+       (body (rmail-mime-entity-body entity))
+       size type to-show)
+     (cond (size
+          (setq size (string-to-number size)))
+         ((stringp (aref body 0))
+          (setq size (length (aref body 0))))
+         (t
+          ;; Rough estimation of the size.
+          (let ((encoding (rmail-mime-entity-transfer-encoding entity)))
+            (setq size (- (aref body 1) (aref body 0)))
+            (cond ((string= encoding "base64")
+                   (setq size (/ (* size 3) 4)))
+                  ((string= encoding "quoted-printable")
+                   (setq size (/ (* size 7) 3)))))))
+     (cond
+      ((string-match "text/" content-type)
+       (setq type 'text))
+      ((string-match "image/\\(.*\\)" content-type)
+       (setq type (image-type-from-file-name
+                 (concat "." (match-string 1 content-type))))
+       (if (and (memq type image-types)
+              (image-type-available-p type))
+         (if (and rmail-mime-show-images
+                  (not (eq rmail-mime-show-images 'button))
+                  (or (not (numberp rmail-mime-show-images))
+                      (< size rmail-mime-show-images)))
+             (setq to-show t))
+       (setq type nil))))
+     (setcar bulk-data size)
+     (setcdr bulk-data type)
+     to-show))
  
  (defun rmail-mime-insert-bulk (entity)
-   "Inesrt a MIME-entity ENTITY as an attachment.
- The optional second arg DATA, if non-nil, is a string containing
- the attachment data that is already decoded."
+   "Presentation handler for an attachment MIME entity."
    ;; Find the default directory for this media type.
    (let* ((content-type (rmail-mime-entity-type entity))
         (content-disposition (rmail-mime-entity-disposition entity))
+        (current (aref (rmail-mime-entity-display entity) 0))
+        (new (aref (rmail-mime-entity-display entity) 1))
+        (header (rmail-mime-entity-header entity))
+        (tagline (rmail-mime-entity-tagline entity))
+        (bulk-data (aref tagline 1))
         (body (rmail-mime-entity-body entity))
         (directory (catch 'directory
                      (dolist (entry rmail-mime-attachment-dirs-alist)
         (filename (or (cdr (assq 'name (cdr content-type)))
                       (cdr (assq 'filename (cdr content-disposition)))
                       "noname"))
-        (label (format "\nAttached %s file: " (car content-type)))
         (units '(B kB MB GB))
-        data udata size osize type)
-     (if body
+        (segment (rmail-mime-entity-segment (point) entity))
+        beg data size)
+     (if (integerp (aref body 0))
        (setq data entity
-             udata entity
-             size (- (cdr body) (car body)))
-       (setq data (buffer-string)
-           udata (string-as-unibyte data)
-           size (length udata))
-       (delete-region (point-min) (point-max)))
-     (setq osize size)
+             size (car bulk-data))
+       (if (stringp (aref body 0))
+         (setq data (aref body 0))
+       (setq data (string-as-unibyte (buffer-string)))
+       (aset body 0 data)
+       (rmail-mime-set-bulk-data entity)
+       (delete-region (point-min) (point-max)))
+       (setq size (length data)))
      (while (and (> size 1024.0) ; cribbed from gnus-agent-expire-done-message
                (cdr units))
        (setq size (/ size 1024.0)
            units (cdr units)))
-     (insert label)
-     (insert-button filename
-                  :type 'rmail-mime-save
-                  'help-echo "mouse-2, RET: Save attachment"
-                  'filename filename
-                  'directory (file-name-as-directory directory)
-                  'data data)
-     (insert (format " (%.0f%s)" size (car units)))
-     (when (and rmail-mime-show-images
-              (string-match "image/\\(.*\\)" (setq type (car content-type)))
-              (setq type (concat "." (match-string 1 type))
-                    type (image-type-from-file-name type))
-              (memq type image-types)
-              (image-type-available-p type))
-       (insert " ")
-       (cond ((or (eq rmail-mime-show-images 'button)
-                (and (numberp rmail-mime-show-images)
-                     (>= osize rmail-mime-show-images)))
-            (insert-button "Display"
-                           :type 'rmail-mime-image
-                           'help-echo "mouse-2, RET: Show image"
-                           'image-type type
-                           'image-data udata))
-           (t
-            (rmail-mime-insert-image type udata))))))
+     (setq beg (point))
+     ;; header
+     (if (eq (aref current 0) (aref new 0))
+       (goto-char (aref segment 2))
+       (if (aref current 0)
+         (delete-char (- (aref segment 2) (aref segment 1))))
+       (if (aref new 0)
+         (rmail-mime-insert-header header)))
+     ;; tagline
+     (if (eq (aref current 1) (aref new 1))
+       (forward-char (- (aref segment 3) (aref segment 2)))
+       (if (aref current 1)
+         (delete-char (- (aref segment 3) (aref segment 2))))
+       (if (aref new 1)
+         (rmail-mime-insert-tagline
+          entity
+          " file:"
+          (list filename
+                :type 'rmail-mime-save
+                'help-echo "mouse-2, RET: Save attachment"
+                'filename filename
+                'directory (file-name-as-directory directory)
+                'data data)
+          (format " (%.0f%s)" size (car units))
+          (if (cdr bulk-data)
+              " ")
+          (if (cdr bulk-data)
+              (list "Toggle show/hide"
+                    :type 'rmail-mime-image
+                    'help-echo "mouse-2, RET: Toggle show/hide"
+                    'image-type (cdr bulk-data)
+                    'image-data data)))))
+     ;; body
+     (if (eq (aref current 2) (aref new 2))
+       (forward-char (- (aref segment 4) (aref segment 3)))
+       (if (aref current 2)
+         (delete-char (- (aref segment 4) (aref segment 3))))
+       (if (aref new 2)
+         (cond ((eq (cdr bulk-data) 'text)
+                (rmail-mime-insert-decoded-text entity))
+               ((cdr bulk-data)
+                (rmail-mime-insert-image entity)))))
+     (put-text-property beg (point) 'rmail-mime-entity entity)))
  
  (defun test-rmail-mime-bulk-handler ()
    "Test of a mail used as an example in RFC 2183."
@@@ -397,19 -774,21 +775,21 @@@ CONTENT-DISPOSITION, and CONTENT-TRANSF
  of the respective parsed headers.  See `rmail-mime-handle' for their
  format."
    (rmail-mime-process-multipart
-    content-type content-disposition content-transfer-encoding nil))
+    content-type content-disposition content-transfer-encoding nil)
+   t)
  
  (defun rmail-mime-process-multipart (content-type
                                     content-disposition
                                     content-transfer-encoding
-                                    parse-only)
+                                    parse-tag)
    "Process the current buffer as a multipart MIME body.
  
- If PARSE-ONLY is nil, modify the current buffer directly for showing
- the MIME body and return nil.
+ If PARSE-TAG is nil, modify the current buffer directly for
showing the MIME body and return nil.
  
- Otherwise, just parse the current buffer and return a list of
- MIME-entity objects.
+ Otherwise, PARSE-TAG is a string indicating the depth and index
+ number of the entity.  In this case, parse the current buffer and
+ return a list of MIME-entity objects.
  
  The other arguments are the same as `rmail-mime-multipart-handler'."
    ;; Some MUAs start boundaries with "--", while it should start
    ;;    of the preceding part.
    ;; We currently don't handle that.
    (let ((boundary (cdr (assq 'boundary content-type)))
+       (subtype (cadr (split-string (car content-type) "/")))
+       (index 0)
        beg end next entities)
      (unless boundary
        (rmail-mm-get-boundary-error-message
      (goto-char (point-min))
      (when (and (search-forward boundary nil t)
               (looking-at "[ \t]*\n"))
-       (if parse-only
+       (if parse-tag
          (narrow-to-region (match-end 0) (point-max))
        (delete-region (point-min) (match-end 0))))
+     ;; Change content-type to the proper default one for the children.
+     (cond ((string-match "mixed" subtype)
+          (setq content-type '("text/plain")))
+         ((string-match "digest" subtype)
+          (setq content-type '("message/rfc822"))))
      ;; Loop over all body parts, where beg points at the beginning of
      ;; the part and end points at the end of the part.  next points at
-     ;; the beginning of the next part.
+     ;; the beginning of the next part.  The current point is just
+     ;; after the boundary tag.
      (setq beg (point-min))
      (while (search-forward boundary nil t)
        (setq end (match-beginning 0))
             (rmail-mm-get-boundary-error-message
              "Malformed boundary" content-type content-disposition
              content-transfer-encoding)))
+       (setq index (1+ index))
        ;; Handle the part.
-       (if parse-only
+       (if parse-tag
          (save-restriction
            (narrow-to-region beg end)
-           (setq entities (cons (rmail-mime-process nil t) entities)))
+           (let ((child (rmail-mime-process
+                         nil (format "%s/%d" parse-tag index)
+                         content-type content-disposition)))
+             ;; Display a tagline.
+             (aset (aref (rmail-mime-entity-display child) 1) 1
+                   (aset (rmail-mime-entity-tagline child) 2 t))
+             (push child entities)))
        (delete-region end next)
        (save-restriction
          (narrow-to-region beg end)
          (rmail-mime-show)))
        (goto-char (setq beg next)))
-     (nreverse entities)))
+     (when parse-tag
+       (setq entities (nreverse entities))
+       (if (string-match "alternative" subtype)
+         ;; Find the best entity to show, and hide all the others.
+         (let (best second)
+           (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))
+           (dolist (child entities)
+             (or (eq best child)
+                 (rmail-mime-hidden-mode child t)))))
+       entities)))
  
  (defun test-rmail-mime-multipart-handler ()
    "Test of a mail used as an example in RFC 2046."
@@@ -493,6 -911,40 +912,40 @@@ This is the epilogue.  It is also to b
      (insert mail)
      (rmail-mime-show t)))
  
+ (defun rmail-mime-insert-multipart (entity)
+   "Presentation handler for a multipart MIME entity."
+   (let ((current (aref (rmail-mime-entity-display entity) 0))
+       (new (aref (rmail-mime-entity-display entity) 1))
+       (header (rmail-mime-entity-header entity))
+       (tagline (rmail-mime-entity-tagline entity))
+       (body (rmail-mime-entity-body entity))
+       (beg (point))
+       (segment (rmail-mime-entity-segment (point) entity)))
+     ;; header
+     (if (eq (aref current 0) (aref new 0))
+       (goto-char (aref segment 2))
+       (if (aref current 0)
+         (delete-char (- (aref segment 2) (aref segment 1))))
+       (if (aref new 0)
+         (rmail-mime-insert-header header)))
+     ;; tagline
+     (if (eq (aref current 1) (aref new 1))
+       (forward-char (- (aref segment 3) (aref segment 2)))
+       (if (aref current 1)
+         (delete-char (- (aref segment 3) (aref segment 2))))
+       (if (aref new 1)
+         (rmail-mime-insert-tagline entity)))
+     (put-text-property beg (point) 'rmail-mime-entity entity)
+     ;; body
+     (if (eq (aref current 2) (aref new 2))
+       (forward-char (- (aref segment 4) (aref segment 3)))
+       (if (aref current 2)
+         (delete-char (- (aref segment 4) (aref segment 3))))
+       (if (aref new 2)
+         (dolist (child (rmail-mime-entity-children entity))
+           (rmail-mime-insert child))))))
  ;;; Main code
  
  (defun rmail-mime-handle (content-type
@@@ -565,7 -1017,9 +1018,9 @@@ The current buffer must contain a singl
  modified."
    (rmail-mime-process show-headers nil))
  
- (defun rmail-mime-process (show-headers parse-only)
+ (defun rmail-mime-process (show-headers parse-tag &optional
+                                       default-content-type
+                                       default-content-disposition)
    (let ((end (point-min))
        content-type
        content-transfer-encoding
      (setq content-type
          (if content-type
              (mail-header-parse-content-type content-type)
-           ;; FIXME: Default "message/rfc822" in a "multipart/digest"
-           ;; according to RFC 2046.
-           '("text/plain")))
+           (or default-content-type '("text/plain"))))
      (setq content-disposition
          (if content-disposition
              (mail-header-parse-content-disposition content-disposition)
            ;; If none specified, we are free to choose what we deem
            ;; suitable according to RFC 2183.  We like inline.
-           '("inline")))
+           (or default-content-disposition '("inline"))))
      ;; Unrecognized disposition types are to be treated like
      ;; attachment according to RFC 2183.
      (unless (member (car content-disposition) '("inline" "attachment"))
        (setq content-disposition '("attachment")))
  
-     (if parse-only
-       (cond ((string-match "multipart/.*" (car content-type))
-              (setq end (1- end))
-              (save-restriction
-                (let ((header (if show-headers (cons (point-min) end))))
+     (if parse-tag
+       (let* ((is-inline (string= (car content-disposition) "inline"))
+              (header (vector (point-min) end nil))
+              (tagline (vector parse-tag (cons nil nil) t))
+              (body (vector end (point-max) is-inline))
+              (new (vector (aref header 2) (aref tagline 2) (aref body 2)))
+              children handler entity)
+         (cond ((string-match "multipart/.*" (car content-type))
+                (save-restriction
+                  (narrow-to-region (1- end) (point-max))
+                  (setq children (rmail-mime-process-multipart
+                                  content-type
+                                  content-disposition
+                                  content-transfer-encoding
+                                  parse-tag)
+                        handler 'rmail-mime-insert-multipart)))
+               ((string-match "message/rfc822" (car content-type))
+                (save-restriction
                   (narrow-to-region end (point-max))
-                  (rmail-mime-entity content-type
-                                     content-disposition
-                                     content-transfer-encoding
-                                     header nil
-                                     (rmail-mime-process-multipart
-                                      content-type content-disposition
-                                      content-transfer-encoding t)))))
-             ((string-match "message/rfc822" (car content-type))
-              (or show-headers
-                  (narrow-to-region end (point-max)))
-              (rmail-mime-process t t))
-             (t
-              (rmail-mime-entity content-type
-                                 content-disposition
-                                 content-transfer-encoding
-                                 nil
-                                 (cons end (point-max))
-                                 nil)))
+                  (let* ((msg (rmail-mime-process t parse-tag
+                                                  '("text/plain") '("inline")))
+                         (msg-new (aref (rmail-mime-entity-display msg) 1)))
+                    ;; Show header of the child.
+                    (aset msg-new 0 t)
+                    (aset (rmail-mime-entity-header msg) 2 t)
+                    ;; Hide tagline of the child.
+                    (aset msg-new 1 nil)
+                    (aset (rmail-mime-entity-tagline msg) 2 nil)
+                    (setq children (list msg)
+                          handler 'rmail-mime-insert-multipart))))
+               ((and is-inline (string-match "text/" (car content-type)))
+                ;; Don't need a tagline.
+                (aset new 1 (aset tagline 2 nil))
+                (setq handler 'rmail-mime-insert-text))
+               (t
+                ;; Force hidden mode.
+                (aset new 1 (aset tagline 2 t))
+                (aset new 2 (aset body 2 nil))
+                (setq handler 'rmail-mime-insert-bulk)))
+         (setq entity (rmail-mime-entity content-type
+                                         content-disposition
+                                         content-transfer-encoding
+                                         (vector (vector nil nil nil) new)
+                                         header tagline body children handler))
+         (if (and (eq handler 'rmail-mime-insert-bulk)
+                  (rmail-mime-set-bulk-data entity))
+             ;; Show the body.
+             (aset new 2 (aset body 2 t)))
+         entity)
        ;; Hide headers and handle the part.
 -                       (rmail-mime-entity 
+       (put-text-property (point-min) (point-max) 'rmail-mime-entity
++                       (rmail-mime-entity
+                        content-type content-disposition
+                        content-transfer-encoding
+                        (vector (vector 'raw nil 'raw) (vector 'raw nil 'raw))
+                        (vector nil nil 'raw) (vector "" (cons nil nil) nil)
+                        (vector nil nil 'raw) nil nil))
        (save-restriction
        (cond ((string= (car content-type) "message/rfc822")
               (narrow-to-region end (point-max)))
        (rmail-mime-handle content-type content-disposition
                           content-transfer-encoding)))))
  
- (defun rmail-mime-insert-multipart (entity)
-   "Insert MIME-entity ENTITY of multipart type in the current buffer."
-   (let ((subtype (cadr (split-string (car (rmail-mime-entity-type entity))
-                                    "/")))
-       (disposition (rmail-mime-entity-disposition entity))
-       (header (rmail-mime-entity-header entity))
-       (children (rmail-mime-entity-children entity)))
-     (if header
-       (let ((pos (point)))
-         (or (bolp)
-             (insert "\n"))
-         (insert-buffer-substring rmail-buffer (car header) (cdr header))
-         (rfc2047-decode-region pos (point))
-         (insert "\n")))
-     (cond
-      ((string= subtype "mixed")
-       (dolist (child children)
-       (rmail-mime-insert child '("text/plain") disposition)))
-      ((string= subtype "digest")
-       (dolist (child children)
-       (rmail-mime-insert child '("message/rfc822") disposition)))
-      ((string= subtype "alternative")
-       (let (best-plain-text best-text)
-       (dolist (child children)
-         (if (string= (or (car (rmail-mime-entity-disposition child))
-                          (car disposition))
-                      "inline")
-             (if (string-match "text/plain"
-                               (car (rmail-mime-entity-type child)))
-                 (setq best-plain-text child)
-               (if (string-match "text/.*"
-                                 (car (rmail-mime-entity-type child)))
-                   (setq best-text child)))))
-       (if (or best-plain-text best-text)
-           (rmail-mime-insert (or best-plain-text best-text))
-         ;; No child could be handled.  Insert all.
-         (dolist (child children)
-           (rmail-mime-insert child nil disposition)))))
-      (t
-       ;; Unsupported subtype.  Insert all of them.
-       (dolist (child children)
-       (rmail-mime-insert child))))))
  (defun rmail-mime-parse ()
    "Parse the current Rmail message as a MIME message.
- The value is a MIME-entiy object (see `rmail-mime-enty-new')."
-   (save-excursion
-     (goto-char (point-min))
-     (condition-case nil
-       (rmail-mime-process nil t)
-       (error nil))))
- (defun rmail-mime-insert (entity &optional content-type disposition)
+ The value is a MIME-entiy object (see `rmail-mime-entity').
+ If an error occurs, return an error message string."
+   (let ((rmail-mime-mbox-buffer (if (rmail-buffers-swapped-p)
+                                   rmail-view-buffer
+                                 (current-buffer))))
+     (condition-case err
+       (with-current-buffer rmail-mime-mbox-buffer
+         (save-excursion
+           (goto-char (point-min))
+           (let* ((entity (rmail-mime-process t ""
+                                              '("text/plain") '("inline")))
+                  (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)))))
+ (defun rmail-mime-insert (entity)
    "Insert a MIME-entity ENTITY in the current buffer.
  
  This function will be called recursively if multiple parts are
  available."
-   (if (rmail-mime-entity-children entity)
-       (rmail-mime-insert-multipart entity)
-     (setq content-type
-         (or (rmail-mime-entity-type entity) content-type))
-     (setq disposition
-         (or (rmail-mime-entity-disposition entity) disposition))
-     (if (and (string= (car disposition) "inline")
-            (string-match "text/.*" (car content-type)))
-       (rmail-mime-insert-text entity)
-       (rmail-mime-insert-bulk entity))))
+   (let ((current (aref (rmail-mime-entity-display entity) 0))
+       (new (aref (rmail-mime-entity-display entity) 1)))
+     (if (not (eq (aref new 0) 'raw))
+       ;; Not a raw-mode.  Each handler should handle it.
+       (funcall (rmail-mime-entity-handler entity) entity)
+       (let ((header (rmail-mime-entity-header entity))
+           (tagline (rmail-mime-entity-tagline entity))
+           (body (rmail-mime-entity-body entity))
+           (beg (point))
+           (segment (rmail-mime-entity-segment (point) entity)))
+       ;; header
+       (if (eq (aref current 0) (aref new 0))
+           (goto-char (aref segment 2))
+         (if (aref current 0)
+             (delete-char (- (aref segment 2) (aref segment 1))))
+         (insert-buffer-substring rmail-mime-mbox-buffer
+                                    (aref header 0) (aref header 1)))
+       ;; tagline
+       (if (aref current 1)
+           (delete-char (- (aref segment 3) (aref segment 2))))
+       ;; body
+       (if (eq (aref current 2) (aref new 2))
+           (forward-char (- (aref segment 4) (aref segment 3)))
+         (if (aref current 2)
+             (delete-char (- (aref segment 4) (aref segment 3))))
+         (insert-buffer-substring rmail-mime-mbox-buffer
+                                  (aref body 0) (aref body 1)))
+       (put-text-property beg (point) 'rmail-mime-entity entity)))
+     (dotimes (i 3)
+       (aset current i (aref new i)))))
  
  (define-derived-mode rmail-mime-mode fundamental-mode "RMIME"
    "Major mode used in `rmail-mime' buffers."
    (setq font-lock-defaults '(rmail-font-lock-keywords t t nil nil)))
  
  ;;;###autoload
- (defun rmail-mime ()
-   "Process the current Rmail message as a MIME message.
- This creates a temporary \"*RMAIL*\" buffer holding a decoded
- copy of the message.  Inline content-types are handled according to
+ (defun rmail-mime (&optional arg)
+   "Toggle displaying of a MIME message.
+ The actualy behavior depends on the value of `rmail-enable-mime'.
+ If `rmail-enable-mime' is t (default), this command change the
+ displaying of a MIME message between decoded presentation form
+ and raw data.
+ With ARG, toggle the displaying of the current MIME entity only.
+ If `rmail-enable-mime' is nil, this creates a temporary
+ \"*RMAIL*\" buffer holding a decoded copy of the message.  Inline
+ content-types are handled according to
  `rmail-mime-media-type-handlers-alist'.  By default, this
  displays text and multipart messages, and offers to download
  attachments as specfied by `rmail-mime-attachment-dirs-alist'."
-   (interactive)
-   (let ((data (rmail-apply-in-message rmail-current-message 'buffer-string))
-       (buf (get-buffer-create "*RMAIL*")))
-     (set-buffer buf)
-     (setq buffer-undo-list t)
-     (let ((inhibit-read-only t))
-       ;; Decoding the message in fundamental mode for speed, only
-       ;; switching to rmail-mime-mode at the end for display.  Eg
-       ;; quoted-printable-decode-region gets very slow otherwise (Bug#4993).
-       (fundamental-mode)
-       (erase-buffer)
-       (insert data)
-       (rmail-mime-show t)
-       (rmail-mime-mode)
-       (set-buffer-modified-p nil))
-     (view-buffer buf)))
+   (interactive "P")
+   (if rmail-enable-mime
+       (if (rmail-mime-message-p)
+         (let ((rmail-mime-mbox-buffer rmail-view-buffer)
+               (rmail-mime-view-buffer rmail-buffer)
+               (entity (get-text-property (point) 'rmail-mime-entity)))
+           (if arg
+               (if entity
+                   (rmail-mime-toggle-raw entity))
+             (goto-char (point-min))
+             (rmail-mime-toggle-raw
+              (get-text-property (point) 'rmail-mime-entity))))
+       (message "Not a MIME message"))
+     (let* ((data (rmail-apply-in-message rmail-current-message 'buffer-string))
+          (buf (get-buffer-create "*RMAIL*"))
+          (rmail-mime-mbox-buffer rmail-view-buffer)
+          (rmail-mime-view-buffer buf))
+       (set-buffer buf)
+       (setq buffer-undo-list t)
+       (let ((inhibit-read-only t))
+       ;; Decoding the message in fundamental mode for speed, only
+       ;; switching to rmail-mime-mode at the end for display.  Eg
+       ;; quoted-printable-decode-region gets very slow otherwise (Bug#4993).
+       (fundamental-mode)
+       (erase-buffer)
+       (insert data)
+       (rmail-mime-show t)
+       (rmail-mime-mode)
+       (set-buffer-modified-p nil))
+       (view-buffer buf))))
  
  (defun rmail-mm-get-boundary-error-message (message type disposition encoding)
    "Return MESSAGE with more information on the main mime components."
  
  (defun rmail-show-mime ()
    "Function to set in `rmail-show-mime-function' (which see)."
-   (let ((mbox-buf rmail-buffer)
-       (entity (rmail-mime-parse)))
-     (if entity
-       (with-current-buffer rmail-view-buffer
-         (let ((inhibit-read-only t)
-               (rmail-buffer mbox-buf))
-           (erase-buffer)
-           (rmail-mime-insert entity)))
-       ;; Decoding failed.  Insert the original message body as is.
-       (let ((region (with-current-buffer mbox-buf
+   (let ((entity (rmail-mime-parse))
+       (rmail-mime-mbox-buffer rmail-buffer)
+       (rmail-mime-view-buffer rmail-view-buffer)
+       (rmail-mime-coding-system nil))
+     (if (vectorp entity)
+       (with-current-buffer rmail-mime-view-buffer
+         (erase-buffer)
+         (rmail-mime-insert entity)
+         (if rmail-mime-coding-system
+             (set-buffer-file-coding-system rmail-mime-coding-system t t)))
+       ;; Decoding failed.  ENTITY is an error message.  Insert the
+       ;; original message body as is, and show warning.
+       (let ((region (with-current-buffer rmail-mime-mbox-buffer
                      (goto-char (point-min))
                      (re-search-forward "^$" nil t)
                      (forward-line 1)
-                     (cons (point) (point-max)))))
-       (with-current-buffer rmail-view-buffer
+                     (vector (point-min) (point) (point-max)))))
+       (with-current-buffer rmail-mime-view-buffer
          (let ((inhibit-read-only t))
            (erase-buffer)
-           (insert-buffer-substring mbox-buf (car region) (cdr region))))
-       (message "MIME decoding failed")))))
+           (rmail-mime-insert-header region)
+           (insert-buffer-substring rmail-mime-mbox-buffer
+                                    (aref region 1) (aref region 2))))
+       (set-buffer-file-coding-system 'no-conversion t t)
+       (message "MIME decoding failed: %s" entity)))))
  
  (setq rmail-show-mime-function 'rmail-show-mime)
  
  (defun rmail-insert-mime-forwarded-message (forward-buffer)
    "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)."
-   (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer)))
+   (let ((rmail-mime-mbox-buffer
+        (with-current-buffer forward-buffer rmail-view-buffer)))
      (save-restriction
        (narrow-to-region (point) (point))
-       (message-forward-make-body-mime mbox-buf))))
+       (message-forward-make-body-mime rmail-mime-mbox-buffer))))
  
  (setq rmail-insert-mime-forwarded-message-function
        'rmail-insert-mime-forwarded-message)
    "Function to set in `rmail-search-mime-message-function' (which see)."
    (save-restriction
      (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg))
-     (let ((mbox-buf (current-buffer))
-         (header-end (save-excursion
-                       (re-search-forward "^$" nil 'move) (point)))
-         (body-end (point-max))
-         (entity (rmail-mime-parse)))
-       (or 
+     (let* ((rmail-mime-mbox-buffer (current-buffer))
+          (rmail-mime-view-buffer rmail-view-buffer)
+          (header-end (save-excursion
+                        (re-search-forward "^$" nil 'move) (point)))
+          (body-end (point-max))
+          (entity (rmail-mime-parse)))
 -      (or 
++      (or
         ;; At first, just search the headers.
         (with-temp-buffer
-        (insert-buffer-substring mbox-buf nil header-end)
+        (insert-buffer-substring rmail-mime-mbox-buffer nil header-end)
         (rfc2047-decode-region (point-min) (point))
         (goto-char (point-min))
         (re-search-forward regexp nil t))
         (if (and entity
                (let* ((content-type (rmail-mime-entity-type entity))
                       (charset (cdr (assq 'charset (cdr content-type)))))
--                (or (not (string-match "text/.*" (car content-type))) 
++                (or (not (string-match "text/.*" (car content-type)))
                      (and charset
                           (not (string= (downcase charset) "us-ascii"))))))
           ;; Search the decoded MIME message.
           (with-temp-buffer
-            (let ((rmail-buffer mbox-buf))
-              (rmail-mime-insert entity))
+            (rmail-mime-insert entity)
             (goto-char (point-min))
             (re-search-forward regexp nil t))
         ;; Search the body without decoding.
diff --combined lisp/term/w32-win.el
index a1ab5a8225ccd520960eb86408734bfa4b9e9c5c,7bded5b87586e3da31b960d24f6db5160a3a6fd2..df4057aba24d66c374282ff14ff9ecb4d87e692f
@@@ -148,7 -148,17 +148,7 @@@ the last file dropped is selected.
  (global-set-key [language-change] 'ignore)
  
  (defvar x-resource-name)
 -(defvar x-colors)
  
 -\f
 -(defun xw-defined-colors (&optional frame)
 -  "Internal function called by `defined-colors', which see."
 -  (or frame (setq frame (selected-frame)))
 -  (let ((defined-colors nil))
 -    (dolist (this-color (or (mapcar 'car w32-color-map) x-colors))
 -      (and (color-supported-p this-color frame t)
 -         (setq defined-colors (cons this-color defined-colors))))
 -    defined-colors))
  \f
  ;;;; Function keys
  
@@@ -186,21 -196,29 +186,29 @@@ See the documentation of `create-fontse
    "Report an error when a suspend is attempted."
    (error "Suspending an Emacs running under W32 makes no sense"))
  
 -(defvar image-library-alist)
 +(defvar dynamic-library-alist)
  
 -;;; Set default known names for image libraries
 -(setq image-library-alist
 +;;; Set default known names for external libraries
 +(setq dynamic-library-alist
-       '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
-         (png "libpng12d.dll" "libpng12.dll" "libpng.dll"
-        ;; these are libpng 1.2.8 from GTK+
-        "libpng13d.dll" "libpng13.dll")
-         (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
-         (tiff "libtiff3.dll" "libtiff.dll")
-         (gif "giflib4.dll" "libungif4.dll" "libungif.dll")
-         (svg "librsvg-2-2.dll")
-         (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
-         (glib "libglib-2.0-0.dll")
-       (gobject "libgobject-2.0-0.dll")))
+       (list
+        '(xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
+        ;; Versions of libpng 1.4.x and later are incompatible with
+        ;; earlier versions.  Set up the list of libraries according to
+        ;; the version we were compiled against.  (If we were compiled
+        ;; without PNG support, libpng-version's value is -1.)
+        (if (>= libpng-version 10400)
+          ;; libpng14-14.dll is libpng 1.4.3 from GTK+
+          '(png "libpng14-14.dll" "libpng14.dll")
+        '(png "libpng12d.dll" "libpng12.dll" "libpng3.dll" "libpng.dll"
+              ;; these are libpng 1.2.8 from GTK+
+              "libpng13d.dll" "libpng13.dll"))
+         '(jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
+         '(tiff "libtiff3.dll" "libtiff.dll")
+         '(gif "giflib4.dll" "libungif4.dll" "libungif.dll")
+         '(svg "librsvg-2-2.dll")
+         '(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
+         '(glib "libglib-2.0-0.dll")
+       '(gobject "libgobject-2.0-0.dll")))
  
  ;;; multi-tty support
  (defvar w32-initialized nil
  
  (provide 'w32-win)
  
 -;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166
  ;;; w32-win.el ends here
diff --combined lisp/textmodes/rst.el
index 5bf1a7c7894b88690a17408b5fb668f542ba28e4,8a4c06ba150bb289251540f44f620e91678001c8..067fa3a06d78d3064a2abf2f30285ece242b2945
@@@ -698,9 -698,11 +698,9 @@@ existing decoration, they are removed b
  requested decoration."
  
    (interactive)
 -  (let (marker
 -        len)
 -
        (end-of-line)
 -      (setq marker (point-marker))
 +  (let ((marker (point-marker))
 +        len)
  
        ;; Fixup whitespace at the beginning and end of the line
        (if (or (null indent) (eq style 'simple))
@@@ -787,7 -789,7 +787,7 @@@ This function does not detect the hiera
  just finds all of them in a file.  You can then invoke another
  function to remove redundancies and inconsistencies."
  
 -  (let (positions
 +  (let ((positions ())
          (curline 1))
      ;; Iterate over all the section titles/decorations in the file.
      (save-excursion
@@@ -868,7 -870,7 +868,7 @@@ A decoration can be said to exist if th
  A point can be specified to go to the given location before
  extracting the decoration."
  
 -  (let (char style indent)
 +  (let (char style)
      (save-excursion
        (if point (goto-char point))
        (beginning-of-line)
                           (forward-line -1)
                           (rst-line-homogeneous-nodent-p)))
  
 -                (under (save-excursion
 -                         (forward-line +1)
 -                         (rst-line-homogeneous-nodent-p)))
 -                )
 +                 (under (save-excursion
 +                          (forward-line +1)
 +                          (rst-line-homogeneous-nodent-p)))
 +                 )
  
              ;; Check that the line above the overline is not part of a title
              ;; above it.
               ;; Both overline and underline.
               (t
                (setq char under
 -                    style 'over-and-under))
 -             )
 -            )
 -        )
 -      ;; Find indentation.
 -      (setq indent (save-excursion (back-to-indentation) (current-column)))
 -      )
 -    ;; Return values.
 -    (list char style indent)))
 +                    style 'over-and-under)))))
 +      ;; Return values.
 +      (list char style
 +            ;; Find indentation.
 +            (save-excursion (back-to-indentation) (current-column))))))
  
  
  (defun rst-get-decorations-around (&optional alldecos)
@@@ -1035,7 -1041,7 +1035,7 @@@ b. a negative numerical argument, whic
    (interactive)
  
    (let* (;; Save our original position on the current line.
 -       (origpt (set-marker (make-marker) (point)))
 +       (origpt (point-marker))
  
         ;; Parse the positive and negative prefix arguments.
           (reverse-direction
@@@ -1389,28 -1395,32 +1389,28 @@@ hierarchy is similar to that used by `r
      ;; Create a list of markers for all the decorations which are found within
      ;; the region.
      (save-excursion
 -      (let (line)
 +      (let (line)
          (while (and cur (< (setq line (caar cur)) region-end-line))
 -          (setq m (make-marker))
            (goto-char (point-min))
            (forward-line (1- line))
 -          (push (list (set-marker m (point)) (cdar cur)) marker-list)
 +          (push (list (point-marker) (cdar cur)) marker-list)
            (setq cur (cdr cur)) ))
  
        ;; Apply modifications.
 -      (let (nextdeco)
 -        (dolist (p marker-list)
 -          ;; Go to the decoration to promote.
 -          (goto-char (car p))
 -
 -          ;; Rotate the next decoration.
 -          (setq nextdeco (rst-get-next-decoration
 -                          (cadr p) hier suggestion demote))
 -
 -          ;; Update the decoration.
 -          (apply 'rst-update-section nextdeco)
 -
 -          ;; Clear marker to avoid slowing down the editing after we're done.
 -          (set-marker (car p) nil)
 -          ))
 +      (dolist (p marker-list)
 +        ;; Go to the decoration to promote.
 +        (goto-char (car p))
 +
 +        ;; Update the decoration.
 +        (apply 'rst-update-section
 +               ;; Rotate the next decoration.
 +               (rst-get-next-decoration
 +                (cadr p) hier suggestion demote))
 +
 +        ;; Clear marker to avoid slowing down the editing after we're done.
 +        (set-marker (car p) nil))
        (setq deactivate-mark nil)
 -    )))
 +      )))
  
  
  
@@@ -1453,10 -1463,11 +1453,10 @@@ in order to adapt it to our preferred s
           (levels-and-markers (mapcar
                                (lambda (deco)
                                  (cons (rst-position (cdr deco) hier)
 -                                      (let ((m (make-marker)))
 +                                      (progn
                                          (goto-char (point-min))
                                          (forward-line (1- (car deco)))
 -                                        (set-marker m (point))
 -                                        m)))
 +                                          (point-marker))))
                                alldecos))
           )
        (dolist (lm levels-and-markers)
@@@ -1500,7 -1511,7 +1500,7 @@@ section levels.
    "Find all the positions of prefixes in region between BEG and END.
  This is used to find bullets and enumerated list items.  PFX-RE
  is a regular expression for matching the lines with items."
 -  (let (pfx)
 +  (let ((pfx ()))
      (save-excursion
        (goto-char beg)
        (while (< (point) end)
@@@ -1624,9 -1635,10 +1624,9 @@@ child.  This has advantages later in pr
                        (forward-line (1- (car deco)))
                        (list (gethash (cons (cadr deco) (caddr deco)) levels)
                              (rst-get-stripped-line)
 -                            (let ((m (make-marker)))
 +                            (progn
                                (beginning-of-line 1)
 -                              (set-marker m (point)))
 -                            ))
 +                              (point-marker))))
                      alldecos)))
  
      (let ((lcontnr (cons nil lines)))
@@@ -1775,7 -1787,7 +1775,7 @@@ The TOC is inserted indented at the cur
        (delete-region init-point (+ init-point (length initial-indent)))
  
        ;; Delete the last newline added.
 -      (delete-backward-char 1)
 +      (delete-char -1)
      )))
  
  (defun rst-toc-insert-node (node level indent pfx)
@@@ -2045,11 -2057,11 +2045,11 @@@ brings the cursor in that section.
    "In `rst-toc' mode, go to the occurrence whose line you click on.
  EVENT is the input event."
    (interactive "e")
 -  (let (pos)
 +  (let ((pos
      (with-current-buffer (window-buffer (posn-window (event-end event)))
        (save-excursion
          (goto-char (posn-point (event-end event)))
 -        (setq pos (rst-toc-mode-find-section))))
 +             (rst-toc-mode-find-section)))))
      (pop-to-buffer (marker-buffer pos))
      (goto-char pos)
      (recenter 5)))
@@@ -2294,8 -2306,8 +2294,8 @@@ of (COLUMN-NUMBER . LINE) pairs.
  
  (defun rst-shift-region-guts (find-next-fun offset-fun)
    "(See `rst-shift-region-right' for a description)."
 -  (let* ((mbeg (set-marker (make-marker) (region-beginning)))
 -       (mend (set-marker (make-marker) (region-end)))
 +  (let* ((mbeg (copy-marker (region-beginning)))
 +       (mend (copy-marker (region-end)))
         (tabs (rst-compute-bullet-tabs mbeg))
         (leftmostcol (rst-find-leftmost-column (region-beginning) (region-end)))
         )
@@@ -2374,8 -2386,8 +2374,8 @@@ Also, if invoked with a negative prefi
  indentation is removed, up to the leftmost character in the
  region, and automatic filling is disabled."
    (interactive "P")
 -  (let ((mbeg (set-marker (make-marker) (region-beginning)))
 -      (mend (set-marker (make-marker) (region-end)))
 +  (let ((mbeg (copy-marker (region-beginning)))
 +      (mend (copy-marker (region-end)))
        (leftmostcol (rst-find-leftmost-column
                      (region-beginning) (region-end)))
        (rst-shift-fill-region
@@@ -2409,7 -2421,8 +2409,7 @@@ Set FIRST-ONLY to true if you want to c
  of each paragraph only."
    `(save-excursion
      (let ((leftcol (rst-find-leftmost-column ,beg ,end))
 -        (endm (set-marker (make-marker) ,end))
 -        )
 +        (endm (copy-marker ,end)))
  
        (do* (;; Iterate lines
            (l (progn (goto-char ,beg) (back-to-indentation))
@@@ -2447,7 -2460,8 +2447,7 @@@ first of a paragraph.
  
    `(save-excursion
       (let ((,leftmost (rst-find-leftmost-column ,beg ,end))
 -         (endm (set-marker (make-marker) ,end))
 -         )
 +         (endm (copy-marker ,end)))
  
        (do* (;; Iterate lines
            (l (progn (goto-char ,beg) (back-to-indentation))
@@@ -2524,7 -2538,9 +2524,7 @@@ region to enumerated lists, renumberin
    (let* (;; Find items and convert the positions to markers.
         (items (mapcar
                 (lambda (x)
 -                 (cons (let ((m (make-marker)))
 -                         (set-marker m (car x))
 -                         m)
 +                 (cons (copy-marker (car x))
                         (cdr x)))
                 (rst-find-pfx-in-region beg end rst-re-items)))
         (count 1)
@@@ -2569,132 -2585,62 +2569,132 @@@ With prefix argument set the empty line
    :group 'faces
    :version "21.1")
  
 -(defcustom rst-block-face 'font-lock-keyword-face
 +(defface rst-block '((t :inherit font-lock-keyword-face))
 +  "Face used for all syntax marking up a special block."
 +  :version "24.1"
 +  :group 'rst-faces)
 +
 +(defcustom rst-block-face 'rst-block
    "All syntax marking up a special block."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-block-face
 +                        "customize the face `rst-block' instead."
 +                        "24.1")
  
 -(defcustom rst-external-face 'font-lock-type-face
 +(defface rst-external '((t :inherit font-lock-type-face))
 +  "Face used for field names and interpreted text."
 +  :version "24.1"
 +  :group 'rst-faces)
 +
 +(defcustom rst-external-face 'rst-external
    "Field names and interpreted text."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-external-face
 +                        "customize the face `rst-external' instead."
 +                        "24.1")
 +
 +(defface rst-definition '((t :inherit font-lock-function-name-face))
 +  "Face used for all other defining constructs."
 +  :version "24.1"
 +  :group 'rst-faces)
  
 -(defcustom rst-definition-face 'font-lock-function-name-face
 +(defcustom rst-definition-face 'rst-definition
    "All other defining constructs."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 -
 -(defcustom rst-directive-face
 -  ;; XEmacs compatibility
 -  (if (boundp 'font-lock-builtin-face)
 -      'font-lock-builtin-face
 -    'font-lock-preprocessor-face)
 +(make-obsolete-variable 'rst-definition-face
 +                        "customize the face `rst-definition' instead."
 +                        "24.1")
 +
 +;; XEmacs compatibility (?).
 +(defface rst-directive (if (boundp 'font-lock-builtin-face)
 +                           '((t :inherit font-lock-builtin-face))
 +                         '((t :inherit font-lock-preprocessor-face)))
 +  "Face used for directives and roles."
 +  :version "24.1"
 +  :group 'rst-faces)
 +
 +(defcustom rst-directive-face 'rst-directive
    "Directives and roles."
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-directive-face
 +                        "customize the face `rst-directive' instead."
 +                        "24.1")
  
 -(defcustom rst-comment-face 'font-lock-comment-face
 +(defface rst-comment '((t :inherit font-lock-comment-face))
 +  "Face used for comments."
 +  :version "24.1"
 +  :group 'rst-faces)
 +
 +(defcustom rst-comment-face 'rst-comment
    "Comments."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-comment-face
 +                        "customize the face `rst-comment' instead."
 +                        "24.1")
 +
 +(defface rst-emphasis1 '((t :inherit italic))
 +  "Face used for simple emphasis."
 +  :version "24.1"
 +  :group 'rst-faces)
  
 -(defcustom rst-emphasis1-face
 -  ;; XEmacs compatibility
 -  (if (facep 'italic)
 -      ''italic
 -    'italic)
 +(defcustom rst-emphasis1-face 'rst-emphasis1
    "Simple emphasis."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-emphasis1-face
 +                        "customize the face `rst-emphasis1' instead."
 +                        "24.1")
 +
 +(defface rst-emphasis2 '((t :inherit bold))
 +  "Face used for double emphasis."
 +  :version "24.1"
 +  :group 'rst-faces)
  
 -(defcustom rst-emphasis2-face
 -  ;; XEmacs compatibility
 -  (if (facep 'bold)
 -      ''bold
 -    'bold)
 +(defcustom rst-emphasis2-face 'rst-emphasis2
    "Double emphasis."
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-emphasis2-face
 +                        "customize the face `rst-emphasis2' instead."
 +                        "24.1")
  
 -(defcustom rst-literal-face 'font-lock-string-face
 +(defface rst-literal '((t :inherit font-lock-string-face))
 +  "Face used for literal text."
 +  :version "24.1"
 +  :group 'rst-faces)
 +
 +(defcustom rst-literal-face 'rst-literal
    "Literal text."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-literal-face
 +                        "customize the face `rst-literal' instead."
 +                        "24.1")
 +
 +(defface rst-reference '((t :inherit font-lock-variable-name-face))
 +  "Face used for references to a definition."
 +  :version "24.1"
 +  :group 'rst-faces)
  
 -(defcustom rst-reference-face 'font-lock-variable-name-face
 +(defcustom rst-reference-face 'rst-reference
    "References to a definition."
 +  :version "24.1"
    :group 'rst-faces
    :type '(face))
 +(make-obsolete-variable 'rst-reference-face
 +                        "customize the face `rst-reference' instead."
 +                        "24.1")
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
@@@ -2843,7 -2789,10 +2843,7 @@@ details check the Rst Faces Defaults gr
  
         ;; There seems to be a bug leading to error "Stack overflow in regexp
         ;; matcher" when "|" or "\\*" are the characters searched for
 -       (re-imendbeg
 -        (if (< emacs-major-version 21)
 -            "]"
 -          "\\]\\|\\\\."))
 +       (re-imendbeg "\\]\\|\\\\.")
         ;; inline markup content end
         (re-imend (concat re-imendbeg "\\)*[^\t \\\\]\\)"))
         ;; inline markup content without asterisk
  
       ;; Simple `Body Elements`_
       ;; `Bullet Lists`_
 -     (list
 -      (concat re-bol "\\([-*+]" re-blksep1 "\\)")
 -      1 rst-block-face)
 +     `(,(concat re-bol "\\([-*+]" re-blksep1 "\\)")
 +       1 rst-block-face)
       ;; `Enumerated Lists`_
 -     (list
 -      (concat re-bol "\\((?\\(#\\|[0-9]+\\|[A-Za-z]\\|[IVXLCMivxlcm]+\\)[.)]"
 -            re-blksep1 "\\)")
 -      1 rst-block-face)
 +     `(,(concat re-bol "\\((?\\(#\\|[0-9]+\\|[A-Za-z]\\|[IVXLCMivxlcm]+\\)[.)]"
 +                re-blksep1 "\\)")
 +       1 rst-block-face)
       ;; `Definition Lists`_ FIXME: missing
       ;; `Field Lists`_
 -     (list
 -      (concat re-bol "\\(:[^:\n]+:\\)" re-blksep1)
 -      1 rst-external-face)
 +     `(,(concat re-bol "\\(:[^:\n]+:\\)" re-blksep1)
 +       1 rst-external-face)
       ;; `Option Lists`_
 -     (list
 -      (concat re-bol "\\(\\(\\(\\([-+/]\\|--\\)\\sw\\(-\\|\\sw\\)*"
 -            "\\([ =]\\S +\\)?\\)\\(,[\t ]\\)?\\)+\\)\\($\\|[\t ]\\{2\\}\\)")
 -      1 rst-block-face)
 +     `(,(concat re-bol "\\(\\(\\(\\([-+/]\\|--\\)\\sw\\(-\\|\\sw\\)*"
 +               "\\([ =]\\S +\\)?\\)\\(,[\t ]\\)?\\)+\\)\\($\\|[\t ]\\{2\\}\\)")
 +       1 rst-block-face)
  
       ;; `Tables`_ FIXME: missing
  
       ;; All the `Explicit Markup Blocks`_
       ;; `Footnotes`_ / `Citations`_
 -     (list
 -      (concat re-bol "\\(" re-ems "\\[[^[\n]+\\]\\)" re-blksep1)
 +     `(,(concat re-bol "\\(" re-ems "\\[[^[\n]+\\]\\)" re-blksep1)
        1 rst-definition-face)
       ;; `Directives`_ / `Substitution Definitions`_
 -     (list
 -      (concat re-bol "\\(" re-ems "\\)\\(\\(|[^|\n]+|[\t ]+\\)?\\)\\("
 -            re-sym1 "+::\\)" re-blksep1)
 -      (list 1 rst-directive-face)
 -      (list 2 rst-definition-face)
 -      (list 4 rst-directive-face))
 +     `(,(concat re-bol "\\(" re-ems "\\)\\(\\(|[^|\n]+|[\t ]+\\)?\\)\\("
 +                re-sym1 "+::\\)" re-blksep1)
 +       (1 rst-directive-face)
 +       (2 rst-definition-face)
 +       (4 rst-directive-face))
       ;; `Hyperlink Targets`_
 -     (list
 -      (concat re-bol "\\(" re-ems "_\\([^:\\`\n]\\|\\\\.\\|`[^`\n]+`\\)+:\\)"
 -            re-blksep1)
 -      1 rst-definition-face)
 -     (list
 -      (concat re-bol "\\(__\\)" re-blksep1)
 -      1 rst-definition-face)
 +     `(,(concat re-bol "\\(" re-ems "_\\([^:\\`\n]\\|\\\\.\\|`[^`\n]+`\\)+:\\)"
 +                re-blksep1)
 +       1 rst-definition-face)
 +     `(,(concat re-bol "\\(__\\)" re-blksep1)
 +       1 rst-definition-face)
  
       ;; All `Inline Markup`_
       ;; FIXME: Condition 5 preventing fontification of e.g. "*" not implemented
       ;; `Strong Emphasis`_
 -     (list
 -      (concat re-imp1 "\\(\\*\\*" re-ima2 "\\*\\*\\)" re-ims1)
 -      2 rst-emphasis2-face)
 +     `(,(concat re-imp1 "\\(\\*\\*" re-ima2 "\\*\\*\\)" re-ims1)
 +       2 rst-emphasis2-face)
       ;; `Emphasis`_
 -     (list
 -      (concat re-imp1 "\\(\\*" re-ima2 "\\*\\)" re-ims1)
 -      2 rst-emphasis1-face)
 +     `(,(concat re-imp1 "\\(\\*" re-ima2 "\\*\\)" re-ims1)
 +       2 rst-emphasis1-face)
       ;; `Inline Literals`_
 -     (list
 -      (concat re-imp1 "\\(``" re-imb2 "``\\)" re-ims1)
 -      2 rst-literal-face)
 +     `(,(concat re-imp1 "\\(``" re-imb2 "``\\)" re-ims1)
 +       2 rst-literal-face)
       ;; `Inline Internal Targets`_
 -     (list
 -      (concat re-imp1 "\\(_`" re-imb2 "`\\)" re-ims1)
 -      2 rst-definition-face)
 +     `(,(concat re-imp1 "\\(_`" re-imb2 "`\\)" re-ims1)
 +       2 rst-definition-face)
       ;; `Hyperlink References`_
       ;; FIXME: `Embedded URIs`_ not considered
 -     (list
 -      (concat re-imp1 "\\(\\(`" re-imb2 "`\\|\\(\\sw\\(\\sw\\|-\\)+\\sw\\)\\)__?\\)" re-ims1)
 +     `(,(concat re-imp1 "\\(\\(`" re-imb2 "`\\|\\(\\sw\\(\\sw\\|-\\)+\\sw\\)\\)__?\\)" re-ims1)
        2 rst-reference-face)
       ;; `Interpreted Text`_
 -     (list
 -      (concat re-imp1 "\\(\\(:" re-sym1 "+:\\)?\\)\\(`" re-imb2 "`\\)\\(\\(:"
 -            re-sym1 "+:\\)?\\)" re-ims1)
 -      (list 2 rst-directive-face)
 -      (list 5 rst-external-face)
 -      (list 8 rst-directive-face))
 +     `(,(concat re-imp1 "\\(\\(:" re-sym1 "+:\\)?\\)\\(`" re-imb2 "`\\)\\(\\(:"
 +                re-sym1 "+:\\)?\\)" re-ims1)
 +       (2 rst-directive-face)
 +       (5 rst-external-face)
 +       (8 rst-directive-face))
       ;; `Footnote References`_ / `Citation References`_
 -     (list
 -      (concat re-imp1 "\\(\\[[^]]+\\]_\\)" re-ims1)
 -      2 rst-reference-face)
 +     `(,(concat re-imp1 "\\(\\[[^]]+\\]_\\)" re-ims1)
 +       2 rst-reference-face)
       ;; `Substitution References`_
 -     (list
 -      (concat re-imp1 "\\(|" re-imv2 "|\\)" re-ims1)
 -      2 rst-reference-face)
 +     `(,(concat re-imp1 "\\(|" re-imv2 "|\\)" re-ims1)
 +       2 rst-reference-face)
       ;; `Standalone Hyperlinks`_
 -     (list
 -      ;; FIXME: This takes it easy by using a whitespace as delimiter
 -      (concat re-imp1 "\\(" re-uris1 ":\\S +\\)" re-ims1)
 -      2 rst-definition-face)
 -     (list
 -      (concat re-imp1 "\\(" re-sym1 "+@" re-sym1 "+\\)" re-ims1)
 -      2 rst-definition-face)
 +     `(;; FIXME: This takes it easy by using a whitespace as delimiter
 +       ,(concat re-imp1 "\\(" re-uris1 ":\\S +\\)" re-ims1)
 +       2 rst-definition-face)
 +     `(,(concat re-imp1 "\\(" re-sym1 "+@" re-sym1 "+\\)" re-ims1)
 +       2 rst-definition-face)
  
       ;; Do all block fontification as late as possible so 'append works
  
        (list
         re-ado2)
        (if (not rst-mode-lazy)
 -        (list 1 rst-block-face)
 +        '(1 rst-block-face)
        (list
         (list 'rst-font-lock-handle-adornment
               '(progn
        (list
         (concat re-bol "\\(" re-ems "\\)\[^[|_]\\([^:\n]\\|:\\([^:\n]\\|$\\)\\)*$")
  
 -       (list 1 rst-comment-face))
 +       '(1 rst-comment-face))
        (if rst-mode-lazy
          (list
           (list 'rst-font-lock-find-unindented-line
                    (setq rst-font-lock-indentation-point (match-end 1))
                    (point-max))
                 nil
 -               (list 0 rst-comment-face 'append)))))
 +               '(0 rst-comment-face append)))))
       (append
        (list
         (concat re-bol "\\(" re-emt "\\)\\(\\s *\\)$")
 -       (list 1 rst-comment-face)
 -       (list 2 rst-comment-face))
 +       '(1 rst-comment-face)
 +       '(2 rst-comment-face))
        (if rst-mode-lazy
          (list
           (list 'rst-font-lock-find-unindented-line
                    (setq rst-font-lock-indentation-point 'next)
                    (point-max))
                 nil
 -               (list 0 rst-comment-face 'append)))))
 +               '(0 rst-comment-face append)))))
  
       ;; `Literal Blocks`_
       (append
        (list
         (concat re-bol "\\(\\([^.\n]\\|\\.[^.\n]\\).*\\)?\\(::\\)$")
 -       (list 3 rst-block-face))
 +       '(3 rst-block-face))
        (if rst-mode-lazy
          (list
           (list 'rst-font-lock-find-unindented-line
                    (setq rst-font-lock-indentation-point t)
                    (point-max))
                 nil
 -               (list 0 rst-literal-face 'append)))))
 +               '(0 rst-literal-face append)))))
  
      ;; `Doctest Blocks`_
      (append
       (list
        (concat re-bol "\\(>>>\\|\\.\\.\\.\\)\\(.+\\)")
 -      (list 1 rst-block-face)
 -      (list 2 rst-literal-face)))
 +      '(1 rst-block-face)
 +      '(2 rst-literal-face)))
      )))
  
  
@@@ -3340,7 -3307,7 +3340,7 @@@ or of the entire buffer, if the region 
  (defun rst-compile-pdf-preview ()
    "Convert the document to a PDF file and launch a preview program."
    (interactive)
-   (let* ((tmp-filename "/tmp/out.pdf")
+   (let* ((tmp-filename (make-temp-file "rst-out" nil ".pdf"))
         (command (format "rst2pdf.py %s %s && %s %s"
                          buffer-file-name tmp-filename
                          rst-pdf-program tmp-filename)))
  (defun rst-compile-slides-preview ()
    "Convert the document to an S5 slide presentation and launch a preview program."
    (interactive)
-   (let* ((tmp-filename "/tmp/slides.html")
+   (let* ((tmp-filename (make-temp-file "rst-slides" nil ".html"))
         (command (format "rst2s5.py %s %s && %s %s"
                          buffer-file-name tmp-filename
                          rst-slides-program tmp-filename)))
diff --combined lisp/time.el
index 006fd758a7c5ecff85ce8229dbfc9d7e4594ba5a,1247e30c203cacec4698972adb6cf560f1977637..3fc17ec6eee1e87ba4c10df38745c491509e7108
@@@ -454,16 -454,17 +454,18 @@@ update which can wait for the next redi
    (force-mode-line-update))
  
  (defun display-time-file-nonempty-p (file)
 -  (and (file-exists-p file)
 -       (< 0 (nth 7 (file-attributes (file-chase-links file))))))
 +  (let ((remote-file-name-inhibit-cache (- display-time-interval 5)))
 +    (and (file-exists-p file)
 +       (< 0 (nth 7 (file-attributes (file-chase-links file)))))))
  
  ;;;###autoload
  (define-minor-mode display-time-mode
    "Toggle display of time, load level, and mail flag in mode lines.
  With a numeric arg, enable this display if arg is positive.
  
- When this display is enabled, it updates automatically every minute.
+ When this display is enabled, it updates automatically every minute
+ \(you can control the number of seconds between updates by
+ customizing `display-time-interval').
  If `display-time-day-and-date' is non-nil, the current day and date
  are displayed as well.
  This runs the normal hook `display-time-hook' after each update."
                 'display-time-event-handler)))
  
  
 -(defun display-time-world-mode ()
 +(define-derived-mode display-time-world-mode nil "World clock"
    "Major mode for buffer that displays times in various time zones.
  See `display-time-world'."
 -  (interactive)
 -  (kill-all-local-variables)
 -  (setq
 -   major-mode 'display-time-world-mode
 -   mode-name "World clock")
 -  (use-local-map display-time-world-mode-map))
 +  (setq show-trailing-whitespace nil))
  
  (defun display-time-world-display (alist)
    "Replace current buffer text with times in various zones, based on ALIST."
        (buffer-undo-list t))
      (erase-buffer)
      (let ((max-width 0)
 -        (result ()))
 +        (result ())
 +        fmt)
        (unwind-protect
          (dolist (zone alist)
            (let* ((label (cadr zone))
                   (width (string-width label)))
              (set-time-zone-rule (car zone))
 -            (setq result
 -                  (append result
 -                          (list
 -                           label width
 -                           (format-time-string display-time-world-time-format))))
 +            (push (cons label
 +                        (format-time-string display-time-world-time-format))
 +                  result)
              (when (> width max-width)
                (setq max-width width))))
        (set-time-zone-rule nil))
 -      (while result
 -      (insert (pop result)
 -              (make-string (1+ (- max-width (pop result))) ?\s)
 -              (pop result) "\n")))
 -    (delete-backward-char 1)))
 +      (setq fmt (concat "%-" (int-to-string max-width) "s %s\n"))
 +      (dolist (timedata (nreverse result))
 +      (insert (format fmt (car timedata) (cdr timedata)))))
 +    (delete-char -1)))
  
  ;;;###autoload
  (defun display-time-world ()
diff --combined lisp/version.el
index b4e2c61b57095d4bc2816db2b7d1baad3ce85145,1187fea50dfaa0baff8abfc614f1e5d849cc27d1..f1146e8a5101ec65d74dae7b68409f38a278e0e5
@@@ -1,12 -1,11 +1,12 @@@
  ;;; version.el --- record version number of Emacs -*- no-byte-compile: t -*-
  
  ;; Copyright (C) 1985, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
- ;;   2004, 2005, 2006, 2007, 2008, 2009, 2010
+ ;;   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
  ;;   Free Software Foundation, Inc.
  
  ;; Maintainer: FSF
  ;; Keywords: internal
 +;; Package: emacs
  
  ;; This file is part of GNU Emacs.
  
  
  ;;; Code:
  
 -(defconst emacs-copyright "Copyright (C) 2011 Free Software Foundation, Inc." "\
 -Short copyright string for this version of Emacs.")
 -
 -(defconst emacs-version "23.2.91" "\
 -Version numbers of this version of Emacs.")
 -
  (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\
  Major version number of this version of Emacs.
  This variable first existed in version 19.23.")
@@@ -88,5 -93,4 +88,4 @@@ to the system configuration; look at `s
  ;;version-control: never
  ;;End:
  
- ;; arch-tag: e60dc445-6218-4a4c-a7df-f15a818642a0
  ;;; version.el ends here
diff --combined nextstep/ChangeLog
index ac060bbcee436afaa24e7abc519422411bb56266,2fd7dd4f1fc26127557c421241e7f88f09f49ac4..26d22b4c90e09b24243b1f7eb6661c583aa9b8fe
@@@ -1,23 -1,13 +1,30 @@@
+ 2011-01-02  Glenn Morris  <rgm@gnu.org>
+       * Cocoa/Emacs.base/Contents/Info.plist:
+       * Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
+       * GNUstep/Emacs.base/Resources/Info-gnustep.plist:
++      Set short copyright year to 2011.
++
 +2010-10-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * README: Remove information duplicated in AUTHORS.
 +      Move historical information to new file ../etc/NEXTSTEP.
 +      * AUTHORS: Merge into ./etc/NEXTSTEP and remove file.
 +
 +2010-10-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * FOR-RELEASE: Merge into ../etc/TODO.
 +
 +      * DEV-NOTES: Move to ../admin/notes/nextstep.
  
  2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
  
        * Version 23.2 released.
  
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
  2010-01-11  Glenn Morris  <rgm@gnu.org>
  
        * Cocoa/Emacs.base/Contents/Info.plist:
  
  ;; Local Variables:
  ;; coding: utf-8
 -;; add-log-time-zone-rule: t
  ;; End:
  
 -    Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
 +  Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
  
    You should have received a copy of the GNU General Public License
    along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 -
 -;; arch-tag: 963ee08e-8e76-485f-9cfb-65a4333a073c
index f064a1248ea60b5ee8ed61448f2fa84ed1ef5980,64601ba5aa4124f5b751b9be71ad3e95281d336b..7d95a4b0936cf87ff438ded95c05e89a09be99dd
@@@ -1,5 -1,5 +1,5 @@@
  <!--
- Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
@@@ -553,7 -553,7 +553,7 @@@ along with GNU Emacs.  If not, see <htt
        <key>CFBundleExecutable</key>
        <string>Emacs</string>
        <key>CFBundleGetInfoString</key>
-       <string>Emacs 24.0.50 Copyright (C) 2010 Free Software Foundation, Inc.</string>
 -      <string>Emacs 23.2.91 Copyright (C) 2011 Free Software Foundation, Inc.</string>
++      <string>Emacs 24.0.50 Copyright (C) 2011 Free Software Foundation, Inc.</string>
        <key>CFBundleIconFile</key>
        <string>Emacs.icns</string>
        <key>CFBundleIdentifier</key>
        <string>APPL</string>
        <!-- This should be the emacs version number. -->
        <key>CFBundleShortVersionString</key>
 -      <string>23.2.91</string>
 +      <string>24.0.50</string>
        <key>CFBundleSignature</key>
        <string>EMAx</string>
        <!-- This SHOULD be a build number. -->
index 197e42cb6fb921963869aeb106058a71b74bfc19,20636e09304eaaedd6e3e31c4e89d4d26737c892..95bc8ad83e69f70ab4271bd61f4b5095cffa034c
@@@ -1,6 -1,6 +1,6 @@@
  /* Localized versions of Info.plist keys */
  
  CFBundleName = "Emacs";
 -CFBundleShortVersionString = "Version 23.2.91";
 -CFBundleGetInfoString = "Emacs version 23.2.91, NS Windowing";
 +CFBundleShortVersionString = "Version 24.0.50";
 +CFBundleGetInfoString = "Emacs version 24.0.50, NS Windowing";
- NSHumanReadableCopyright = "Copyright (C) 2010 Free Software Foundation, Inc.";
+ NSHumanReadableCopyright = "Copyright (C) 2011 Free Software Foundation, Inc.";
index ade3f0117e6481fad29feb6378239588997cfeaa,a9963f3651bc152b07a24807fba7c14a789b0cc2..e92d45ae686d1480569dad601d49fe9bd440b144
@@@ -2,7 -2,7 +2,7 @@@
      ApplicationDescription = "GNU Emacs for GNUstep / OS X";
      ApplicationIcon = emacs.tiff;
      ApplicationName = Emacs;
 -    ApplicationRelease = "23.2.91";
 +    ApplicationRelease = "24.0.50";
      Authors = (
        "Adrian Robert (GNUstep)",
        "Christophe de Dinechin (MacOS X)",
@@@ -11,9 -11,9 +11,9 @@@
        "Carl Edman (NeXTStep)",
        "..see http://emacs-app.sf.net/authorship.html"
      );
-     Copyright = "Copyright (C) 2010 Free Software Foundation, Inc.";
+     Copyright = "Copyright (C) 2011 Free Software Foundation, Inc.";
      CopyrightDescription = "Released under the GNU General Public License Version 3 or later";
 -    FullVersionID = "Emacs 23.2.91, NS Windowing";
 +    FullVersionID = "Emacs 24.0.50, NS Windowing";
      NSExecutable = Emacs;
      NSIcon = emacs.tiff;
      NSPrincipalClass = NSApplication;
diff --combined nt/ChangeLog
index eca36a06be0f2cece14c8fe0396ee9c31d44fda7,60f76db3485d701ab4a721f6a8848c2dc57f8aac..dffae55ba93a8665daecfcf897ba380ae7d91e2b
 -2010-12-31  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * configure.bat (end): Unset environment variables used by this
+       batch file.
+       * INSTALL: Update the information about PNG support libraries.
+       (Bug#7716)
 -2010-08-02  Óscar Fuentes  <ofv@wanadoo.es>
 +2010-11-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * config.nt (EXTERNALLY_VISIBLE): Define.
 +
 +2010-10-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * INSTALL: Refer to `dynamic-library-alist'.
 +
 +2010-10-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * INSTALL: Add note about problematic characters passed to configure.
 +
 +2010-10-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (frc, TAGS, TAGS-gmake, TAGS-nmake): New targets.
 +      emacs-src.tags: New file.
 +
 +      * gmake.defs: Add a comment with a single quote to fix
 +      fontification.  (Bug#7102)
 +
 +2010-09-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * configure.bat: Fix the condition for copying paths.h into
 +      ../src/epaths.h.
 +
 +2010-09-28  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * addpm.c (entry, add_registry, main):
 +      * addsection.c (file_data, open_input_file, open_output_file)
 +      (find_section, PTR_TO_OFFSET, copy_executable_and_add_section)
 +      (COPY_CHUNK):
 +      * cmdproxy.c (vfprintf, fprintf, printf, fail, warn, skip_space)
 +      (skip_nonspace, get_next_token, search_dir, make_absolute)
 +      (spawn, main):
 +      * preprep.c (file_data, open_input_file, open_output_file)
 +      (open_inout_file, find_section, PTR_TO_OFFSET, COPY_CHUNK, main):
 +      Use const char*.
 +
 +      * cmdproxy.c (stdin): Don't define, not used.
 +      (main): Don't assign remlen after last use.
 +
 +2010-09-22  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * configure.bat: Err out when the argument of --cflags contains
 +      invalid characters (check implemented only for GCC).  (Bug#6820)
 +
 +2010-08-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * addpm.c (add_registry): Create App Paths of type REG_EXPAND_SZ.
 +
 +2010-08-12  Jason Rumney  <jasonr@gnu.org>
 +
 +      * addpm.c (add_registry): Set path for runemacs.exe to use.
 +
 +2010-08-08  Óscar Fuentes  <ofv@wanadoo.es>
  
        * cmdproxy.c (main): Use _snprintf instead of wsprintf,
        which has a 1024 char limit on Windows (bug#6647).
  
 +2010-08-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * config.nt (TIME_WITH_SYS_TIME): Remove #undef, unused (bug#6754).
 +      Suggested by Dan Nicolaescu <dann@ics.uci.edu>.
 +
 +2010-07-29  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * config.nt: Remove code referring to NO_REMAP, unused.
 +
 +2010-07-25  Christoph Scholtes  <cschol2112@gmail.com>
 +
 +      Build binary distros on Windows using emacs-VERSION as root dir name.
 +
 +      * makefile.w32-in: Copy README.W32 to installation directory
 +      during `make install'.  Remove README.W32 with `distclean' (in
 +      case Emacs was installed in place).  Use temporary directory to
 +      create distribution zip files in `dist' target.
 +      * zipdist.bat: Simplify code using temporary directory.
 +
 +2010-07-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * runemacs.c (set_user_model_id): Fix prototype.
 +
 +2010-07-24  Christoph Scholtes  <cschol2112@gmail.com>
 +
 +      New make target for Windows platform: make dist (bug#6602)
 +
 +      * INSTALL: Document new dist target and add section about
 +      creating binary distributions.
 +      * README.W32: Relocate from admin/nt/ directory.
 +      * configure.bat: New parameter `--distfiles'.
 +      * makefile.w32-in: Add version number, new target `dist'.
 +      Add new target `install-shortcuts'.
 +      * zipdist.bat: New file; create zipped binary distribution,
 +      replaces admin/nt/makedist.bat.
 +
 +2010-07-21  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * INSTALL: Add note about backslashes in Windows paths.
 +      Fix typos.  Simplify references to Windows versions.
 +
 +2010-07-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * addpm.c (add_registry, main):
 +      * cmdproxy.c (get_env_size):
 +      * ddeclient.c (main):
 +      * runemacs.c (set_user_model_id):
 +      Convert definitions to standard C.
 +
 +2010-07-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * gmake.defs (CHECKING_CFLAGS) [ENABLECHECKS]: Add -fno-crossjumping.
 +
 +2010-07-18  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * configure.bat: New option --enable-checking.
 +      * gmake.defs, nmake.defs (CHECKING_CFLAGS): New define.
 +      (CFLAGS): Include it.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * config.nt (volatile): Remove definition.
 +
 +2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
 +      (HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
 +
 +2010-07-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * config.nt (__P): Remove.
 +
 +2010-06-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * config.nt: Remove code depending on BSTRING.
 +
 +2010-06-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * config.nt: Remove NOT_C_CODE tests, it is always true now.
 +
 +2010-05-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * config.nt (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Remove undefs.
 +
  2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
  
        * Version 23.2 released.
  
 +2010-05-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * config.nt (LD_SWITCH_X_SITE_AUX): Remove.
 +
 +2010-04-20  Lewis Perin  <perin@panix.com>  (tiny change)
 +
 +      * emacs.manifest: Add trustInfo section to Windows manifest.
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
  2010-01-13  Martin Rudalics  <rudalics@gmx.at>
  
        * emacsclient.rc: Fix format of "LegalCopyright" value.
  
  2009-01-26  Jason Rumney  <jasonr@gnu.org>
  
 -      * emacsclient.rc, emacs.rc: Swap name and description.  Remove
 -      Windows versions.
 +      * emacsclient.rc, emacs.rc: Swap name and description.
 +      Remove Windows versions.
  
  2009-01-15  Jason Rumney  <jasonr@gnu.org>
  
        * config.nt (HAVE_FACES): Remove, unused.
  
  2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
 -          Eli Zaretskii  <eliz@gnu.org>
 +            Eli Zaretskii  <eliz@gnu.org>
  
        * nmake.defs (FONT_CFLAGS):
        * gmake.defs (FONT_CFLAGS): Remove.
        * config.nt: Remove reference to UNEXEC_SRC.
  
  2008-06-23  Juanma Barranquero  <lekktu@gmail.com>
 -          Eli Zaretskii  <eliz@gnu.org>
 +            Eli Zaretskii  <eliz@gnu.org>
  
        * gmake.defs (DEBUG_FLAG, DEBUG_LINK) [!NODEBUG]:
        Don't hardcode -gstabs+, use DEBUG_INFO.
diff --combined nt/INSTALL
index a000b21ade45ee368499da092b9089a7a08e825a,fafa9a97b6a810e0ff325a04f746eb4348778b93..da7ad5647ed900247184105714bd1bbf3ddb918d
@@@ -1,5 -1,5 +1,5 @@@
 -                    Building and Installing Emacs
 -              on Windows NT/2K/XP and Windows 95/98/ME
 +                  Building and Installing Emacs on Windows
 +                          (from 95 to 7 and beyond)
  
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
      Free Software Foundation, Inc.
          emacs source with text!=binary.
      [2] fails when needs to invoke shell commands; okay invoking gcc etc.
      [3] requires LC_MESSAGES support to build; cannot build with early
 -        versions of cygwin.
 +        versions of Cygwin.
      [4] may fail on Windows 9X and Windows ME; if so, install Bash.
      [5] fails when building leim due to the use of cygwin style paths.
          May work if building emacs without leim.
    like this, we recommend the use of the supported compilers mentioned
    in the previous paragraph.
  
 -  You will also need a copy of the Posix cp, rm and mv programs.  These
 -  and other useful Posix utilities can be obtained from one of several
 +  You will also need a copy of the POSIX cp, rm and mv programs.  These
 +  and other useful POSIX utilities can be obtained from one of several
    projects:
  
    * http://gnuwin32.sourceforge.net/              ( GnuWin32 )
    * http://www.cygwin.com/                        ( Cygwin   )
    * http://unxutils.sourceforge.net/              ( UnxUtils )
  
 -  If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
 -  Windows NT, we suggest to install the Cygwin port of Bash.  That is
 -  because the native Windows shell COMMAND.COM is too limited; the
 -  Emacs build procedure tries very hard to support even such limited
 -  shells, but as none of the Windows developers of Emacs work on
 -  Windows 9x, we cannot guarantee that it works without a more
 -  powerful shell.
 +  If you build Emacs on 16-bit versions of Windows (9X or ME), we
 +  suggest to install the Cygwin port of Bash.  That is because the
 +  native Windows shell COMMAND.COM is too limited; the Emacs build
 +  procedure tries very hard to support even such limited shells, but
 +  as none of the Windows developers of Emacs work on Windows 9X, we
 +  cannot guarantee that it works without a more powerful shell.
  
    Additional instructions and help for building Emacs on Windows can be
    found at the Emacs Wiki:
    absolutely sure the produced binaries will never need to be run under
    a debugger.
  
 +  Because of limitations of the stock Windows command shell, certain
 +  characters (quotes, backslashes and equal signs) can be problematic
 +  and should not be used in arguments to configure.  That means that
 +  forward slashes must be used in paths passed to the compiler and
 +  linker via the --cflags and --ldflags options, and that it is
 +  currently not possible to pass a macro like -DFOO=BAR (though -DFOO
 +  is perfectly valid).
 +
    N.B.  It is normal to see a few error messages output while configure
    is running, when gcc support is being tested.  These cannot be
 -  suppressed because of limitations in the Windows 9x command.com shell.
 +  suppressed because of limitations in the Windows 9X command.com shell.
  
    You are encouraged to look at the file config.log which shows details
    for failed tests, after configure.bat finishes.  Any unexplained failure
    wrong.  (Usually, any such failures happen because some headers are
    missing due to bad packaging of the image support libraries.)
  
 +  Note that any file path passed to the compiler or linker must use
 +  forward slashes; using backslashes will cause compiler warnings or
 +  errors about unrecognized escape sequences.
 +
    To use the external image support, the DLLs implementing the
    functionality must be found when Emacs first needs them, either on the
    PATH, or in the same directory as emacs.exe.  Failure to find a
    library is not an error; the associated image format will simply be
    unavailable.  Note that once Emacs has determined that a library can
    not be found, there's no way to force it to try again, other than
 -  restarting.  See the variable `image-library-alist' to configure the
 +  restarting.  See the variable `dynamic-library-alist' to configure the
    expected names of the libraries.
  
    Some image libraries have dependencies on one another, or on zlib.
    If GTK 2.0 is installed, addpm will arrange for its image libraries
    to be on the DLL search path for Emacs.
  
+   For PNG images, we recommend to use versions 1.4.x and later of
+   libpng, because previous versions had security issues.  You can find
+   precompiled libraries and headers on the GTK download page for
+   Windows (http://www.gtk.org/download-windows.html).
+   Versions 1.4.0 and later of libpng are binary incompatible with
+   earlier versions, so Emacs will only look for libpng libraries which
+   are compatible with the version it was compiled against.  That
+   version is given by the value of the Lisp variable `libpng-version';
+   e.g., 10403 means version 1.4.3.  The variable `image-library-alist'
+   is automatically set to name only those DLL names that are known to
+   be compatible with the version given by `libpng-version'.  If PNG
+   support does not work for you even though you have the support DLL
+   installed, check the name of the installed DLL against
+   `image-library-alist' and the value of `libpng-version', and
+   download compatible DLLs if needed.
  * Experimental SVG support
  
    SVG support is currently experimental, and not built by default.
    Removes the installed files in the bin subdirectory in addition to
    the files removed by make cleanall.
  
 +  make dist
 +  Builds Emacs from the available sources and pre-compiled lisp files.
 +  Packages Emacs binaries as full distribution and barebin distribution.
  
    The following targets are intended only for use with the Bazaar sources.
  
    bootstrap to rebuild.  Occasionally it may be necessary to run this
    target after an update.
  
 +* Creating binary distributions
 +
 +  Binary distributions (full and barebin distributions) can be
 +  automatically built and packaged from source tarballs or a bzr
 +  checkout.
 +
 +  When building Emacs binary distributions, the --distfiles argument
 +  to configure.bat specifies files to be included in the bin directory
 +  of the binary distributions. This is intended for libraries that are
 +  not built as part of Emacs, e.g. image libraries.
 +
 +  For example, specifying
 +
 +      --distfiles D:\distfiles\libXpm.dll
 +
 +  results in libXpm.dll being copied from D:\distfiles to the
 +  bin directory before packaging starts.
 +
 +  Multiple files can be specified using multiple --distfiles arguments:
 +
 +      --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
 +
 +  For packaging the binary distributions, the 'dist' make target uses
 +  7-Zip (http://www.7-zip.org), which must be installed and available
 +  on the Windows Path.
 +
  
  * Trouble-shooting
  
    The main problems that are likely to be encountered when building
    Emacs stem from using an old version of GCC, or old MinGW or W32 API
 -  headers.  Additionally, cygwin ports of GNU make may require the Emacs
 +  headers.  Additionally, Cygwin ports of GNU make may require the Emacs
    source tree to be mounted with text!=binary, because the makefiles
    generated by configure.bat necessarily use DOS line endings.  Also,
 -  cygwin ports of make must run in UNIX mode, either by specifying
 +  Cygwin ports of make must run in UNIX mode, either by specifying
    --unix on the command line, or MAKE_MODE=UNIX in the environment.
  
    When configure runs, it attempts to detect when GCC itself, or the
diff --combined nt/README.W32
index df869d6569d0af71d770c424e50d9a1cf754231e,b8d2610b65525ed1204dbe696dc36df40aaa614b..808b77e29d08e361f873fc976d4d082e59e7aeaa
@@@ -1,5 -1,5 +1,5 @@@
 -Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 -  Free Software Foundation, Inc.
 +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 +  2010  Free Software Foundation, Inc.
  See the end of the file for license conditions.
  
                           Emacs for Windows
      a mail spool or POP server to a local user mailbox.  See the
      `Movemail' node of the Emacs manual.
  
 -  + digest-doc.exe, sorted-doc.exe - Tools for rebuilding the
 -    built-in documentation.
 -
  * Image support
  
    Emacs has built in support for XBM and PPM/PGM/PBM images, and the
    libXpm library from X11R7.3.
  
    Emacs can also support some other image formats with appropriate
-   libraries.  These libraries are all available as part of GTK, or from
-   gnuwin32.sourceforge.net.  Emacs will find them if the directory they
-   are installed in is on the PATH.
-       PNG: requires the PNG reference library 1.2 or later, which will
-       be named libpng13d.dll, libpng13.dll, libpng12d.dll, libpng12.dll
-       or libpng.dll.  LibPNG requires zlib, which should come from the same
-       source as you got libpng.
+   libraries.  These libraries are all available as part of GTK
+   download for Windows (http://www.gtk.org/download-windows.html), or
+   from the GnuWin32 project.  Emacs will find them if the directory
+   they are installed in is on the PATH.
+       PNG: requires the PNG reference library 1.4 or later, which will
+       be named libpng14.dll or libpng14-14.dll.  LibPNG requires zlib,
+       which should come from the same source as you got libpng.
+       Starting with Emacs 23.3, the precompiled Emacs binaries are
+       built with libpng 1.4.x and later, and are incompatible with
+       earlier versions of libpng DLLs.  So if you have libpng 1.2.x,
+       the PNG support will not work, and you will have to download
+       newer versions.
  
        JPEG: requires the Independant JPEG Group's libjpeg 6b or later,
        which will be called jpeg62.dll, libjpeg.dll, jpeg-62.dll or jpeg.dll.
        GIF: requires libungif or giflib 4.1 or later, which will be
        called giflib4.dll, libungif4.dll or libungif.dll.
  
+    If you have image support DLLs under different names, customize the
+    value of `image-library-alist'.
     In addition, Emacs can be compiled to support SVG.  This precompiled
     distribution has not been compiled that way, since the SVG library
     or one or more of its extensive dependencies appear to be
diff --combined nt/configure.bat
index 4da259276738288496630f5b68b938a871b8cb94,074949a23d3df0efe0122900494b785aa20e8834..410087687bd3f93c5ee988c402f510b3d07e46d7
@@@ -1,6 -1,6 +1,6 @@@
  @echo off\r
  rem   ----------------------------------------------------------------------\r
 -rem   Configuration script for MS Windows 95/98/Me and NT/2000/XP\r
 +rem   Configuration script for MS Windows operating systems\r
  rem   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,\r
  rem      2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.\r
  \r
@@@ -22,7 -22,7 +22,7 @@@ rem   along with GNU Emacs.  If not, se
  rem   ----------------------------------------------------------------------\r
  rem   YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r
  rem\r
 -rem   + MS Windows 95/98/Me or NT/2000/XP\r
 +rem   + MS Windows 95, NT or later\r
  rem   + either MSVC 2.x or later, or gcc-2.95 or later (with GNU make 3.75\r
  rem     or later) and the Mingw32 and W32 API headers and libraries.\r
  rem   + Visual Studio 2005 is not supported at this time.\r
@@@ -80,7 -80,6 +80,7 @@@ rem   Default settings
  set prefix=\r
  set nodebug=N\r
  set noopt=N\r
 +set enablechecking=N\r
  set profile=N\r
  set nocygwin=N\r
  set COMPILER=\r
@@@ -90,8 -89,6 +90,8 @@@ set userldflags
  set doldflags=\r
  set sep1=\r
  set sep2=\r
 +set sep3=\r
 +set distfiles=\r
  \r
  rem ----------------------------------------------------------------------\r
  rem   Handle arguments.\r
@@@ -103,7 -100,6 +103,7 @@@ if "%1" == "--with-gcc" goto withgc
  if "%1" == "--with-msvc" goto withmsvc\r
  if "%1" == "--no-debug" goto nodebug\r
  if "%1" == "--no-opt" goto noopt\r
 +if "%1" == "--enable-checking" goto enablechecking\r
  if "%1" == "--profile" goto profile\r
  if "%1" == "--no-cygwin" goto nocygwin\r
  if "%1" == "--cflags" goto usercflags\r
@@@ -114,9 -110,7 +114,9 @@@ if "%1" == "--without-gif" goto without
  if "%1" == "--without-tiff" goto withouttiff\r
  if "%1" == "--without-xpm" goto withoutxpm\r
  if "%1" == "--with-svg" goto withsvg\r
 +if "%1" == "--distfiles" goto distfiles\r
  if "%1" == "" goto checkutils\r
 +\r
  :usage\r
  echo Usage: configure [options]\r
  echo Options:\r
@@@ -125,7 -119,6 +125,7 @@@ echo.   --with-gcc              use GC
  echo.   --with-msvc             use MSVC to compile Emacs\r
  echo.   --no-debug              exclude debug info from executables\r
  echo.   --no-opt                disable optimization\r
 +echo.   --enable-checking       enable checks and assertions\r
  echo.   --profile               enable profiling\r
  echo.   --no-cygwin             use -mno-cygwin option with GCC\r
  echo.   --cflags FLAG           pass FLAG to compiler\r
@@@ -136,84 -129,57 +136,84 @@@ echo.   --without-gif           do not 
  echo.   --without-tiff          do not use TIFF library even if it is installed\r
  echo.   --without-xpm           do not use XPM library even if it is installed\r
  echo.   --with-svg              use the RSVG library (experimental)\r
 +echo.   --distfiles             path to files for make dist, e.g. libXpm.dll\r
  goto end\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :setprefix\r
  shift\r
  set prefix=%1\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :withgcc\r
  set COMPILER=gcc\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :withmsvc\r
  set COMPILER=cl\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :nodebug\r
  set nodebug=Y\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :noopt\r
  set noopt=Y\r
  shift\r
  goto again\r
 +\r
 +rem ----------------------------------------------------------------------\r
 +\r
 +:enablechecking\r
 +set enablechecking=Y\r
 +shift\r
 +goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :profile\r
  set profile=Y\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :nocygwin\r
  set nocygwin=Y\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :usercflags\r
  shift\r
  set usercflags=%usercflags%%sep1%%1\r
  set sep1= %nothing%\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :userldflags\r
  shift\r
  set userldflags=%userldflags%%sep2%%1\r
  set sep2= %nothing%\r
  shift\r
  goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
  \r
  :withoutpng\r
@@@ -259,19 -225,8 +259,19 @@@ shif
  set svgsupport=Y\r
  goto again\r
  \r
 +rem ----------------------------------------------------------------------\r
 +\r
 +:distfiles\r
 +set HAVE_DISTFILES=1\r
 +shift\r
 +set distfiles=%distfiles%%sep3%%1\r
 +set sep3= %nothing%\r
 +shift\r
 +goto again\r
 +\r
  rem ----------------------------------------------------------------------\r
  rem    Check that necessary utilities (cp and rm) are present.\r
 +\r
  :checkutils\r
  echo Checking for 'cp'...\r
  cp configure.bat junk.bat\r
@@@ -280,11 -235,9 +280,11 @@@ echo Checking for 'rm'..
  rm junk.bat\r
  if exist junk.bat goto needrm\r
  goto checkcompiler\r
 +\r
  :needcp\r
  echo You need 'cp' (the Unix file copy program) to build Emacs.\r
  goto end\r
 +\r
  :needrm\r
  del junk.bat\r
  echo You need 'rm' (the Unix file delete program) to build Emacs.\r
@@@ -292,7 -245,6 +292,7 @@@ goto en
  \r
  rem ----------------------------------------------------------------------\r
  rem   Auto-detect compiler if not specified, and validate GCC if chosen.\r
 +\r
  :checkcompiler\r
  if (%COMPILER%)==(cl) goto compilercheckdone\r
  if (%COMPILER%)==(gcc) goto checkgcc\r
@@@ -327,7 -279,6 +327,7 @@@ if exist junk.o set nocygwin=
  :chkapi\r
  echo The failed program was: >>config.log\r
  type junk.c >>config.log\r
 +\r
  :chkapiN\r
  rm -f junk.c junk.o\r
  rem ----------------------------------------------------------------------\r
@@@ -347,10 -298,8 +347,10 @@@ echo {PIMAGE_SECTION_HEADER pSection = 
  if (%nocygwin%) == (Y) goto chkapi1\r
  set cf=%usercflags%\r
  goto chkapi2\r
 +\r
  :chkapi1\r
  set cf=%usercflags% -mno-cygwin\r
 +\r
  :chkapi2\r
  echo on\r
  gcc %cf% -c junk.c\r
  @echo gcc %cf% -c junk.c >>config.log\r
  gcc %cf% -c junk.c >>config.log 2>&1\r
  set cf=\r
 -if exist junk.o goto gccOk\r
 +if exist junk.o goto chkuser\r
  echo The failed program was: >>config.log\r
  type junk.c >>config.log\r
 +goto nocompiler\r
 +\r
 +:chkuser\r
 +rm -f junk.o\r
 +echo int main (int argc, char *argv[]) {>junk.c\r
 +echo char *usercflags = "%usercflags%";>>junk.c\r
 +echo }>>junk.c\r
 +echo gcc -Werror -c junk.c >>config.log\r
 +gcc -Werror -c junk.c >>config.log 2>&1\r
 +if exist junk.o goto gccOk\r
 +echo.\r
 +echo Error in --cflags argument: %usercflags%\r
 +echo Backslashes and quotes cannot be used with --cflags.  Please use forward\r
 +echo slashes for filenames and paths (e.g. when passing directories to -I).\r
 +rm -f junk.c\r
 +goto end\r
  \r
  :nocompiler\r
  echo.\r
@@@ -402,12 -335,10 +402,12 @@@ type junk.c >>config.lo
  set mf=-mcpu=i686\r
  rm -f junk.c junk.o\r
  goto gccdebug\r
 +\r
  :gccMtuneOk\r
  echo GCC supports -mtune=pentium4 >>config.log\r
  set mf=-mtune=pentium4\r
  rm -f junk.c junk.o\r
 +\r
  :gccdebug\r
  rem Check for DWARF-2 debug info support, else default to stabs\r
  echo main(){} >junk.c\r
@@@ -419,7 -350,6 +419,7 @@@ type junk.c >>config.lo
  set dbginfo=-gstabs+\r
  rm -f junk.c junk.o\r
  goto compilercheckdone\r
 +\r
  :gccdwarf\r
  echo GCC supports DWARF-2 >>config.log\r
  set dbginfo=-gdwarf-2 -g3\r
@@@ -583,37 -513,7 +583,37 @@@ set HAVE_RSVG=
  :svgDone\r
  rm -f junk.c junk.obj junk.err junk.out\r
  \r
 +rem Any distfiles provided for building distribution? If no, we're done.\r
 +if "(%HAVE_DISTFILES%)"=="()" goto :distFilesDone\r
 +\r
 +rem Any arguments to --distfiles specified? If no, we're done.\r
 +if not "%distfiles%"=="" goto :checkDistFiles\r
 +set distFilesOk=0\r
 +echo No arguments specified for option --distfiles!\r
 +goto distfilesDone\r
 +\r
 +:checkDistFiles\r
 +echo Checking for distfiles...\r
 +rem Check if all specified distfiles exist\r
 +set fileNotFound=\r
 +for %%d in (%distfiles%) do if not exist %%d set fileNotFound=%%d\r
 +if not "%fileNotFound%"=="" goto distFilesNotFound\r
 +\r
 +set distFilesOK=1\r
 +echo ...all distfiles found.\r
 +goto :distFilesDone\r
 +\r
 +:distFilesNotFound\r
 +set distFilesOk=0\r
 +echo ...%fileNotFound% not found.\r
 +set distfiles=\r
 +goto :distfilesDone\r
 +\r
 +:distFilesDone\r
 +set fileNotFound=\r
 +\r
  rem ----------------------------------------------------------------------\r
 +\r
  :genmakefiles\r
  echo Generating makefiles\r
  if %COMPILER% == gcc set MAKECMD=gmake\r
@@@ -629,11 -529,9 +629,11 @@@ if not "(%mf%)" == "()" echo MCPU_FLAG=
  if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings\r
  if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings\r
  if (%noopt%) == (Y) echo NOOPT=1 >>config.settings\r
 +if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings\r
  if (%profile%) == (Y) echo PROFILE=1 >>config.settings\r
  if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings\r
  if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings\r
 +if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles%>>config.settings\r
  rem We go thru docflags because usercflags could be "-DFOO=bar" -something\r
  rem and the if command cannot cope with this\r
  for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y\r
@@@ -646,8 -544,6 +646,8 @@@ echo. >>config.setting
  copy config.nt config.tmp\r
  echo. >>config.tmp\r
  echo /* Start of settings from configure.bat.  */ >>config.tmp\r
 +rem   We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify\r
 +rem   processing of compiler options in w32.c:get_emacs_configuration_options\r
  if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp\r
  if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp\r
  if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp\r
@@@ -669,8 -565,7 +669,8 @@@ if not errorlevel 2 goto doCop
  fc /b config.tmp ..\src\config.h >nul 2>&1\r
  if errorlevel 1 goto doCopy\r
  fc /b paths.h ..\src\epaths.h >nul 2>&1\r
 -if errorlevel 0 goto dontCopy\r
 +if not errorlevel 1 goto dontCopy\r
 +\r
  :doCopy\r
  copy config.tmp ..\src\config.h\r
  copy paths.h ..\src\epaths.h\r
@@@ -700,7 -595,6 +700,7 @@@ fc /b foo.bar foo.bar >nul 2>&
  if not errorlevel 2 goto doUpdateSubdirs\r
  fc /b subdirs.el ..\site-lisp\subdirs.el >nul 2>&1\r
  if not errorlevel 1 goto dontUpdateSubdirs\r
 +\r
  :doUpdateSubdirs\r
  if exist ..\site-lisp\subdirs.el del ..\site-lisp\subdirs.el\r
  copy subdirs.el ..\site-lisp\subdirs.el\r
@@@ -739,19 -633,12 +739,19 @@@ if (%tiffsupport%) == (N) goto checkgi
   echo   Install libtiff development files or use --without-tiff\r
  \r
  :checkgif\r
 -if not "(%HAVE_GIF%)" == "()" goto donelibchecks\r
 -if (%gifsupport%) == (N) goto donelibchecks\r
 +if not "(%HAVE_GIF%)" == "()" goto checkdistfiles\r
 +if (%gifsupport%) == (N) goto checkdistfiles\r
   set libsOK=0\r
   echo GIF support is missing.\r
   echo   Install giflib or libungif development files or use --without-gif\r
  \r
 +:checkdistfiles\r
 +if "(%HAVE_DISTFILES%)" == "()" goto donelibchecks\r
 +if (%distFilesOk%) == (1) goto donelibchecks\r
 +echo.\r
 +echo Files specified with option --distfiles could not be found.\r
 +echo   Fix these issues before running make dist\r
 +\r
  :donelibchecks\r
  if (%libsOK%) == (1) goto success\r
  echo.\r
@@@ -769,12 -656,10 +769,12 @@@ goto en
  echo Your environment size is too small.  Please enlarge it and rerun configure.\r
  echo For example, type "command.com /e:2048" to have 2048 bytes available.\r
  set $foo$=\r
 +\r
  :end\r
  set prefix=\r
  set nodebug=\r
  set noopt=\r
 +set enablechecking=\r
  set profile=\r
  set nocygwin=\r
  set COMPILER=\r
@@@ -785,9 -670,19 +785,22 @@@ set userldflags
  set doldflags=\r
  set mingwflag=\r
  set mf=\r
 +set distfiles=\r
 +set HAVE_DISTFILES=\r
 +set distFilesOk=\r
+ set pngsupport=\r
+ set jpegsupport=\r
+ set gifsupport=\r
+ set tiffsupport=\r
+ set xpmsupport=\r
+ set svgsupport=\r
+ set libsOK=\r
+ set HAVE_GIF=\r
+ set HAVE_JPEG=\r
+ set HAVE_PNG=\r
+ set HAVE_TIFF=\r
+ set HAVE_XPM=\r
+ set dbginfo=\r
  \r
  goto skipArchTag\r
     arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c\r
diff --combined src/.gdbinit
index 73fecea5972610e855700feb892c5dcffa94fdaf,f81b99d4f3fe7463cbf421ab2b0046c1188ef5c2..ac466de0eee79934731bec38da33f33f85e0d633
@@@ -1,5 -1,5 +1,5 @@@
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- #   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ #   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
  #   Free Software Foundation, Inc.
  #
  # This file is part of GNU Emacs.
@@@ -21,8 -21,6 +21,8 @@@
  
  # Force loading of symbols, enough to give us gdb_valbits etc.
  set main
 +# With some compilers, we need this to give us struct Lisp_Symbol etc.:
 +set Fmake_symbol
  
  # Find lwlib source files too.
  dir ../lwlib
@@@ -51,7 -49,7 +51,7 @@@ handle SIGALRM ignor
  # Using a constant runs into GDB bugs sometimes.
  define xgetptr
    set $bugfix = $arg0
-   set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits
+   set $ptr = (gdb_use_union ? (gdb_use_lsb ? $bugfix.u.val << gdb_gctypebits : $bugfix.u.val) : $bugfix & $valmask) | gdb_data_seg_bits
  end
  
  define xgetint
@@@ -273,9 -271,6 +273,9 @@@ define pit
      end
    end
    printf "\n"
 +  if ($it->bidi_p)
 +    printf "BIDI: base_stop=%d prev_stop=%d level=%d\n", $it->base_level_stop, $it->prev_stop, $it->bidi_it.resolved_level
 +  end
    if ($it->region_beg_charpos >= 0)
      printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos
    end
@@@ -452,36 -447,6 +452,36 @@@ document pwi
  Pretty print window structure w.
  end
  
 +define pbiditype
 +  if ($arg0 == 0)
 +    printf "UNDEF"
 +  end
 +  if ($arg0 == 1)
 +    printf "L"
 +  end
 +  if ($arg0 == 2)
 +    printf "R"
 +  end
 +  if ($arg0 == 3)
 +    printf "EN"
 +  end
 +  if ($arg0 == 4)
 +    printf "AN"
 +  end
 +  if ($arg0 == 5)
 +    printf "BN"
 +  end
 +  if ($arg0 == 6)
 +    printf "B"
 +  end
 +  if ($arg0 < 0 || $arg0 > 6)
 +    printf "%d??", $arg0
 +  end
 +end
 +document pbiditype
 +Print textual description of bidi type given as first argument.
 +end
 +
  define pgx
    set $g = $arg0
    # CHAR_GLYPH
    end
    # COMPOSITE_GLYPH
    if ($g->type == 1)
 -    printf "COMP[%d (%d..%d)]", $g->u.cmp.id, $g->u.cmp.from, $g->u.cmp.to
 +    printf "COMP[%d (%d..%d)]", $g->u.cmp.id, $g->slice.cmp.from, $g->slice.cmp.to
    end
 -  # IMAGE_GLYPH
 +  # GLYPHLESS_GLYPH
    if ($g->type == 2)
 +    printf "GLYPHLESS["
 +    if ($g->u.glyphless.method == 0)
 +      printf "THIN]"
 +    end
 +    if ($g->u.glyphless.method == 1)
 +      printf "EMPTY]"
 +    end
 +    if ($g->u.glyphless.method == 2)
 +      printf "ACRO]"
 +    end
 +    if ($g->u.glyphless.method == 3)
 +      printf "HEX]"
 +    end
 +  end
 +  # IMAGE_GLYPH
 +  if ($g->type == 3)
      printf "IMAGE[%d]", $g->u.img_id
    end
    # STRETCH_GLYPH
 -  if ($g->type == 3)
 +  if ($g->type == 4)
      printf "STRETCH[%d+%d]", $g->u.stretch.height, $g->u.stretch.ascent
    end
    xgettype ($g->object)
    else
      printf " pos=%d", $g->charpos
    end
 +  # For characters, print their resolved level and bidi type
 +  if ($g->type == 0)
 +    printf " blev=%d,btyp=", $g->resolved_level
 +    pbiditype $g->bidi_type
 +  end
    printf " w=%d a+d=%d+%d", $g->pixel_width, $g->ascent, $g->descent
    # If not DEFAULT_FACE_ID
    if ($g->face_id != 0)
    if ($g->overlaps_vertically_p)
      printf " OVL"
    end
 +  if ($g->avoid_cursor_p)
 +    printf " AVOID"
 +  end
    if ($g->left_box_line_p)
      printf " ["
    end
    if ($g->right_box_line_p)
      printf " ]"
    end
 -  if ($g->slice.x || $g->slice.y || $g->slice.width || $g->slice.height)
 -    printf " slice=%d,%d,%d,%d" ,$g->slice.x, $g->slice.y, $g->slice.width, $g->slice.height
 +  if ($g->slice.img.x || $g->slice.img.y || $g->slice.img.width || $g->slice.img.height)
 +    printf " slice=%d,%d,%d,%d" ,$g->slice.img.x, $g->slice.img.y, $g->slice.img.width, $g->slice.img.height
    end
    printf "\n"
  end
@@@ -634,31 -575,6 +634,31 @@@ document pgrowi
  Pretty print all glyphs in it->glyph_row.
  end
  
 +define prowlims
 +  printf "edges=(%d,%d),r2l=%d,cont=%d,trunc=(%d,%d),at_zv=%d\n", $arg0->minpos.charpos, $arg0->maxpos.charpos, $arg0->reversed_p, $arg0->continued_p, $arg0->truncated_on_left_p, $arg0->truncated_on_right_p, $arg0->ends_at_zv_p
 +end
 +document prowlims
 +Print important attributes of a glyph_row structure.
 +Takes one argument, a pointer to a glyph_row structure.
 +end
 +
 +define pmtxrows
 +  set $mtx = $arg0
 +  set $gl = $mtx->rows
 +  set $glend = $mtx->rows + $mtx->nrows - 1
 +  set $i = 0
 +  while ($gl < $glend)
 +    printf "%d: ", $i
 +    prowlims $gl
 +    set $gl = $gl + 1
 +    set $i = $i + 1
 +  end
 +end
 +document pmtxrows
 +Print data about glyph rows in a glyph matrix.
 +Takes one argument, a pointer to a glyph_matrix structure.
 +end
 +
  define xtype
    xgettype $
    output $type
@@@ -913,19 -829,6 +913,19 @@@ Print the address of the char-table $, 
  This command assumes that $ is an Emacs Lisp char-table value.
  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
 +end
 +document xsubchartable
 +Print the address of the sub-char-table $, its depth and min-char.
 +This command assumes that $ is an Emacs Lisp sub-char-table value.
 +end
 +
  define xboolvector
    xgetptr $
    print (struct Lisp_Bool_Vector *) $ptr
@@@ -1227,7 -1130,8 +1227,8 @@@ define xbacktrac
        xprintsym (*$bt->function)
        printf " (0x%x)\n", $bt->args
      else
-       printf "0x%x ", *$bt->function
+       xgetptr *$bt->function
+       printf "0x%x ", $ptr
        if $type == Lisp_Vectorlike
        xgetptr (*$bt->function)
          set $size = ((struct Lisp_Vector *) $ptr)->size
diff --combined src/ChangeLog
index d03b16a7092546141fc3021ba0b019f5d89f4f7c,acd579b94675ae3468bf38cf4950fa9cdecadc15..879ecc94d725f329aa11eadcb023e7d6120e55e9
 -2010-12-31  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
++
++      * keyboard.c (Vselect_active_regions): Doc fix.  (Bug#7702)
++
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * image.c <Qlibpng_version>: New variable.
+       (syms_of_image): Intern and staticpro it.  Set its value to the
+       version of PNG library we were compiled with.
+       (my_png_error, png_load): Avoid GCC warnings about direct access
+       to png_ptr->jmpbuf.  (Bug#7716)
+       (png_jmpbuf): New macro.
+       (my_png_error, png_load): Use it instead of #ifdef'ing according
+       to PNG_LIBPNG_VER_MAJOR and PNG_LIBPNG_VER_MINOR.
 -2010-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>
++2011-01-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * .gdbinit (xgetptr): Fix the union+lsb case.
+       (xbacktrace): Fix the union case.
 -2010-12-26  Stefan Monnier  <monnier@iro.umontreal.ca>
++2011-01-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * window.c (Fmove_to_window_line): Avoid abort when called in a buffer
+       different from selected-window's.
 -2010-12-25  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * keyboard.c (parse_menu_item): Prepend "  " to the key sequence
+       equivalent of a menu item when the key sequence is given by the
+       `:keys' attribute.  (Bug#7662)
+       * xdisp.c (Fformat_mode_line): Doc fix: no need to state that only
+       the basic faces are supported.
 -2010-12-24  Jan Djärv  <jan.h.d@swipnet.se>
++2011-01-02  Jan Djärv  <jan.h.d@swipnet.se>
+       * xterm.c (x_check_fullscreen): Fix pixel/character mixup.
 -2010-12-17  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * xdisp.c (Fformat_mode_line): Fix last change.
 -2010-12-16  Chong Yidong  <cyd@stupidchicken.com>
++2011-01-02  Chong Yidong  <cyd@stupidchicken.com>
+       * xdisp.c (Fformat_mode_line): Restrict the FACE argument to basic
+       faces (Bug#7587).
 -2010-12-13  Eli Zaretskii  <eliz@gnu.org>
++2011-01-02  Eli Zaretskii  <eliz@gnu.org>
+       * fileio.c (Fexpand_file_name): One more doc fix.
 -2010-12-12  Eli Zaretskii  <eliz@gnu.org>
 +2011-01-01  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * gtkutil.c (xg_get_tool_bar_widgets): Use NULL for a missing
 +      image or label in the container.
 +      (xg_make_tool_item): Replace VERT_ONLY arg with HORIZ, TEXT_IMAGE.
 +      (xg_show_toolbar_item): Function deleted.
 +      (xg_tool_item_stale_p): New function.
 +      (update_frame_tool_bar): Calculate tool-bar style once per call.
 +      Instead of hiding text labels, omit them.  Don't use
 +      xg_show_toolbar_item; create new GtkToolItems from scratch if
 +      necessary, instead of trying to re-use them.  This avoids an
 +      annoying animation when changing tool-bars.
 +
 +2010-12-31  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsfns.m (ns_set_name_as_filename): Always use buffer name for
 +      title and buffer filename only for RepresentedFilename.
 +      Handle bad UTF-8 in buffer name (Bug#7517).
 +
 +2010-12-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * coding.h (ENCODE_UTF_8): Remove "Used by ..." comment.
 +
 +      * nsfns.m (ns_set_name_iconic): Remove.
 +      (ns_set_name_internal): New function (Bug#7517).
 +      (Vicon_title_format): Extern declare.
 +      (ns_set_name): Call ns_set_name_internal.
 +      (x_explicitly_set_name): Remove call to ns_set_name_iconic.
 +      (x_implicitly_set_name): Ditto.
 +      (x_set_title): Remove commet about EXPLICIT.  Call ns_set_name_internal.
 +      (ns_set_name_as_filename): Encode name with ENCODE_UTF_8 (Bug#7517).
 +
 +2010-12-29  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 +
 +      * window.c (syms_of_window): Add missing defsubr for
 +      window-use-time.
 +
 +2010-12-28  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xterm.h (x_alloc_lighter_color_for_widget): Restore declaration.
 +      * xterm.c (x_alloc_lighter_color_for_widget): Restore.
 +
 +2010-12-27  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * buffer.c: Remove unused declarations.
 +      * buffer.h: Likewise.
 +      * charset.h: Likewise.
 +      * composite.h: Likewise.
 +      * dispextern.h: Likewise.
 +      * dispnew.c: Likewise.
 +      * font.h: Likewise.
 +      * fontset.c: Likewise.
 +      * fontset.h: Likewise.
 +      * intervals.h: Likewise.
 +      * keymap.h: Likewise.
 +      * lisp.h: Likewise.
 +      * syntax.c: Likewise.
 +      * syntax.h: Likewise.
 +      * termhooks.h: Likewise.
 +      * window.h: Likewise.
 +      * xsettings.h: Likewise.
 +      * xterm.c: Likewise.
 +      * xterm.h: Likewise.
 +
 +      * chartab.c (sub_char_table_ref): Make static.
 +      * dispnew.c (line_hash_code, required_matrix_height)
 +      (required_matrix_width): Likewise.
 +      * eval.c (interactive_p, apply_lambda): Likewise.
 +      * fns.c (string_make_multibyte, copy_hash_table, hash_clear):
 +      Likewise.
 +      * font.c (QCadstyle, QCregistry, font_make_spec)
 +      (font_parse_fcname, font_encode_char, font_at): Likewise.
 +      * frame.c (x_frame_get_arg): Likewise.
 +      * keymap.c (get_keyelt): Likewise.
 +      * lread.c (read_filtered_event): Likewise.
 +      * print.c (write_string_1): Likewise.
 +      * window.c (delete_window, window_height, window_width)
 +      (foreach_window): Likewise.
 +      * xrdb.c (x_get_customization_string, x_get_resource): Likewise.
 +      * xterm.c (x_scroll_bar_clear, xembed_set_info)
 +      (xembed_send_message): Likewise.
 +
 +      * eval.c (run_hook_list_with_args): Delete.
 +      * font.c (font_unparse_gtkname, font_update_lface): Likewise.
 +      * terminal.c (get_terminal_param): Likewise.
 +      * xterm.c (x_alloc_lighter_color_for_widget): Likewise.
 +
 +      * scroll.c: Fix comment.
 +
 +      * dispnew.c (add_window_display_history)
 +      (add_frame_display_history, glyph_row_slice_p)
 +      (find_glyph_row_slice, flush_stdout)
 +      (check_matrix_pointer_lossage, matrix_row)
 +      (check_matrix_invariants, check_window_matrix_pointers)
 +      (check_matrix_pointers, window_to_frame_vpos)
 +      (window_to_frame_hpos): Prototize.
 +      * textprop.c (erase_properties): Likewise.
 +
 +2010-12-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * print.c (PRINT_NUMBER_OBJECT, PRINT_NUMBER_STATUS): Remove.
 +      (print_preprocess): Fix handling of uninterned symbols in last change.
 +
 +      * print.c (print, print_preprocess, print_object): Use a hash table
 +      rather than a linear table for Vprint_number_table.
 +
 +2010-12-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (focus_follows_mouse): Default to 0 (Bug#7269).
 +
 +2010-12-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (Vtool_bar_separator_image_expression): New variable.
 +      (parse_tool_bar_item): Use it to obtain image separators for
 +      displays not using native tool-bar separators.
 +
 +      * xdisp.c (build_desired_tool_bar_string): Don't handle separators
 +      specially, since this is now done in parse_tool_bar_item.
 +
 +2010-12-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Minor clean up to silence some gcc warnings.
 +      * window.c (Fset_window_buffer):
 +      * xterm.c (x_set_frame_alpha): Restructure code to silence
 +      compiler warning.
 +      (handle_one_xevent): Remove unused var `p'.
 +      (do_ewmh_fullscreen): Remove unused var `lval'.
 +      (xembed_set_info): Remove unused var `atom'.
 +      * textprop.c (Fremove_list_of_text_properties): Add braces to silence
 +      compiler warning.
 +      * fontset.c (fontset_id_valid_p, dump_fontset):
 +      * ftfont.c (ftfont_drive_otf): Modernize k&r declaration.
 +      * eval.c (Feval, Ffuncall): Avoid unneeded gotos.
 +      * dispnew.c (update_frame, update_frame_1): Compile the `do_pause'
 +      label only when it's used.
 +      * image.c (x_create_bitmap_from_xpm_data):
 +      * dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like
 +      its callers.
 +      * coding.c (detect_coding_utf_16): Remove unused vars `src_base' and
 +      `consumed_chars'.
 +      (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'.
 +      (decode_coding_emacs_mule): Remove unused label `retry'.
 +      (detect_eol): Add parens to silence compiler warning.
 +      * alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where
 +      it's used to silence the compiler.
 +      (make_number): Modernize k&r declaration.
 +      (mark_char_table): Add parens to silence compiler warning.
 +
 +2010-12-17  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (parse_tool_bar_item): Allow menu separators in
 +      tool-bar maps.
 +      (menu_separator_name_p): New function, from gtkutil.c.
 +      (separator_names): Move from gtkutil.c.
 +
 +      * keyboard.h (menu_separator_name_p): Add prototype.
 +
 +      * gtkutil.c (XG_BIN_CHILD): New macro.
 +      (xg_get_menu_item_label, xg_update_menubar)
 +      (xg_update_menu_item, xg_tool_bar_menu_proxy)
 +      (xg_show_toolbar_item, update_frame_tool_bar): Use it.
 +      (separator_names, xg_separator_p): Move to keyboard.c.
 +      (create_menus, xg_update_submenu, update_frame_tool_bar):
 +      Use menu_separator_name_p.
 +
 +      * nsmenu.m (name_is_separator): Function deleted.
 +      (addItemWithWidgetValue): Use menu_separator_name_p.
 +
 +      * w32menu.c (name_is_separator): Function deleted.
 +      (add_menu_item): Use menu_separator_name_p.
 +
 +2010-12-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_draw_window_cursor): If the cursor color is the
 +      same as the background, use the face forground as cursor.
 +
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * fileio.c (Fexpand_file_name): Doc fix.  (Bug#7617)
  
 -2010-12-11  Eli Zaretskii  <eliz@gnu.org>
 -
 -      * w32fns.c (Fx_show_tip): Call try_window with last argument
 -      TRY_WINDOW_IGNORE_FONTS_CHANGE.  Delete the TODO ifdef: problem
 -      solved.  Round up the tip height to an integral multiple of the
 -      frame's line height.  Add FRAME_COLUMN_WIDTH to the tip width.
 -      (Bug#7398)
 +2010-12-13  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (string_pos_nchars_ahead, c_string_pos)
        (face_before_or_after_it_pos, next_element_from_string)
        (string_char_and_length): Update commentary: MAXLEN is no longer
        needed.
  
 -2010-12-10  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-12-13  Jan Djärv  <jan.h.d@swipnet.se>
  
        * keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT
        as (Qsave_session arg).
        (Fhandle_save_session): If event has Qt as argument,
        call Fkill_emacs (Bug#7552).
  
 -2010-12-07  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * buffer.c (transient-mark-mode): Doc fix (Bug#7465).
 +
 +2010-12-13  Jan Djärv  <jan.h.d@swipnet.se>
  
        * xsmfns.c (smc_die_CB): Call Fkill_emacs (Bug#7552).
  
 -2010-12-06  Chong Yidong  <cyd@stupidchicken.com>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
        * dispextern.h (struct it): New member overlay_strings_charpos.
  
        (next_overlay_string): Load overlay strings at recorded position,
        which may not be the same as the iterator's charpos (Bug#7016).
  
 -2010-12-05  Jan Djärv  <jan.h.d@swipnet.se>
 -
 -      * nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background
 -      with cursor color and draw a rectangle around the image (Bug#7412).
 -
 -2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
 +2010-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
        * xdisp.c (try_scrolling): Avoid infloop if the first line is
        obscured due to a vscroll (Bug#7537).
  
 -2010-12-02  Jan Djärv  <jhd@zeplinf.localdomain>
 +2010-12-13  Jan Djärv  <jhd@zeplinf.localdomain>
  
        * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT.
  
        (x_set_offset): Handle XNegative and YNegative in
        f->size_hint_flags (Bug#7510).
  
 -2010-11-25  Kenichi Handa  <handa@m17n.org>
 +2010-12-11  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c (Fx_show_tip): Call try_window with last argument
 +      TRY_WINDOW_IGNORE_FONTS_CHANGE.  Delete the TODO ifdef: problem
 +      solved.  Round up the tip height to an integral multiple of the
 +      frame's line height.  Add FRAME_COLUMN_WIDTH to the tip width.
 +      (Bug#7398)
 +
 +2010-12-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * fileio.c (Fverify_visited_file_modtime): Default to current buffer.
 +
 +2010-12-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xml.c (parse_region): Ignore blank HTML nodes.
 +      (make_dom): Return CDATA sections (like <style>foo</style>) as
 +      text nodes.
 +
 +2010-12-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (read1): Allow newstyle unquote outside of backquote.
 +      Disallow old-style backquotes inside new-style backquotes.
 +      Don't count unquotes to figure out when we're "syntactically inside
 +      but semantically outside of a backquote" any more.
 +      Extend the restriction no-unescaped-commas-and-backquotes-in-symbols
 +      to all contexts.
 +
 +2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * process.c: Remove checks for HAVE_SYS_IOCTL_H (Bug#7484).
 +
 +2010-12-04  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (M_FILE): Substitute @M_FILE@ instead of @machfile@.
 +      (S_FILE): Substitute @S_FILE@ instead of @opsysfile@.
 +      * m/arm.h, m/sh3.h, m/xtensa.h: Remove files.
 +
 +2010-12-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lisp.h (union Lisp_Object): Explicitly declare signedness of
 +      bit-field.
 +      (XINT): Remove variant for EXPLICIT_SIGN_EXTEND.
 +      * m/alpha.h (EXPLICIT_SIGN_EXTEND): Don't define.
 +      * m/amdx86-64.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/ia64.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/ibms390.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/ibms390x.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/iris4d.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/m68k.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/sparc.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/template.h (EXPLICIT_SIGN_EXTEND): Likewise.
 +      * m/hp800.h: Remove file.
 +      * m/mips.h: Remove file.
 +
 +2010-12-03  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background
 +      with cursor color and draw a rectangle around the image (Bug#7412).
 +
 +2010-12-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * frame.c (x_set_font): Remove unused variable.
 +
 +2010-12-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsmenu.m (update_frame_tool_bar): Remove NSLog on invalid image.
 +
 +      * nsterm.m (ns_draw_glyph_string): Switch fore- and background if
 +      drawing text under filled box cursor (Bug#7479).
 +
 +2010-11-27  Kenichi Handa  <handa@m17n.org>
  
        * charset.c (emacs_mule_charset): Make it an array of charset ID;
        i.e. integer.
 -      (Fdefine_charset_internal): Adjusted for the above change.
 +      (Fdefine_charset_internal): Adjust for the above change.
        (init_charset_once): Likewise.
  
 -      * charset.h (emacs_mule_charset): Adjust the prototype.  Delete
 -      duplicated extern.
 +      * charset.h (emacs_mule_charset): Adjust the prototype.
 +      Delete duplicated extern.
  
        * coding.c (emacs_mule_char): Adjust for the change of
        emacs_mule_charset.
        * lread.c (read_emacs_mule_char): Adjust for the change of
        emacs_mule_charset.
  
 -2010-11-22  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-27  Eli Zaretskii  <eliz@gnu.org>
  
        * w32.c (_PROCESS_MEMORY_COUNTERS_EX): Don't define with versions
        of w32api >= 3.15.  (Bug#6989)  (Bug#7452)
  
 -2010-11-22  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-11-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        * alloc.c (mark_terminals): Ensure that the image cache is marked
        even if the terminal object was marked earlier (Bug#6301).
  
        * editfns.c (Fbyte_to_string): Signal an error arg is not a byte.
  
 -2010-11-20  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-11-27  Jan Djärv  <jan.h.d@swipnet.se>
  
        * gtkutil.c (menubar_map_cb): New function (Bug#7425).
        (xg_update_frame_menubar): Connect signal map to menubar_map_cb.
        Use 23 as menubar height if 0. (Bug#7425).
  
 -2010-11-14  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-11-26  Eli Zaretskii  <eliz@gnu.org>
  
 -      * xsettings.c (init_gconf): Check HAVE_G_TYPE_INIT.
 +      * xdisp.c (set_message_1): Force paragraph direction in echo area
 +      be left-to-right.
  
 -      * config.in (HAVE_G_TYPE_INIT): New symbol.
 +      * keyboard.c (make_lispy_position): Put a meaningful value in yret
 +      when the click is on the header or mode line.
  
 -2010-11-12  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-25  Eli Zaretskii  <eliz@gnu.org>
  
 -      * lread.c (Fload): Mention `load-in-progress' and
 -      `load-file-name'.  (Bug#7346)
 +      * xdisp.c (set_cursor_from_row): Don't forget to consider the
 +      `cursor' property of the first character in overlay strings.
 +      (Bug#7474)  (Bug#7481)
  
 -2010-11-09  Eli Zaretskii  <eliz@gnu.org>
 +2010-11-24  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * keyboard.c (kbd_buffer_nr_stored): Define only ifdef subprocesses.
 -      (kbd_buffer_store_event_hold, kbd_buffer_get_event)
 -      (tty_read_avail_input): Call kbd_buffer_nr_stored only ifdef
 -      subprocesses.  Use buffer_free only ifdef subprocesses.
 +      * nsterm.m (NSLeftControlKeyMask, NSLeftCommandKeyMask)
 +      (NSLeftAlternateKeyMask): New defines.
 +      (keyDown): Parse left and right keys separately (Bug#7458).
 +      Compare Left key masks exactly (Bug#7458).
  
 -      * process.c (init_process) [subprocesses]: Init kbd_is_on_hold in
 -      the subprocesses version, not in the non-subprocesses one.
 +2010-11-23  Eli Zaretskii  <eliz@gnu.org>
  
 -      * Makefile.in: Don't use ## comment, it breaks the MSDOS build.
 +      * intervals.c (temp_set_point_both): Define before calling, to
 +      avoid GCC warnings.
  
 -      * xfns.c (x_real_positions): Fix declaration-after-statement
 -      problem.
 +2010-11-23  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-11-05  Chong Yidong  <cyd@stupidchicken.com>
 +      * nsmenu.m: Use #include <config.h> instead of "config.h".
  
 -      * image.c (free_image): Don't garbage the frame here, since this
 -      function can be called while redisplaying (Bug#7210).
 -      (uncache_image): Garbage the frame here (Bug#6426).
 +      * term.c (Qglyphless_char,last_glyphless_glyph_frame)
 +      (last_glyphless_glyph_face_id. last_glyphless_glyph_merged_face_id):
 +      Move declarations ...
 +      * lisp.h (Qglyphless_char,last_glyphless_glyph_frame)
 +      (last_glyphless_glyph_face_id. last_glyphless_glyph_merged_face_id):
 +      ... here.
  
 -2010-11-04  Chong Yidong  <cyd@stupidchicken.com>
 +      * emacs.c (gdb_use_union, gdb_valbits,gdb_gctypebits)
 +      (gdb_data_seg_bits, gdb_array_mark_flag, PVEC_FLAG)
 +      (gdb_pvec_type):
 +      * print.c (print_output_debug_flag):
 +      * lisp.h (debug_print): Mark as EXTERNALLY_VISIBLE.
 +      (safe_debug_print): New declaration.
  
 -      * process.c (Fmake_network_process): Don't apply Bug#5173 fix for
 -      Windows.
 +      * xterm.c:
 +      * systty.h:
 +      * sound.c: Include <sys/ioctl.h> unconditionally.
  
 -2010-11-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-11-22  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
 -      * process.c (Fmake_network_process): Don't call turn_on_atimers around
 -      `connect' (Bug#5723).
 +      * alloc.c (mark_maybe_object): Return early if given a Lisp
 +      integer (Bug#6301).
  
 -2010-11-04  Helmut Eller  <eller.helmut@gmail.com>
 +2010-11-21  Ken Brown  <kbrown@cornell.edu>
  
 -      * process.c (Fmake_network_process): Call `select' for interrupted
 -      `connect' rather than creating new socket (Bug#5173).
 +      * sheap.c (STATIC_HEAP_SIZE): Revert previous change.
  
 -2010-11-04  Kenichi Handa  <handa@m17n.org>
 +2010-11-21  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * font.c (font_delete_unmatched): Check Vface_ignored_fonts.
 -      Don't sheck SPEC if it is nil.
 -      (font_list_entities): Call font_delete_unmatched if
 -      Vface_ignored_fonts is non-nil.
 +      * nsterm.m (ns_right_command_modifier, ns_right_control_modifier):
 +      Define (Bug#7458).
 +      (NSRightCommandKeyMask, NSRightControlKeyMask): Define (Bug#7458).
 +      (EV_MODIFIERS): Check for NSRightCommandKeyMask and
 +      NSRightControlKeyMask also (Bug#7458).
 +      (keyDown): Ditto (Bug#7458).
 +      (syms_of_nsterm): Defvar ns-right-command-modifier and
 +      ns-right-control-modifier (Bug#7458).
  
 -2010-11-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-11-21  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * dispextern.h (TRY_WINDOW_CHECK_MARGINS)
 -      (TRY_WINDOW_IGNORE_FONTS_CHANGE): New defines.
 +      * sysdep.c (sys_subshell): Remove SET_EMACS_PRIORITY.
 +      * emacs.c (emacs_priority, syms_of_emacs): Remove emacs_priority.
  
 -      * xdisp.c (try_window): Change arg from CHECK_MARGINS to FLAGS.
 -      Don't abort with fonts change if TRY_WINDOW_IGNORE_FONTS_CHANGE is
 -      set in FLAGS.  Callers with non-zero CHECK_MARGINS changed to use
 -      TRY_WINDOW_CHECK_MARGINS.
 +      * intervals.h (temp_set_point, temp_set_point_both):
 +      * buffer.h (offset_intervals, copy_intervals): Remove INLINE.
  
 -      * xfns.c (Fx_show_tip): Undo last change.  Call try_window with
 -      TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).
 +2010-11-20  Ken Brown  <kbrown@cornell.edu>
  
 -2010-11-04  Jan Djärv  <jan.h.d@swipnet.se>
 +      * sheap.c (STATIC_HEAP_SIZE): Increase to 13MB.
  
 -      * xfns.c (x_real_positions): Only use _NET_FRAME_EXTENTS if our
 -      parent is the root window.  Check this after traversing window tree.
 +2010-11-20  Eli Zaretskii  <eliz@gnu.org>
  
 -      * xterm.c (x_term_init): Initialize Xatom_net_frame_extents.
 +      * term.c (produce_glyphless_glyph): Use \uNNNN, \UNNNNNN, or
 +      \xNNNNNN for hex-code display of glyphless characters.
  
 -      * xterm.h (struct x_display_info): Xatom_net_frame_extents is new.
 +2010-11-20  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * xfns.c (x_real_positions): Try to get _NET_FRAME_EXTENTS first
 -      before traversing window tree (Bug#5721).
 +      * gtkutil.c (xg_make_tool_item): Take vert_only as argument.
 +      Set important to ! vert_only.
 +      (xg_show_toolbar_item): Don't show label horizontally if
 +      tool item isn't important.
 +      (update_frame_tool_bar): Get TOOL_BAR_ITEM_VERT_ONLY and pass it to
 +      xg_make_tool_item, or update important on existing tool item.
  
 -2010-11-03  Glenn Morris  <rgm@gnu.org>
 +      * keyboard.c (QCvert_only): New variable.
 +      (parse_tool_bar_item): Check for QCvert_only.
 +      (syms_of_keyboard): Initialize QCvert_only.
  
 -      * Makefile.in (CRT_DIR): New variable, set by configure.
 -      * m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
 -      Use $CRT_DIR rather than HAVE_LIB64_DIR.  (Bug#5655)
 +      * dispextern.h (tool_bar_item_idx): Add TOOL_BAR_ITEM_VERT_ONLY.
  
 -2010-11-01  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-11-20  Eli Zaretskii  <eliz@gnu.org>
  
 -      * process.c (kbd_is_on_hold): New variable.
 -      (hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p):
 -      New functions.
 -      (wait_reading_process_output): If kbd_on_hold_p returns non-zero,
 -      select on empty input mask.
 -      (init_process): Initialize kbd_is_on_hold to 0.
 +      * msdos.c (dos_rawgetc): Use gen_help_event, instead of doing the
 +      same in-line.
  
 -      * process.h (hold_keyboard_input, unhold_keyboard_input)
 -      (kbd_on_hold_p): Declare.
 +2010-11-20  Andreas Schwab  <schwab@linux-m68k.org>
  
 -      * keyboard.c (input_available_signal): Declare.
 -      (kbd_buffer_nr_stored): New function.
 -      (kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns
 -      more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571).
 -      (kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored
 -      returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571).
 -      (tty_read_avail_input): If input is on hold, return.
 -      Don't read more that free slots in kbd_buffer (Bug#6571).
 +      * xfaces.c (lookup_face): Make static.
 +      * dispnew.c (copy_row_except_pointers): Likewise.
 +      * syntax.c (dec_bytepos): Likewise.
 +      (inc_bytepos): Remove.
 +      * dispextern.h (lookup_face): Remove declaration.
  
 -2010-10-31  Chong Yidong  <cyd@stupidchicken.com>
 +2010-11-19  Eli Zaretskii  <eliz@gnu.org>
  
 -      * xterm.c (x_connection_closed): Print informative error message
 -      when aborting on GTK.  This requires using shut_down_emacs
 -      directly instead of Fkill_emacs.
 +      * xdisp.c (set_cursor_from_row): Display cursor after all the
 +      glyphs that come from an overlay.  Don't overstep the last glyph
 +      when skipping glyphs from an overlay.  (Bug#6687)
  
 -2010-10-25  Michael Albinus  <michael.albinus@gmx.de>
 +2010-11-18  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * dbusbind.c (Fdbus_call_method_asynchronously)
 -      (Fdbus_register_signal, Fdbus_register_method): Check, whether
 -      `dbus-registered-objects-table' is initialized.
 +      * alloc.c (refill_memory_reserve): Move declaration ...
 +      * lisp.h (refill_memory_reserve): ... here.
  
 -2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
 +      * strftime.c (_strftime_copytm): Add declaration.
  
 -      * xterm.c (x_connection_closed): Kill Emacs unconditionally.
 +      * callproc.c (syms_of_callproc): Use intern_c_string.
  
 -2010-10-22  Eli Zaretskii  <eliz@gnu.org>
 +      Move declarations from .c files to .h files.
 +      * process.c (timers_run):
 +      * minibuf.c (quit_char):
 +      * lread.c (read_emacs_mule_char):
 +      * keyboard.c (minibuf_level, message_enable_multibyte)
 +      (pending_malloc_warning):
 +      * insdel.c (Vselect_active_regions, Vsaved_region_selection)
 +      (Qonly): Remove declarations.
 +      * lisp.h (pending_malloc_warning, Vsaved_region_selection)
 +      (Vselect_active_regions):
 +      * keyboard.h (timers_run):  Add declarations.
  
 -      * frame.c (Fframep, Fwindow_system): Deprecate use as a predicate.
 +      * strftime.c (my_strftime_gmtime_r, my_strftime_localtime_r)
 +      (tm_diff): Convert definitions to standard C.
 +      (extra_args_spec_iso): Remove, unused.
  
 -      * dispnew.c (syms_of_display) <initial-window-system, window-system>:
 -      Deprecate use as a boolean flag.
 +2010-11-18  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-10-18  Ken Brown  <kbrown@cornell.edu>
 +      * xsettings.c (init_gconf): Check HAVE_G_TYPE_INIT.
  
 -      * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225).
 +      * config.in (HAVE_G_TYPE_INIT): New symbol.
  
 -2010-10-15  Kenichi Handa  <handa@m17n.org>
 +2010-11-18  Eli Zaretskii  <eliz@gnu.org>
  
 -      Fix incorrect font metrics when the same font is opened with
 -      different pixelsizes.
 +      * lread.c (Fload): Mention `load-in-progress' and
 +      `load-file-name'.  (Bug#7346)
  
 -      * xftfont.c: Include composite.h.
 -      (xftfont_shape): New function.
 -      (syms_of_xftfont): Set xftfont_driver.shape.
 +      * keyboard.c (kbd_buffer_nr_stored): Define only ifdef subprocesses.
 +      (kbd_buffer_store_event_hold, kbd_buffer_get_event)
 +      (tty_read_avail_input): Call kbd_buffer_nr_stored only ifdef
 +      subprocesses.  Use buffer_free only ifdef subprocesses.
  
 -2010-10-13  Damyan Pepper  <damyanp@gmail.com>
 +      * process.c (init_process) [subprocesses]: Init kbd_is_on_hold in
 +      the subprocesses version, not in the non-subprocesses one.
  
 -      Fix handling of font properties on Windows (bug#6303).
 -      * font.c (font_filter_properties): New function, refactored from
 -      ftfont_filter_properties.
 -      * font.h (font_filter_properties): Declare.
 -      * ftfont.c (ftfont_filter_properties): Use font_filter_properties.
 -      * w32font.c (w32font_booleans, w32font_non_booleans): New variables.
 -      (w32font_filter_properties): New function.
 -      (w32font_driver): Add w32font_filter_properties.
 +      * Makefile.in: Don't use ## comment, it breaks the MSDOS build.
  
 -2010-10-12  Juanma Barranquero  <lekktu@gmail.com>
 +2010-11-17  Eli Zaretskii  <eliz@gnu.org>
  
 -      * font.c (Ffont_variation_glyphs):
 -      * ccl.c (Fccl_execute_on_string): Fix typo in docstring.
 +      * xdisp.c (set_cursor_from_row): Fix cursor positioning in empty
 +      lines on text-mode terminals.  (bug#7417)
  
 -2010-10-10  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * nsterm.m (Qleft): Declare.
 -      (ns_right_alternate_modifier): New variable
 -      (NSRightAlternateKeyMask): New define.
 -      (EV_MODIFIERS): Parse NSRightAlternateKeyMask if
 -      ns_right_alternate_modifier isn't Qleft.
 -      (keyDown): If ns_right_alternate_modifier isn't Qleft, use it
 -      as emacs modifier for NSRightAlternateKeyMask.
 -      (syms_of_nsterm): DEFVAR_LISP ns-right-alternate-modifier.
 +      * xterm.c (get_current_wm_state): Rename from get_current_vm_state.
 +      (do_ewmh_fullscreen, x_handle_net_wm_state): Update callers.
  
 -2010-10-08  Michael Albinus  <michael.albinus@gmx.de>
 +2010-11-17  Kenichi Handa  <handa@m17n.org>
  
 -      * dbusbind.c (xd_get_dispatch_status): Return a Lisp_Object.
 -      (xd_pending_messages): Catch xd_get_dispatch_status calls.
 +      * coding.c (Fset_terminal_coding_system_internal): Fix previous
 +      change (set charset-ID list instead of charset-symbol list).
  
 -2010-10-08  Kenichi Handa  <handa@m17n.org>
 +2010-11-16  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * coding.c (complement_process_encoding_system): Fix previous change.
 +      * keyboard.c (make_lispy_position): For text area clicks, record Y
 +      pixel position relative to the text area, excluding header line.
 +      Also change X and Y to Lisp_Objects, not pointers; don't return
 +      coordinate values via pointers.  Pass ON_TEXT_AREA coordinate to
 +      buffer_posn_from_coords counting from the start of the text area.
 +      (Fposn_at_x_y, make_lispy_event): Callers changed.
  
 -2010-10-03  Michael Albinus  <michael.albinus@gmx.de>
 +      * window.c (coordinates_in_window): Change X and Y to ints rather
 +      than pointers; don't return coordinates via pointers.
 +      (struct check_window_data): Change X and Y from pointers to ints.
 +      (window_from_coordinates): Remove args WX and WY; don't return
 +      coordinates via pointers.
 +      (Fcoordinates_in_window_p, window_from_coordinates):
 +      (check_window_containing, Fwindow_at): Callers changed.
 +      (window_relative_x_coord): New function.
  
 -      * dbusbind.c (syms_of_dbusbind): Move putenv call ...
 -      (Fdbus_init_bus): ... here.  (Bug#7113)
 +      * window.h (window_from_coordinates, window_relative_x_coord):
 +      Update prototypes.
  
 -2010-10-03  Glenn Morris  <rgm@gnu.org>
 +      * dispnew.c (buffer_posn_from_coords): Assume that X counts from
 +      the start of the text area.
  
 -      * buffer.c (before-change-functions, after-change-functions):
 -      Three-year overdue doc fix following 2007-08-13 change.
 +      * xdisp.c (remember_mouse_glyph): Change window_from_coordinates
 +      call.  Use window_relative_x_coord.
 +      (note_mouse_highlight): Change window_from_coordinates call.
  
 -2010-10-02  Kenichi Handa  <handa@m17n.org>
 +      * w32term.c (w32_read_socket):
 +      * msdos.c (dos_rawgetc):
 +      * xterm.c (handle_one_xevent): Likewise.
  
 -      * coding.c (coding_inherit_eol_type): If parent doesn't specify
 -      eol-format, inherit from the system's default.
 -      (complement_process_encoding_system): Make a new coding system
 -      inherit the original eol-format.
 +2010-11-16  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-09-30  Kenichi Handa  <handa@m17n.org>
 +      * strftime.c (LOCALE_PARAM_DECL): Update for standard C.
 +      (LOCALE_PARAM, LOCALE_PARAM_PROTO): Remove, unused.
 +      (memcpy_lowcase, so_week_days, extra_args_spec, emacs_strftimeu):
 +      Convert definitions to standard C.
 +      * regex.c: Do not include <stdlib.h>, config.h does it.
 +      Include unistd.h.
 +      (xrealloc, init_syntax_once, re_match, regcomp, regexec)
 +      (regerror, regfree): Convert definitions to standard C.
 +      * mktime.c (my_mktime_localtime_r, ydhms_tm_diff, ranged_convert)
 +      (__mktime_internal): Convert definitions to standard C.
  
 -      * coding.c (complement_process_encoding_system): New function.
 +2010-11-15  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * coding.h (complement_process_encoding_system): Extern it.
 +      * w32proc.c:
 +      * w32inevt.c:
 +      * w32heap.c:
 +      * w32.c: Remove config.h include guards.
  
 -      * callproc.c (Fcall_process): Complement the coding system for
 -      encoding arguments.
 -      (Fcall_process_region): Complement the coding system for encoding
 -      the input to the process.
 +      * callproc.c (child_setup): Reorder code to simplify #ifdefs.
 +      No code changes.
  
 -      * process.c (Fstart_process): Complement the coding system for
 -      encoding arguments.
 -      (send_process): Complement the coding system for encoding what
 -      sent to the process.
 +      * process.c: Include <sys/ioctl.h> unconditionally,
 +      keyboard.c already does it.
  
 -2010-09-29  Kenichi Handa  <handa@m17n.org>
 +      * keyboard.c (pending_malloc_warning): Add const to match
 +      definition in alloc.c.
 +      (Fset_input_interrupt_mode): Simplify #ifdefs.
  
 -      * xfont.c (xfont_open): Fix setting of font->average_width from
 -      :avgwidth property (Bug#7123).
 +2010-11-15  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-09-28  Michael Albinus  <michael.albinus@gmx.de>
 +      Clean up systty.h macros.
 +      * systty.h (EMACS_GET_TTY_PGRP, EMACS_SET_TTY_PGRP, EMACS_GET_TTY)
 +      (EMACS_SET_TTY): Remove unneeded abstraction, instead inline the
 +      definition in all uses.
 +      (EMACS_TTY_TABS_OK): Remove, it has a single user.
 +      * sysdep.c (discard_tty_input, child_setup_tty)
 +      (init_sys_modes, tabs_safe_p, reset_sys_modes):
 +      * emacs.c (shut_down_emacs):
 +      * callproc.c (child_setup):
 +      * term.c (dissociate_if_controlling_tty): Inline removed macros.
  
 -      * dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, it
 -      is more portable.
 +      * data.c (sign_extend_temp, sign_extend_lisp_int): Remove, unused.
  
 -      * keyboard.c (gobble_input): Move call of xd_read_queued_messages ...
 -      (kbd_buffer_get_event): ... here. This is needed for cygwin, which
 -      has not defined SIGIO.
 +2010-11-14  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-09-27  Michael Albinus  <michael.albinus@gmx.de>
 +      * w32fns.c (Fx_create_frame):
 +      * nsfns.m (Fx_create_frame): Don't check for the cursorColor
 +      resource here; it's now done at startup.
  
 -      * dbusbind.c (syms_of_dbusbind): Set $DBUS_FATAL_WARNINGS to "0".
 -      (Bug#7113)
 +2010-11-14  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-09-26  Jan Djärv  <jan.h.d@swipnet.se>
 +      * xterm.c (set_wm_state): Add Qnil to final cons.
  
 -      * xgselect.c (xg_select): Clear file descriptors not set from
 -      rfds and wfds.
 +      * xselect.c (x_send_client_event): Remove unused variables cons and
 +      size.
  
 -2010-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-11-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
 -      * syntax.c (back_comment): Detect the case where a 1-char comment
 -      starter is also the 2nd char of a 2-char comment ender.
 +      * keyboard.c (modify_event_symbol) : Add const to array elements of
 +      arg NAME_TABLE.
 +      (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys)
 +      (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names)
 +      (lispy_wheel_names, lispy_drag_n_drop_names, modifier_names):
 +      Add const to array elements.
 +      (scroll_bar_parts): Make static.  Fix position of const.
  
 -2010-09-17  Jan Djärv  <jan.h.d@swipnet.se>
 +      * w32fns.c (lispy_function_keys): Add const to extern.
  
 -      * gtkutil.c (xg_tool_bar_menu_proxy): Set gtk-menu-items to TRUE.
 +      * w32inevt.c (lispy_function_keys): Likewise.
  
 -2010-09-12  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-11-14  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * xterm.c (get_current_vm_state): New function.
 -      (do_ewmh_fullscreen): Call get_current_vm_state and compare with
 -      want_fullscreen so set_wm_state calls are few (Bug#7013).
 -      (x_handle_net_wm_state): Move code to get_current_vm_state and
 -      call that function.
 +      * xfns.c (Fx_create_frame): Don't check for the cursorColor
 +      resource here; it's now done at startup.
  
 -2010-09-11  Courtney Bane  <emacs-bugs-7626@cbane.org>  (tiny change)
 +2010-11-13  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * term.c (tty_set_terminal_modes): Don't initialize twice (bug#7002).
 +      * xmenu.c: Make it clear that ../lwlib/lwlib.h is only needed for Motif.
  
 -2010-09-08  Kenichi Handa  <handa@m17n.org>
 +      Fix compilation on Solaris.
 +      * sysdep.c: Do not #include <term.h>.
 +      (tputs): Add declaration, similar to what cm.c does.  (Bug#7178)
  
 -      * coding.c (encode_coding_iso_2022): Don't optimize for ASCII if
 -      we may use designation or locking-shift.
 +      * s/ms-w32.h (HAVE_TERMIOS_H): Do not undef, not used anymore.
  
 -2010-09-07  Kenichi Handa  <handa@m17n.org>
 +2010-11-13  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * coding.c (detect_coding_emacs_mule): Fix checking of multibyte
 -      sequence when the source is multibyte.
 +      * xterm.c (set_wm_state): Don't put Atom in cons, call
 +      make_fixnum_or_float on them first.
 +      (x_term_init): Initialize Xatom_net_supporting_wm_check and
 +      Xatom_net_supported correctly.
  
 -2010-08-31  Kenichi Handa  <handa@m17n.org>
 +      * xselect.c (x_send_client_event): Move CHECK_STRING ...
 +      (Fx_send_client_event): to here.
  
 -      * dispextern.h (FACE_FOR_CHAR): Use an ASCII face for 8-bit
 -      characters.
 +2010-11-13  Martin Rudalics  <rudalics@gmx.at>
  
 -      * term.c (encode_terminal_code): Fix the previous change.
 -      (produce_glyphs): Don't set it->char_to_display here.
 -      Don't handle unibyte-display-via-language-environment here.
 -      (produce_special_glyphs): Set temp_it.char_to_display before
 -      calling produce_glyphs.
 +      * window.c (Fwindow_use_time): New function.
  
 -      * xdisp.c (get_next_display_element): Set it->char_to_display
 -      here.  Convert all 8-bit bytes from unibyte buffer/string to 8-bit
 -      characters.
 -      (get_overlay_arrow_glyph_row): Set it.char_to_display too before
 -      calling PRODUCE_GLYPHS.
 -      (append_space_for_newline): Save and store it->char_to_display.
 -      Set it->char_to_display before calling PRODUCE_GLYPHS.
 -      (extend_face_to_end_of_line): Set it->char_to_display before
 -      calling PRODUCE_GLYPHS.
 -      (get_glyph_face_and_encoding): Set the glyph code an 8-bit
 -      character to its byte value.
 -      (get_char_glyph_code): New function.
 -      (produce_stretch_glyph): Set it2.char_to_display too before
 -      calling x_produce_glyphs.
 -      (x_produce_glyphs): Simplify by using the same code for ASCII and
 -      non-ASCII characters.  Don't set it->char_to_display here.
 -      Don't handle unibyte-display-via-language-environment here.  For a
 -      character of no glyph, use font->space_width instead of FONT_WIDTH.
 +2010-11-13  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-08-29  Kenichi Handa  <handa@m17n.org>
 +      * xdisp.c (set_cursor_from_row): Fix cursor positioning on
 +      zero-width characters.
  
 -      * term.c (encode_terminal_code): Encode byte chars to the
 -      correspnding bytes.
 +      * .gdbinit (pgx): Adapt to latest changes in `struct glyph'.
  
 -2010-08-17  Andreas Schwab  <schwab@linux-m68k.org>
 +      * w32term.c (x_draw_glyphless_glyph_string_foreground): Draw the
 +      box before drawing the glyphs inside it.
  
 -      * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP
 -      instead of SAFE_ALLOCA.
 +      * xdisp.c (syms_of_xdisp) <glyphless-char-display>: Doc fix.
  
 -2010-08-17  Chong Yidong  <cyd@stupidchicken.com>
 +      * dispextern.h (enum glyphless_display_method):
 +      Rename GLYPHLESS_DISPLAY_HEXA_CODE to GLYPHLESS_DISPLAY_HEX_CODE.
 +      All users changed.
  
 -      * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA
 -      (Bug#6214).
 +      * term.c (append_glyphless_glyph, produce_glyphless_glyph):
 +      Fix comments.
 +      (produce_glyphless_glyph): Enclose "U+nnnn" and "empty box"
 +      whitespace in "[]", to simulate a box.  Don't use uninitialized
 +      variable `width'.
  
 -2010-08-14  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-11-11  Julien Danjou  <julien@danjou.info>
  
 -      * doc.c (Fsnarf_documentation): Set skip_file only if p[1] is S.
 +      * xsettings.c (init_xsettings): Use already fetch atoms.
  
 -2010-08-13  Jan Djärv  <jan.h.d@swipnet.se>
 +      * xsmfns.c (create_client_leader_window): Use SM_CLIENT_ID atom
 +      from dpyinfo.
  
 -      * doc.c (Fsnarf_documentation): Initialize skip_file before
 -      build-files test.
 +      * xselect.c (Fx_send_client_event): Split and create
 +      x_send_client_event.
 +
 +      * lisp.h: Do not EXFUN Fx_send_client_event.
 +
 +      * xterm.c (x_set_frame_alpha): Use _NET_WM_WINDOW_OPACITY atom
 +      from dpyinfo.
 +      (wm_supports): Use atoms from dpyinfo.
 +      (do_ewmh_fullscreen): Use atoms from dpyinfo.
 +      (x_ewmh_activate_frame): Use atoms from dpyinfo.
 +      (xembed_set_info): Use atoms from dpyinfo.
 +      (x_term_init): Fetch _XEMBED_INFO, _NET_SUPPORTED,
 +      _NET_SUPPORTING_WM_CHECK, _NET_WM_WINDOW_OPACITY and
 +      _NET_ACTIVE_WINDOW, XSETTINGS  atoms.
 +      Get all atoms in one round-trip.
 +      (set_wm_state): Use x_send_client_event rather than
 +      Fx_send_client_event, using Atom directly.
 +      (x_ewmh_activate_frame): Ditto.
 +      (x_set_sticky): Pass atoms to set_wm_state.
 +      (do_ewmh_fullscreen): Ditto.
 +
 +
 +      * xterm.h (x_display_info): Add Xatom_net_supported,
 +      Xatom_net_supporting_wm_check, Xatom_net_active_window,
 +      Xatom_net_wm_window_opacity, Xatom_XEMBED_INFO, SM_CLIENT_ID.
 +
 +      * xfns.c (Fx_show_tip): Fix typo in docstring.
 +
 +2010-11-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * cmds.c (Fself_insert_command): Don't call XFASTINT without checking
 +      it's not negative.
 +
 +2010-11-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * font.c (font_filter_properties): Add const to array elements of
 +      properties args.
 +
 +      * font.h (font_filter_properties): Likewise.
 +
 +      * ftfont.c (ftfont_booleans, ftfont_non_booleans): Add const to array
 +      elements.
 +
 +      * w32font.c (w32font_booleans, w32font_non_booleans): Likewise.
 +
 +2010-11-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (QCdbus_type_unix_fd): New Lisp object.
 +      (XD_BASIC_DBUS_TYPE, xd_symbol_to_dbus_type, xd_signature)
 +      (xd_append_arg, xd_retrieve_arg): Support DBUS_TYPE_UNIX_FD.
 +      (Fdbus_call_method): Add DBUS_TYPE_UNIX_FD type mapping to doc string.
 +      (syms_of_dbusbind): Initialize QCdbus_type_unix_fd).
 +
 +2010-11-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs.c (syms_of_emacs) <system-type>: Doc fix.
 +
 +2010-11-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xfns.c (x_real_positions): Fix declaration-after-statement problem.
 +
 +2010-11-09  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.c (free_image): Don't garbage the frame here, since this
 +      function can be called while redisplaying (Bug#7210).
 +      (uncache_image): Garbage the frame here (Bug#6426).
 +
 +2010-11-09  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (x_real_positions): Only use _NET_FRAME_EXTENTS if our
 +      parent is the root window.  Check this after traversing window tree.
 +
 +      * xterm.c (x_term_init): Initialize Xatom_net_frame_extents.
 +
 +      * xterm.h (struct x_display_info): Xatom_net_frame_extents is new.
 +
 +      * xfns.c (x_real_positions): Try to get _NET_FRAME_EXTENTS first
 +      before traversing window tree (Bug#5721).
 +
 +2010-11-07  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (set_machine_and_pid_properties): Let X set WM_CLIENT_MACHINE.
 +
 +      * xdisp.c (note_mode_line_or_margin_highlight):
 +      Initialize Cursor to No_Cursor for HAVE_WINDOW_SYSTEM also.
 +
 +2010-11-06  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xfns.c (Fx_show_tip): If any of the tool-tip text lines is R2L,
 +      adjust width of tool-tip frame to the width of text, excluding the
 +      stretch glyph at the beginning of R2L glyph rows.
 +
 +      * w32fns.c (Fx_show_tip): Likewise.
 +
 +2010-11-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsfont.m: Include termchar for new mouse-highlight.
 +      (nsfont_draw): Use MOUSE_HL_INFO.
 +
 +2010-11-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Unify mouse-highlight code for all GUI and TTY sessions.
 +
 +      * term.c: Remove static mouse_face_* variables.  All users
 +      changed.
 +      (term_show_mouse_face, term_clear_mouse_face)
 +      (fast_find_position, term_mouse_highlight): Functions deleted.
 +      (tty_draw_row_with_mouse_face): New function.
 +      (term_mouse_movement): Call note_mouse_highlight instead of
 +      term_mouse_highlight.
 +
 +      * nsterm.m (ns_update_window_begin, ns_update_window_end)
 +      (ns_update_end, x_destroy_window, ns_frame_up_to_date)
 +      (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
 +      (ns_dumpglyphs_image, ns_dumpglyphs_stretch)
 +      (ns_initialize_display_info, keyDown, mouseMoved, mouseExited):
 +      Replace Display_Info with Mouse_HLInfo everywhere where
 +      mouse_face_* members were accessed for mouse highlight purposes.
 +
 +      * xterm.c (x_update_window_begin, x_update_window_end)
 +      (x_update_end, XTframe_up_to_date, x_set_mouse_face_gc)
 +      (handle_one_xevent, x_free_frame_resources, x_term_init):
 +      Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_*
 +      members were accessed for mouse highlight purposes.
 +
 +      * w32term.c (x_update_window_begin, x_update_window_end)
 +      (x_update_end, w32_read_socket, x_free_frame_resources)
 +      (w32_initialize_display_info): Replace Display_Info with
 +      Mouse_HLInfo everywhere where mouse_face_* members were accessed
 +      for mouse highlight purposes.
 +
 +      * xdisp.c (show_mouse_face, note_mode_line_or_margin_highlight)
 +      (note_mouse_highlight) [HAVE_WINDOW_SYSTEM]: Don't run GUI code
 +      unless the frame is on a window-system.
 +      (get_tool_bar_item, handle_tool_bar_click)
 +      (note_tool_bar_highlight, draw_glyphs, erase_phys_cursor)
 +      (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
 +      (note_mode_line_or_margin_highlight, note_mouse_highlight)
 +      (x_clear_window_mouse_face, cancel_mouse_face, expose_frame):
 +      Replace Display_Info with Mouse_HLInfo everywhere where
 +      mouse_face_* members were accessed for mouse highlight purposes.
 +      (coords_in_mouse_face_p): Move prototype out of the
 +      HAVE_WINDOW_SYSTEM conditional.
 +      (x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
 +      HAVE_WINDOW_SYSTEM block.
 +      (try_window_id) [HAVE_GPM || MSDOS]:
 +      Call x_clear_window_mouse_face.
 +      (draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
 +      systems.  Call tty_draw_row_with_mouse_face for TTY systems.
 +      (show_mouse_face): Call draw_row_with_mouse_face, instead of
 +      calling draw_glyphs directly.
 +      (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
 +      (cursor_in_mouse_face_p, rows_from_pos_range)
 +      (mouse_face_from_buffer_pos, mouse_face_from_string_pos)
 +      (note_mode_line_or_margin_highlight, note_mouse_highlight)
 +      (x_clear_window_mouse_face, cancel_mouse_face): Move out of the
 +      HAVE_WINDOW_SYSTEM block.  Ifdef away window-system specific
 +      fragments.
 +      (note_mouse_highlight): Call popup_activated for MSDOS as well.
 +      Clear mouse highlight if pointer is over glyphs whose OBJECT is an
 +      integer.
 +      (mouse_face_from_buffer_pos): Add parentheses around && within ||.
 +      (x_consider_frame_title, tool_bar_lines_needed):
 +      Move prototypes to HAVE_WINDOW_SYSTEM-only part.
 +      (get_window_cursor_type): Move inside a HAVE_WINDOW_SYSTEM-only
 +      part.  Remove "#ifdef HAVE_WINDOW_SYSTEM" from body of function.
 +      (null_glyph_slice): Move declaration into HAVE_WINDOW_SYSTEM-only
 +      part.
 +
 +      * dispnew.c (mirror_make_current): Set Y coordinate of the
 +      mode-line and header-line rows.
 +      (init_display): Setup initial frame's output_data for text
 +      terminal frames.
 +
 +      * xmenu.c (popup_activated): Don't define on MSDOS, which now has
 +      its own definition on msdos.c.
 +
 +      * msdos.c (show_mouse_face, clear_mouse_face)
 +      (fast_find_position, IT_note_mode_line_highlight)
 +      (IT_note_mouse_highlight): Functions deleted.
 +      (IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
 +      instead of IT_note_mouse_highlight.
 +      (draw_row_with_mouse_face, popup_activated): New functions.
 +      (dos_set_window_size, draw_row_with_mouse_face, IT_update_begin)
 +      (IT_update_end, IT_frame_up_to_date, internal_terminal_init)
 +      (dos_rawgetc): Replace Display_Info with Mouse_HLInfo everywhere
 +      where mouse_face_* members were accessed for mouse highlight
 +      purposes.
 +
 +      * msdos.h (initialize_msdos_display): Add prototype.
 +
 +      * frame.h (MOUSE_HL_INFO): New macro.
 +
 +      * lisp.h (Mouse_HLInfo): New data type.
 +
 +      * xterm.h (struct x_display_info):
 +      * w32term.h (struct w32_display_info):
 +      * nsterm.h (struct ns_display_info):
 +      * termchar.h (struct tty_display_info): Use it instead of
 +      mouse_face_* members.
 +
 +      * dispextern.h (show_mouse_face, clear_mouse_face): Update type of
 +      1st argument.
 +      (frame_to_window_pixel_xy, note_mouse_highlight)
 +      (x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
 +      (show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
 +      HAVE_WINDOW_SYSTEM conditional.
 +      (draw_row_with_mouse_face): Declare prototype.
 +      (tty_draw_row_with_mouse_face): Declare prototype.
 +
 +2010-11-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * term.c (append_glyphless_glyph, produce_glyphless_glyph):
 +      Remove unused variables.
 +
 +2010-11-05  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +
 +      * nsterm.m (EmacsView-mouseExited:): Correct error in conditional
 +      logic pointed out by Eli Zaretskii.
 +
 +2010-11-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * coding.c (coding-category-list): Refer to set-coding-system-priority
 +      instead of the obsolete set-coding-priority in the doc string.
 +
 +
 +2010-11-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +
 +      * nsfont.m (nsfont_draw):  Correct previous patch to return
 +      correct value.
 +      * nsimage.m (EmacsImage-setXBMColor:): Correct previous patch:
 +      don't change the method signature, change the return.
 +
 +2010-11-04  Ismail Donmez  <ismail@namtrac.org>  (tiny change)
 +
 +      * nsfont.m (nsfont_draw)
 +      * nsimage.m (EmacsImage-setXBMColor:)
 +      * nsterm.m (EmacsView-performDragOperation:): Correct empty return.
 +
 +2010-11-03  Julien Danjou  <julien@danjou.info>
 +
 +      * image.c (gif_load): Add support for transparency and specified
 +      :background.
 +
 +2010-11-01  Kenichi Handa  <handa@m17n.org>
 +
 +      * dispextern.h (lookup_glyphless_char_display): Extern it.
 +
 +      * termhooks.h (struct terminal): New member charset_list.
 +
 +      * coding.c (Fset_terminal_coding_system_internal): Set the
 +      `charset_list' member of struct terminal.
 +
 +      * term.c (produce_glyphs): Handle the case it->what == IT_GLYPHLESS.
 +      (append_glyphless_glyph, produce_glyphless_glyph): New functions.
 +
 +      * xdisp.c (lookup_glyphless_char_display): Make it non-static.
 +      (lookup_glyphless_char_display): Set it->what at the end.
 +      (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
 +      (last_glyphless_glyph_merged_face_id): Make them non-static.
 +
 +      * w32term.c (x_draw_glyphless_glyph_string_foreground):
 +      Fix the arg with_background for font->driver->draw.
 +
 +2010-11-01  Kenichi Handa  <handa@m17n.org>
 +
 +      * w32gui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
 +      Surround chp by parentheses.
 +
 +2010-11-01  Kenichi Handa  <handa@m17n.org>
 +
 +      Implement various display methods for glyphless characters.
 +
 +      * xdisp.c (Qglyphless_char, Vglyphless_char_display)
 +      (Qglyphless_char_display, Qhexa_code, Qempty_box, Qthin_space)
 +      (Qzero_width): New variables.
 +      (THIN_SPACE_WIDTH): New macro.
 +      (lookup_glyphless_char_display): New funciton.
 +      (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
 +      (last_glyphless_glyph_merged_face_id): New variables.
 +      (get_next_display_element): Check glyphless characters.
 +      (redisplay_internal): Initialize last_glyphless_glyph_frame and
 +      last_glyphless_glyph_face_id.
 +      (fill_glyphless_glyph_string): New function.
 +      (BUILD_GLYPHLESS_GLYPH_STRING): New macro.
 +      (BUILD_GLYPH_STRINGS): Handle the case GLYPHLESS_GLYPH.
 +      (append_glyphless_glyph, produce_glyphless_glyph): New functions.
 +      (x_produce_glyphs): If a suitable font is not found, produce a
 +      glyphless glyph.  Handle the case it->what == IT_GLYPHLESS.
 +      (syms_of_xdisp): Intern and staticpro Qglyphless_char,
 +      Qglyphless_char_display, Qhexa_code, Qempty_box, Qthin_space, and
 +      Qzero_width.
 +      (Vglyphless_char_display): Declare it as a Lisp variable.
 +
 +      * dispextern.h (enum glyph_type): Add GLYPHLESS_GLYPH.
 +      (struct glyph): Change the size of the member "type" to 3.
 +      Add glyphless to the union slice and u.
 +      (enum display_element_type): Add IT_GLYPHLESS.
 +      (enum glyphless_display_method): New enum.
 +      (struct it): New member glyphless_method.
 +      (Vglyphless_char_display): Extern it.
 +
 +      * xterm.c (x_draw_glyphless_glyph_string_foreground): New function.
 +      (x_draw_glyph_string): Handle the case GLYPHLESS_GLYPH.
 +
 +      * w32term.c (x_draw_glyphless_glyph_string_foreground): New function.
 +      (x_draw_glyph_string): Handle the case GLYPHLESS_GLYPH.
 +
 +      * nsterm.m (ns_draw_glyph_string): Handle the case
 +      GLYPHLESS_GLYPH (the detail is not yet implemented).
 +
 +2010-10-31  Glenn Morris  <rgm@gnu.org>
 +
 +      * xterm.c (x_connection_closed) [USE_X_TOOLKIT]: Fix merge, maybe.
 +
 +      * frame.c (syms_of_frame) <tool-bar-mode>:
 +      Default to nil if !HAVE_WINDOW_SYSTEM.  (Bug#7299)
 +
 +2010-10-31  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xterm.c (x_connection_closed): Print informative error message
 +      when aborting on GTK.  This requires using shut_down_emacs
 +      directly instead of Fkill_emacs.
 +
 +2010-10-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * emacs.c (main): Call syms_of_filelock unconditionally.
 +
 +      * filelock.c (syms_of_filelock): Move out of #ifdef CLASH_DETECTION
 +      clause, but keep part of it conditioned on CLASH_DETECTION.
 +
 +2010-10-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * nsfns.m (Fx-display-save-under, Fx-open-connection)
 +      (Fxw-color-defined-p, Fxw-display-color-p, Fx-show-tip):
 +      * w32fns.c (Fxw_color_defined_p, Fx_open_connection):
 +      * xfns.c (Fxw_color_defined_p, Fx_open_connection):
 +      Sync docs between X, W32, NS.
 +
 +      * buffer.c (syms_of_buffer) <abbrev-mode, transient-mark-mode>:
 +      * frame.c (syms_of_frame) <tool-bar-mode>: Move doc here from Lisp.
 +
 +2010-10-26  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * eval.c (init_eval_once): Set max_lisp_eval_depth to 600;
 +      otherwise, bootstrapping on Windows fails to compile macroexp.el.
 +
 +2010-10-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * cmds.c (internal_self_insert): Don't insert if argument N is
 +      zero or negative.  (Bug#7281)
 +
 +2010-10-26  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (qttip_cb): Set title to empty for ATK (Bug#7278).
 +
 +2010-10-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (SOME_MACHINE_LISP): Remove easymenu.elc.
 +
 +2010-10-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * w32fns.c (Fx_synchronize, Fx_change_window_property)
 +      (Fx_window_property, Fx_file_dialog):
 +      * xfns.c (Fx_synchronize, Fx_change_window_property)
 +      (Fx_window_property, Fx_file_dialog): Sync docs between w32 and X.
 +
 +2010-10-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xterm.c (x_connection_closed): Kill Emacs unconditionally.
 +
 +2010-10-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * frame.c (Fframep, Fwindow_system): Deprecate use as a predicate.
 +
 +      * dispnew.c (syms_of_display) <initial-window-system, window-system>:
 +      Deprecate use as a boolean flag.
 +
 +2010-10-24  Jim Meyering  <jim@meyering.net>
 +
 +      * emacs.c (argmatch): Don't treat "--" as "--chdir".
 +
 +2010-10-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * w16select.c (syms_of_win16select) <selection-coding-system>:
 +      <next-selection-coding-system>:
 +      * w32select.c (syms_of_w32select) <selection-coding-system>:
 +      <next-selection-coding-system>:
 +      Sync docs with select.el.
 +
 +      * xfaces.c (syms_of_xfaces) <tty-defined-color-alist>: Sync doc with
 +      Lisp version.
 +
 +      * w32term.c (syms_of_w32term) <x-use-underline-position-properties>:
 +      Sync doc with the xterm.c version.
 +
 +      * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
 +      * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
 +
 +2010-10-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * buffer.c (syms_of_buffer) <cursor-in-non-selected-windows>:
 +      * frame.c (syms_of_frame) <menu-bar-mode>:
 +      * xdisp.c (syms_of_xdisp) <auto-hscroll-mode, display-hourglass>:
 +      <hourglass-delay>: Sync docs with Lisp.
 +
 +2010-10-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Implement mouse highlight for bidi-reordered lines.
 +
 +      * xdisp.c (fast_find_string_pos): #ifdef away, not used anymore.
 +      (mouse_face_from_string_pos): New function, replaces
 +      fast_find_string_pos.
 +      (note_mouse_highlight): Call it instead of fast_find_string_pos.
 +      (note_mode_line_or_margin_highlight): Support bidi-reordered
 +      strings and R2L glyph rows.  Fix comments.
 +      (note_mouse_highlight): When bidi reordering is turned on in a
 +      buffer, call next-single-property-change and
 +      previous-single-property-change with last argument nil.
 +      Clear mouse highlight when mouse pointer is in a R2L row on the stretch
 +      glyph that stands for no text beyond the line end.
 +      (row_containing_pos): Don't return too early when CHARPOS is in a
 +      bidi-reordered continued line.  Return immediately when the first
 +      hit is found in a line that is not continued, or when an exact
 +      match for CHARPOS is found.
 +      (rows_from_pos_range): New function.
 +      (mouse_face_from_buffer_pos): Use it instead of calling
 +      row_containing_pos for START_CHARPOS and END_CHARPOS.  Rewrite the
 +      function to support mouse highlight in bidi-reordered lines and
 +      not to assume that START_CHARPOS is always in mouse_face_beg_row.
 +      If necessary, swap mouse_face_beg_row and mouse_face_end_row so
 +      that the former is always above the latter or identical to it.
 +      (show_mouse_face): Support drawing highlighted R2L lines.
 +      (coords_in_mouse_face_p): New function, bidi-aware.
 +      (cursor_in_mouse_face_p, note_mouse_highlight, erase_phys_cursor):
 +      Call it instead of comparing with mouse-face members of dpyinfo.
 +      (note_mode_line_or_margin_highlight): Fix confusingly swapped
 +      usage of hpos and vpos.
 +
 +2010-10-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xrdb.c: Include keyboard.h for MOTIF.
 +
 +      * xmenu.c: Revert 2010-07-27 change: lwlib.h is needed for
 +      MOTIF (Bug#7263).
 +
 +      * xfns.c: Include Xm/TextF and Xm/List.
 +      (file_dialog_cb, file_dialog_unmap_cb, clean_up_file_dialog):
 +      Make ANSI prototypes.
 +
 +2010-10-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (SOME_MACHINE_LISP): Add w32-vars.
 +      Remove ccl and duplicate mouse.
 +
 +2010-10-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * insdel.c (prepare_to_modify_buffer): Don't set
 +      saved-region-selection if modification hooks are disabled.
 +
 +2010-10-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cmds.c (Fdelete_char): Doc fix.
 +
 +2010-10-19  Ken Brown  <kbrown@cornell.edu>
 +
 +      * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225).
 +
 +2010-10-19  Kenichi Handa  <handa@m17n.org>
 +
 +      Fix incorrect font metrics when the same font is opened with
 +      different pixelsizes.
 +
 +      * xftfont.c: Include composite.h.
 +      (xftfont_shape): New function.
 +      (syms_of_xftfont): Set xftfont_driver.shape.
 +
 +2010-10-18  Julien Danjou  <julien@danjou.info>
 +
 +      * frame.c (Fframe_pointer_visible_p):
 +      Add `frame-pointer-visible-p' to get the pointer visibility.
 +
 +2010-10-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnutls.c (emacs_gnutls_read): Return 0 if we get a
 +      non-"EAGAIN"-like error to signal to Emacs that the socket should
 +      be closed.
 +
 +2010-10-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * unexcoff.c (make_hdr): Fix prototype according to changes in
 +      2010-10-03T13:59:56Z!dann@ics.uci.edu.
 +
 +      * image.c (tiff_load): Cast 3rd argument to avoid compiler warning.
 +
 +2010-10-15  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * Makefile.in (really-oldXMenu): Fix typo in variable name that
 +      made building the X menu fail.
 +      (really-oldXMenu): Fix my previous fix.
 +
 +2010-10-14  Damyan Pepper  <damyanp@gmail.com>
 +
 +      Fix handling of font properties on Windows (bug#6303).
 +      * font.c (font_filter_properties): New function, refactored from
 +      ftfont_filter_properties.
 +      * font.h (font_filter_properties): Declare.
 +      * ftfont.c (ftfont_filter_properties): Use font_filter_properties.
 +      * w32font.c (w32font_booleans, w32font_non_booleans): New variables.
 +      (w32font_filter_properties): New function.
 +      (w32font_driver): Add w32font_filter_properties.
 +
 +2010-10-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * font.c (Ffont_variation_glyphs):
 +      * ccl.c (Fccl_execute_on_string): Fix typo in docstring.
 +
 +2010-10-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32fns.c (w32_wnd_proc, file_dialog_callback):
 +      * w32font.c (w32_generic_family):
 +      * w32inevt.c (key_event):
 +      * w32menu.c (fill_in_menu):
 +      * w32proc.c (reader_thread, w32_executable_type, compare_env)
 +      (merge_and_sort_env, int_from_hex, enum_locale_fn, enum_codepage_fn):
 +      * w32term.c (w32_read_socket): Make static.
 +
 +2010-10-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * image.c (DEF_IMGLIB_FN): Add argument to adapt to strict
 +      prototypes; all callers changed.
 +
 +2010-10-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (TLIB2): Rename from TLIBW32.
 +      (OBJ2): New macro.
 +      (WIN32OBJ, FONTOBJ): Remove.
 +      (OBJ1): Redistribute object files with OBJ2.
 +      (LIBS, $(TEMACS)): Use TLIB2.
 +      (make-buildobj-CMD, make-buildobj-SH): Use OBJ2.
 +      ($(TLIB2), TAGS, TAGS-LISP, TAGS-gmake): Depend on OBJ2.
 +
 +2010-10-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs.c (Vdynamic_library_alist)
 +      (syms_of_emacs) <dynamic-library-alist>: Move from image.c and rename.
 +      Doc fix.
 +
 +      * lisp.h (Vdynamic_library_alist): Declare extern.
 +
 +      * image.c (Vimage_library_alist)
 +      (syms_of_image) <image-library-alist>: Move to emacs.c and rename.
 +      (lookup_image_type): Use Vdynamic_library_alist.
 +      (Finit_image_library): Doc fix.
 +
 +2010-10-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (lispsource, libsrc, etc, oldxmenudir, lwlibdir)
 +      (lispdir): Remove trailing /, update all uses.
 +
 +2010-10-12  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (Qleft): Declare.
 +      (ns_right_alternate_modifier): New variable
 +      (NSRightAlternateKeyMask): New define.
 +      (EV_MODIFIERS): Parse NSRightAlternateKeyMask if
 +      ns_right_alternate_modifier isn't Qleft.
 +      (keyDown): If ns_right_alternate_modifier isn't Qleft, use it
 +      as emacs modifier for NSRightAlternateKeyMask.
 +      (syms_of_nsterm): DEFVAR_LISP ns-right-alternate-modifier.
 +
 +2010-10-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnutls.c (emacs_gnutls_write): If we're trying to write before
 +      gnutls is ready, return EAGAIN as the errno.
 +
 +2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vm-limit.c:
 +      * unexhp9k800.c:
 +      * unexelf.c:
 +      * unexaix.c:
 +      * termcap.c: Remove #ifdef emacs / #ifndef emacs code, unused.
 +
 +      * Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line.
 +      (PROFILING_LDFLAGS): Remove, not needed anymore.
 +
 +      * Makefile.in: Use $(...) everywhere instead of ${...}
 +      (CRT_DIR): Move near potential user.
 +      (START_FILE): Move near CRT_DIR, it might use it.
 +
 +      * sysdep.c (LPASS8): Remove, unused.
 +      (emacs_ospeed): Change from being a global to a local in the only
 +      user: init_baud_rate.
 +
 +2010-10-09  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnutls.c (syms_of_gnutls): All the bootprops are keywords.
 +      (emacs_gnutls_write): Remove the debuggin fsync call.
 +      (emacs_gnutls_read): Return -1 if we got an error from
 +      gnutls_read.  This allows us to actually read lots of data from
 +      the GnuTLS stream.
 +      (emacs_gnutls_write): Check for GNUTLS_E_AGAIN and not EINTR.
 +      According to the documentation, this is correct, and it seems to
 +      make things work.
 +
 +2010-10-09  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xterm.c (x_draw_relief_rect): Clear corner pixels.
 +
 +2010-10-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * keyboard.c: Revert last change; it was not intended to be
 +      synchronized with the trunk.
 +
 +2010-10-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * coding.c (complement_process_encoding_system): Fix previous change.
 +
 +2010-10-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (syms_of_dbusbind): Move putenv call ...
 +      (Fdbus_init_bus): ... here.  (Bug#7113)
 +
 +2010-10-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * buffer.c (before-change-functions, after-change-functions):
 +      Three-year overdue doc fix following 2007-08-13 change.
 +
 +2010-10-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * coding.c (coding_inherit_eol_type): If parent doesn't specify
 +      eol-format, inherit from the system's default.
 +      (complement_process_encoding_system): Make a new coding system
 +      inherit the original eol-format.
 +
 +2010-10-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * coding.c (complement_process_encoding_system): New function.
 +
 +      * coding.h (complement_process_encoding_system): Extern it.
 +
 +      * callproc.c (Fcall_process): Complement the coding system for
 +      encoding arguments.
 +      (Fcall_process_region): Complement the coding system for encoding
 +      the input to the process.
 +
 +      * process.c (Fstart_process): Complement the coding system for
 +      encoding arguments.
 +      (send_process): Complement the coding system for encoding what
 +      sent to the process.
 +
 +2010-10-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * xfont.c (xfont_open): Fix setting of font->average_width from
 +      :avgwidth property (Bug#7123).
 +
 +2010-10-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, it
 +      is more portable.
 +
 +      * keyboard.c (gobble_input): Move call of xd_read_queued_messages ...
 +      (kbd_buffer_get_event): ... here. This is needed for cygwin, which
 +      has not defined SIGIO.
 +
 +2010-10-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xterm.c (x_draw_relief_rect): If box width is larger than 1,
 +      draw the outermost line using the black relief, for legibility.
 +      Omit drawing the four corner pixels.
 +
 +2010-10-04  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (echo_prompt): Function moved into read_key_sequence.
 +      (read_key_sequence): Inline echo_prompt.
 +      (echo_dash): Add a dash only if key is continued (Bug#7137).
 +
 +2010-10-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove O_RDONLY, O_WRONLY definitions, not needed.
 +      * unexcoff.c:
 +      * lread.c:
 +      * fileio.c:
 +      * doc.c:
 +      * callproc.c:
 +      * alloc.c:
 +      * termcap.c: Remove O_RDONLY O_WRONLY definitions.
 +
 +2010-10-03  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * gnutls.h (GNUTLS_LOG2): Convenience macro.
 +
 +      * gnutls.c: Add property list symbol holders.
 +      (emacs_gnutls_handshake): Clarify how sockets are passed to
 +      GnuTLS.
 +      (gnutls_log_function2): Convenience function using GNUTLS_LOG2.
 +      (Fgnutls_boot): Get all parameters from a plist.  Require trustfiles
 +      and keyfiles to be a list of file names.  Default to "NORMAL" for
 +      the priority string.  Improve logging.
 +
 +2010-10-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * fileio.c (Vdirectory_sep_char): Remove.
 +
 +2010-10-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * termhooks.h: Remove #ifdef CONSP.
 +
 +      * xterm.c (NO_INLINE, noinline): Move definitions to ../configure.in.
 +
 +      Include <fcntl.h> unconditionally.
 +      * termcap.c:
 +      * sysdep.c:
 +      * lread.c:
 +      * keyboard.c:
 +      * filelock.c:
 +      * fileio.c:
 +      * doc.c:
 +      * callproc.c:
 +      * alloc.c: Remove include guards for <fcntl.h>, process.c already
 +      does it.
 +
 +      * process.c: Do not include <sys/wait.h>, syswait.h does it.
 +
 +      * sysdep.c (flush_pending_output): Remove code, does not do
 +      anything on any platform.
 +
 +      Remove unused code.
 +      * sysdep.c (select_alarm, sys_select, read_input_waiting):
 +      Remove select emulation, all systems support select.
 +      (set_exclusive_use): Remove, the only user is in an #if 0 block.
 +      * process.c (create_process): Remove #if 0 code.
 +
 +      Remove unused arguments for unexec.
 +      The third one is never used, and the last two are always passed as zero.
 +      * emacs.c (unexec): Add declaration.
 +      (Fdump_emacs): Only pass the first two arguments to unexec.
 +      Simplify #ifdef.
 +      * unexw32.c (unexec):
 +      * unexsol.c (unexec):
 +      * unexhp9k800.c (unexec):
 +      * unexcw.c (unexec): Remove the last 3 arguments, unused.
 +      * unexelf.c (unexec): Remove the last 3 arguments, unused.
 +      (find_section): Use const.
 +      * unexmacosx.c (unexec): Remove the last 3 arguments, unused.
 +      (unexec_error): Declare it NO_RETURN.
 +      * unexcoff.c (make_hdr): Assume bss_start is always zero, remove
 +      it as an argument, remove data_start and entry_address arguments, unused.
 +      (unexec): Remove bss_start, data_start and
 +      entry_address arguments.
 +      * unexaix.c (make_hdr): Assume bss_start is always zero, remove
 +      it as an argument, remove data_start and entry_address arguments, unused.
 +      (unexec): Remove bss_start, data_start and
 +      entry_address arguments.
 +
 +2010-10-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (TAGS, TAGS-LISP, TAGS-gmake): Add $(FONTOBJ).
 +
 +      * gnutls.c (emacs_gnutls_handshake, gnutls_make_error)
 +      (gnutls_emacs_global_init, gnutls_emacs_global_deinit): Make static.
 +      (Fgnutls_get_initstage, Fgnutls_deinit, Fgnutls_boot, Fgnutls_bye):
 +      Fix typos in docstrings.
 +      (Fgnutls_error_fatalp, Fgnutls_error_string): Doc fixes.
 +      (Fgnutls_errorp): Doc fix; use ERR for the argument name.
 +
 +2010-10-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (command_loop_1): Make sure the mark is really alive
 +      before using it (Bug#7044).
 +
 +2010-10-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (tags): Rename target to full-tags.
 +
 +2010-10-02  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * emacs.c (main): Remove !WINDOWSNT conditional.
 +      (Fkill_emacs): Don't mention exemption on MS-Windows.
 +
 +2010-10-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * character.c (Fchar_bytes): Remove obsolete function.
 +      (syms_of_character): Remove Schar_bytes.
 +
 +      * emacs.c (fatal_error_signal): Also run Fkill_emacs on SIGINT.
 +      (main) [!WINDOWSNT]: Handle SIGINT with fatal_error_signal
 +      in batch-mode.
 +      (Fkill_emacs): Doc fix.  Also run the hook in batch mode.
 +      (kill-emacs-hook): Doc fix.
 +
 +2010-10-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xml.c (Flibxml_parse_xml_region, Flibxml_parse_html_region)
 +      (parse_region): Rework to take regions instead of strings, and
 +      renamed to reflect that these are the libxml functions.
 +
 +2010-10-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * term.c (init_tty) [DOS_NT]: Don't call Wcm_clear after setting
 +      screen dimensions in tty->Wcm.
 +
 +      * xdisp.c (set_cursor_from_row): When the row is truncated and
 +      point is outside the range of displayed characters, position the
 +      cursor inside the scroll margin.  (Bug#6349)
 +
 +2010-10-01  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Do not include stdlib.h and string.h, config.h does it.
 +      * xfont.c:
 +      * w32term.c:
 +      * w32reg.c:
 +      * w32inevt.c:
 +      * w32heap.c:
 +      * w32console.c:
 +      * w16select.c:
 +      * unexsol.c:
 +      * term.c:
 +      * sound.c:
 +      * scroll.c (m):
 +      * gtkutil.c:
 +      * font.c:
 +      * filelock.c:
 +      * fileio.c:
 +      * dosfns.c:
 +      * dbusbind.c:
 +      * bidi.c:
 +      * callproc.c:
 +      * process.c:
 +      * msdos.c:
 +      * charset.c: Do not include stdlib.h and string.h, config.h does it.
 +
 +      * callproc.c (SIGCHLD): Remove conditional definition, syssignal.h
 +      defines it.
 +
 +      * process.c: Move #include <pty.h> earlier.
 +      (SIGCHLD): Remove conditional definition, syssignal.h defines it.
 +      (pty_name): Move definition later.
 +
 +      * nsselect.m (syms_of_nsselect):
 +      * nsmenu.m (syms_of_nsmenu):
 +      * nsfns.m (syms_of_nsfns):
 +      * msdos.c (syms_of_msdos):
 +
 +      * image.c (syms_of_image):
 +      * charset.c (syms_of_charset): Use intern_c_string instead of intern.
 +
 +      * point.h: Remove, unused.
 +
 +2010-10-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (TAGS, frc, TAGS-LISP, ../nt/TAGS, tags)
 +      (TAGS-gmake, TAGS-nmake, TAGS-LISP-gmake, TAGS-LISP-nmake)
 +      (nt-TAGS-gmake, nt-TAGS-nmake): New targets.
 +
 +2010-09-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xml.c (parse_string): Use const.
 +
 +2010-09-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * eval.c (Fbacktrace): Don't overwrite print-level on exit.
 +      Also only override Vprint_level if it isn't already bound, and increase
 +      the level to 8 to produce more useful backtraces for bug reports.
 +
 +2010-09-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in: ecrt0.c does not exist anymore, do not mention it.
 +
 +2010-09-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32console.c (vga_stdcolor_name): Remove unused function;
 +      presumed dead after 2007-11-30T13:57:21Z!jasonr@gnu.org.
 +
 +2010-09-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnutls.c (emacs_gnutls_handshake): Made into internal function.
 +      (Fgnutls_boot): Start the handshake.
 +      (emacs_gnutls_read): Perform the handshake from the reader loop.
 +      (Fgnutls_boot): Remove some debugging messages.
 +      Change indentation throughout to use the Emacs style.
 +      (emacs_gnutls_handshake): Cast the fds to something that's
 +      possibly the expected length.
 +      (emacs_gnutls_write): Return -1 if we try to write before handshake.
 +
 +      * process.h (Lisp_Process): Add a gnutls_p field to Lisp_Process.
 +
 +      * process.c (make_process): Set the gnutls_p field to zero by
 +      default.
 +      (read_process_output): Always call the gnutls_read function if the
 +      stream is a gnutls stream.
 +      (send_process): Ditto for writes.
 +
 +      * gnutls.c (emacs_gnutls_write, emacs_gnutls_read): Refuse to read
 +      or write anything until the state is GNUTLS_STAGE_READY.
 +      (Fgnutls_boot): Mark the stream as being a gnutls stream.
 +
 +2010-09-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (reseat_1): Initialize bidi_it.paragraph_dir to
 +      NEUTRAL_DIR.
 +      (handle_invisible_prop, iterate_out_of_display_property)
 +      (next_element_from_buffer): If bidi_it.first_elt is set, call
 +      bidi_paragraph_init with NO_DEFAULT_P argument non-zero.
 +      (Bug#7128)
 +
 +      * print.c (print_object): Fix format string and argument types for
 +      printing a Lisp_Misc_Marker.
 +
 +      * xdisp.c (pos_visible_p, c_string_pos, number_of_chars)
 +      (load_overlay_strings, get_overlay_strings_1)
 +      (get_overlay_strings, forward_to_next_line_start)
 +      (back_to_previous_visible_line_start, reseat, reseat_to_string)
 +      (get_next_display_element, next_element_from_string)
 +      (next_element_from_c_string, next_element_from_buffer)
 +      (move_it_vertically_backward, move_it_by_lines, add_to_log)
 +      (message_dolog, message_log_check_duplicate, message2_nolog)
 +      (message3, message3_nolog, vmessage, set_message, set_message_1)
 +      (hscroll_window_tree, text_outside_line_unchanged_p)
 +      (set_cursor_from_row, set_vertical_scroll_bar, redisplay_window)
 +      (find_last_unchanged_at_beg_row)
 +      (find_first_unchanged_at_end_row, row_containing_pos)
 +      (trailing_whitespace_p, display_mode_element, decode_mode_spec)
 +      (display_count_lines, x_produce_glyphs, note_mouse_highlight):
 +      Use EMACS_INT for buffer and string positions.
 +
 +      * dispextern.h (struct it) <string_nchars>: Declare EMACS_INT.
 +      (row_containing_pos): Adjust prototype.
 +
 +      * lisp.h (pos_visible_p, message2, message2_nolog, message3)
 +      (message2_nolog, set_message): Adjust prototypes.
 +
 +2010-09-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * gnutls.c (Fgnutls_boot): Remove unused vars `data' and `srp_cred'.
 +      (Fgnutls_boot): Use SDATA.
 +      (Fgnutls_handshake): Remove unused var `max_log_level'.
 +
 +2010-09-27  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (syms_of_dbusbind): Set $DBUS_FATAL_WARNINGS to "0".
 +      (Bug#7113)
 +
 +2010-09-27  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xgselect.c (xg_select): Clear file descriptors not set from
 +      rfds and wfds.
 +
 +      * process.c (wait_reading_process_output): Add missing FD_CLR
 +      for write_mask (must mirror connect_wait_mask).
 +
 +2010-09-27  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * gnutls.c (gnutls_log_function): Show level and "gnutls.c"
 +      prefix.
 +      (Fgnutls_boot): Use changed process members.  Use log level with a
 +      function parameter to set it.  Bring back Emacs-level debugging
 +      messages at log level 1 and 2.
 +
 +      * process.c (make_process): Initialize gnutls_log_level.
 +
 +      * process.h: Add gnutls_log_level and rename x509_cred and
 +      anon_cred to have the gnutls_ prefix for consistency.
 +
 +      * gnutls.h (GNUTLS_LOG): Add convenience macro.
 +
 +2010-09-27  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32.c (g_b_init_get_sid_identifier_authority)
 +      (GetSidIdentifierAuthority_Proc, get_sid_identifier_authority):
 +      Remove, not used.
 +      (globals_of_w32): Don't set g_b_init_get_sid_identifier_authority.
 +      (init_winsock): Remove useless assignment.
 +      (open_process_token, get_token_information, lookup_account_sid)
 +      (get_sid_sub_authority, get_sid_sub_authority_count, get_file_security)
 +      (get_security_descriptor_owner, get_security_descriptor_group)
 +      (is_valid_sid, equal_sid, get_length_sid, copy_sid)
 +      (get_native_system_info, get_system_times, init_user_info, crlf_to_lf)
 +      (is_unc_volume, GetCachedVolumeInformation, get_volume_info)
 +      (is_fat_volume, open_unc_volume, read_unc_volume, close_unc_volume)
 +      (unc_volume_file_attributes, convert_from_time_t)
 +      (create_toolhelp32_snapshot, process32_first, process32_next)
 +      (open_thread_token, impersonate_self, revert_to_self)
 +      (get_process_memory_info, get_process_working_set_size)
 +      (global_memory_status, global_memory_status_ex, socket_to_fd)
 +      (shutdown_handler): Make static.
 +
 +2010-09-27  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (dbus_fd_cb, xd_get_dispatch_status)
 +      (xd_pending_messages): Functions removed.
 +      (xd_read_queued_messages): Add parameters fd, *data, for_read in
 +      order to be compatible with add_read_fd.  Determine bus from data,
 +      and call xd_read_message just for this bus.
 +      (xd_add_watch): Use xd_read_queued_messages as callback function.
 +      Add data.
 +
 +      * lisp.h (xd_pending_messages, xd_read_queued_messages): Remove.
 +
 +2010-09-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * gnutls.c (gnutls_log_function): Add more debugging.
 +      (emacs_gnutls_read): Don't infloop while reading.
 +
 +2010-09-27  Kenichi Handa  <handa@m17n.org>
 +
 +      These changes are to remove restriction on the number of glyphs in
 +      one composition.
 +
 +      * dispextern.h (struct glyph): Change the member "slice" to union.
 +      Remove u.cmp.from and u.cmp.to.  Give more bits to u.cmp.id.
 +      (GLYPH_SLICE_EQUAL_P): Adjust for the above change.
 +
 +      * dispnew.c (buffer_posn_from_coords): Use glyph->slice.img
 +      instead of glyph->slice.
 +      (marginal_area_string): Likewise.
 +
 +      * term.c (encode_terminal_code): Use glyph->slice.cmp instead of
 +      glyph->u.cmp.
 +      (append_composite_glyph): Likewise.
 +
 +      * xdisp.c (dump_glyph): Use glyph->slice.cmp instead of
 +      glyph->u.cmp.
 +      (fill_gstring_glyph_string, x_get_glyph_overhangs)
 +      (append_composite_glyph): Likewise.
 +      (fill_image_glyph_string): Use glyph->slice.img instead of
 +      glyph->slice.
 +      (append_glyph, produce_image_glyph, append_stretch_glyph)
 +      (note_mouse_highlight): Likewise.
 +
 +2010-09-26  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * process.c (add_keyboard_wait_descriptor)
 +      (delete_keyboard_wait_descriptor): Reinstate ifdef subprocesses.
 +      (wait_reading_process_output): Don't pass write_mask to select
 +      if SELECT_CANT_DO_WRITE_MASK is defined.
 +      (SELECT_CANT_DO_WRITE_MASK): Define if SELECT_CANT_DO_WRITE_MASK.
 +
 +      * process.h (add_read_fd, delete_read_fd, add_write_fd)
 +      (delete_write_fd): Declare.
 +
 +      * process.c (gpm_wait_mask, max_gpm_desc): Remove.
 +      (write_mask): New variable.
 +      (max_input_desc): Rename from max_keyboard_desc.
 +      (fd_callback_info): New variable.
 +      (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd):
 +      New functions.
 +      (Fmake_network_process): FD_SET write_mask.
 +      (deactivate_process): FD_CLR write_mask.
 +      (wait_reading_process_output): Connecting renamed to Writeok.
 +      check_connect removed.  check_write is new.  Remove references to gpm.
 +      Use Writeok/check_write unconditionally (i.e. no #ifdef
 +      NON_BLOCKING_CONNECT) instead of Connecting.
 +      Loop over file descriptors and call callbacks in fd_callback_info
 +      if file descriptor is ready for I/O.
 +      (add_gpm_wait_descriptor): Just call add_keyboard_wait_descriptor.
 +      (delete_gpm_wait_descriptor): Just call delete_keyboard_wait_descriptor.
 +      (keyboard_bit_set): Use max_input_desc.
 +      (add_keyboard_wait_descriptor, delete_keyboard_wait_descriptor):
 +      Remove #ifdef subprocesses.  Use max_input_desc.
 +      (init_process): Initialize write_mask and fd_callback_info.
 +
 +      * keyboard.c (readable_events, gobble_input): Remove DBUS code.
 +
 +      * dbusbind.c: Include process.h.
 +      (dbus_fd_cb, xd_find_watch_fd, xd_toggle_watch)
 +      (xd_read_message_1): New functions.
 +      (xd_add_watch, xd_remove_watch): Call xd_find_watch_fd.
 +      Handle watch for both read and write.
 +      (Fdbus_init_bus): Also register xd_toggle_watch.
 +      (Fdbus_call_method_asynchronously, Fdbus_method_return_internal)
 +      (Fdbus_method_error_internal, Fdbus_send_signal): Remove call
 +      to dbus_connection_flush.
 +      (xd_read_message): Move most of the code to xd_read_message_1.
 +      Call xd_read_message_1 until status is COMPLETE.
 +
 +2010-09-26  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * term.c: Do not include sys/ioctl.h, not needed.
 +      (init_tty): Reorder code to reduce the number of #ifdefs.
 +      No code changes.
 +
 +2010-09-26  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * process.h: Set up GnuTLS support.
 +
 +      * process.c (make_process, Fstart_process)
 +      (read_process_output, send_process): Set up GnuTLS support for
 +      process input/output file descriptors.
 +
 +      * gnutls.h: The GnuTLS glue for Emacs, macros and enums.
 +
 +      * gnutls.c: The source code for GnuTLS support in Emacs.
 +
 +      * emacs.c: Set up GnuTLS support and call syms_of_gnutls.
 +
 +      * config.in: Set up GnuTLS support.
 +
 +      * Makefile.in (LIBGNUTLS_LIBS, LIBGNUTLS_CFLAGS, ALL_CFLAGS)
 +      (obj, LIBES): Set up GnuTLS support.
 +
 +2010-09-26  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32.c (get_emacs_configuration_options): Fix previous change.
 +
 +2010-09-25  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * insdel.c (prepare_to_modify_buffer): Ensure the mark marker is
 +      alive before using it (Bug#6977).
 +
 +2010-09-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xdisp.c (face_before_or_after_it_pos): EMACS_INT/int fixup.
 +
 +      * dispextern.h: EMACS_INT/int fixup.
 +
 +      * xdisp.c (string_pos_nchars_ahead, init_iterator): EMACS_INT/int
 +      fixup.
 +
 +      * xrdb.c (magic_file_p): EMACS_INT/int fixup.
 +
 +2010-09-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * window.c (Fpos_visible_in_window_p, Fdelete_other_windows)
 +      (Fselect_window, window_scroll_pixel_based)
 +      (window_scroll_line_based, Frecenter, Fset_window_configuration):
 +      Use EMACS_INT for buffer positions.
 +
 +      * textprop.c (validate_interval_range, interval_of)
 +      (property_change_between_p, Fadd_text_properties)
 +      (set_text_properties_1, Fremove_text_properties)
 +      (Fremove_list_of_text_properties, Ftext_property_any)
 +      (Ftext_property_not_all, copy_text_properties)
 +      (text_property_list, extend_property_ranges)
 +      (verify_interval_modification): Use EMACS_INT for buffer
 +      positions.
 +
 +      * term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT
 +      for buffer positions.
 +
 +      * process.c (read_process_output, send_process)
 +      (Fprocess_send_region, status_notify): Use EMACS_INT for buffer
 +      and string positions and size.
 +
 +      * print.c (print_object, print_string, strout): Use EMACS_INT for
 +      string indices.
 +
 +      * minibuf.c (string_to_object): Use EMACS_INT for string position
 +      and size.
 +
 +      * marker.c (verify_bytepos): Use EMACS_INT for buffer positions.
 +
 +      * lread.c <read_from_string_index, read_from_string_index_byte>
 +      <read_from_string_limit, readchar_count>: Define EMACS_INT.
 +      (readchar, unreadchar, read_internal_start): Use EMACS_INT for
 +      buffer positions and string length.
 +
 +      * keyboard.c <last_point_position, last_non_minibuf_size>: Declare
 +      EMACS_INT.
 +      (echo_truncate, adjust_point_for_property, read_char)
 +      (gen_help_event, make_lispy_event, modify_event_symbol)
 +      (Fexecute_extended_command, stuff_buffered_input): Use EMACS_INT
 +      for buffer positions and string length.
 +
 +      * keyboard.h (gen_help_event): Adjust prototype.
 +
 +      * termhooks.h <struct input_event>: Make `code' member EMACS_INT.
 +
 +      * commands.h <last_point_position>: Declare EMACS_INT.
 +
 +      * xdisp.c <help_echo_pos>: Define as EMACS_INT.
 +      (truncate_echo_area): Accept EMACS_INT argument.
 +
 +      * dispextern.h <help_echo_pos>: Declare EMACS_INT.
 +
 +      * lisp.h (truncate_echo_area): Adjust prototype.
 +
 +      * composite.c (composition_adjust_point): Return EMACS_INT.
 +
 +      * composite.h (composition_adjust_point): Adjust prototype.
 +
 +2010-09-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * process.c (Fmake_network_process): When arg :host is 'local,
 +      use address 127.0.0.1, not name "localhost".  (Bug#6781)
 +
 +2010-09-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * indent.c (Fcurrent_indentation, indented_beyond_p)
 +      (compute_motion): Use EMACS_INT for buffer position variables.
 +
 +      * lisp.h (indented_beyond_p): Adjust prototype.
 +
 +      * buffer.c (overlay_strings): Return EMACS_INT.
 +
 +      * buffer.h (overlay_strings): Adjust prototype.
 +
 +      * region-cache.c (pp_cache): Adjust format to arguments.
 +
 +      * eval.c <specpdl_size, lisp_eval_depth>: Declare EMACS_INT.
 +      (call_debugger): Use EMACS_INT for specpdl_size related variables.
 +      (verror): Use EMACS_INT for size of allocated buffer.
 +
 +      * keyboard.c (make_lispy_position): Use EMACS_INT for buffer
 +      positions.
 +
 +      * xdisp.c (redisplay_internal, try_window_id)
 +      (set_cursor_from_row, find_first_unchanged_at_end_row):
 +      Use EMACS_INT for buffer positions.
 +
 +      * dispextern.h (set_cursor_from_row): Adjust prototype.
 +
 +      * dispnew.c (increment_matrix_positions)
 +      (increment_row_positions, copy_glyph_row_contents)
 +      (mode_line_string, marginal_area_string): Use EMACS_INT for buffer
 +      positions.
 +
 +      * dispextern.h (mode_line_string, marginal_area_string)
 +      (increment_matrix_positions, increment_row_positions):
 +      Adjust prototypes.
 +
 +      * data.c (Faref, Faset): Use EMACS_INT for string length and
 +      positions.
 +
 +      * cmds.c (internal_self_insert): Use EMACS_INT for the count of
 +      characters to insert.
 +
 +      * ccl.c (Fccl_execute_on_string): Use EMACS_INT for string
 +      position and size.
 +
 +      * syntax.c (scan_words, update_syntax_table)
 +      (prev_char_comend_first, back_comment, skip_chars)
 +      (skip_syntaxes, Fforward_comment, Fbackward_prefix_chars):
 +      Use EMACS_INT for buffer and string positions.
 +
 +      * syntax.h (scan_words, update_syntax_table): Adjust prototypes.
 +
 +      * casefiddle.c (operate_on_word): Use EMACS_INT for buffer
 +      positions.
 +
 +2010-09-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * scroll.c (calculate_scrolling, line_ins_del)
 +      (calculate_direct_scrolling, scroll_cost): Fix EMACS_INT/int
 +      conversion.
 +
 +      * region-cache.c (move_cache_gap, set_cache_region, pp_cache)
 +      (region_cache_backward, region_cache_forward)
 +      (revalidate_region_cache, set_cache_region): FIX EMACS_INT/int
 +      conversion.
 +
 +      * xdisp.c (message_dolog): Fix EMACS_INT/int conversion.
 +
 +      * eval.c (verror): Fix EMACS_INT/int conversion.
 +
 +      * print.c (PRINTDECLARE, PRINTPREPARE, strout, print_string)
 +      (print_preprocess, print_check_string_charset_prop)
 +      (print_object): Fix EMACS_INT/int conversion.
 +
 +      * xdisp.c (message_dolog): Fix EMACS_INT/int conversion.
 +
 +2010-09-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * callproc.c (Fcall_process): Use EMACS_INT for count of
 +      characters read from the subprocess.
 +
 +      * bidi.c (struct bidi_paragraph_info): Use EMACS_INT for buffer
 +      positions.
 +      (bidi_cache_search, bidi_cache_find): Use EMACS_INT for buffer
 +      positions.
 +
 +      * buffer.c (struct sortvec): Use EMACS_INT for buffer positions.
 +      (struct sortstrlist, overlay_str_len): Use EMACS_INT for string
 +      length.
 +      (advance_to_char_boundary, Fset_buffer_multibyte)
 +      (overlays_at, overlays_in, mouse_face_overlay_overlaps)
 +      (overlay_touches_p, record_overlay_string, overlay_strings)
 +      (recenter_overlay_lists, fix_start_end_in_overlays)
 +      (modify_overlay, Fmove_overlay, report_overlay_modification)
 +      (evaporate_overlays): Use EMACS_INT for buffer positions.
 +
 +      * lisp.h (fix_start_end_in_overlays, overlay_touches_p):
 +      Adjust prototypes.
 +
 +      * dispextern.h (struct bidi_saved_info): Use EMACS_INT for buffer
 +      positions.
 +
 +      * fns.c (Fcompare_strings, Fstring_lessp, concat)
 +      (string_make_unibyte, Fstring_as_unibyte, Fsubstring)
 +      (Fsubstring_no_properties, substring_both, Ffillarray)
 +      (Fclear_string, mapcar1, Fmapconcat, Fmapcar, Fmapc)
 +      (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
 +      (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
 +      (Fmd5): Use EMACS_INT for buffer and string positions and length
 +      variables and arguments.
 +
 +      * lisp.h (substring_both): Adjust prototype.
 +
 +2010-09-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Remove W32 API function pointer unused since 2005-02-15 (revno 2005-02-15T23:19:26Z!jasonr@gnu.org).
 +      * w32fns.c (clipboard_sequence_fn): Don't declare.
 +      (globals_of_w32fns): Don't initialize it.
 +
 +2010-09-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * syntax.c (back_comment): Detect the case where a 1-char comment
 +      starter is also the 2nd char of a 2-char comment ender.
 +
 +2010-09-23  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_tool_bar_menu_proxy): Set gtk-menu-items to TRUE.
 +
 +2010-09-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * eval.c (verror): EMACS_INT/int cleanup.
 +
 +      * lisp.h (SPECPDL_INDEX): Cast to int, since we're not going to
 +      unwind_protect more than 2GB worth of functions.
 +
 +      * editfns.c (Finsert_char): EMACS_INT/int cleanup.
 +
 +      * lisp.h: Have oblookup take EMACS_INT to allow interning big
 +      string and avoid compiler warnings.
 +      (USE_SAFE_ALLOCA): Cast to int to avoid compilation warnings in
 +      all users.
 +
 +      * lread.c (oblookup): EMACS_INT/int cleanup.
 +
 +      * cmds.c (Fforward_line, Fdelete_char): EMACS_INT/int cleanup.
 +
 +2010-09-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * editfns.c (clip_to_bounds): Return an EMACS_INT value.
 +
 +      * lisp.h (clip_to_bounds): Adjust prototype.
 +
 +      * intervals.c (adjust_for_invis_intang): Return EMACS_INT value.
 +
 +2010-09-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * lisp.h: doprnt.c EMACS_INT/int cleanup.
 +
 +      * doprnt.c (doprnt): EMACS_INT/int cleanup.
 +
 +      * doc.c (Fsnarf_documentation, get_doc_string): EMACS_INT/int
 +      cleanup.
 +
 +      * lisp.h: Change the definition of all marker.c functions that
 +      take and return buffer stuff to be EMACS_INT instead of int.
 +
 +      * marker.c (buf_charpos_to_bytepos, CONSIDER, set_marker_both)
 +      (buf_charpos_to_bytepos, bytepos_to_charpos)
 +      (buf_bytepos_to_charpos, Fbuffer_has_markers_at)
 +      (set_marker_restricted, set_marker_both): Convert int to EMACS_INT
 +      for all buffer positions.
 +
 +2010-09-23  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * intervals.c (traverse_intervals, rotate_right, rotate_left)
 +      (split_interval_right, find_interval, next_interval)
 +      (delete_node, delete_interval, interval_deletion_adjustment)
 +      (adjust_intervals_for_deletion, merge_interval_right)
 +      (merge_interval_left, graft_intervals_into_buffer)
 +      (copy_intervals): Convert EMACS_UINTs to EMACS_INT.
 +
 +      * intervals.h (traverse_intervals): Update prototype.
 +
 +2010-09-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * indent.c (compute_motion): Use EMACS_INT for arguments to
 +      region_cache_forward.
 +
 +      * region-cache.c (struct boundary, struct region_cache):
 +      Use EMACS_INT for positions.
 +      (find_cache_boundary, move_cache_gap, insert_cache_boundary)
 +      (delete_cache_boundaries, set_cache_region)
 +      (invalidate_region_cache, know_region_cache)
 +      (region_cache_forward, region_cache_backward, pp_cache):
 +      Use EMACS_INT for buffer positions.
 +
 +      * region-cache.h (know_region_cache, invalidate_region_cache)
 +      (region_cache_forward, region_cache_backward): Adjust prototypes.
 +
 +      * search.c (string_match_1, fast_c_string_match_ignore_case)
 +      (looking_at_1, scan_buffer, scan_newline)
 +      (find_next_newline_no_quit, find_before_next_newline)
 +      (search_command, trivial_regexp_p, search_buffer, simple_search)
 +      (boyer_moore, wordify, Freplace_match): Use EMACS_INT for buffer
 +      and string positions and length.
 +
 +      * lisp.h (scan_buffer, scan_newline, find_next_newline_no_quit)
 +      (find_before_next_newline): Adjust prototypes.
 +
 +      * editfns.c (transpose_markers, update_buffer_properties)
 +      (buildmark, clip_to_bounds, Fgoto_char, overlays_around)
 +      (get_pos_property, Fconstrain_to_field)
 +      (Fline_beginning_position, Fline_end_position, Fprevious_char)
 +      (Fchar_after, Fchar_before, Finsert_char)
 +      (Finsert_buffer_substring, Fcompare_buffer_substrings)
 +      (Fsubst_char_in_region, Fformat, Ftranspose_regions):
 +      Use EMACS_INT for buffer and string position variables.
 +      (Finsert_char): Protect against too large insertions.
 +
 +      * lisp.h (clip_to_bounds): Adjust prototype.
 +
 +      * intervals.c (traverse_intervals, rotate_right, rotate_left)
 +      (balance_an_interval, split_interval_right, split_interval_left)
 +      (find_interval, next_interval, update_interval)
 +      (adjust_intervals_for_insertion, delete_node, delete_interval)
 +      (interval_deletion_adjustment, adjust_intervals_for_deletion)
 +      (offset_intervals, merge_interval_right, merge_interval_left)
 +      (graft_intervals_into_buffer, adjust_for_invis_intang)
 +      (move_if_not_intangible, get_local_map, copy_intervals)
 +      (copy_intervals_to_string, compare_string_intervals)
 +      (set_intervals_multibyte_1): Use EMACS_INT for buffer positions
 +      and for interval tree size.
 +
 +      * intervals.h (traverse_intervals, split_interval_right)
 +      (split_interval_left, find_interval, offset_intervals)
 +      (graft_intervals_into_buffer, copy_intervals)
 +      (copy_intervals_to_string, move_if_not_intangible, get_local_map)
 +      (update_interval): Adjust prototypes.
 +
 +      * xdisp.c (check_point_in_composition, reconsider_clip_changes):
 +      Use EMACS_INT for buffer position variables and arguments.
 +
 +      * composite.c (get_composition_id, find_composition)
 +      (run_composition_function, compose_text)
 +      (composition_gstring_width, autocmp_chars)
 +      (composition_update_it, Ffind_composition_internal): Use EMACS_INT
 +      for buffer positions and string length variables and arguments.
 +
 +      * composite.h (get_composition_id, find_composition, compose_text)
 +      (composition_gstring_width): Adjust prototypes.
 +
 +      * editfns.c (Fformat): Use EMACS_INT for string size variables.
 +
 +      * xdisp.c (store_mode_line_noprop, display_mode_element):
 +      Use EMACS_INT for string positions.
 +
 +      * intervals.c (get_property_and_range): Use EMACS_INT for buffer
 +      position arguments.
 +
 +      * intervals.h (get_property_and_range): Adjust prototype.
 +
 +      * character.c (parse_str_as_multibyte, str_as_multibyte)
 +      (parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
 +      (string_count_byte8, string_escape_byte8, c_string_width)
 +      (strwidth, lisp_string_width, multibyte_chars_in_text):
 +      Use EMACS_INT for string length variables and arguments.
 +
 +      * character.h (parse_str_as_multibyte, str_as_multibyte)
 +      (parse_str_to_multibyte, str_to_multibyte, str_as_unibyte)
 +      (c_string_width, strwidth, lisp_string_width):
 +      Adjust prototypes.
 +
 +      * font.c (font_intern_prop): Use EMACS_INT for string length
 +      variables.
 +
 +      * font.c (font_intern_prop): Use EMACS_INT for string length
 +      variables.
 +
 +      * fns.c (Fstring_as_multibyte): Use EMACS_INT for string length
 +      variables.
 +
 +      * alloc.c <total_string_size>: Declare as EMACS_INT, not int.
 +      (Fmake_string): Protect against too large strings.
 +      (live_string_p, live_cons_p, live_symbol_p, live_float_p)
 +      (live_misc_p): Use ptrdiff_t instead of int for pointer
 +      differences.
 +      (string_bytes, check_sblock, check_string_free_list)
 +      (allocate_string_data, compact_small_strings, Fmake_string)
 +      (Fmake_bool_vector, make_string, make_unibyte_string)
 +      (make_multibyte_string, make_string_from_bytes)
 +      (make_specified_string_string, Fmake_list, Fmake_vector):
 +      Use EMACS_INT for string length variables and arguments.
 +      (find_string_data_in_pure, make_pure_string, make_pure_c_string)
 +      (Fpurecopy): Use EMACS_INT for string size.
 +      (mark_vectorlike, mark_char_table, mark_object): Use EMACS_UINT
 +      for vector size.
 +
 +      * lisp.h (make_string, make_unibyte_string, make_multibyte_string)
 +      (make_string_from_bytes, make_specified_string_string)
 +      (make_pure_string, string_bytes, check_point_in_composition):
 +      Adjust prototypes.
 +
 +2010-09-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
 +      (check_translation): Use EMACS_INT for buffer positions and
 +      length.
 +
 +      * undo.c (record_marker_adjustment, record_delete)
 +      (record_change, record_point, record_insert)
 +      (record_property_change, Fprimitive_undo): Use EMACS_INT for
 +      buffer positions.
 +
 +      * lisp.h (record_marker_adjustment, record_delete)
 +      (record_change, record_point, record_insert)
 +      (record_property_change, Fprimitive_undo): Adjust prototypes.
 +
 +2010-09-22  Juanma Barranquero  <lekktu@gmail.com>
 +            Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32.c (get_emacs_configuration_options): Fix buffer overrun.
 +
 +2010-09-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * minibuf.c (Fminibuffer_contents)
 +      (Fminibuffer_contents_no_properties)
 +      (Fminibuffer_completion_contents): Use EMACS_INT for minibuffer
 +      positions.
 +
 +      * keyboard.c (command_loop_1): Use EMACS_INT to compare point with
 +      mark.
 +
 +      * alloc.c (make_uninit_string, make_uninit_multibyte_string)
 +      (allocate_string_data): Accept EMACS_INT for string length.
 +
 +      * editfns.c (Ffield_string, Ffield_string_no_properties)
 +      (make_buffer_string, make_buffer_string_both, Fbuffer_substring)
 +      (Fbuffer_substring_no_properties, find_field, Fdelete_field)
 +      (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
 +      (Ffield_end): Use EMACS_INT for buffer positions.
 +
 +      * insdel.c (prepare_to_modify_buffer): Use EMACS_INT to compare
 +      point with mark.
 +
 +      * lisp.h (allocate_string_data, make_uninit_string)
 +      (make_uninit_multibyte_string, make_buffer_string)
 +      (make_buffer_string_both): Adjust prototypes.
 +
 +2010-09-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xml.c: Switch to GNU indentation.
 +      (make_dom): Change parse tree format to match xml.el.
 +      (Fxml_parse_html_string_internal): Rename from html-parse-string.
 +      (Fxml_parse_string_internal): Rename from xml-parse-string.
 +
 +2010-09-22  Kenichi Handa  <handa@m17n.org>
 +
 +      * xdisp.c (compute_stop_pos): Call composition_compute_stop_pos
 +      only if we are not at a composition.
 +      (set_iterator_to_next): Give it->end_charpos to
 +      composition_compute_stop_pos.
 +      (set_iterator_to_next, next_element_from_buffer): Likewise.
 +
 +      * dispnew.c (buffer_posn_from_coords): Fix position when the
 +      current display element is a grapheme cluster in bidi-reordered
 +      region.
 +
 +2010-09-21  Ari Roponen  <ari.roponen@gmail.com>  (tiny change)
 +
 +      * doc.c (Fsnarf_documentation): Use memmove instead of memcpy as
 +      the regions may overlap.
 +
 +2010-09-21  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
 +
 +2010-09-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * emacs.c: Do not include sys/ioctl.h, not needed.
 +
 +      * doprnt.c: Do not include stdlib.h, config.h does it.
 +      Move #include before macro definition.
 +
 +2010-09-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (temacs): Link using $(CC) not $(LD).
 +      (LD_FIRSTFLAG): Define using autoconf.
 +      (LD): Remove.
 +
 +      Remove HAVE_TERMIOS definitions.
 +      * s/usg5-4-common.h (HAVE_TERMIOS):
 +      * s/template.h (HAVE_TERMIOS):
 +      * s/gnu-linux.h (HAVE_TERMIOS):
 +      * s/darwin.h (HAVE_TERMIOS):
 +      * s/cygwin.h (HAVE_TERMIOS):
 +      * s/bsd-common.h (HAVE_TERMIOS):
 +      * s/aix4-2.h (HAVE_TERMIOS):
 +      * s/hpux10-20.h (HAVE_TERMIOS): Do not define, it is assumed
 +      defined on all non-MS platforms.
 +      (HAVE_PSTAT_GETDYNAMIC): Do not define, autoconf does it.
 +
 +      * xterm.c (xt_action_hook): Use const.
 +
 +2010-09-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Don't make W32 code conditional on HAVE_SOCKETS, it's always defined.
 +      * w32.c: Remove top-level uses of #ifdef HAVE_SOCKETS.
 +      (gethostname) [!HAVE_SOCKETS]: Remove.
 +      (SOCK_REPLACE_HANDLE): Remove macro.
 +      (socket_to_fd, sys_close, _sys_read_ahead, sys_read, sys_write)
 +      (term_ntproc, init_ntproc): Don't conditionalize on HAVE_SOCKETS.
 +      * w32proc.c: Remove top-level uses of #ifdef HAVE_SOCKETS.
 +      (syms_of_ntproc): Don't conditionalize on HAVE_SOCKETS.
 +
 +2010-09-18  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * deps.mk (xml.o): Add dependencies.
 +
 +      * xdisp.c (Fcurrent_bidi_paragraph_direction):
 +      Call bidi_paragraph_init with NO_DEFAULT_P non-zero.  (Bug#7038)
 +
 +      * bidi.c (bidi_paragraph_init): Accept an additional argument
 +      NO_DEFAULT_P; all callers changed.  If NO_DEFAULT_P is non-zero,
 +      search back until a paragraph with a strong directional character
 +      is found, and use that to determine paragraph's base direction.
 +
 +      * dispextern.h (bidi_paragraph_init): Update prototype.
 +
 +2010-09-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32.c (_PROCESS_MEMORY_COUNTERS_EX): Don't define with versions
 +      of w32api >= 3.15.  (Bug#6989)
 +
 +2010-09-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * process.c (wait_reading_process_output): Don't message about
 +      accept-process-output unless the time limit really is zero.
 +
 +2010-09-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * frame.c (Ftool_bar_pixel_width): YAILOM (Yet another
 +      int/Lisp_Object mixup).
 +
 +2010-09-17  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * keyboard.c (parse_tool_bar_item): For QClabel, set TOOL_BAR_ITEM_LABEL
 +      not HELP.
 +
 +2010-09-17  Stephen Berman  <stephen.berman@gmx.net>
 +
 +      * frame.c (Ftool_bar_pixel_width): New function to expose tool
 +      bar's pixel width to Lisp (Bug#7048).
 +
 +2010-09-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * cmds.c (syms_of_cmds) <post-self-insert-hook>: Fix typos in docstring.
 +
 +2010-09-17  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_pack_tool_bar): Call gtk_handle_box_set_handle_position
 +      with argument top/left if tool bar is vertical/horizontal (Bug#7051).
 +
 +2010-09-17  Kenichi Handa  <handa@m17n.org>
 +
 +      * ftfont.c (ftfont_check_otf): Fix previous change.
 +
 +2010-09-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * ftfont.c (ftfont_check_otf): Fix the case of checking just
 +      existence of GSUB or GPOS.
 +
 +2010-09-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * cmds.c (syms_of_cmds) <post-self-insert-hook>: Fix typos in docstring.
 +
 +2010-09-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xml.c (parse_buffer): Rename to parse_string(), since that's
 +      what it does.
 +      (parse_string): Return nil when the document can't be parsed.
 +
 +2010-09-14  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (get_current_vm_state): New function.
 +      (do_ewmh_fullscreen): Call get_current_vm_state and compare with
 +      want_fullscreen so set_wm_state calls are few (Bug#7013).
 +      (x_handle_net_wm_state): Move code to get_current_vm_state and
 +      call that function.
 +
 +2010-09-14  Courtney Bane  <emacs-bugs-7626@cbane.org>  (tiny change)
 +
 +      * term.c (tty_set_terminal_modes): Don't initialize twice (bug#7002).
 +
 +2010-09-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * coding.c (encode_coding_iso_2022): Don't optimize for ASCII if
 +      we may use designation or locking-shift.
 +
 +2010-09-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * coding.c (detect_coding_emacs_mule): Fix checking of multibyte
 +      sequence when the source is multibyte.
 +
 +2010-09-14  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xml.c (Fxml_parse_string, Fxml_parse_string): Revert last change.
 +      Don't make first argument optional.  Doc fix.
 +
 +2010-09-14  Leo  <sdl.web@gmail.com>  (tiny change)
 +
 +      * xml.c (Fxml_parse_string, Fhtml_parse_string): Fix up the
 +      parameters for the doc string.
 +
 +2010-09-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xml.c (Fhtml_parse_string, Fxml_parse_string): Mention BASE-URL.
 +
 +2010-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * fns.c (Fy_or_n_p): Move to lisp/subr.el.
 +      (syms_of_fns): Don't defsubr Sy_or_n_p.
 +      * lisp.h: Don't declare Fy_or_n_p.
 +      * fileio.c (barf_or_query_if_file_exists): Fy_or_n_p -> y-or-n-p.
 +
 +2010-09-09  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xml.c (Fxml_parse_buffer): New function to parse XML files.
 +
 +2010-09-08  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * xml.c: New file.
 +      (Fhtml_parse_buffer): New function to interface to the libxml2
 +      html parsing function.
 +
 +2010-09-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * biditype.h: Regenerate.
 +
 +2010-09-04  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * nsimage.m (ns_load_image): Check argument types.
 +
 +      * image.c: Remove all uses of gcpro.
 +      (xpm_load): Check all lisp types.
 +      (pbm_load): Likewise.
 +      (png_load): Likewise.
 +      (jpeg_load): Likewise.
 +      (tiff_load): Likewise.
 +      (gif_load): Likewise.
 +      (imagemagick_load_image): Likewise.
 +      (imagemagick_load): Likewise.
 +      (svg_load): Likewise.
 +      (gs_load): Likewise.
 +
 +2010-09-04  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32uniscribe.c (uniscribe_shape): Update commentary.
 +      Don't try to reorder grapheme clusters, since LGSTRING should always
 +      hold them in the logical order.
 +      (uniscribe_encode_char, uniscribe_shape): Force ScriptShape to
 +      return glyph codes in the logical order.
 +
 +2010-09-04  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * image.c (imagemagick_image_p): Replace bcopy by memcpy.
 +      (imagemagick_load_image): Fix type mismatch.
 +      (Fimagemagick_types): Likewise.  Doc fix.
 +
 +2010-09-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.h (struct dpyinfo): Remove cut_buffers_initialized.
 +
 +      * xterm.c (x_term_init): Don't set dpyinfo->cut_buffers_initialized.
 +
 +      * xselect.c: Remove declaration of cut-buffer objects and functions.
 +      (symbol_to_x_atom): Remove mapping to XA_CUT_BUFFERn.
 +      (x_atom_to_symbol): Remove mapping to QCUT_BUFFERn.
 +      (Fx_get_cut_buffer_internal, Fx_store_cut_buffer_internal)
 +      (Fx_rotate_cut_buffers_internal): Remove.
 +      (syms_of_xselect): Remove defsubr of above.
 +      Remove intern of QCUT_BUFFERn.
 +
 +2010-09-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * cmds.c (Vblink_paren_function): Remove.
 +      (internal_self_insert): Make it insert N chars at a time.
 +      Don't call blink-paren-function.
 +      (Fself_insert_command): Adjust accordingly.
 +      (syms_of_cmds): Don't declare blink-paren-function.
 +
 +2010-08-31  Kenichi Handa  <handa@m17n.org>
 +
 +      * dispextern.h (FACE_FOR_CHAR): Use an ASCII face for 8-bit
 +      characters.
 +
 +      * term.c (encode_terminal_code): Fix the previous change.
 +      (produce_glyphs): Don't set it->char_to_display here.
 +      Don't handle unibyte-display-via-language-environment here.
 +      (produce_special_glyphs): Set temp_it.char_to_display before
 +      calling produce_glyphs.
 +
 +      * xdisp.c (get_next_display_element): Set it->char_to_display
 +      here.  Convert all 8-bit bytes from unibyte buffer/string to 8-bit
 +      characters.
 +      (get_overlay_arrow_glyph_row): Set it.char_to_display too before
 +      calling PRODUCE_GLYPHS.
 +      (append_space_for_newline): Save and store it->char_to_display.
 +      Set it->char_to_display before calling PRODUCE_GLYPHS.
 +      (extend_face_to_end_of_line): Set it->char_to_display before
 +      calling PRODUCE_GLYPHS.
 +      (get_glyph_face_and_encoding): Set the glyph code an 8-bit
 +      character to its byte value.
 +      (get_char_glyph_code): New function.
 +      (produce_stretch_glyph): Set it2.char_to_display too before
 +      calling x_produce_glyphs.
 +      (x_produce_glyphs): Simplify by using the same code for ASCII and
 +      non-ASCII characters.  Don't set it->char_to_display here.
 +      Don't handle unibyte-display-via-language-environment here.  For a
 +      character of no glyph, use font->space_width instead of FONT_WIDTH.
 +
 +2010-08-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keyboard.c (Fwindow_system): Fix compilation for USE_LISP_UNION_TYPE.
 +
 +2010-08-31  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (command_loop_1): Don't call x-set-selection on tty.
 +
 +2010-08-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * marker.c (Fcopy_marker): Make the first arg optional.
 +
 +2010-08-30  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.c (composition_update_it): Fix computing of
 +      cmp_it->width.
 +
 +2010-08-29  Kenichi Handa  <handa@m17n.org>
 +
 +      * term.c (encode_terminal_code): Encode byte chars to the
 +      corresponding bytes.
 +
 +2010-08-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_draw_window_cursor): Draw BAR_CURSOR correct for R2L.
 +
 +2010-08-26  Kenichi Handa  <handa@m17n.org>
 +
 +      * xdisp.c (compute_stop_pos): Pay attention to bidi scan direction
 +      on calling composition_compute_stop_pos.
 +
 +2010-08-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * fontset.c (reorder_font_vector): Prefer a font-spec specifying
 +      :otf.
 +
 +      * composite.c (composition_compute_stop_pos): Don't break
 +      composition at PT.
 +      (composition_reseat_it): Likewise.  Fix calculation of character
 +      position starting a composition.
 +      (Fcomposition_get_gstring): Don't limit the number of components
 +      for automatic composition.
 +
 +2010-08-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.c (composition_compute_stop_pos): In forward search,
 +      pay attention to the possibility that some character after ENDPOS
 +      will be composed with charactrs before ENDPOS.
 +
 +2010-08-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (command_loop_1): Don't clobber primary selection
 +      during handle-switch-frame (Bug#6872).
 +
 +2010-08-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c: Accept UNIX domain sockets as bus address.
 +      (Fdbus_close_bus): New function.
 +      (Vdbus_registered_buses): New variable.
 +      (xd_initialize): Implement string as bus address.
 +      (Fdbus_init_bus): Add bus to Vdbus_registered_buses).
 +      (Fdbus_get_unique_name, Fdbus_call_method)
 +      (Fdbus_call_method_asynchronously, Fdbus_method_return_internal)
 +      (Fdbus_method_error_internal, Fdbus_send_signal)
 +      (Fdbus_register_signal, Fdbus_register_method): Remove bus type
 +      check.  This is done in xd_initialize_bus.  Adapt doc string, if
 +      necessary.
 +      (xd_pending_messages, xd_read_queued_messages): Loop over buses in
 +      Vdbus_registered_buses.
 +      (Vdbus_registered_objects_table): Create hash.
 +
 +2010-08-22  Juri Linkov  <juri@jurta.org>
 +
 +      * keyboard.c (Fexecute_extended_command): Move reading a command name
 +      with `completing-read' to a new Elisp function `read-extended-command'.
 +      Call it to read a command to `function'  (bug#5364, bug#5214).
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs.c (main): Remove handling of --unibyte arg (Bug#6886).
 +
 +2010-08-22  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP
 +      instead of SAFE_ALLOCA.
 +
 +2010-08-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA
 +      (Bug#6214).
 +
 +2010-08-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * doc.c (Fsnarf_documentation): Set skip_file only if p[1] is S.
 +
 +2010-08-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * doc.c (Fsnarf_documentation): Initialize skip_file before
 +      build-files test.
 +
 +2010-08-22  Peter O'Gorman  <pogma@thewrittenword.com>  (tiny change)
 +
 +      * s/hpux10-20.h (HAVE_TERMIOS, NO_TERMIO, ORDINARY_LINK):
 +      New definitions.
 +      (HAVE_TERMIO): Remove.
 +
 +2010-08-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * deps.mk (sysdep.o, msdos.o): Depend on sysselect.h.
 +
 +      * sysselect.h [WINDOWSNT]: Don't define the FD_* and select stuff
 +      for w32.
 +
 +      * s/ms-w32.h (HAVE_SYS_TIMEB_H): Don't #undef HAVE_SYS_SELECT_H,
 +      it's done in nt/config.nt.
 +
 +      * makefile.w32-in ($(BLD)/sysdep.$(O)): Depend on sysselect.h.
 +
 +      * unexcoff.c (report_error, make_hdr, write_segment)
 +      (copy_text_and_data, copy_sym, mark_x, adjust_lnnoptrs, unexec):
 +      Convert argument lists and prototypes to ANSI C.
 +      (make_hdr, write_segment): Remove unused variables.
 +      (unexec): Remove commented-out line.  Initialize `new' to shut up
 +      compiler warnings.
 +
 +2010-08-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Simplify termio code.
 +      All non-MSDOS non-WINDOWSNT platforms define HAVE_TERMIOS, so
 +      HAVE_TERMIO code is obsolete.
 +      Replace HAVE_TERMIOS conditionals with !DOS_NT.
 +      * systty.h: Do not define HAVE_TCATTR.
 +      Remove HAVE_TERMIO, HAVE_LTCHARS and HAVE_TCHARS code.
 +      Do not define EMACS_HAVE_TTY_PGRP.  Only define
 +      EMACS_GET_TTY_PGRP for !DOS_NT.
 +      * sysdep.c: Include sysselect.h unconditionally.  Do not include
 +      sys/ioctl.h and termios.h, systty.h does it.
 +      Use HAVE_SYS_UTSNAME_H instead of USG as an include guard.
 +      (init_baud_rate): Remove HAVE_TERMIO code.
 +      (child_setup_tty): Remove HAVE_TERMIO code.
 +      (emacs_get_tty, emacs_set_tty): Remove HAVE_TERMIO, HAVE_TCHARS
 +      and HAVE_LTCHARS code.  Use !DOS_NT instead of HAVE_TCATTR.
 +      (new_ltchars, new_tchars): Remove, unused.
 +      (init_sys_modes): Remove HAVE_TERMIO, HAVE_TCHARS and HAVE_LTCHARS
 +      code.  Remove special casing for __mips__, it was a no-op.
 +      Remove HAVE_TCATTR conditional, it is implied by HAVE_TERMIOS.
 +      (init_sys_modes): Remove HPUX special case.
 +      * process.c: Include stdlib.h unconditionally.  Do not include
 +      fcntl.h, systty.h does it.  Remove conditional code for
 +      HAVE_SERIAL, it is always true.
 +      (process_send_signal): Remove HAVE_TERMIOS conditional, it's
 +      always true when SIGNALS_VIA_CHARACTERS is true.
 +      (Fcontinue_process, Fprocess_send_eof): Simplify conditionals:
 +      !WINDOWSNT means HAVE_TERMIOS.
 +      (create_process): Remove HAVE_TERMIOS, it's inside a HAVE_PTYS
 +      conditional, which is true for all HAVE_TERMIOS systems.
 +      * keyboard.c (init_keyboard): Do not use HAVE_TERMIO, use !DOS_NT
 +      instead of HAVE_TERMIOS.
 +      * emacs.c (shut_down_emacs): Use !defined DOS_NT instead of
 +      EMACS_HAVE_TTY_PGRP.
 +      * callproc.c (child_setup): Move EMACS_SET_TTY_PGRP use to the
 +      non-MSDOS, non-WINDOWSNT code, it's only defined for such systems
 +      anyway.
 +
 +2010-08-21  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispnew.c (buffer_posn_from_coords): Fix off-by-one error in
 +      mirroring pixel positions.
 +
 +2010-08-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * alloc.c (malloc_sbrk_used, malloc_sbrk_unused): Remove,
 +      write only.
 +      (init_alloc_once): Remove writes to malloc_sbrk_unused, and
 +      malloc_sbrk_used, nothing uses them.
 +
 +      * puresize.h: Remove code assuming PNTR_COMPARISON_TYPE is not
 +      defined, unconditionally defined in lisp.h.
 +
 +      * term.c: Do not include <termios.h>, systty.h does it.
 +
 +      * s/unixware.h (HAVE_TCATTR):
 +      * s/aix4-2.h (HAVE_TCATTR): Remove definitions, not needed.
 +      systty.h defines it when HAVE_TERMIOS is defined.
 +
 +2010-08-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispnew.c (buffer_posn_from_coords): Fix last change for text
 +      terminals: add one-character offset for R2L lines.
 +
 +      * emacs.c <emacs_version>: Add a comment regarding
 +      msdos/mainmake.v2's dependency on the syntax of this declaration.
 +
 +2010-08-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispnew.c (buffer_posn_from_coords): Fix calculation of buffer
 +      position for R2L lines by mirroring the pixel position wrt the
 +      text are box.  Improve commentary.
 +
 +2010-08-20  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * image.c (imagemagick_clear_image): Remove debugging output.
 +
 +2010-08-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * cmds.c (Vself_insert_face, Vself_insert_face_command): Remove.
 +      (Qpost_self_insert_hook, Vpost_self_insert_hook): New vars.
 +      (internal_self_insert): Run Qpost_self_insert_hook rather than handle
 +      self-insert-face.
 +      (syms_of_cmds): Initialize the new vars.
 +
 +2010-08-19  Jason Rumney  <jasonr@gnu.org>
 +
 +      * w32menu.c (set_frame_menubar): Remove call to undefined function.
 +
 +      * w32fns.c (w32_wnd_proc): Don't check context before initializing.
 +
 +2010-08-19  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsselect.m (nxatoms_of_nsselect): Use "Selection" and "Secondary".
 +
 +2010-08-18  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xterm.c (x_draw_bar_cursor):
 +      * w32term.c (x_draw_bar_cursor): If the character under cursor is
 +      R2L, draw the bar cursor on its right rather than on its left.
 +
 +2010-08-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fdefmacro): Only obey one declaration.
 +
 +      * casefiddle.c (casify_region): Setup gl_state.
 +
 +2010-08-18  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_define_frame_cursor): Call x_update_cursor (Bug#6868).
 +
 +2010-08-18  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (update_frame_tool_bar): Literal strings are const char*.
 +
 +2010-08-18  David De La Harpe Golden  <david@harpegolden.net>
 +
 +      * nsselect.m (QCLIPBOARD, NXPrimaryPboard): Define.
 +      (symbol_to_nsstring): Map QCLIPBOARD => NSGeneralPboard,
 +      QPRIMARY => NXPrimaryPboard.
 +      (ns_string_to_symbol): NSGeneralPboard => QCLIPBOARD,
 +      NXPrimaryPboard => QPRIMARY.
 +      (nxatoms_of_nsselect): NXPrimaryPboard = PrimarySelection,
 +      NXSecondaryPboard = SecondarySelection.
 +      (syms_of_nsselect): Intern QCLIPBOARD (Bug#6677).
 +
 +2010-08-18  Joakim Verona  <joakim@verona.se>
 +
 +      * image.c: Add support for ImageMagick.  When HAVE_IMAGEMAGICK is
 +      defined:
 +      (imagemagick_image_p): New function to test for ImageMagic image.
 +      (imagemagick_load): New function to load ImageMagick image.
 +      (imagemagick_load_image): New function, helper for imagemagick_load.
 +      (imagemagick-types): New function.
 +      (Qimagemagick): New Lisp_object.
 +      (imagemagick-render-type): New variable, decides which renderer to use.
 +
 +2010-08-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * gtkutil.c (update_frame_tool_bar): Don't assume TOOL_BAR_ITEM_LABEL
 +      is a string.
 +
 +2010-08-17  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsfns.m (ns_frame_parm_handlers): Add a slot for the
 +      x_set_tool_bar_position handler.
 +
 +2010-08-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c <w32_frame_parm_handlers>: Add a slot for the
 +      x_set_tool_bar_position handler, needed to support changes from
 +      2010-07-29T16:49:59Z!jan.h.d@swipnet.se for positioning the tool bar.  (Bug#6796)
 +
 +2010-08-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsselect.m: include keyboard.h for QPRIMARY, remove its
 +      declaration (Bug#6863).
 +      (syms_of_nsselect): Don't intern QPRIMARY.
 +
 +      * xselect.c: Remove declaration of QPRIMARY (Bug#6864).
 +
 +      * keyboard.h (QPRIMARY): Declare (Bug#6864).
 +
 +2010-08-16  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (command_loop_1): Avoid setting selection twice,
 +      since it's done in deactivate-mark as well.
 +      (Vselect_active_regions): Change default to t.  Replace `lazy'
 +      with non-default value `only', meaning only set PRIMARY for
 +      temporarily active regions.
 +
 +      * insdel.c (prepare_to_modify_buffer): Handle `only' value of
 +      select-active-regions.
 +
 +2010-08-15  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * keyboard.c (parse_tool_bar_item): Put in a bad label if :label
 +      isn't a string.
 +
 +2010-08-15  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * keyboard.c (parse_tool_bar_item): Avoid excessive use of strlen.
 +
 +2010-08-15  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * keyboard.c (parse_tool_bar_item): malloc buf.
 +      Set TOOL_BAR_ITEM_LABEL to empty string if not set to
 +      new_lbl (Bug#6855).
 +
 +2010-08-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xterm.c (x_draw_stretch_glyph_string):
 +      * w32term.c (x_draw_stretch_glyph_string): In R2L rows, display
 +      the cursor on the right edge of the stretch glyph.
 +
 +      * xdisp.c (window_box_right_offset, window_box_right):
 +      Fix commentary.
 +
 +      * xdisp.c (Fcurrent_bidi_paragraph_direction): Fix paragraph
 +      direction when point is inside a run of whitespace characters.
 +
 +      * bidi.c (bidi_at_paragraph_end): Remove obsolete comment.
 +
 +2010-08-14  Jason Rumney  <jasonr@gnu.org>
 +
 +      * keyboard.c (lispy_function_keys): Do not define VK_PACKET (bug#4836)
 +
 +2010-08-14  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * fns.c (Fmake_hash_table): Doc fix (Bug#6851).
 +
 +2010-08-13  Jason Rumney  <jasonr@gnu.org>
 +
 +      * w32menu.c (simple_dialog_show): Use unicode message box if available.
 +      (MessageBoxW_Proc): New function typedef.
 +      (unicode-message-box): New function pointer.
 +      (globals_of_w32menu): Import it from user32.dll. (Bug#5629)
 +
 +2010-08-13  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * frame.h (Qtool_bar_position): Declare.
 +
 +      * xfns.c (Fx_create_frame): Call x_default_parameter for
 +      Qtool_bar_position.
 +
 +2010-08-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * unexcoff.c: Remove the parts used when "emacs" is not defined.
 +      (report_error, report_error_1): Ditto.
 +      (write_segment): Remove "#if 0" unused code.
 +      (make_hdr): Remove code that was "#ifndef NO_REMAP" before
 +      NO_REMAP was removed (in 2010-07-29T03:25:08Z!dann@ics.uci.edu).
 +      (start_of_text): Remove unused function (was used only if NO_REMAP
 +      was NOT defined).
 +
 +      * msdos.c (IT_set_face): Fix format string to match argument
 +      types.
 +      (IT_write_glyphs, IT_note_mode_line_highlight)
 +      (IT_set_frame_parameters): Remove unused variables.
 +      (x_set_menu_bar_lines): Declare set_menu_bar_lines.
 +      (IT_set_terminal_modes): Disambiguate expression in if clause.
 +      (Fmsdos_remember_default_colors): Return Qnil.
 +      (IT_set_frame_parameters): Add parens to disambiguate boolean
 +      expression for logging the cursor type to termscript.
 +      (keyboard_layout_list, keypad_translate_map)
 +      (grey_key_translate_map): Add braces in inner initializers.
 +      (dos_rawgetc): Add parens in condition for mouse-3 button-press.
 +      (dos_rawgetc): Remove unused label.
 +      (XMenuActivate): Add braces to remove ambiguous `else'.
 +      (dos_ttraw): Always return a value.
 +      (spawnve): Declare.
 +      (run_msdos_command): Cast 3rd arg of spawnve to "char **".
 +
 +      * dosfns.h (x_set_title): Declare.
 +
 +      * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
 +      Remove unused variables.
 +
 +      * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Remove unused
 +      variables.
 +      (init_dosfns): Declare get_lim_data.
 +      (system_process_attributes): Declare Fget_internal_run_time.
 +
 +      * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Fix argument
 +      list to be consistent with menu.h.
 +
 +      * w32menu.c (add_menu_item, name_is_separator): Shut up compiler
 +      warnings due to mixing of "char *" and "const char *".
 +
 +2010-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Introduce a new comment style "c" flag.
 +      * syntax.c (SYNTAX_FLAGS_COMMENT_STYLEB)
 +      (SYNTAX_FLAGS_COMMENT_STYLEC): New macros.
 +      (SYNTAX_FLAGS_COMMENT_STYLE): Use them, add an argument.
 +      (syntax_prefix_flag_p): New function.
 +      (Fstring_to_syntax): Understand new "c" flag.
 +      (Finternal_describe_syntax_value): Recognize new flag; use the
 +      SYNTAX_FLAGS_* macros.
 +      (scan_sexps_forward, Fparse_partial_sexp): Change representation of
 +      comment style to accomodate the new styles.
 +      (back_comment, forw_comment, Fforward_comment, scan_lists)
 +      (scan_sexps_forward): Update code to obey the new comment style flag.
 +
 +      * syntax.h: Move SYNTAX_FLAGS_FOO() macros to syntax.c.
 +
 +      * casefiddle.c (casify_region): Use the new syntax_prefix_flag_p.
 +
 +2010-08-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (x_defined_color): If USE_GTK, call xg_check_special_colors
 +      first.
 +      (Fx_hide_tip): Check FRAME_LIVE_P (f) before calling xg_hide_tooltip.
 +
 +      * gtkutil.h (xg_check_special_colors): Declare.
 +
 +      * gtkutil.c (xg_check_special_colors, style_changed_cb): New functions.
 +      (xg_create_frame_widgets): Connect theme name changes to
 +      style_changed_cb.
 +
 +      * xterm.c (emacs_class): New char[] for EMACS_CLASS.
 +      (xim_open_dpy, xim_initialize, xim_close_dpy): Use emacs_class.
 +      (x_term_init): Use char[] display_opt and name_opt instead of
 +      string literal.  file is const char*.
 +
 +      * xsmfns.c (NOSPLASH_OPT): Change to char[].
 +      (smc_save_yourself_CB): Do xstrdup on all ->type and ->name for
 +      props.  Free them at the end.
 +
 +      * xselect.c (Fx_get_atom_name): Use char empty[] instead of literal "".
 +
 +      * xrdb.c (get_system_app): Make path const and use char *p for
 +      non-const char.
 +
 +      * xmenu.c (Fx_popup_dialog): error_name is const char*.
 +      (xmenu_show): error parameter is const char **.  pane_string is const
 +      char *.
 +      (button_names): Is const char *.
 +      (xdialog_show): error_name and pane_string is const.
 +
 +      * process.h (synch_process_death): Is const char*.
 +
 +      * w32menu.c (w32_menu_show):
 +      * nsmenu.m (ns_menu_show): error parameter is const char **.
 +
 +      * menu.h (w32_menu_show, ns_menu_show, xmenu_show): error parameter
 +      is const char **.
 +
 +      * menu.c (Fx_popup_menu): error_name is const.
 +
 +      * keyboard.h (_widget_value): Add defined USE_GTK.  Replace Boolean
 +      with unsigned char and XtPointer with void *.
 +
 +      * gtkutil.h: Replace widget_value with struct _widget_value.
 +      (enum button_type, struct _widget_value): Remove and use the one from
 +      keyboard.h.
 +
 +      * gtkutil.c (get_utf8_string): Always return an allocated string.
 +      Parameter is const.
 +      (create_dialog, xg_create_one_menuitem, create_menus)
 +      (xg_item_label_same_p, xg_update_menu_item): Free result from
 +      get_utf8_string.
 +      (xg_separator_p, xg_item_label_same_p): label is const.
 +
 +      * font.h (font_open_by_name): Make name const.
 +
 +      * font.c (font_open_by_name): Make name const.
 +
 +      * floatfns.c (matherr): Use a const char* variable for x->name.
 +
 +      * emacs.c (main): Pass char[] to putenv instead of literal.
 +
 +      * callproc.c (synch_process_death): Make const.
 +      (Fcall_process): Make signame const.
 +
 +      * nsterm.h (parseKeyEquiv, addSubmenuWithTitle)
 +      (addDisplayItemWithImage): Use const char*.
 +
 +      * nsmenu.m (parseKeyEquiv, addSubmenuWithTitle)
 +      (addDisplayItemWithImage, update_frame_tool_bar): Use const char*.
 +
 +      * nsfont.m (ns_descriptor_to_entity): Use const char*.
 +
 +      * keyboard.h (_widget_value): name, value and key are const char*.
 +
 +      * unexmacosx.c (unexec_error): Use const char *.
 +
 +2010-08-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * font.h (font_parse_xlfd, font_parse_fcname, font_unparse_fcname)
 +      (font_parse_name, font_open_by_name):
 +      * font.c (font_parse_xlfd, font_parse_fcname, font_unparse_fcname)
 +      (font_parse_name, font_open_by_name): Remove const.
 +
 +2010-08-09  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      Use autoconf determined WORDS_BIGENDIAN instead of hardcoded
 +      definition.
 +
 +      * m/alpha.h: Don't define/undef WORDS_BIG_ENDIAN.
 +      * m/amdx86-64.h: Likewise.
 +      * m/arm.h: Likewise.
 +      * m/hp800.h: Likewise.
 +      * m/ia64.h: Likewise.
 +      * m/ibmrs6000.h: Likewise.
 +      * m/ibms390.h: Likewise.
 +      * m/intel386.h: Likewise.
 +      * m/iris4d.h: Likewise.
 +      * m/m68k.h: Likewise.
 +      * m/macppc.h: Likewise.
 +      * m/mips.h: Likewise.
 +      * m/sh3.h: Likewise.
 +      * m/sparc.h: Likewise.
 +      * m/template.h: Likewise.
 +      * m/vax.h: Likewise.
 +      * m/xtensa.h: Likewise.
 +      * fringe.c (init_fringe_bitmap): Test WORDS_BIGENDIAN instead of
 +      WORDS_BIG_ENDIAN.
 +      * lisp.h: Likewise.
 +      * md5.c: Likewise.
 +      * sound.c (le2hl, le2hs, be2hl, be2hs): Likewise.
 +
 +2010-08-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Use const char* instead of char*.
 +      Reduce the number of warnings with -Wwrite-strings.
 +      * xrdb.c (get_environ_db, get_system_name):
 +      * unexelf.c (find_section):
 +      * term.c (string_cost, string_cost_one_line, per_line_cost)
 +      (get_named_tty, init_tty):
 +      * sysdep.c (sys_subshell):
 +      * sound.c (sound_perror, sound_warning, vox_open, vox_init)
 +      (alsa_sound_perror, alsa_open, alsa_configure, alsa_init):
 +      * search.c (Freplace_match):
 +      * process.c (Fmake_network_process, send_process, init_process):
 +      * lread.c (Fload, init_lread):
 +      * keymap.c (Fdescribe_buffer_bindings, describe_map_tree):
 +      * keyboard.c (parse_tool_bar_item, struct event_head):
 +      * gtkutil.h (xg_get_font_name):
 +      * gtkutil.c (get_dialog_title, create_dialog, xg_get_font_name)
 +      (make_widget_for_menu_item, make_menu_item, create_menus)
 +      (xg_make_tool_item):
 +      * font.c (parse_matrix, font_parse_name):
 +      * floatfns.c (rounding_driver, float_error_fn_name):
 +      * filelock.c (get_boot_time_1, lock_file_1):
 +      * fileio.c (barf_or_query_if_file_exists, check_writable):
 +      * editfns.c (get_system_name, get_operating_system_release)
 +      (Fencode_time, Fset_time_zone_rule):
 +      * dispextern.h (string_cost, per_line_cost, get_named_tty, init_tty):
 +      * buffer.c (defvar_per_buffer): Use const.
 +
 +2010-08-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * charset.c: Include <stdlib.h>.
 +      (struct charset_sort_data): New struct.
 +      (charset_compare): New function.
 +      (Fsort_charsets): New function.
 +      (syms_of_charset): Declare Fsort_charsets as a Lisp function.
 +
 +      * coding.c (decode_coding_iso_2022): Fix checking of dimension
 +      number in CTEXT extended segment.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32fns.c (syms_of_w32fns) <x-max-tooltip-size>: Fix typo in docstring.
 +      * xfns.c (syms_of_xfns) <x-max-tooltip-size>: Reflow docstring.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * fns.c (Fsubstring_no_properties, Fnthcdr, Ffeaturep)
 +      (Fhash_table_size): Fix typos in docstrings.
 +      (Fmake_hash_table): Doc fix.
 +
 +2010-08-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * minibuf.c (syms_of_minibuf) <read-buffer-function>:
 +      Doc fix (bug#5625).
 +
 +2010-08-08  Ken Brown  <kbrown@cornell.edu>
 +
 +      * dired.c (DIRENTRY_NONEMPTY) [cygwin]: Use d_ino instead of
 +      the MSDOS definition.
 +
 +2010-08-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Use const char* instead of char*.
 +      * xterm.c (x_create_toolkit_scroll_bar):
 +      * xfont.c (xfont_list_pattern):
 +      * xfns.c (x_default_scroll_bar_color_parameter)
 +      (xic_create_fontsetname, x_default_font_parameter)
 +      (x_screen_planes):
 +      * xdisp.c (c_string_pos, number_of_chars, reseat_to_string)
 +      (store_mode_line_string, decode_mode_spec, display_string):
 +      * menu.c (digest_single_submenu):
 +      * keymap.h (initial_define_key, initial_define_lispy_key):
 +      * keymap.c (initial_define_key, initial_define_lispy_key):
 +      * image.c (image_error, image_keyword):
 +      * gtkutil.h (xg_create_widget, xg_create_scroll_bar):
 +      * gtkutil.c (xg_create_widget, xg_create_scroll_bar):
 +      * ftfont.c (struct fc_charset_table, ftfont_spec_pattern)
 +      (ftfont_list, ftfont_match):
 +      * frame.c (frame_parm_table):
 +      * font.h (font_intern_prop, font_parse_xlfd, font_parse_fcname)
 +      (font_unparse_fcname, font_unparse_fcname, font_open_by_name)
 +      (font_add_log, font_deferred_log):
 +      * font.c (font_intern_prop, font_parse_xlfd, font_parse_fcname)
 +      (font_unparse_fcname, font_unparse_fcname, font_open_by_name)
 +      (font_add_log, font_deferred_log):
 +      * emacs.c (argmatch):
 +      * dispextern.h (struct it):
 +      * coding.c (ENCODE_DESIGNATION):
 +      * charset.c (define_charset_internal): Use const.
 +
 +      * s/freebsd.h (DECLARE_GETPWUID_WITH_UID_T): Remove, unused.
 +
 +      * xrdb.c: Remove include guard.
 +      Remove DECLARE_GETPWUID_WITH_UID_T conditional it had no effect.
 +      Remove #if 0 code.  Replace malloc->xmalloc, free->xfree,
 +      realloc->xrealloc instead of using #defines.
 +
 +2010-08-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * cmds.c (Fforward_line, Fbeginning_of_line, Fend_of_line):
 +      * editfns.c (Fline_beginning_position, Fline_end_position):
 +      State in the doc strings that start and end of line are in the
 +      logical order.
 +
 +      * xdisp.c (display_line): Move the handling of overlay arrow after
 +      the call to find_row_edges.  (Bug#6699)
 +
 +2010-08-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * keyboard.c (command_loop_1):
 +      * insdel.c (prepare_to_modify_buffer): Don't call validate_region.
 +
 +2010-08-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * insdel.c (prepare_to_modify_buffer): Save active region text to
 +      Vsaved_region_selection.
 +
 +      * xselect.c (QPRIMARY): Move to keyboard.c.
 +
 +      * keyboard.c (Vselect_active_regions): Move from simple.el.
 +      (Vsaved_region_selection, Qx_set_selection, QPRIMARY, Qlazy): New vars.
 +      (command_loop_1): Set window selection prior to deactivating the mark.
 +
 +2010-08-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * alloc.c (lisp_malloc):
 +      * buffer.c (set_buffer_internal, set_buffer_internal_1):
 +      * charset.h (emacs_mule_charset):
 +      * dispextern.h (inhibit_free_realized_faces, redraw_frame)
 +      (redraw_garbaged_frames, scroll_cost, update_frame, scrolling)
 +      (bitch_at_user):
 +      * lisp.h (Fcheck_coding_system, Fget_text_property)
 +      (Qfunction, Qcompletion_ignore_case, QCwidth, QCsize):
 +      Remove duplicate declarations.
 +
 +2010-08-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * process.c: Simplify include logic.
 +
 +      * keyboard.h (quit_char): Add declaration.
 +      * process.h (QCport, QCspeed, QCprocess, QCbytesize, QCstopbits)
 +      (QCparity, Qodd, Qeven, QCflowcontrol, Qhw, Qsw, QCsummary):
 +      Add declarations.
 +      * sysdep.c:
 +      * w32.c: Remove the above declarations.
 +
 +      Remove extern declarations in .c files, .h files have them.
 +      * xterm.c:
 +      * xdisp.c:
 +      * msdos.c:
 +      * image.c:
 +      * gtkutil.c:
 +      * fileio.c:
 +      * eval.c: Remove declarations.
 +
 +      * frame.c (frame_params): Make const.
 +
 +      * lisp.h (fatal_error_signal, emacs_root_dir): Add declaration.
 +
 +      * emacs.c (emacs_copyright, emacs_version): Make static.
 +      (Vinitial_window_system, Vauto_save_list_file_name)
 +      (Vinhibit_redisplay): Remove declarations.
 +      (main): Remove HAVE_SHM code, unused.  Remove _I386 conditional
 +      for AIX.
 +
 +      Use const for some arrays and functions.
 +      * xterm.h (xg_set_icon_from_xpm_data):
 +      * xfns.c (xg_set_icon_from_xpm_data):
 +      * term.c (fkeys):
 +      * keyboard.c (lispy_accent_keys, lispy_function_keys)
 +      (lispy_multimedia_keys, lispy_kana_keys, iso_lispy_function_keys)
 +      (lispy_drag_n_drop_names, scroll_bar_parts, modify_event_symbol)
 +      (frame.c frame_parms):
 +      * emacs-icon.h (gnu_xpm_bits):
 +      * callint.c (callint_argfuns): Use const.
 +
 +2010-08-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * sysdep.c: Move include term.h last of includes (Bug#6812).
 +
 +2010-08-06  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs.
 +
 +      * msdos.c (IT_display_cursor): Log cursor position on termscript.
 +
 +      * .gdbinit (pgx): Display the avoid_cursor_p flag.
 +
 +2010-08-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/xdisp.$(O)): Update dependencies.
 +
 +2010-08-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.h (x_get_focus_frame): Declare.
 +
 +      * keyboard.h (poll_for_input_1): Unconditionally declare.
 +
 +      * nsterm.h (x_set_menu_bar_lines): Declare.
 +
 +      * window.c: Don't include menu.h, it depends on lots of other .h-files.
 +
 +      * xfaces.c (x_create_gc, x_free_gc): Convert to ANSI C prototypes.
 +
 +      * window.c: Include menu.h.
 +
 +      * unexmacosx.c (print_region_list, print_regions)
 +      (build_region_list, find_emacs_zone_regions)
 +      (unexec_regions_merge, read_load_commands, dump_it)
 +      (unexec_init_emacs_zone): Convert to ANSI C prototypes.
 +
 +      * term.c: Check HAVE_SYS_IOCTL_H.
 +
 +      * sysdep.c: Check HAVE_TERM_H.
 +
 +      * process.c: Check HAVE_UTIL_H.  Include nsterm.h if HAVE_NS.
 +
 +      * nsterm.m (ns_init_paths, ns_alloc_autorelease_pool)
 +      (ns_ring_bell, ns_defined_color, hide_hourglass)
 +      (x_display_pixel_height, x_display_pixel_width, syms_of_nsterm):
 +      Convert to ANSI C prototypes.
 +      (x_set_window_size, ns_draw_fringe_bitmap, judge): Move declarations
 +      before code.
 +
 +      * nsterm.h : Include sysselect.h.
 +      (x_sync, x_get_focus_frame, x_set_mouse_position)
 +      (x_set_mouse_pixel_position, x_make_frame_visible)
 +      (x_make_frame_invisible, x_iconify_frame, x_char_width, x_char_height)
 +      (x_pixel_width, x_pixel_height, x_set_frame_alpha, x_set_tool_bar_lines)
 +      (x_activate_menubar, free_frame_menubar, ns_init_paths, ns_select)
 +      (syms_of_nsterm, syms_of_nsfns, syms_of_nsmenu, syms_of_nsselect):
 +      Declare.
 +
 +      * nsmenu.m (popup_activated, name_is_separator)
 +      (syms_of_nsmenu): Convert to ANSI C prototypes.
 +      (runMenuAt): Prototypes and move declarations before code.
 +
 +      * nsimage.m (ns_load_image): Move NSTRACE after declarations.
 +
 +      * nsfont.m (ns_fallback_entity, syms_of_nsfont): Convert to ANSI C
 +      prototypes.
 +
 +      * nsfns.m (have_menus_p, ns_display_info_for_name)
 +      (x_set_cursor_type, ns_appkit_version_str)
 +      (ns_appkit_version_int, ns_do_applescript)
 +      (x_set_scroll_bar_default_width, x_sync, compute_tip_xy)
 +      (syms_of_nsfns): Convert to ANSI C prototypes.
 +
 +      * menu.h (x_set_menu_bar_line): Declare.
 +      (free_menubar_widget_value_tree et.al): Add HAVE_NS for these functions.
 +
 +      * lisp.h (fmod_float): Declare.
 +
 +      * image.c (xpm_scan, xpm_make_color_table_v)
 +      (xpm_put_color_table_v, xpm_get_color_table_v)
 +      (xpm_make_color_table_h, xpm_put_color_table_h)
 +      (xpm_get_color_table_h, xpm_str_to_color_key, xpm_load_image)
 +      (xpm_load): Convert to ANSI C prototypes.
 +
 +      * emacs.c: Include nsterm.h if HAVE_NS.
 +
 +      * bidi.c (bidi_dump_cached_states): Fix fprintf warning.
 +
 +2010-08-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef
 +      subprocesses, only MSDOS does not define HAVE_SOCKETS.
 +      (socket_options): Use const char* for name.
 +
 +2010-08-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Fix changes in 2010-08-05T23:15:24Z!dann@ics.uci.edu..2010-08-05T23:34:12Z!dann@ics.uci.edu for Windows build.
 +
 +      * xmenu.c [USE_X_TOOLKIT || USE_GTK]:
 +      Don't declare xmalloc_widget_value and digest_single_submenu.
 +
 +      * w32font.c (Qlatin): Remove declaration.
 +
 +      * menu.h (xmalloc_widget_value, digest_single_submenu): Declare.
 +
 +      * dired.c (compile_pattern): Restore declaration.
 +
 +2010-08-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove extern declarations in .c files, .h files have them.
 +      * data.c:
 +      * dired.c:
 +      * editfns.c:
 +      * filelock.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * fringe.c:
 +      * ftfont.c:
 +      * gtkutil.c:
 +      * indent.c:
 +      * keyboard.c:
 +      * keymap.c:
 +      * lread.c:
 +      * menu.c:
 +      * print.c:
 +      * search.c:
 +      * sound.c:
 +      * window.c:
 +      * xdisp.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xfont.c:
 +      * xftfont.c:
 +      * xmenu.c:
 +      * xterm.c: Remove declarations.
 +
 +      Cleanup syssignal.h.
 +      * syssignal.h (sighold, sigrelse, RETSIGTYPE): Remove, unused.
 +      (main_thread): Move down to remove #ifdef.
 +      (SIGMASKTYPE, SIGEMPTYMASK, SIGFULLMASK, sigmask, sigunblock):
 +      Remove conditional definition following unconditional ones.
 +
 +      * lisp.h: Remove HAVE_SHM code, unused.
 +      (QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest)
 +      (QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle)
 +      (Qborder, Qbottom, Qbox, Qcircular_list, Qcomma, Qcomma_at)
 +      (Qcomma_dot, Qcursor, Qdefault, Qdown, Qend_scroll, Qeq, Qeql)
 +      (Qequal, Qfile_exists_p, Qfont_param, Qfringe, Qfunction)
 +      (Qfunction_documentation, Qhandle, Qhbar, Qheader_line, Qhollow)
 +      (Qidentity, Qleft_margin, Qmenu, Qmenu_bar_update_hook)
 +      (Qmode_line_inactive, Qmouse, Qoverriding_local_map)
 +      (Qoverriding_terminal_local_map, Qratio, Qregion, Qright_margin)
 +      (Qscroll_bar, Qtool_bar, Qtop, Qup, Qvertical_border, Qwhen)
 +      (Qwindow_scroll_functions, Vafter_load_alist)
 +      (Vauto_save_list_file_name, Vface_alternative_font_family_alist)
 +      (Vface_alternative_font_registry_alist, Vface_font_rescale_alist)
 +      (Vface_ignored_fonts, Vinhibit_redisplay, Vminibuffer_list)
 +      (Vprint_length, Vprint_level, Vscalable_fonts_allowed)
 +      (Vshell_file_name, Vsystem_name, Vwindow_scroll_functions)
 +      (Vwindow_system_version, Vx_no_window_manager, initial_argc)
 +      (initial_argv, last_nonmenu_event, load_in_progress)
 +      (noninteractive_need_newline, scroll_margin): Add declarations.
 +
 +      * keyboard.h (xmalloc_widget_value, digest_single_submenu):
 +      Remove declarations, menu.h has them.
 +      (QCbutton, QCtoggle, QCradio, QClabel, extra_keyboard_modifiers)
 +      (Vinput_method_function, Qinput_method_function)
 +      (Qevent_symbol_element_mask, last_event_timestamp):
 +      * dispextern.h (Voverflow_newline_into_fringe):
 +      * font.h (QCantialias, Qp, syms_of_ftfont, syms_of_xfns)
 +      (syms_of_ftxfont, syms_of_xftfont, syms_of_bdffont)
 +      (syms_of_w32font, syms_of_nsfont):
 +      * fontset.h (find_font_encoding, Qlatin):
 +      * frame.h (Qtooltip, Qrun_hook_with_args, Vmenu_bar_mode)
 +      (Vtool_bar_mode, set_frame_menubar):
 +      * ftfont.h (ftfont_font_format, ftfont_get_fc_charset):
 +      * xterm.h (Qx_gtk_map_stock):
 +      * keymap.h (meta_prefix_char): Add declarations.
 +
 +      * term.c: Remove dead code.
 +
 +      Fix emacs -Q -f server-start & emacsclient -t on GNU/Linux.
 +      * term.c (dissociate_if_controlling_tty): Use USG5 instead of
 +      USG.  This is equivalent to defined (USG) && !defined (BSD_PGRPS),
 +      which is what was there before BSD_PGRPS was removed.
 +
 +2010-08-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * deps.mk (unexcoff.o): Rename unexec.[co] => unexcoff.[co].
 +
 +      * unexcoff.c: Renamed from unexec.c.
 +
 +2010-08-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * sysdep.c (child_setup_tty): Comment-out left-over non-ICANON code.
 +
 +2010-08-03  Johan Bockgård  <bojohan@gnu.org>
 +
 +      * data.c (Flocal_variable_p): Handle variable aliases correctly.
 +      (Bug#6744)
 +
 +2010-08-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (x_create_toolkit_scroll_bar): Only set XtNbeNiceToColormap
 +      to TRUE if depth of screen is < 16.
 +
 +      * gtkutil.c (hierarchy_ch_cb, qttip_cb): Do not define unless
 +      USE_GTK_TOOLTIP.
 +      (xg_prepare_tooltip): Return 0 unless USE_GTK_TOOLTIP.
 +      (xg_show_tooltip, xg_hide_tooltip): Do nothing unless USE_GTK_TOOLTIP.
 +      (xg_create_frame_widgets): Surround tooltip-related code with ifdef
 +      USE_GTK_TOOLTIP.
 +      (xg_free_frame_widgets): Don't delete ttip_* unless USE_GTK_TOOLTIP.
 +
 +      * xterm.h (USE_GTK_TOOLTIP): New define.
 +      (struct x_output): Put ttip_* inside ifdef USE_GTK_TOOLTIP.
 +
 +      * sysdep.c (child_setup_tty): Enable ICANON in lflags and set VEOF
 +      to Control-D (Bug#6771).
 +
 +2010-08-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * editfns.c (Fregion_beginning, Fregion_end): Doc fixes (bug#6493).
 +      Wording by Drew Adams <drew.adams@oracle.com>.
 +
 +2010-08-01  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.h (struct x_output): Add ttip_widget, ttip_window and
 +      ttip_lbl.
 +
 +      * xterm.c (x_clear_frame): Check FRAME_GTK_WIDGET (f) before
 +      calling gtk_widget_queue_draw.
 +      (x_free_frame_resources): Call xg_free_frame_widgets.
 +
 +      * xfns.c (x_gtk_use_system_tooltips): New variable.
 +      (Fx_show_tip): If USE_GTK and x_gtk_use_system_tooltips, call
 +      new gtkutil tooltip functions to show the tooltip.
 +      (Fx_hide_tip): Call xg_hide_tooltip.
 +      (syms_of_xfns): Defvar x-gtk-use-system-tooltips.
 +
 +      * gtkutil.h (xg_free_frame_widgets, xg_prepare_tooltip)
 +      (xg_show_tooltip, xg_hide_tooltip): Declare.
 +
 +      * gtkutil.c (hierarchy_ch_cb, qttip_cb, xg_prepare_tooltip)
 +      (xg_show_tooltip, xg_hide_tooltip, xg_free_frame_widgets):
 +      New functions.
 +      (xg_create_frame_widgets): Set ttip_* to 0.  Set a dummy tooltip
 +      text so qttip_cb is called.  Connect query-tooltip to qttip_cb.
 +      Remove code that is commented out.
 +
 +2010-08-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keymap.c (Fdefine_key, Flookup_key): Say what event is invalid.
 +
 +2010-07-31  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xselect.c (x_own_selection): Use list4.
 +
 +2010-07-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * buffer.c (Qwindow): Do not define, already defined in data.c.
 +      (syms_of_buffer): Do not intern and staticpro Qwindow.  (Bug#6760)
 +
 +2010-07-29  Chad Brown  <yandros@mit.edu>
 +
 +      Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf.
 +      * dired.c, sysdep.c: Test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR.
 +      * config.in: Undef HAVE_DIRENT_H.
 +      * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h,
 +      * s/msdos.h, s/usg5-4.h: Don't define SYSV_SYSTEM_DIR.
 +
 +2010-07-29  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Rename s/usg5-4.h -> s/usg5-4-common.h.
 +      * s/usg5-4.h: Rename file to ...
 +      * s/usg5-4-common.h: ... this for consistency with what we do for BSD.
 +      * s/unixware.h:
 +      * s/sol2-6.h:
 +      * s/irix6-5.h: Update includes accordingly.
 +
 +2010-07-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (x_set_tool_bar_position): Remove debug fprintf.
 +
 +      * xterm.h (struct x_output): Add toolbar_top_height,
 +      toolbar_bottom_height, toolbar_left_width, toolbar_right_width.
 +      Remove toolbar_height.
 +      If USE_GTK: Add hbox_widget and toolbar_in_hbox.
 +      (FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT)
 +      (FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros.
 +      (FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT.
 +
 +      * xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
 +
 +      * xfns.c (x_set_tool_bar_position): New function.
 +      (xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT.
 +      (x_frame_parm_handlers): Add x_set_tool_bar_position.
 +      (syms_of_xfns): If USE_GTK, provide move-toolbar.
 +
 +      * window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT
 +      and FRAME_TOOLBAR_LEFT_WIDTH.
 +
 +      * gtkutil.h (xg_change_toolbar_position): Declare.
 +
 +      * gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro.
 +      (xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
 +      (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH.
 +      (xg_create_frame_widgets): Create a hobox for placing widgets
 +      vertically.  Use gtk_box_pack_start.
 +      (xg_height_or_width_changed): Rename from xg_height_changed.
 +      (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width.
 +      (xg_update_frame_menubar, free_frame_menubar): Change to
 +      xg_height_or_width_changed.
 +      (xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar
 +      size correctly.  Remove hardcoded 4, instead use handlebox size -
 +      toolbar size.
 +      (xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar
 +      size correctly.  Use handlebox size + toolbar size as additional size.
 +      (xg_pack_tool_bar): POS is a new parameter.
 +      Set orientation of tool bar based on pos.
 +      Only make handlebox_widget if NULL.
 +      Check if tool bar goes to vbox or hbox depending on pos.
 +      (xg_update_tool_bar_sizes): New function.
 +      (update_frame_tool_bar): Remove old_req, new_req.  Do not get tool bar
 +      height, call xg_update_tool_bar_sizes instead.
 +      (free_frame_tool_bar): Remove from hbox or vbox depending on
 +      toolbar_in_hbox,  Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero.
 +      (xg_change_toolbar_position): New function.
 +
 +      * frame.h (struct frame): Add tool_bar_position.
 +      (Qbottom): Declare.
 +
 +      * frame.c (Qtool_bar_position): New variable.
 +      (make_frame): Set tool_bar_position to Qtop.
 +      (frame_parms): Add tool-bar-position.
 +      (x_report_frame_params): Store tool_bar_position.
 +      (x_set_fringe_width): Reset wm size hint after fringe changes.
 +
 +2010-07-29  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Make lisp_time_argument declaration work on all systems.
 +      * lisp.h (lisp_time_argument): Move declaration ...
 +      * systime.h (lisp_time_argument): ... here
 +      * editfns.c (lisp_time_argument): Remove declaration.  (Bug#6751)
 +
 +2010-07-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * vm-limit.c (POINTER): Add typedef for it.
 +      (start_of_data): Change return type from POINTER to char *.
 +
 +      * frame.h (Qtty_color_mode): Move declaration out of ifdef
 +      HAVE_WINDOW_SYSTEM.
 +
 +2010-07-29  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vm-limit.c: Do not include sys/resource.h, mem-limits.h does it.
 +      Remove reference to __osf__, unused.
 +
 +      * mem-limits.h: Remove duplicated includes.
 +      (NULL): Remove definition, unused.
 +      (POINTER): Remove definition.
 +      (start_of_data): Use char* in prototype, as the function
 +      definition does.
 +
 +      Remove extern declarations from .c files, and them to .h files.
 +      * keyboard.h (Qhelp_echo, waiting_for_input)
 +      (input_available_clear_time, ignore_mouse_drag_p)
 +      (Vdouble_click_time, real_this_command, Vthis_original_command):
 +      * keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
 +      (Voverriding_local_map_menu_flag):
 +      * lisp.h (Qinteractive_form, use_file_dialog)
 +      (Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
 +      (Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
 +      (QCindex, QCmatrix, QCcolor_adjustment, QCmask)
 +      (Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
 +      (Qfunction, debug_on_next_call, Qfield)
 +      (Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
 +      (Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
 +      (Qfile_directory_p, Qinsert_file_contents)
 +      (Qcompletion_ignore_case, Qcompletion_ignore_case)
 +      (Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
 +      (history_delete_duplicates, minibuffer_auto_raise, Qonly)
 +      (Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
 +      (Qminibuffer_prompt)
 +      (Vtemporary_file_directory,char_ins_del_vector, Qface):
 +      * xterm.h (gray_bitmap_width, gray_bitmap_height)
 +      (gray_bitmap_bits, xic_create_fontsetname):
 +      * coding.h (Vtranslation_table_for_input): Add extern declarations.
 +
 +      * xsmfns.c (Vuser_login_name):
 +      * xrdb.c (Vdouble_click_time):
 +      * xfaces.c (xic_create_fontsetname):
 +      * w32select.c (waiting_for_input):
 +      * print.c (minibuffer_auto_raise):
 +      * msdos.c (Qhelp_echo):
 +      * macros.c (real_this_command):
 +      * keymap.c (Voverriding_local_map):
 +      * xterm.c (poll_for_input_1, gray_bitmap_width)
 +      (gray_bitmap_height, gray_bitmap_bits;
 +      * xmenu.c ( Voverriding_local_map)
 +      (Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
 +      (use_file_dialog, Xt_app_con):
 +      * xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
 +      (Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
 +      (Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
 +      (Qtool_bar_lines, ignore_mouse_drag_p):
 +      * minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
 +      (Qrear_nonsticky, nconc2):
 +      * keyboard.c (current_global_map, minibuf_level, Qmenu_item)
 +      (Vhistory_length, Vtranslation_table_for_input, Qcomposition)
 +      (Qdisplay, Qafter_string, Qbefore_string, Qundefined):
 +      * fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
 +      (minibuf_level, minibuffer_auto_raise, lisp_time_argument):
 +      * eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
 +      (gc_in_progress):
 +      * doc.c (Voverriding_local_map, Qremap):
 +      * dired.c (completion_ignore_case, Qcompletion_ignore_case)
 +      (Vcompletion_regexp_list):
 +      * coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
 +      (Qcompletion_ignore_case):
 +      * callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
 +      (Vhistory_length, Vthis_original_command, real_this_command)
 +      (Qface, Qminibuffer_prompt, history_delete_duplicates):
 +      * image.c (Qrisky_local_variable):
 +      * fontset.c (QCname):
 +      * fns.c (minibuffer_auto_raise, QCname):
 +      * dispnew.c (char_ins_del_cost):
 +      * composite.c (font_fill_lglyph_metrics):
 +      * cmds.c (Qface, Vtranslation_table_for_input):
 +      * charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
 +      * ccl.c (charset_unicode):
 +      * callproc.c (Vtemporary_file_directory):
 +      * buffer.c (emacs_strerror): Remove extern declarations.
 +
 +      * data.c (Qwindow): Make non-static, used from other files too.
 +      * frame.c (validate_x_resource_name): Remove shadow definition for i.
 +
 +      * unexec.c (make_hdr): Remove references to NO_REMAP, COFF,
 +      SEGMENT_MASK, SECTION_ALIGNMENT, ADJUST_EXEC_HEADER.
 +      * s/usg5-4.h (COFF):
 +      * s/template.h:
 +      * s/msdos.h (COFF, NO_REMAP):
 +      * s/ms-w32.h (NO_REMAP):
 +      * s/hpux10-20.h (NO_REMAP):
 +      * m/sparc.h (SEGMENT_MASK):
 +      * m/m68k.h (NO_REMAP):
 +      * m/intel386.h (SEGMENT_MASK):
 +      * m/arm.h (NO_REMAP):
 +      * m/alpha.h (COFF):
 +      * m/template.h: Remove references to unused defines.
 +
 +2010-07-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (Ftool_bar_get_system_style): Also check for
 +      Qtext_image_horiz.
 +
 +      * xdisp.c (Qtext_image_horiz): Define.
 +      (syms_of_xdisp): Initialize Qtext_image_horiz.  Add text-image-horiz
 +      to documentation of tool-bar-style.
 +
 +      * lisp.h (Qtext_image_horiz): Declare.
 +
 +      * gtkutil.c (xg_make_tool_item, xg_show_toolbar_item): Handle tool bar
 +      style text_image_horiz.
 +
 +2010-07-27  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * emacs.c (Fkill_emacs): Remove return statement.
 +
 +      * term.c (Qspace, QCalign_to, QCwidth): Remove declarations.
 +      (encode_terminal_code, produce_composite_glyph): Remove unused variables.
 +      (set_tty_color_mode, term_mouse_highlight, term_get_fkeys):
 +      Remove local extern declarations.
 +
 +      * xmenu.c: Do not included lwlib.h, not needed.
 +
 +      * m/iris4d.h (XUINT, XSET): Remove, not needed.
 +
 +      * process.c: Move definitions earlier to minimize #ifdefs.
 +
 +      * xterm.h (x_get_customization_string, x_load_resources)
 +      (x_get_resource, x_text_icon, x_text_icon, x_check_errors)
 +      (x_check_errors, x_property_data_to_lisp, defined_color)
 +      (xic_set_xfontset, x_defined_color): Use const.
 +
 +      * xterm.c (xlwmenu_window_p, xlwmenu_redisplay): Remove declarations.
 +      (x_text_icon, x_check_errors, x_connection_closed): Use const.
 +
 +      * xselect.c (selection_data_to_lisp_data)
 +      (x_property_data_to_lisp):
 +      * xrdb.c (x_get_string_resource, file_p)
 +      (x_get_customization_string, magic_file_p, search_magic_path)
 +      (get_system_app, get_user_app, x_load_resources, x_get_resource)
 +      (x_get_string_resource): Use const.
 +
 +      * xfns.c: Include xlwmenu.h when USE_LUCID.
 +      (x_defined_color, xic_set_xfontset): Use const.
 +      (Fx_hide_tip): Remove local extern declaration.
 +
 +      * xfaces.c (Qmouse_face): Remove declaration.
 +      (face_color_gray_p, tty_defined_color, defined_color)
 +      (face_color_gray_p, face_color_supported_p): Add const.
 +
 +      * xdisp.c (do_mouse_tracking): Remove declaration.
 +      (add_to_log): Use const.
 +
 +      * minibuf.c (Qmouse_face): Remove declaration.
 +
 +      * msdos.c (IT_note_mouse_highlight): Remove local extern declaration.
 +
 +      * keyboard.h (do_mouse_tracking): Add declaration.
 +
 +      * image.c (QCwidth, QCheight, QCforeground, QCbackground, QCfile)
 +      (QCdata, QCtype, Qcenter): Remove declarations.
 +
 +      * frame.c (x_get_resource_string, x_get_string_resource)
 +      (x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg)
 +      (x_default_parameter): Use const.
 +
 +      * font.c (Qnormal, QCtype, QCfamily, QCweight, QCslant, QCwidth)
 +      (QCheight, QCsize, QCname): Remove declarations.
 +
 +      * emacs.c (main): Remove local extern declaration.
 +
 +      * editfns.c (region_limit, syms_of_editfns): Remove local extern
 +      declarations.
 +
 +      * dispnew.c: Remove duplicate #include <unistd.h>.
 +      (update_window, update_frame_1, init_display): Remove local extern
 +      declarations.
 +
 +      * dispextern.h (add_to_log): Remove declaration.
 +      (x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg)
 +      (x_frame_get_and_record_arg, x_default_parameter): Add const.
 +
 +      * dired.c (scmp): Add const.
 +      (directory_files_internal): Remove local extern declaration.
 +
 +      * data.c (Finteractive_form): Use const.
 +
 +      * composite.c (syms_of_composite): Remove local extern declarations.
 +
 +      * charset.c (add_to_log): Remove declaration.
 +
 +      * character.c (strwidth, parse_str_to_multibyte): Add const.
 +
 +      * character.h (strwidth, parse_str_to_multibyte): Likewise.
 +
 +      * buffer.c (Fset_buffer_multibyte): Remove local extern declaration.
 +
 +      * lisp.h (Fkill_emacs): Mark as NO_RETURN.
 +      (Lisp_Subr): Make doc and intspec constant.
 +      (QCsize, Qspace, Qcenter, QCalign_to, QCdata, QCfile, QCtype)
 +      (Qlocal, Qapply, Qnormal, QCfamily, QCweight, QCslant, QCwidth)
 +      (QCheight, QCsize, QCname, QCwidth, QCforeground)
 +      (QCbackground, add_to_log, stack_base, Vmark_even_if_inactive)
 +      (display_arg): Add declarations.
 +
 +2010-07-27  Christoph Scholtes  <cschol2112@gmail.com>
 +
 +      * minibuf.c (Fread_buffer): Doc fix (bug#6528).
 +
 +      * window.c (Fwindow_height): Doc fix (bug#6518).
 +
 +2010-07-27  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * buffer.c (syms_of_buffer) <fringe-indicator-alist>: Doc fix.
 +
 +2010-07-26  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * keyboard.c (Ftop_level, Fexit_recursive_edit)
 +      (Fabort_recursive_edit): Remove return statements in NO_RETURN
 +      functions.
 +
 +      * frame.h (Qtty_color_mode): Add declaration.
 +
 +      * lisp.h (Ftop_level, Fexit_recursive_edit)
 +      (Fabort_recursive_edit): Mark as NO_RETURN.
 +
 +2010-07-26  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (Ffont_shape_gstring): Terminate GSTRING by nil if the
 +      number of glyphs gets smaller than the original length.  (Bug#6621)
 +
 +2010-07-26  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * lread.c (unreadpure, mapatoms_1): Make static.
 +
 +2010-07-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * terminfo.c (tparam): Fix prototype of tparm.
 +
 +2010-07-25  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs.c (main) [PROFILING]: Use __executable_start if defined to
 +      find start of text segment.
 +      * dispnew.c (safe_bcopy): Don't define if HAVE___EXECUTABLE_START
 +      is defined.
 +
 +      * callproc.c (set_initial_environment): Avoid unbalanced braces.
 +
 +2010-07-25  Ken Brown  <kbrown@cornell.edu>
 +
 +      * vm-limit.c (check_memory_limits): Fix previous change;
 +      accidentally reverted an earlier change.
 +
 +2010-07-25  Ken Brown  <kbrown@cornell.edu>
 +
 +      * mem-limits.h (BSD4_2) [cygwin]: Don't define here; instead...
 +      * vm-limit.c: ...add 'defined (CYGWIN)' here (Bug#6715).
 +
 +2010-07-25  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * callproc.c (relocate_fd): Set inside #ifndef WINDOWSNT.
 +      * dired.c (opendir, readdir): Fix prototypes.
 +      * editfns.c (w32_get_internal_run_time): Fix prototypes.
 +      * keyboard.c (input_available_signal): Declare inside #ifdef SIGIO.
 +      * ndir.h (opendir, readdir, seekdir, closedir): Fix prototypes.
 +      (telldir): Remove declaration.
 +      * ralloc.c (real_morecore, __morecore): Fix prototypes.
 +      * sound.c (alsa_sound_perror): Declare inside #ifdef HAVE_ALSA.
 +      * syssignal.h (strsignal): Fix prototype.
 +      * term.c (tparam): Fix prototype.
 +      (term_get_fkeys_address, term_get_fkeys_kboard, term_get_fkeys_1)
 +      (term_get_fkeys): Set inside "#ifndef DOS_NT".
 +      * vm-limit.c (check_memory_limits): Fix prototypes of real_morecore
 +      and __morecore.
 +      * w32gui.h (XParseGeometry): Fix prototype.
 +      * w32heap.h (get_data_start, get_data_end, init_heap): Fix prototypes.
 +      * w32term.c (my_set_focus): Declare inside #if 0.
 +      * w32term.h (x_window_to_frame, x_display_info_for_name, w32_term_init)
 +      (w32_fill_rect, w32_clear_window, init_crit, delete_crit, signal_quit)
 +      (drain_message_queue, get_next_msg, post_msg, parse_button)
 +      (ClipboardSequence_Proc): Fix prototypes.
 +      (wait_for_sync): Remove declaration.
 +
 +2010-07-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32fns.c (w32_to_x_color): Remove, unused.
 +
 +2010-07-24  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lisp.h: Remove leftover P_.
 +
 +2010-07-24  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * ecrt0.c, unexalpha.c: Remove files, unused.
 +
 +2010-07-24  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * cmds.c (internal_self_insert): Make static.
 +      * lisp.h (internal_self_insert): Remove declaration.
 +
 +2010-07-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * alloc.c (free_float):
 +      * font.c [ENABLE_CHECKING] (font_match_xlfd, font_check_xlfd_parse):
 +      * frame.c (delete_frame_handler):
 +      * ralloc.c (reorder_bloc):
 +      * w32menu.c (menubar_id_to_frame, add_left_right_boundary):
 +      Remove unused static functions.
 +
 +      * menu.c (cleanup_popup_menu): Set inside "#ifdef HAVE_NS";
 +      it is called only from NS code.
 +
 +      * w32term.c (my_set_focus): #ifdef away; it is called only from
 +      "#ifdef 0" code.
 +
 +      * w32fns.c (x_edge_detection):
 +      * xfaces.c (may_use_scalable_font_p):
 +      Remove obsolete static declarations.
 +
 +2010-07-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * alloc.c (emacs_blocked_free, emacs_blocked_malloc)
 +      (emacs_blocked_realloc, uninterrupt_malloc):
 +      * fringe.c (w32_reset_fringes):
 +      * image.c (convert_mono_to_color_image, lookup_rgb_color)
 +      (init_color_table, XPutPixel, jpeg_resync_to_restart_wrapper):
 +      * sound.c (be2hs, do_play_sound):
 +      * vm-limit.c (get_lim_data, ret_lim_data):
 +      * w32term.c (x_free_frame_resources):
 +      * xfaces.c (x_create_gc, x_free_gc):
 +      Convert definitions to standard C.
 +
 +2010-07-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Feval, Ffuncall): Use the new names.
 +
 +      * lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED.
 +      (DEFUN): Add braces around the union initialisation and use ## to
 +      specify the right union alternative and avoid a cast.
 +
 +2010-07-18  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/keyboard.$(O)): Update dependencies.
 +
 +2010-07-17  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (make_initial_frame): Use set_menu_bar_lines (Bug#6660).
 +
 +2010-07-17  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_event_is_for_menubar): Also check that event window
 +      is related to the menu bar (Bug#6499).
 +      (xg_frame_resized): GTK_IS_MAPPED => gtk_widget_get_mapped, for Gtk 3.0.
 +
 +2010-07-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*.
 +
 +      * xterm.c (handle_one_xevent): Pass event to x_menubar_window_to_frame.
 +
 +      * xmenu.c (x_activate_menubar): Revert previous fix for Bug#6499,
 +      i.e. don't put back ButtonRelease (Bug#6608).
 +
 +      * xfns.c (x_menubar_window_to_frame): Take XEvent as second parameter
 +      instead of Window.  Call xg_event_is_for_menubar when
 +      USE_GTK (Bug#6499).
 +
 +      * gtkutil.h (xg_event_is_for_menubar): Declare.
 +
 +      * gtkutil.c (xg_event_is_for_menubar): New function (Bug#6499).
 +
 +2010-07-16  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c (x_set_foreground_color): Fix setting the cursor color
 +      when it's the same as the old foreground.  (Bug#6609)
 +
 +2010-07-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (free_frame_menubar): Only call x_set_window_size if
 +      widget is non-null (Bug#6645).
 +
 +2010-07-15  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font):
 +      Convert old-style definition.
 +
 +      * xmenu.c (create_and_show_popup_menu, xmenu_show): Fix type of
 +      timestamp argument.
 +
 +2010-07-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.c (update_window_fringes): Restore mistakenly reverted
 +      code from 2010-04-17T12:33:05Z!eliz@gnu.org merged in 2010-04-20T13:31:28Z!eliz@gnu.org.
 +
 +2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (xm_scroll_callback, x_process_timeouts): K&R => prototype.
 +      (SET_SAVED_KEY_EVENT): Remove (not used).
 +      (SET_SAVED_MENU_EVENT): Rename to SET_SAVED_BUTTON_EVENT and
 +      remove size parameter.
 +      (handle_one_xevent): Check popup_activated () for menu for Xt also.
 +      Remove #ifdef USE_GTK around finish = X_EVENT_DROP.
 +      Remove #ifdef USE_MOTIF code that did SET_SAVED_BUTTON_EVENT for
 +      ButtonRelease.
 +      (x_set_window_size_1): scroll_bar_actual_width is always
 +      SCROLL_BAR_COLS * COLUMN_WIDTH for the purpose of frame sizing.
 +
 +      * xdisp.c (pending_menu_activation): Remove extern declaration.
 +      (prepare_menu_bars): Remove setting of pending_menu_activation.
 +
 +      * xmenu.c (pending_menu_activation): Remove.
 +      (x_activate_menubar): Set popup_activated_flag for Xt also.
 +      Remove setting of pending_menu_activation.
 +      (set_frame_menubar): Remove check of pending_menu_activation.
 +      Declare menubar_size before code.  Correct spelling in comment.
 +
 +2010-07-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (font_open_entity): Cancel previous change.
 +      (Ffont_get): Don't check FONT_ENTITY_INDEX of a font-object.
 +
 +2010-07-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Remove subprocesses #ifdefs.
 +      * process.c <inhibit_sentinels>: Move to the common part.
 +      (Fwaiting_for_user_input_p): Move to the common part; return nil
 +      if async subprocesses aren't supported.
 +      * sysdep.c (wait_for_termination) [!MSDOS]: Don't compile on
 +      MS-DOS.  Remove "#ifdef subprocesses".
 +      (sys_subshell, sys_select): Remove "#ifdef subprocesses".
 +      (gettimeofday): Remove "#ifdef subprocesses".
 +      (wait_without_blocking): Remove function.
 +      (flush_pending_output, child_setup_tty): Don't compile on MS-DOS.
 +      Remove "#ifdef subprocesses".
 +      (child_setup_tty): Use WINDOWSNT instead of DOS_NT, since not
 +      compiled on MS-DOS.
 +      * callproc.c (Fcall_process) [!MSDOS]: Don't call
 +      wait_for_termination on MS-DOS.
 +      * emacs.c (shut_down_emacs): Remove "#ifndef subprocesses" from
 +      initialization of inhibit_sentinels.
 +      * keyboard.c (record_asynch_buffer_change): Remove "#ifdef
 +      subprocesses" conditional.
 +      * callproc.c (Fcall_process) [!subprocesses]: Don't call
 +      wait_for_termination, since `buffer' cannot be an integer when
 +      async subprocesses are not supported
 +      * xdisp.c (decode_mode_spec): Use `MSDOS' instead of `subprocesses'
 +      for ifdefing away the call to Fprocess_status.
 +
 +      * process.c (add_keyboard_wait_descriptor) [!subprocesses]: Ifdef
 +      away the entire body of the function.
 +
 +2010-07-13  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove subprocesses #ifdefs from term.c.
 +      * process.c (add_keyboard_wait_descriptor)
 +      (delete_keyboard_wait_descriptor): Move to common section, do
 +      nothing when subprocesses is not defined.
 +      * term.c (Fsuspend_tty, Fresume_tty, init_tty):
 +      Remove subprocesses #ifdefs.
 +
 +      Convert maybe_fatal to standard C.
 +      * lisp.h (verror): Declare.
 +      * eval.c (verror): New function containing the code from ...
 +      (error): ... this.  Call verror.
 +      * term.c (vfatal): New function containing the code from ...
 +      (fatal): ... this.  Call vfatal.
 +      (maybe_fatal): Convert to standard C, use variable number of
 +      arguments.  Declare as non-return.
 +      (init_tty): Fix maybe_fatal call.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xterm.c (x_scroll_bar_set_handle, x_scroll_bar_expose)
 +      (_scroll_bar_note_movement): Convert definitions to standard C.
 +      * xmenu.c (menu_help_callback, pop_down_menu, xmenu_show):
 +      * xfns.c (hack_wm_protocols, x_window, x_window): Likewise.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xterm.c (x_frame_of_widget, x_alloc_nearest_color_for_widget)
 +      (x_alloc_lighter_color_for_widget, cvt_string_to_pixel)
 +      (cvt_pixel_dtor, x_window_to_menu_bar, xt_action_hook)
 +      (xaw_jump_callback, xaw_scroll_callback)
 +      (x_create_toolkit_scroll_bar, x_set_toolkit_scroll_bar_thumb)
 +      (x_wm_set_size_hint, x_activate_timeout_atimer):
 +      Convert definitions to standard C.
 +      * xmenu.c (menubar_id_to_frame, popup_get_selection)
 +      (popup_activate_callback, popup_deactivate_callback)
 +      (menu_highlight_callback, menubar_selection_callback)
 +      (apply_systemfont_to_dialog, apply_systemfont_to_menu)
 +      (free_frame_menubar, popup_selection_callback, as)
 +      (create_and_show_popup_menu, dialog_selection_callback)
 +      (create_and_show_dialog):
 +      * xfns.c (hack_wm_protocols, x_window):
 +      * xfaces.c (x_update_menu_appearance):
 +      * widget.c (get_default_char_pixel_size, pixel_to_char_size)
 +      (char_to_pixel_size, round_size_to_char, get_wm_shell)
 +      (set_frame_size, update_wm_hints, setup_frame_gcs)
 +      (update_various_frame_slots, update_from_various_frame_slots)
 +      (EmacsFrameInitialize, EmacsFrameRealize, EmacsFrameResize)
 +      (EmacsFrameSetValues, EmacsFrameQueryGeometry)
 +      (EmacsFrameSetCharSize, widget_store_internal_border): Likewise.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * dbusbind.c (xd_initialize): Don't compare boolean with a constant.
 +
 +2010-07-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (setup_process_coding_systems): Move to the part
 +      shared by non-subprocesses systems, and make its body empty when
 +      subprocesses is not defined.
 +      (close_process_descs): Move to the part shared by non-subprocesses
 +      systems.
 +      (wait_reading_process_output) [!subprocesses]: Convert arg list to
 +      ANSI C.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * editfns.c (transpose_markers): Convert old-style definition.
 +      * emacs.c (abort, shut_down_emacs, fixup_locale)
 +      (synchronize_system_time_locale)
 +      (synchronize_system_messages_locale, syms_of_emacs): Likewise.
 +      * floatfns.c (extract_float, matherr, init_floatfns)
 +      (syms_of_floatfns): Likewise.
 +      * fns.c (make_hash_table): Likewise.
 +      * ftfont.c (ftfont_get_otf, ftfont_otf_features)
 +      (ftfont_otf_capability, ftfont_get_glyph_id, ftfont_get_metrics)
 +      (ftfont_drive_otf, ftfont_shape_by_flt, ftfont_shape)
 +      (ftfont_variation_glyphs): Likewise.
 +      * gtkutil.c (xg_create_widget, xg_modify_menubar_widgets): Likewise.
 +      * keymap.c (describe_map_tree, describe_map, describe_vector): Likewise.
 +      * lread.c (read_filtered_event): Likewise.
 +      * minibuf.c (read_minibuf_noninteractive, read_minibuf): Likewise.
 +      * process.c (wait_reading_process_output): Likewise.
 +      * scroll.c (do_line_insertion_deletion_costs): Likewise.
 +      * search.c (search_buffer, boyer_moore): Likewise.
 +      * syntax.c (scan_sexps_forward): Likewise.
 +      * xdisp.c (try_scrolling): Likewise.
 +      * xfaces.c (face_at_buffer_position, face_for_overlay_string)
 +      (face_at_string_position): Likewise.
 +      * xfns.c (x_default_scroll_bar_color_parameter): Likewise.
 +      * xselect.c (x_get_window_property, receive_incremental_selection)
 +      (x_get_window_property_as_lisp_data, lisp_data_to_selection_data):
 +      Likewise.
 +      * xterm.c (x_draw_relief_rect, x_draw_box_rect): Likewise.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * callproc.c (child_setup): Remove subprocesses conditional.
 +      Remove code dealing with SET_EMACS_PRIORITY, unused.
 +
 +      * buffer.c (Fset_buffer_multibyte): Remove subprocesses conditional.
 +      * process.c (close_process_descs): Use DOS_NT instead of WINDOWSNT.
 +
 +      * emacs.c (__do_global_ctors, __do_global_ctors_aux)
 +      (__do_global_dtors, __main): Use void in definition.
 +      (main): Remove code dealing with SET_EMACS_PRIORITY, unused.
 +      Remove SYMS_MACHINE code, unused.  Remove SYMS_SYSTEM, inline
 +      the only users from ...
 +      * s/ms-w32.h (SYMS_SYSTEM): ... here and ...
 +      * s/msdos.h (SYMS_SYSTEM): ... here.  Remove.
 +      (HAVE_VOLATILE): Remove, unused.
 +
 +      Convert more function definitions to standard C.
 +      * xdisp.c (window_box_edges, handle_single_display_spec)
 +      (display_string): Convert definition to standard C.
 +      * scroll.c (do_direct_scrolling, scrolling_1):
 +      * dispnew.c (allocate_matrices_for_frame_redisplay)
 +      (mirrored_line_dance):
 +      * coding.c (code_convert_string):
 +      * charset.c (map_charset_chars):
 +      * ccl.c (Fccl_program_p, Fccl_execute, Fccl_execute_on_string)
 +      (Fregister_ccl_program, Fregister_code_conversion_map):
 +      * keyboard.c (kbd_buffer_nr_stored): Likewise.
 +      (head_table): Make static and const.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
 +      (PROFILING_LDFLAGS): Set from substitution.
 +      (ALL_CFLAGS): Add C_WARNINGS_SWITCH and PROFILING_CFLAGS, put
 +      CFLAGS last.
 +
 +2010-07-12  Kenichi Handa  <handa@m17n.org>
 +
 +      * Makefile.in (lisp): Change hebrew.el to hebrew.elc.
 +      (shortlisp): Likewise.
 +
 +      * font.h (enum font_property_index): New member FONT_ENTITY_INDEX.
 +
 +      * font.c (font_open_entity): Record ENTITY in FONT_OBJECT's slot
 +      of FONT_ENTITY_INDEX.
 +      (Ffont_get): If KEY is :otf and the font-object doesn't have the
 +      property, get the property value dynamically.
 +      (Ffont_put): Accept font-entity and font-object too.
 +      (Ffont_get_glyhphs): Rename from Fget_font_glyphs.  Arguments and
 +      return value changed.
 +      (syms_of_font): Adjust for the above change.
 +
 +2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * blockinput.h: Remove obsolete comment.
 +
 +      * lisp.h: Include <stddef.h>.
 +      (OFFSETOF): Don't define.
 +      (VECSIZE): Use offsetof instead of OFFSETOF.
 +      (PSEUDOVECSIZE): Likewise.
 +      * process.c (conv_sockaddr_to_lisp): Likewise.
 +      * alloc.c: Don't include <stddef.h>.
 +      * buffer.h (PER_BUFFER_VAR_OFFSET): Use offsetof.
 +
 +      * process.c: Remove obsolete comment.
 +
 +2010-07-11  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfaces.c (Vface_remapping_alist): Doc fix (Bug#6091).
 +
 +2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * callint.c (Fcall_interactively): Use strchr, strrchr instead of
 +      index, rindex.
 +      * doc.c (get_doc_string, Fsnarf_documentation): Likewise.
 +      * editfns.c (Fuser_full_name, Fformat): Likewise.
 +      * emacs.c (argmatch, sort_args, decode_env_path): Likewise.
 +      * fileio.c (Ffile_symlink_p): Likewise.
 +      * filelock.c (current_lock_owner): Likewise.
 +      * font.c (font_parse_name, font_parse_family_registry): Likewise.
 +      * fontset.c (fontset_pattern_regexp): Likewise.
 +      * lread.c (read1): Likewise.
 +      * sysdep.c (init_system_name): Likewise.
 +      * xfns.c (select_visual): Likewise.
 +      * s/hpux10-20.h (index, rindex): Don't define.
 +      * s/ms-w32.h (index): Likewise.
 +      * s/usg5-4.h: Likewise.
 +
 +      * callproc.c (relocate_fd): Use F_DUPFD if defined.
 +
 +      * alloc.c (pending_malloc_warning, malloc_warning): Add const.
 +      * callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
 +      (egetenv): Likewise.
 +      * doprnt.c (doprnt): Likewise.
 +      * editfns.c (set_time_zone_rule, format2): Likewise.
 +      * emacs.c (decode_env_path): Likewise.
 +      * eval.c (signal_error, error): Likewise.
 +      * insdel.c (replace_range_2): Likewise.
 +      * keyboard.c (cmd_error_internal): Likewise.
 +      * lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
 +      * print.c (write_string, write_string_1, print_error_message):
 +      Likewise.
 +      * vm-limit.c (warn_function, memory_warnings): Likewise.
 +      * xdisp.c (message1, message1_nolog, message_with_string)
 +      (vmessage, message, message_nolog): Likewise.
 +      * emacs.c: Remove duplicate declaration.
 +      * keyboard.h: Likewise.
 +      * lisp.h: Update prototypes.
 +
 +      * eval.c: Fix indentation problem.
 +
 +      * keyboard.c: Include "process.h"
 +
 +      * eval.c: Remove obsolete noinline declaration.
 +      * fns.c: Likewise.
 +
 +2010-07-11  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * doprnt.c (doprnt): Take a va_list argument instead of count and
 +      pointer.
 +      * eval.c (error): Change to a standard-C variadic function.
 +      * xdisp.c (vmessage): Rename from message, made static, and
 +      changed to take a va_list argument.
 +      (message): New variadic wrapper.
 +      (message_nolog): Now a variadic function, calling vmessage.
 +      * lisp.h: Include stdarg.h for va_list.
 +      (doprnt, error, message, message_nolog): Decls updated.
 +
 +2010-07-11  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (syms_of_process) <delete-exited-processes>: Define
 +      even if !subprocesses.
 +      (delete_exited_processes): Ditto.
 +
 +      * msdos.c (syms_of_msdos) <delete-exited-processes>: Remove DEFVAR.
 +      (delete_exited_processes): Don't define.
 +
 +2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (make_frame): Initialize menu_bar_lines and
 +      tool_bar_lines members.
 +      (make_initial_frame, make_terminal_frame):
 +      Initialize menu_bar_lines using value of menu-bar-mode.
 +
 +      * msdos.c (IT_set_frame_parameters): Don't set menu-bar-lines.
 +
 +2010-07-10  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c: Reshuffle #include's.  Condition some of the global
 +      and static variables on `subprocesses'.
 +      (hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p):
 +      Leave only one implementation.
 +      (Fget_buffer_process, Fprocess_inherit_coding_system_flag)
 +      (kill_buffer_processes, Flist_system_processes)
 +      (Fprocess_attributes, init_process, syms_of_process): Unify the
 +      implementations for with subprocesses and without them.
 +
 +2010-07-09  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (set_frame_menubar): Must realize menubar_widget to get the
 +      correct size for Motif.
 +      (free_frame_menubar): Call x_set_window_size to update frame size.
 +
 +      * xfns.c (x_window): Set borderWidth to 0 for pane and
 +      EmacsFrame.  Frame size calculation is wrong otherwise.
 +
 +2010-07-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (xd_initialize): Add new argument RAISE_ERROR, which
 +      allows to suppress errors when polling in Emacs' main loop.
 +      (Fdbus_init_bus, Fdbus_get_unique_name, Fdbus_call_method)
 +      (Fdbus_call_method_asynchronously, Fdbus_method_return_internal)
 +      (Fdbus_method_error_internal, Fdbus_send_signal)
 +      (xd_get_dispatch_status, xd_read_message, Fdbus_register_signal)
 +      (Fdbus_register_method): Use it.  (Bug#6579)
 +
 +2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * alloc.c: Convert DEFUNs to standard C.
 +      * buffer.c:
 +      * bytecode.c:
 +      * callint.c:
 +      * callproc.c:
 +      * casefiddle.c:
 +      * casetab.c:
 +      * category.c:
 +      * character.c:
 +      * charset.c:
 +      * chartab.c:
 +      * cmds.c:
 +      * coding.c:
 +      * composite.c:
 +      * data.c:
 +      * dbusbind.c:
 +      * dired.c:
 +      * dispnew.c:
 +      * doc.c:
 +      * dosfns.c:
 +      * editfns.c:
 +      * emacs.c:
 +      * eval.c:
 +      * fileio.c:
 +      * filelock.c:
 +      * floatfns.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * fringe.c:
 +      * image.c:
 +      * indent.c:
 +      * insdel.c:
 +      * keyboard.c:
 +      * keymap.c:
 +      * lread.c:
 +      * macros.c:
 +      * marker.c:
 +      * menu.c:
 +      * minibuf.c:
 +      * msdos.c:
 +      * nsfns.m:
 +      * nsmenu.m:
 +      * nsselect.m:
 +      * print.c:
 +      * process.c:
 +      * search.c:
 +      * sound.c:
 +      * syntax.c:
 +      * term.c:
 +      * terminal.c:
 +      * textprop.c:
 +      * undo.c:
 +      * w16select.c:
 +      * w32console.c:
 +      * w32fns.c:
 +      * w32font.c:
 +      * w32menu.c:
 +      * w32proc.c:
 +      * w32select.c:
 +      * window.c:
 +      * xdisp.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xmenu.c:
 +      * xselect.c:
 +      * xsettings.c:
 +      * xsmfns.c: Likewise.
 +
 +2010-07-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (kbd_is_on_hold, hold_keyboard_input)
 +      (unhold_keyboard_input, kbd_on_hold_p) [!subprocesses]: Define.
 +
 +2010-07-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
 +      (create_and_show_dialog): Don't call apply_systemfont_to_(menu|dialog)
 +      unless USE_LUCID.
 +
 +2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xdisp.c (store_mode_line_noprop_char): Remove K&R alternative
 +      declaration.
 +
 +      Clean up include guards.
 +      * tparam.c: Remove include guards for config.h, string.h and code
 +      that assumes #ifndef emacs.
 +      * termcap.c:
 +      * unexalpha.c:
 +      * sysdep.c:
 +      * filemode.c:
 +      * filelock.c:
 +      * bidi.c: Likewise.
 +
 +      Remove prefix-args.c
 +      * prefix-args.c: Remove file.
 +      * autodeps.mk (ALLOBJS): Remove reference to prefix-args.
 +      * Makefile.in (temacs${EXEEXT}): Remove references to
 +      PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS.
 +      (mostlyclean): Remove reference to prefix-args.
 +      (prefix-args): Remove.
 +
 +      Simplify cstart_of_data, start_of_code and related code.
 +      * mem-limits.h: Remove !emacs and _LIBC conditional code.
 +      (start_of_data): Merge into start_of_data function.
 +      * sysdep.c (start_of_text): Remove.  Move simplified versions of
 +      it in the only users: unexaix.c and unexec.c.
 +      (read_input_waiting): Remove local declaration of quit_char.
 +      (start, etext): Remove declarations.
 +      (start_of_data): Merge with the version in mem-limits.h and move
 +      to vm-limits.c.
 +      * vm-limit.c (start_of_data): Merged and simplified version of the
 +      code formerly in mem-limits.h and sysdep.c.
 +      * unexec.c (start): New declaration, moved from sysdep.c.
 +      (start_of_text): Simplified version of the code formerly in sysdep.c.
 +      * unexaix.c (start_of_text): Simplified version of the code
 +      formerly in sysdep.c.
 +      * m/alpha.h (HAVE_TEXT_START): Remove.
 +      (TEXT_START): Move ...
 +      * unexalpha.c (TEXT_START): ... here.
 +      * s/hpux10-20.h (TEXT_START): Remove.
 +      * s/darwin.h (TEXT_START):
 +      * m/mips.h (TEXT_START):
 +      * m/macppc.h (HAVE_TEXT_START):
 +      * m/m68k.h (TEXT_START):
 +      * m/iris4d.h (TEXT_START):
 +      * m/intel386.h (TEXT_START):
 +      * m/ibmrs6000.h (TEXT_START):
 +      * m/ia64.h (HAVE_TEXT_START):
 +      * s/msdos.h (TEXT_START): Likewise.
 +
 +2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * alloc.c (overrun_check_malloc, overrun_check_realloc)
 +      (overrun_check_free, xstrdup, allocate_string)
 +      (allocate_string_data, compact_small_strings, Fmake_string)
 +      (make_unibyte_string, make_multibyte_string)
 +      (make_string_from_bytes, make_specified_string, make_float)
 +      (Fcons, allocate_terminal, allocate_frame, make_pure_string)
 +      (Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
 +      memcpy, memmove, memset, memcmp.
 +      * atimer.c (start_atimer, set_alarm): Likewise.
 +      * buffer.c (clone_per_buffer_values, report_overlay_modification)
 +      (mmap_realloc, init_buffer_once): Likewise.
 +      * callint.c (Fcall_interactively): Likewise.
 +      * callproc.c (Fcall_process, Fcall_process_region, child_setup)
 +      (getenv_internal_1): Likewise.
 +      * casefiddle.c (casify_object): Likewise.
 +      * ccl.c (ccl_driver): Likewise.
 +      * character.c (str_as_multibyte, str_to_multibyte): Likewise.
 +      * charset.c (load_charset_map_from_file)
 +      (load_charset_map_from_file, load_charset_map_from_vector)
 +      (Fdefine_charset_internal): Likewise.
 +      * cm.c (Wcm_clear): Likewise.
 +      * coding.c (decode_eol, decode_coding_object)
 +      (Fset_coding_system_priority, make_subsidiaries): Likewise.
 +      * data.c (Faset): Likewise.
 +      * dired.c (directory_files_internal, file_name_completion_stat):
 +      Likewise.
 +      * dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
 +      (clear_glyph_row, copy_row_except_pointers)
 +      (copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
 +      (save_current_matrix, restore_current_matrix)
 +      (build_frame_matrix_from_leaf_window, mirrored_line_dance)
 +      (mirror_line_dance, scrolling_window): Likewise.
 +      * doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
 +      Likewise.
 +      * doprnt.c (doprnt): Likewise.
 +      * editfns.c (Fuser_full_name, make_buffer_string_both)
 +      (Fmessage_box, Fformat, Ftranspose_regions): Likewise.
 +      * emacs.c (sort_args): Likewise.
 +      * eval.c (Fapply, Ffuncall): Likewise.
 +      * fileio.c (Ffile_name_directory, make_temp_name)
 +      (Fexpand_file_name, search_embedded_absfilename)
 +      (Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
 +      (auto_save_error): Likewise.
 +      * fns.c (Fstring_equal, Fcopy_sequence, concat)
 +      (string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
 +      (internal_equal, Fclear_string, larger_vector, copy_hash_table)
 +      (Fmake_hash_table): Likewise.
 +      * fringe.c (Fdefine_fringe_bitmap): Likewise.
 +      * ftfont.c (ftfont_text_extents): Likewise.
 +      * getloadavg.c (getloadavg): Likewise.
 +      * image.c (define_image_type, make_image, make_image_cache)
 +      (x_create_x_image_and_pixmap, xbm_image_p)
 +      (w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
 +      (xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
 +      (init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
 +      (png_image_p, png_read_from_memory, png_load, jpeg_image_p)
 +      (tiff_image_p, tiff_read_from_memory, gif_image_p)
 +      (gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
 +      Likewise.
 +      * indent.c (scan_for_column, compute_motion): Likewise.
 +      * insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
 +      (insert_1_both, insert_from_gap, replace_range_2): Likewise.
 +      * intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
 +      * keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
 +      (kbd_buffer_store_event_hold, apply_modifiers_uncached)
 +      (store_user_signal_events, menu_bar_items, tool_bar_items)
 +      (process_tool_bar_item, append_tool_bar_item)
 +      (read_char_minibuf_menu_prompt, read_key_sequence)
 +      (Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
 +      Likewise.
 +      * keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
 +      Likewise.
 +      * lisp.h (STRING_COPYIN): Likewise.
 +      * lread.c (Fload, read1, oblookup): Likewise.
 +      * msdos.c (Frecent_doskeys): Likewise.
 +      * nsfns.m (Fx_create_frame): Likewise.
 +      * nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
 +      Likewise.
 +      * nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
 +      (EmacsImage-initForXPMWithDepth:width:height:flip:length:):
 +      Likewise.
 +      * nsmenu.m (ns_update_menubar): Likewise.
 +      * nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
 +      * print.c (print_unwind, printchar, strout, print_string)
 +      (print_error_message): Likewise.
 +      * process.c (conv_lisp_to_sockaddr, set_socket_option)
 +      (Fmake_network_process, Fnetwork_interface_list)
 +      (Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
 +      (init_process): Likewise.
 +      * ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
 +      * regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
 +      Likewise.
 +      * scroll.c (do_scrolling, do_direct_scrolling)
 +      (scrolling_max_lines_saved): Likewise.
 +      * search.c (search_buffer, wordify, Freplace_match): Likewise.
 +      * sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
 +      * syntax.c (skip_chars, skip_syntaxes): Likewise.
 +      * sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
 +      (emacs_set_tty): Likewise.
 +      * term.c (encode_terminal_code, calculate_costs)
 +      (produce_special_glyphs, create_tty_output, init_tty, delete_tty):
 +      Likewise.
 +      * termcap.c (tgetst1, gobble_line): Likewise.
 +      * termhooks.h (EVENT_INIT): Likewise.
 +      * tparam.c (tparam1): Likewise.
 +      * unexalpha.c (unexec): Likewise.
 +      * unexec.c (write_segment): Likewise.
 +      * unexmacosx.c (unexec_write_zero): Likewise.
 +      * w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
 +      (Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
 +      * w32font.c (w32font_list_family, w32font_text_extents)
 +      (w32font_list_internal, w32font_match_internal)
 +      (w32font_open_internal, compute_metrics, Fx_select_font):
 +      Likewise.
 +      * w32menu.c (set_frame_menubar, add_menu_item)
 +      (w32_menu_display_help, w32_free_submenu_strings): Likewise.
 +      * w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
 +      * w32uniscribe.c (uniscribe_list_family): Likewise.
 +      * w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
 +      * window.c (make_window, replace_window, set_window_buffer)
 +      (Fsplit_window): Likewise.
 +      * xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
 +      (add_to_log, message3, x_consider_frame_title)
 +      (append_space_for_newline, extend_face_to_end_of_line)
 +      (decode_mode_spec_coding, init_glyph_string): Likewise.
 +      * xfaces.c (x_create_gc, get_lface_attributes_no_remap)
 +      (Finternal_copy_lisp_face, Finternal_merge_in_global_face)
 +      (face_attr_equal_p, make_realized_face, make_face_cache)
 +      (free_realized_faces, lookup_named_face, smaller_face)
 +      (face_with_height, lookup_derived_face)
 +      (x_supports_face_attributes_p, Finternal_set_font_selection_order)
 +      (Finternal_set_font_selection_order, realize_default_face)
 +      (compute_char_face, face_at_buffer_position)
 +      (face_for_overlay_string, face_at_string_position, merge_faces):
 +      Likewise.
 +      * xfns.c (xic_create_fontsetname, Fx_create_frame)
 +      (Fx_window_property, x_create_tip_frame)
 +      (Fx_backspace_delete_keys_p): Likewise.
 +      * xfont.c (xfont_list, xfont_match, xfont_list_family)
 +      (xfont_text_extents): Likewise.
 +      * xmenu.c (set_frame_menubar, xmenu_show): Likewise.
 +      * xrdb.c (magic_file_p, x_get_resource): Likewise.
 +      * xselect.c (x_queue_event, x_get_window_property)
 +      (receive_incremental_selection): Likewise.
 +      * xsmfns.c (x_session_check_input): Likewise.
 +      * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
 +      (handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
 +      Likewise.
 +      * character.h (BCOPY_SHORT): Removed.
 +      * config.in: Regenerate.
 +      * dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
 +      * emacs.c (main) [PROFILING]: Don't declare
 +      dump_opcode_frequencies.
 +      * lisp.h (safe_bcopy): Remove declaration.
 +      (memset) [!HAVE_MEMSET]: Declare.
 +      (memcpy) [!HAVE_MEMCPY]: Likewise.
 +      (memmove) [!HAVE_MEMMOVE]: Likewise.
 +      (memcmp) [!HAVE_MEMCMP]: Likewise.
 +      * s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
 +      (BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
 +      Don't define.
 +      (HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
 +      * s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
 +      (BCOPY_DOWNWARD_SAFE): Don't define.
 +      * sysdep.c (memset) [!HAVE_MEMSET]: Define.
 +      (memcpy) [!HAVE_MEMCPY]: Define.
 +      (memmove) [!HAVE_MEMMOVE]: Define.
 +      (memcmp) [!HAVE_MEMCMP]: Define.
 +
 +2010-07-07  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * process.c (kbd_is_on_hold): New variable.
 +      (hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p):
 +      New functions.
 +      (wait_reading_process_output): If kbd_on_hold_p returns non-zero,
 +      select on empty input mask.
 +      (init_process): Initialize kbd_is_on_hold to 0.
 +
 +      * process.h (hold_keyboard_input, unhold_keyboard_input)
 +      (kbd_on_hold_p): Declare.
 +
 +      * keyboard.c (input_available_signal): Declare.
 +      (kbd_buffer_nr_stored): New function.
 +      (kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns
 +      more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571).
 +      (kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored
 +      returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571).
 +      (tty_read_avail_input): If input is on hold, return.
 +      Don't read more that free slots in kbd_buffer (Bug#6571).
 +
 +2010-07-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * msdos.h:
 +      * msdos.c:
 +      * dosfns.c:
 +      * w16select.c: Convert function definitions to ANSI C.
 +
 +      * msdos.h (ctrl_break_func, install_ctrl_break_check):
 +      Remove unused prototypes.
 +
 +2010-07-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * coding.c, sysdep.c: Convert some more functions to standard C.
 +
 +2010-07-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * coding.c (decode_coding_gap, encode_coding_gap, decode_coding_object)
 +      (encode_coding_object): Use SPECPDL_INDEX.
 +      (syms_of_coding): Use DOS_NT.
 +
 +2010-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * intervals.h (interval): Use EMACS_UINT instead of unsigned EMACS_INT.
 +
 +      Make the function member of Lisp_Subr use standard C prototypes.
 +      * lisp.h (struct Lisp_Subr): Use a union for the function member.
 +      (DECL_ALIGN): Add a cast for the function.
 +      * eval.c (Feval, Ffuncall): Use the proper type for each type
 +      function call.
 +
 +2010-07-06  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * fringe.c (draw_fringe_bitmap_1): Use lookup_named_face to get
 +      fringe face id, so face-remapping-alist works (Bug#6091).
 +
 +2010-07-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32.c, w32console.c, w32fns.c, w32font.c, w32heap.c, w32inevt.c
 +      * w32menu.c, w32proc.c, w32reg.c, w32select.c, w32term.c
 +      * w32uniscribe.c, w32xfns.c: Convert function definitions to standard C.
 +
 +2010-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xterm.c (x_get_keysym_name): Change type of parameter to int.
 +      * lisp.h: Declare x_get_keysym_name.
 +      * keyboard.c (modify_event_symbol): Don't declare
 +      x_get_keysym_name here.
 +
 +2010-07-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * ecrt0.c: Revert conversion to standard C.
 +
 +2010-07-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vm-limit.c (memory_warnings):
 +      * keyboard.c (modify_event_symbol):
 +      * floatfns.c (rounding_driver, ceiling2, floor2, truncate2)
 +      (round2, emacs_rint):
 +      * process.c (send_process, old_sigpipe): Convert function
 +      definitions and declarations to standard C.
 +
 +2010-07-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c,
 +      * xdisp.c: Convert function definitions to standard C.
 +
 +      * cm.c (cmputc): Arg C is now int, not char.
 +      * process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
 +
 +2010-07-05  James Cloos  <cloos@jhcloos.com>
 +
 +      * xterm.h (Xatom_net_wm_name, Xatom_net_wm_icon_name): New.
 +
 +      * xterm.c (x_term_init): Intern the _NET_WM_NAME and
 +      _NET_WM_ICON_NAME atoms.
 +
 +      * xfns.c (x_set_name_internal): Set the EWMH _NET_WM_NAME
 +      and _NET_WM_ICON_NAME properties, too, matching what is
 +      done in the Gtk+ case.
 +
 +2010-07-05  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (XTring_bell, XTset_terminal_window): Fix wrong prototype.
 +
 +      * xsmfns.c (SSDATA): New macro.
 +      (smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
 +      passed to strlen/strcpy/strcat.
 +      (create_client_leader_window): Surround with #ifndef USE_GTK.
 +      Cast 7:th arg to XChangeProperty to (unsigned char *).
 +
 +      * xsettings.c (something_changedCB, parse_settings)
 +      (apply_xft_settings): Reformat prototype.
 +      (something_changedCB, init_gconf): Remove unused variable i.
 +      (read_settings): Remove unused variable long_len.
 +
 +      * gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
 +      (xg_get_image_for_pixmap, create_dialog)
 +      (xg_get_file_with_selection, xg_get_file_name, update_cl_data)
 +      (menuitem_highlight_callback, make_menu_item)
 +      (xg_create_one_menuitem, create_menus, xg_update_menu_item)
 +      (xg_create_scroll_bar, xg_update_scrollbar_pos)
 +      (xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
 +      (xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
 +      (xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
 +      (xg_tool_bar_item_expose_callback): Reformat prototype.
 +      (xg_update_menubar): GList *group => GSList *group.
 +      (xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
 +      before use.
 +      (update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
 +      to GTK_IMAGE (wimage).
 +
 +2010-07-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * atimer.c: Use "" instead of <> for local includes for
 +      consistency with the rest of the code.
 +
 +      * xsmfns.c (smc_save_yourself_CB, smc_error_handler):
 +      * xrdb.c (get_system_name):
 +      * window.c (shrink_windows):
 +      * syntax.c (forw_comment):
 +      * scroll.c (calculate_scrolling, calculate_direct_scrolling)
 +      (ins_del_costs):
 +      * mem-limits.h (start_of_data):
 +      * lread.c (readevalloop):
 +      * gtkutil.c (xg_dialog_response_cb, xg_get_file_with_chooser)
 +      (xg_get_file_with_selection, xg_update_menubar, xg_update_submenu):
 +      * frame.c (x_get_focus_frame):
 +      * floatfns.c (fmod_float):
 +      * fileio.c (choose_write_coding_system):
 +      * emacs.c (fatal_error_signal, init_cmdargs, argmatch)
 +      (malloc_initialize_hook, sort_args, synchronize_locale):
 +      * doprnt.c (doprnt):
 +      * dired.c (compile_pattern):
 +      * data.c (fmod_float):
 +      * chartab.c (map_sub_char_table, map_sub_char_table_for_charset)
 +      (map_char_table_for_charset):
 +      * charset.c (define_charset_internal):
 +      * alloc.c (Fgarbage_collect): Convert declarations or definitions
 +      to standard C.
 +
 +2010-07-04  Tetsurou Okazaki  <okazaki@be.to>  (tiny change)
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (read1): Fix up last change to not mess up `c'.
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * strftime.c: Revert conversion to standard C (2010-07-04T07:50:25Z!dann@ics.uci.edu).
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Fix prototypes.
 +
 +      * atimer.c (start_atimer): Use EMACS_TIME, not struct timeval.
 +      * dired.c (file_name_completion_stat): Use DIRENTRY, not struct dirent.
 +      * fileio.c (read_non_regular, read_non_regular_quit): Add Lisp_Object
 +      arg, as required by internal_condition_case_1.
 +      * print.c (strout): Use const char* for arg PTR.
 +      * regex.c (bcmp_translate): Use RE_TRANSLATE_TYPE, not Lisp_Object.
 +      (analyse_first): Fix "const const".
 +      * sysdep.c (set_file_times): Use EMACS_TIME, not struct timeval.
 +      * unexelf.c (round_up, find_section): Use ElfW macro for arguments.
 +      * xgselect.c (xg_select): Use SELECT_TYPE, EMACS_TIME.
 +
 +2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * alloc.c: Convert function definitions to standard C.
 +      * atimer.c:
 +      * bidi.c:
 +      * bytecode.c:
 +      * callint.c:
 +      * callproc.c:
 +      * casefiddle.c:
 +      * casetab.c:
 +      * category.c:
 +      * ccl.c:
 +      * character.c:
 +      * charset.c:
 +      * chartab.c:
 +      * cmds.c:
 +      * coding.c:
 +      * composite.c:
 +      * data.c:
 +      * dbusbind.c:
 +      * dired.c:
 +      * dispnew.c:
 +      * doc.c:
 +      * doprnt.c:
 +      * ecrt0.c:
 +      * editfns.c:
 +      * fileio.c:
 +      * filelock.c:
 +      * filemode.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * fringe.c:
 +      * ftfont.c:
 +      * ftxfont.c:
 +      * gtkutil.c:
 +      * indent.c:
 +      * insdel.c:
 +      * intervals.c:
 +      * keymap.c:
 +      * lread.c:
 +      * macros.c:
 +      * marker.c:
 +      * md5.c:
 +      * menu.c:
 +      * minibuf.c:
 +      * prefix-args.c:
 +      * print.c:
 +      * ralloc.c:
 +      * regex.c:
 +      * region-cache.c:
 +      * scroll.c:
 +      * search.c:
 +      * sound.c:
 +      * strftime.c:
 +      * syntax.c:
 +      * sysdep.c:
 +      * termcap.c:
 +      * terminal.c:
 +      * terminfo.c:
 +      * textprop.c:
 +      * tparam.c:
 +      * undo.c:
 +      * unexelf.c:
 +      * window.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xfont.c:
 +      * xftfont.c:
 +      * xgselect.c:
 +      * xmenu.c:
 +      * xrdb.c:
 +      * xselect.c:
 +      * xsettings.c:
 +      * xsmfns.c:
 +      * xterm.c: Likewise.
 +
 +2010-07-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * msdos.c (IT_set_frame_parameters): Fix setting of colors in
 +      frames other than the initial one.  Fix reversal of colors when
 +      `reverse' is specified in the frame parameters.
 +      Call update_face_from_frame_parameter instead of
 +      internal-set-lisp-face-attribute.  Initialize screen colors from
 +      initial_screen_colors[] when f->default_face_done_p is zero,
 +      instead of depending on being called with default-frame-alist as
 +      the alist argument.
 +
 +      * xfaces.c (update_face_from_frame_parameter): Move out of
 +      HAVE_WINDOW_SYSTEM portion.  Condition window-system only parts
 +      with HAVE_WINDOW_SYSTEM.
 +
 +      * msdos.c (IT_set_frame_parameters): Set menu-bar-lines according
 +      to menu-bar-mode, if not set in the frame parameters or in
 +      default-frame-alist.
 +
 +      * w32console.c (sys_tputs): Adjust argument list to prototype in
 +      term.c.
 +
 +2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * lisp.h (memory_warnings): Fix prototype.
 +
 +      * cm.h (evalcost): Fix prototype.
 +
 +      * cm.c (evalcost): Fix arg type.
 +
 +2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * term.c (term_clear_mouse_face, Fidentity):
 +      * syssignal.h (signal_handler_t):
 +      * lisp.h (memory_warnings):
 +      * coding.h (preferred_coding_system):
 +      * cm.h (evalcost):
 +      * blockinput.h (reinvoke_input_signal): Convert to standard C prototypes.
 +
 +2010-07-02  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dosfns.h (msdos_stdcolor_idx, msdos_stdcolor_name): Remove P_
 +      from prototypes.
 +
 +      * msdos.h (load_pixmap): Don't define away.
 +
 +2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * lisp.h:
 +      * atimer.h: Remove define for P_.
 +
 +      * alloc.c: Remove __P and P_ from .c and .m files.
 +      * atimer.c:
 +      * buffer.c:
 +      * callint.c:
 +      * category.c:
 +      * charset.c:
 +      * chartab.c:
 +      * cm.c:
 +      * coding.c:
 +      * composite.c:
 +      * data.c:
 +      * dired.c:
 +      * dispnew.c:
 +      * doc.c:
 +      * editfns.c:
 +      * emacs.c:
 +      * eval.c:
 +      * fileio.c:
 +      * filelock.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * ftfont.c:
 +      * ftxfont.c:
 +      * gmalloc.c:
 +      * gtkutil.c:
 +      * image.c:
 +      * indent.c:
 +      * intervals.c:
 +      * keyboard.c:
 +      * keymap.c:
 +      * lread.c:
 +      * marker.c:
 +      * menu.c:
 +      * minibuf.c:
 +      * print.c:
 +      * process.c:
 +      * scroll.c:
 +      * search.c:
 +      * sound.c:
 +      * strftime.c:
 +      * syntax.c:
 +      * sysdep.c:
 +      * term.c:
 +      * terminal.c:
 +      * textprop.c:
 +      * unexalpha.c:
 +      * w32console.c:
 +      * w32fns.c:
 +      * w32font.c:
 +      * w32menu.c:
 +      * w32term.c:
 +      * w32uniscribe.c:
 +      * window.c:
 +      * xdisp.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xfont.c:
 +      * xftfont.c:
 +      * xmenu.c:
 +      * xselect.c:
 +      * xterm.c: Likewise.
 +
 +      Remove P_ and __P macros.
 +      * atimer.h: Remove P_ and __P macros.
 +      * buffer.h:
 +      * category.h:
 +      * ccl.h:
 +      * character.h:
 +      * charset.h:
 +      * cm.h:
 +      * coding.h:
 +      * composite.h:
 +      * dispextern.h:
 +      * disptab.h:
 +      * dosfns.h:
 +      * font.h:
 +      * fontset.h:
 +      * frame.h:
 +      * gtkutil.h:
 +      * indent.h:
 +      * intervals.h:
 +      * keyboard.h:
 +      * keymap.h:
 +      * lisp.h:
 +      * macros.h:
 +      * md5.h:
 +      * menu.h:
 +      * msdos.h:
 +      * nsterm.h:
 +      * puresize.h:
 +      * region-cache.h:
 +      * syntax.h:
 +      * syssignal.h:
 +      * systime.h:
 +      * termhooks.h:
 +      * w32font.h:
 +      * w32term.h:
 +      * widget.h:
 +      * window.h:
 +      * xgselect.h:
 +      * xsettings.h:
 +      * xterm.h: Likewise.
 +
 +2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * lisp.h: Document that USE_LISP_UNION_TYPE is now enabled using autoconf.
 +
 +      Cleanup old code.
 +      * dired.c (BSD4_3): Remove all uses, redundant with BSD4_2.
 +      * syssignal.h: Remove code for Lynx, not supported anymore.
 +      * vm-limit.c: Remove unused code the depends on emacs not being
 +      defined and NO_LIM_DATA being defined.
 +      * mem-limits.h: Remove dead code.
 +
 +2010-07-01  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * window.c (Fwindow_absolute_pixel_edges): Doc fix.
 +
 +      * window.c (calc_absolute_offset, Fwindow_absolute_pixel_edges)
 +      (Fwindow_inside_absolute_pixel_edges): New functions (bug#5721).
 +
 +      * nsfns.m (compute_tip_xy): Do not convert coordinates from frame
 +      parameters, they are already absolute.
 +
 +      * nsterm.m (x_set_window_size, initFrameFromEmacs):
 +      Rename FRAME_NS_TOOLBAR_HEIGHT to FRAME_TOOLBAR_HEIGHT.
 +
 +      * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT.
 +
 +      * nsmenu.m (update_frame_tool_bar, free_frame_tool_bar):
 +      Update FRAME_TOOLBAR_HEIGHT.
 +
 +      * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar):
 +      Add BLOCK/UNBLOCK_INPUT so asserts don't trigger.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (get_future_frame_param, Fmake_terminal_frame):
 +      Don't check default-frame-alist.
 +
 +2010-06-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * process.c (create_process): Avoid using invalid file descriptors.
 +
 +      * callproc.c (child_setup): Avoid closing a file descriptor twice.
 +
 +2010-06-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
 +      Improve documentation.  Return font regardless of use_system_font.
 +      (syms_of_xsettings): Improve documentation for font-use-system-font.
 +
 +2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfaces.c (realize_face): Garbage the frame if a face is removed
 +      (Bug#6593).
 +
 +2010-07-05  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * keyboard.c: Remove duplicate <setjmp.h>.
 +      (read_key_sequence): Remove volatile qualifiers.
 +
 +2010-07-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * dispextern.h (FRINGE_HEIGHT_BITS): New define.
 +      (struct glyph_row): New members left_fringe_offset and
 +      right_fringe_offset.
 +
 +      * xterm.c (x_draw_fringe_bitmap): Don't clip bottom aligned bitmap
 +      specially.
 +      * w32term.c (w32_draw_fringe_bitmap): Likewise.
 +      * nsterm.m (ns_draw_fringe_bitmap): Likewise.
 +
 +      * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here.
 +      Take account of bitmap offset.
 +      (draw_window_fringes): Take account of window vscroll.
 +      (update_window_fringes): Likewise.  Extend top-aligned top indicator
 +      or bottom-aligned bottom indicator to adjacent rows if it doesn't fit
 +      in one row.  Don't set redraw_fringe_bitmaps_p outside row comparison.
 +      Set left_fringe_offset and right_fringe_offset (Bug#5634, Bug#6325).
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32fns.c (Qtooltip): Declare.
 +      Suggested by Andy Moreton <andrewjmoreton@gmail.com>.
 +
 +2010-07-03  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (x_activate_menubar): Send Press/Release for Gtk+ to avoid
 +      grab on just Press (Bug#6499).
 +
 +2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (Qtooltip): New var.
 +      (delete_frame): Use it.  Fix faulty if statement.  Don't update
 +      mode line for tooltip frames.  Suggested by Martin Rudalics.
 +
 +      * xfns.c (x_create_tip_frame):
 +      * w32fns.c (x_create_tip_frame): Use it.
 +
 +2010-06-17  Naohiro Aota  <naota@elisp.net>  (tiny change)
 +
 +      * xftfont.c (xftfont_open): Check font width one by one also when
 +      spacing is dual.
 +
 +      * ftfont.c (ftfont_open): Ditto.
 +
 +2010-06-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/sol2-6.h (INHIBIT_X11R6_XIM): Remove, handled by configure now.
 +
 +      * Makefile.in (CANNOT_DUMP): Update for configure name change.
 +
 +      * s/freebsd.h (USE_MMAP_FOR_BUFFERS):
 +      * s/irix6-5.h (USE_MMAP_FOR_BUFFERS):
 +      * s/darwin.h (SYSTEM_MALLOC):
 +      * s/sol2-10.h (SYSTEM_MALLOC): Move to configure.
 +
 +2010-06-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsfns.m: extern declare Vmenu_bar_mode, Vtool_bar_mode.
 +      (ns_get_screen): Don't assign integer to f.
 +      (Fx_display_color_cells): Declarations before statements.
 +
 +2010-06-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (x_default_font_parameter): Remove got_from_system
 +      (Bug#6526).
 +
 +      * xterm.h (gtk_widget_get_window, gtk_widget_get_mapped)
 +      (gtk_adjustment_get_page_size, gtk_adjustment_get_upper):
 +      New defines based on what configure finds.
 +
 +      * xterm.c (XTflash): Use gtk_widget_get_window.
 +      (xg_scroll_callback): Use gtk_adjustment_get_upper and
 +      gtk_adjustment_get_page_size.
 +      (handle_one_xevent): Use gtk_widget_get_mapped.
 +      (x_term_init): Remove HAVE_GTK_MULTIDISPLAY and associated error
 +      messages.
 +
 +      * xmenu.c (create_and_show_popup_menu): Call gtk_widget_get_mapped.
 +
 +      * gtkutil.h: Replace HAVE_GTK_FILE_BOTH with
 +      HAVE_GTK_FILE_SELECTION_NEW.
 +
 +      * gtkutil.c (xg_display_open, xg_display_close):
 +      Remove HAVE_GTK_MULTIDISPLAY, it is always defined.
 +      (xg_display_open): Return type is void.
 +      (gtk_widget_set_has_window)
 +      (gtk_dialog_get_action_area, gtk_dialog_get_content_area)
 +      (gtk_widget_get_sensitive, gtk_adjustment_set_page_size)
 +      (gtk_adjustment_set_page_increment)
 +      (gtk_adjustment_get_step_increment): #define these if not found
 +      by configure.
 +      (remove_submenu): New define based on Gtk+ version.
 +      (xg_set_cursor, xg_frame_resized, xg_event_is_for_scrollbar):
 +      Use gtk_widget_get_window.
 +      (xg_frame_resized, xg_update_frame_menubar): Use gtk_widget_get_mapped.
 +      (xg_create_frame_widgets): Use gtk_widget_set_has_window.
 +      (create_dialog): Use gtk_dialog_get_action_area and
 +      gtk_dialog_get_content_area.
 +      (xg_uses_old_file_dialog, xg_get_file_name): Remove HAVE_GTK_FILE_BOTH
 +      and HAVE_GTK_FILE_CHOOSER_DIALOG_NEW.  File chooser is always
 +      available, so checking for HAVE_GTK_FILE_SELECTION_NEW is enough.
 +      (xg_update_menubar, xg_update_submenu, xg_show_toolbar_item):
 +      Use g_object_ref and g_object_unref.
 +      (xg_update_menu_item, xg_tool_bar_menu_proxy):
 +      Use gtk_widget_get_sensitive.
 +      (xg_update_submenu): Use remove_submenu.
 +      (xg_update_scrollbar_pos): Don't use GtkFixedChild, use child
 +      properties instead to get old x and y position.
 +      (xg_set_toolkit_scroll_bar_thumb): Use gtk_adjustment_get_page_size,
 +      gtk_adjustment_get_step_increment, gtk_adjustment_set_page_size,
 +      gtk_adjustment_set_step_increment and gtk_adjustment_set_page_increment.
 +      (xg_get_tool_bar_widgets): New function.
 +      (xg_tool_bar_menu_proxy, xg_show_toolbar_item)
 +      (update_frame_tool_bar): Call xg_get_tool_bar_widgets.
 +      (toolbar_set_orientation): New #define based on if configure
 +      finds gtk_orientable_set_orientation.
 +      (xg_create_tool_bar): Call toolbar_set_orientation.
 +      (xg_make_tool_item, xg_show_toolbar_item): Call gtk_box_pack_start
 +      instead of gtk_box_pack_start_defaults.
 +
 +2010-06-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cmds.c (Fdelete_backward_char): Move into Lisp.
 +
 +2010-06-27  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/freebsd.h (BSD4_2): Remove redundant definition.
 +      bsd-common.h defines it already.
 +
 +2010-06-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfns.c (Fx_create_frame): Don't consult X resouces when setting
 +      menu-bar-lines and tool-bar-lines.  Use menu-bar-mode and
 +      tool-bar-mode, which are now set using these X resources at
 +      startup, to determine the defaults (Bug#2249).
 +
 +      * w32fns.c (Fx_create_frame):
 +      * nsfns.m (Fx_create_frame): Likewise.
 +
 +      * frame.c (Vmenu_bar_mode, Vtool_bar_mode): New vars.
 +
 +2010-06-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * gtkutil.c (xg_update_scrollbar_pos):
 +      Avoid C99 mid-block variable declaration.
 +
 +2010-06-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (x_scroll_bar_create): Remove call to xg_show_scroll_bar.
 +
 +      * gtkutil.h (xg_show_scroll_bar): Remove.
 +
 +      * gtkutil.c (xg_update_scrollbar_pos): Show/hide scroll bar as needed
 +      if height is less than scroll bar min size.
 +      (xg_show_scroll_bar): Remove, show moved to xg_update_scrollbar_pos.
 +
 +      * xfns.c (x_default_font_parameter): Try to open font from system
 +      before using it (bug#6478).  Rename got_from_gconf to got_from_system.
 +
 +2010-06-22  Keith Packard  <keithp@keithp.com>  (tiny change)
 +
 +      * font.c (font_parse_fcname): Allow . for sizes like 7.5 (bug#6437).
 +
 +2010-06-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (try_scrolling): When scroll-conservatively is set to
 +      most-positive-fixnum, be extra accurate when scrolling window
 +      start, to avoid missing the cursor line.
 +
 +2010-06-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (try_scrolling): Compute the limit for searching point
 +      in forward scroll from scroll_max, instead of an arbitrary limit
 +      of 10 screen lines.
 +      See http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html
 +      and
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html
 +      for details.
 +
 +2010-06-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * editfns.c (Fbyte_to_string): Pacify compiler.
 +
 +2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (read1): Phase out old-style backquotes a bit more.
 +
 +2010-06-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and
 +      bidimirror.h.
 +
 +      * deps.mk (bidi.o): Depend on biditype.h and bidimirror.h.
 +
 +      * bidi.c (bidi_initialize): Remove explicit initialization of
 +      bidi_type_table; include biditype.h instead.  Don't support
 +      entries whose second codepoint is zero.  Initialize bidi_mirror_table.
 +      (bidi_mirror_char): Use bidi_mirror_table.
 +
 +      * biditype.h: New file.
 +
 +      * bidimirror.h: New file.
 +
 +      * window.c (syms_of_window): Doc fix (bug#6409).
 +
 +2010-06-12  Romain Francoise  <romain@orebokech.com>
 +
 +      * Makefile.in (lisp, shortlisp): Use new location of vc-hooks and
 +      ediff-hook.
 +
 +2010-06-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * editfns.c (Fbyte_to_string): Pacify compiler.
 +
 +      * m/ibms390x.h: Rather than duplicating ibms390.h, just include it.
 +
 +2010-06-26  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * alloc.c (Fmake_byte_code): Don't access undefined argument
 +      (Bug#6517).
 +
 +2010-06-25  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (next_element_from_image): Ensure that after-strings are
 +      read the next time we hit handle_stop (Bug#1336).
 +
 +2010-06-23  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lread.c (read1): Signal error if #s is not followed by paren.
 +
 +2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.c (free_image): Mark frame as garbaged (Bug#6426).
 +
 +      * keymap.c (Fdefine_key): Doc fix (Bug#6460).
 +
 +2010-06-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * editfns.c (Fbyte_to_string): Pacify compiler.
 +
 +2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string.
 +      Check `object's type before accessing its guts.
 +
 +2010-06-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/usg5-4.h: Fix previous change.
 +      Suggested by Lawrence Mitchell <wence@gmx.li>
 +
 +2010-06-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * minibuf.c (Fall_completions): Add more checks.
 +
 +2010-06-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * minibuf.c (Fall_completions): Check COLLECTION's size (bug#6378).
 +
 +2010-06-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * lread.c (X_OK): Remove, unused.
 +
 +      * dispnew.c: Remove obsolete comment.
 +
 +      Remove INCLUDED_FCNTL.
 +      * xterm.c (INCLUDED_FCNTL):
 +      * callproc.c (INCLUDED_FCNTL):
 +      * alloc.c (INCLUDED_FCNTL):
 +      * systty.h (INCLUDED_FCNTL): Remove all uses, not needed anymore.
 +      (emacs_get_tty, emacs_set_tty): Declare unconditionally.
 +
 +2010-06-07  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fselect_window): Move `record_buffer' up to the
 +      beginning of this function, so the buffer gets recorded
 +      even if the selected window does not change.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html
 +
 +2010-06-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings.
 +      (Fforward_line, Fbeginning_of_line): Reflow docstrings.
 +
 +2010-06-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove BSTRING related code, all platforms define it.
 +      * s/usg5-4.h (BSTRING): Remove definition.
 +      * s/template.h (BSTRING):
 +      * s/msdos.h (BSTRING):
 +      * s/ms-w32.h (BSTRING):
 +      * s/hpux10-20.h (BSTRING):
 +      * s/gnu-linux.h (BSTRING):
 +      * s/darwin.h (BSTRING):
 +      * s/cygwin.h (BSTRING):
 +      * s/bsd-common.h (BSTRING):
 +      * s/aix4-2.h (BSTRING): Likewise.
 +      * sysdep.c: Remove code depending on BSTRING not being defined.
 +
 +2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Remove obsolete macro BASE_LEADING_CODE_P.
 +      * character.h (BASE_LEADING_CODE_P): Remove.
 +      * regex.c [!emacs] (BASE_LEADING_CODE_P): Remove.
 +      * buffer.c (Fset_buffer_multibyte):
 +      * indent.c (scan_for_column, compute_motion):
 +      * insdel.c (count_combining_before, count_combining_after):
 +      Use LEADING_CODE_P instead of BASE_LEADING_CODE_P.
 +
 +2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Turn `directory-sep-char' into a noop.
 +
 +      * lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare.
 +      (DIRECTORY_SEP): Define unconditionally.
 +
 +      * s/ms-w32.h (DIRECTORY_SEP): Remove.
 +
 +      * emacs.c (decode_env_path): Don't check DIRECTORY_SEP,
 +      call dostounix_filename directly.
 +
 +      * fileio.c (CORRECT_DIR_SEPS): Remove.
 +      (Ffile_name_directory, directory_file_name, Fexpand_file_name)
 +      (Fsubstitute_in_file_name): Use dostounix_filename instead.
 +      (file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP.
 +      (syms_of_fileio) <directory-sep-char>: Move to subr.el.
 +
 +      * w32proc.c (CORRECT_DIR_SEPS): Remove.
 +      (Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename.
 +
 +2010-06-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * process.c (conv_lisp_to_sockaddr): Fix conversion of IPv4 address.
 +      (Bug#6346)
 +
 +2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * ccl.c (Fccl_program_p): Fix typo in docstring.
 +
 +2010-06-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Move UNEXEC definition to autoconf.
 +      * s/usg5-4.h (UNEXEC): Remove, move to configure.in.
 +      * s/sol2-10.h (UNEXEC):
 +      * s/irix6-5.h (UNEXEC):
 +      * s/hpux10-20.h (UNEXEC):
 +      * s/gnu-linux.h (UNEXEC):
 +      * s/darwin.h (UNEXEC):
 +      * s/cygwin.h (UNEXEC):
 +      * s/bsd-common.h (UNEXEC):
 +      * s/aix4-2.h (UNEXEC):
 +      * m/alpha.h (UNEXEC): Likewise.
 +      * Makefile.in (UNEXEC_OBJ): Define using @UNEXEC_OBJ@.
 +
 +2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Remove obsolete pre-unicode2 macros.
 +      * character.h (MULTIBYTE_FORM_LENGTH, PARSE_MULTIBYTE_SEQ): Remove.
 +      * composite.c (composition_reseat_it):
 +      * data.c (Faset):
 +      * fns.c (Ffillarray):
 +      * regex.c (re_search_2): Use BYTES_BY_CHAR_HEAD.
 +      [!emacs] (BYTES_BY_CHAR_HEAD): Define instead of MULTIBYTE_FORM_LENGTH.
 +
 +2010-06-03  Juri Linkov  <juri@jurta.org>
 +
 +      * buffer.c (Fother_buffer): Add CHECK_FRAME.
 +      (Fswitch_to_buffer): Remove unused variable `err'.
 +
 +2010-06-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * m/template.h (NO_SOCK_SIGIO): Remove, no longer used.
 +
 +      * m/hp800.h (alloca) [__NetBSD__ && __GNUC__]: No need to define it,
 +      now that AH_BOTTOM does it.
 +
 +      * m/hp800.h (HAVE_ALLOCA):
 +      * m/ibms390x.h (HAVE_ALLOCA): Do not define, no longer needed.
 +
 +      * m/ia64.h, s/gnu-linux.h, s/gnu.h, s/netbsd.h, s/usg5-4.h:
 +      Remove NOT_C_CODE tests, it is always true now.
 +
 +2010-06-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix config.h includes.
 +      * xsettings.c:
 +      * xgselect.c:
 +      * nsterm.m:
 +      * nsselect.m:
 +      * nsimage.m:
 +      * nsfont.m:
 +      * nsfns.m:
 +      * dbusbind.c: Use #include <config.h> instead of "config.h" as all
 +      other files do.
 +
 +      * gmalloc.c: Remove BROKEN_PROTOTYPES reference, unused.
 +
 +      * s/sol2-6.h: Remove obsolete comments.
 +
 +      Remove unnecessary alloca.h includes.
 +      * keymap.c: Do not include alloca.h, config.h does that.
 +      * sysdep.c: Likewise.  Do not define fwrite, not used.
 +
 +2010-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * sysdep.c (child_setup_tty): Move the non-canonical initialization to
 +      the HAVE_TERMIO where it belongs (bug#6149).
 +
 +2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keymap.c (Fwhere_is_internal): Fix handling of remapping (in thread
 +      of bug#6305).
 +
 +2010-05-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_move_to_visually_next): Make sure the sentinel
 +      state is always cached (bug#6306).
 +
 +2010-05-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix cursor motion in bidi-reordered continued lines.
 +      * xdisp.c (try_cursor_movement): Backup to non-continuation line
 +      only after finding point's row.  Fix the logic.  Rewrite the loop
 +      over continuation lines in bidi-reordered buffers.
 +      Return CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row,
 +      rather than CURSOR_MOVEMENT_CANNOT_BE_USED.
 +
 +2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * fileio.c (Fdelete_file): Pass TRASH arg to handler call.
 +
 +2010-05-28  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (font_delete_unmatched): Check Vface_ignored_fonts.
 +      Don't sheck SPEC if it is nil.
 +      (font_list_entities): Call font_delete_unmatched if
 +      Vface_ignored_fonts is non-nil.  (Bug#6287)
 +
 +2010-05-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBES): Remove $LOADLIBES, it is never set.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * fileio.c (Fdelete_file): Change meaning of optional arg to mean
 +      whether to trash.
 +      (internal_delete_file, Frename_file): Callers changed.
 +      (delete_by_moving_to_trash): Doc fix.
 +      (Fdelete_directory_internal): Don't move to trash.
 +
 +      * callproc.c (delete_temp_file):
 +      * buffer.c (Fkill_buffer): Callers changed.
 +
 +      * lisp.h: Update prototype.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (redisplay_window): After redisplay, check if point is
 +      still valid before setting it (Bug#6177).
 +
 +2010-05-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in, autodeps.mk, deps.mk, ns.mk:
 +      Convert comments to Makefile format.
 +
 +      * Makefile.in (bootstrap-clean): No more Makefile.c.
 +
 +2010-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (YMF_PASS_LDFLAGS): Remove.
 +      (temacs${EXEEXT}): Use PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS.
 +
 +      * Makefile.in (NS_IMPL_GNUSTEP_INC, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS):
 +      Remove.
 +      (TEMACS_LDFLAGS): Do not use NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
 +
 +2010-05-26  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.c (composition_compute_stop_pos): Fix condition for
 +      backward scanning.
 +
 +2010-05-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (@NS_IMPL_GNUSTEP_INC@, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS):
 +      Move before TEMACS_LDFLAGS.
 +      (TEMACS_LDFLAGS): Use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
 +      (temacs${EXEEXT}): Do not use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
 +
 +      * Makefile.in (NOT_C_CODE): No longer define.
 +      (config.h): No longer include.
 +
 +      * Makefile.in (LD_SWITCH_SYSTEM_TEMACS): Move definition after some
 +      variables it may reference.
 +
 +      * Makefile.in (LD_SWITCH_SYSTEM_EXTRA): Remove.
 +      (TEMACS_LDFLAGS): Remove LD_SWITCH_SYSTEM_EXTRA.
 +
 +2010-05-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * dispextern.h (struct composition_it): New members rule_idx and
 +      charpos.
 +
 +      * xdisp.c (set_iterator_to_next): While scanning backward, assume
 +      that the character positions of IT point the last character of the
 +      current grapheme cluster.
 +      (next_element_from_composition): Don't change character positions
 +      of IT.
 +      (append_composite_glyph): Set glyph->charpos to
 +      it->cmp_it.charpos.
 +
 +      * composite.c (autocmp_chars): Change the first argument to RULE,
 +      and try composition with RULE only.
 +      (composition_compute_stop_pos): Record the index number of the
 +      composition rule in CMP_IT->rule_idx.
 +      (composition_reseat_it): Call autocmp_chars repeatedly until the
 +      correct rule of the composition is found.
 +      (composition_update_it): Set CMP_IT->charpos.  Assume the CHARPOS
 +      is at the last character of the current grapheme cluster when
 +      CMP_IT->reversed_p is nonzero.
 +
 +2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * editfns.c (Fbyte_to_string): New function.
 +
 +2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * process.c (Fmake_network_process): Set :host to nil if it's not used.
 +      Suggested by Masatake YAMATO <yamato@redhat.com>.
 +
 +2010-05-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispextern.h (init_iterator): Sync prototype with changed definition.
 +
 +2010-05-20  enami tsugutomo  <tsugutomo.enami@jp.sony.com>
 +
 +      * s/netbsd.h: If terminfo is found, use it in preference to
 +      termcap.  (Bug#6190)  [Backport from trunk]
 +
 +2010-05-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Redesign and reimplement bidi-aware edge positions of glyph rows.
 +
 +      * dispextern.h (struct glyph_row): New members minpos and maxpos.
 +      (MATRIX_ROW_START_CHARPOS, MATRIX_ROW_START_BYTEPOS)
 +      (MATRIX_ROW_END_CHARPOS, MATRIX_ROW_END_BYTEPOS): Reference minpos
 +      and maxpos members instead of start.pos and end.pos, respectively.
 +
 +      * xdisp.c (display_line): Compare IT_CHARPOS with the position in
 +      row->start.pos, rather than with MATRIX_ROW_START_CHARPOS.
 +      (cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS.
 +      (try_window_reusing_current_matrix, try_window_id):
 +      Use ROW->minpos rather than ROW->start.pos.
 +      (init_from_display_pos, init_iterator): Use EMACS_INT for
 +      character and byte positions.
 +      (find_row_edges): Rename from find_row_end.  Accept additional
 +      arguments for minimum and maximum buffer positions seen by
 +      display_line for this row.  Don't use iterator to find the
 +      position following the maximum one; instead, increment the
 +      position found by display_line directly.  Fix logic; eol_pos
 +      should be tested before the rest.  Handle the case of characters
 +      delivered from display vector (bug#6036).  Fix tests related to
 +      it->method.  Handle the truncated_on_right_p rows.
 +      (RECORD_MAX_MIN_POS): New macro.
 +      (display_line): Use it to record the minimum and maximum buffer
 +      positions for glyphs in the row being assembled.  Record the
 +      position of the newline that terminates the line.  If word wrap is
 +      in effect, restore minimum and maximum positions seen up to the
 +      wrap point, when iterator returns to it.
 +      (try_window_reusing_current_matrix): Give up if in bidi-reordered
 +      row and cursor not already at point.  Restore original pre-bidi
 +      code for unidirectional buffers.
 +
 +      * dispnew.c (increment_row_positions, check_matrix_invariants):
 +      Increment and check row->start.pos and row->end.pos, in addition
 +      to MATRIX_ROW_START_CHARPOS and MATRIX_ROW_END_CHARPOS.
 +
 +      * .gdbinit (prowlims): Display row->minpos and row->maxpos.
 +      Display truncated_on_left_p and truncated_on_right_p flags.
 +      Formatting fixes.
 +      (pmtxrows): Display the ordinal number of each row.  Don't display
 +      rows beyond the last one.
 +
 +      * bidi.c (bidi_cache_iterator_state): Don't zero out new_paragraph:
 +      it is not copied by bidi_copy_it.
 +
 +2010-05-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32.c (sys_write): Break writes into chunks smaller than 32MB.
 +      (Bug#6237)
 +
 +2010-05-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.c (Fimage_flush): Rename from image-refresh.
 +
 +2010-05-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (redisplay_internal): Clear caches even if redisplaying
 +      just one window.
 +
 +      * image.c (Vimage_cache_eviction_delay): Decrease to 300.
 +      (clear_image_cache): If the number of cached images is unusually
 +      large, decrease the cache eviction delay (Bug#6230).
 +
 +2010-05-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (${ns_appdir}, ${ns_appbindir}Emacs, ns-app):
 +      Move these rules to ns.mk.
 +      * ns.mk: New file.
 +
 +      * Makefile.in (../src/$(OLDXMENU), $(OLDXMENU)): Always define rules.
 +
 +      * Makefile.in (CANNOT_DUMP): New, set by configure.
 +      (emacs${EXEEXT}, bootstrap-emacs${EXEEXT}): Use $CANNOT_DUMP.
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * fileio.c (Fdelete_file): Change interative spec to use
 +      `read-file-name' like in `find-file-read-args' where the default
 +      value is `default-directory' instead of `buffer-file-name'.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00533.html
 +
 +2010-05-20  Kevin Ryde  <user42@zip.com.au>
 +
 +      * keyboard.c (Vlast_command, Vkeyboard_translate_table)
 +      (Voverriding_terminal_local_map, Vsystem_key_alist)
 +      (Vlocal_function_key_map): Fix manual link in docstring (Bug#6224).
 +
 +2010-05-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (DEPDIR): New constant.
 +      (DEPFLAGS): Set with configure, not cpp.
 +      (MKDEPDIR): New, set by configure.
 +      (.c.o, .m.o, ecrt0.o): Use $MKDEPDIR.
 +      (clean): Use $DEPDIR.
 +      (deps_frag): Include from configure.
 +      Move static/dynamic dependency stuff to deps.mk/autodeps.mk.
 +      * deps.mk, autodeps.mk: New files, extracted from Makefile.in.
 +
 +      * bidi.c (bidi_cache_shrink, bidi_cache_iterator_state):
 +      Fix reallocation of the cache.  (Bug#6210)
 +
 +2010-05-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/msdos.h (ORDINARY_LINK): Move to sed2v2.inp.
 +
 +      * Makefile.in (LD, YMF_PASS_LDFLAGS): Set with configure, not cpp.
 +      (GNULIB_VAR): Remove.
 +      (LIBES): Use LIB_GCC instead of GNULIB_VAR.
 +
 +      * m/ibms390x.h (LINKER):
 +      * m/macppc.h (LINKER) [GNU_LINUX]:
 +      * s/aix4-2.h (ORDINARY_LINK):
 +      * s/cygwin.h (LINKER):
 +      * s/darwin.h (ORDINARY_LINK):
 +      * s/gnu.h (ORDINARY_LINK):
 +      * s/netbsd.h (LINKER):
 +      * s/usg5-4.h (ORDINARY_LINK):
 +      Move to configure.
 +
 +      * s/aix4-2.h (LINKER): Remove; this file sets ORDINARY_LINK.
 +
 +2010-05-18  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
 +      prevent stack overflow if number of arguments is too large
 +      (Bug#6214).
 +
 +2010-05-18  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * charset.c (load_charset_map_from_file): Don't call close after fclose.
 +
 +2010-05-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-linux.h: Combine two conditionals.
 +
 +      * Makefile.in (otherobj): Include $(VMLIMIT_OBJ) separately from
 +      $(POST_ALLOC_OBJ).
 +
 +      * Makefile.in (RALLOC_OBJ): New, set by configure.
 +      (rallocobj): Replace with the previous variable.
 +      (otherobj): Use $RALLOC_OBJ.
 +
 +      * s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]:
 +      * s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure.
 +
 +      * Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure.
 +      (gmallocobj, vmlimitobj): Replace with previous two variables.
 +      (otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ.
 +
 +2010-05-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU_DEPS): New, set by configure.
 +      (stamp-oldxmenu): Use $OLDXMENU_DEPS.
 +
 +2010-05-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (${ns_appbindir}Emacs, ns-app): Always define these rules.
 +
 +      * Makefile.in (clean): Get rid of HAVE_NS conditional.
 +
 +      * Makefile.in (ns_appdir, ns_appbindir): Now configure adds the
 +      trailing "/".
 +
 +      * Makefile.in (TEMACS_LDFLAGS2): New, set by configure.
 +      (temacs${EXEEXT}): Combine the NS_IMPL_GNUSTEP case with the default.
 +
 +      * Makefile.in (GNUSTEP_SYSTEM_LIBRARIES): Remove, unused.
 +      (NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): New, set by configure.
 +      (LD) [NS_IMPL_GNUSTEP]: Set to $(CC) -rdynamic.
 +      (temacs${EXEEXT}): Remove $LOCALCPP, never defined or referenced.
 +      Make most of the NS_IMPL_GNUSTEP case the same as the default case.
 +
 +      * Makefile.in (temacs${EXEEXT}) [!NS_IMPL_GNUSTEP]:
 +      Remove ${STARTFLAGS}, nothing ever sets it.
 +
 +2010-05-16  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/ia64.h (UNEXEC): Remove, set in s/*.h.
 +
 +2010-05-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBX_BASE): Always define.
 +
 +      * Makefile.in (LIBX_OTHER): Move out of cpp section.
 +
 +      * Makefile.in (LIBXT): Always define.
 +
 +2010-05-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU, LIBXMENU, LIBX_OTHER): Always define.
 +
 +      * Makefile.in (FONT_DRIVERS): Remove, replace with $FONT_OBJ.
 +      (obj, SOME_MACHINE_OBJECTS): Use $FONT_OBJ.
 +
 +2010-05-15  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue.  (Bug#5916)
 +      (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise.
 +
 +      * emacs.c (main): Initialize initial-environment and
 +      process-environment before generating from env, not after.
 +
 +      Handle --version reasonably in CANNOT_DUMP configuration.
 +      * emacs.c (emacs_version, emacs_copyright): New string variables.
 +      (Vemacs_version, Vemacs_copyright): New Lisp_Object variables.
 +      (syms_of_emacs): Defvar them, and initialize them from the C
 +      string variables.
 +      (main): If initialization hasn't been done, print initial version
 +      info from the C strings, instead of starting an interactive session.
 +
 +2010-05-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_paragraph_init): Don't leave alone garbage values
 +      of bidi_it->paragraph_dir.  Call bidi_initialize if needed.
 +      (bidi_paragraph_init): Remove redundant assertion that we are at
 +      the beginning of a line after call to bidi_find_paragraph_start.
 +
 +      * xdisp.c (Fcurrent_bidi_paragraph_direction): New function.
 +      (syms_of_xdisp): Defsubr it.
 +
 +      * cmds.c (Fforward_char, Fbackward_char): Doc fix.
 +
 +      * Makefile.in: Fix MSDOS-related comments.
 +
 +2010-05-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU_TARGET): New, set by configure.
 +      (really-lwlib, really-oldXMenu): Always define.
 +      ($OLDXMENU): Depend on $OLDXMENU_TARGET.
 +
 +      * Makefile.in: Simplify cpp conditional.
 +
 +      * Makefile.in (${ns_appdir}): Simplify using umask.
 +
 +      * Makefile.in (${ns_appdir}): Remove references to CVS-related files.
 +
 +2010-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (specbind): Remove left-over duplicate test.
 +      Disallow let-binding frame-local vars.  Add comment.
 +
 +2010-05-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Make the cache of bidi iterator states dynamically allocated.
 +      * bidi.c (bidi_cache_shrink): New function.
 +      (bidi_init_it): Call it.
 +      (bidi_cache_iterator_state): Enlarge the cache if needed.
 +
 +      * bidi.c (bidi_move_to_visually_next): Rename from
 +      bidi_get_next_char_visually.  All callers changed.
 +
 +2010-05-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * dispextern.h (struct composition_it): New member reversed_p.
 +
 +      * composite.c (composition_compute_stop_pos): Search backward if
 +      ENDPOS < CHARPOS.
 +      (composition_reseat_it): Handle the case that ENDPOS < CHARPOS.
 +      Set CMP_IT->reversed_p.
 +      (composition_update_it): Pay attention to CMP_IT->reversed_p.
 +
 +      * xdisp.c (set_iterator_to_next):
 +      Call composition_compute_stop_pos with negative ENDPOS if we are
 +      scanning backward.  Call composition_compute_stop_pos if scan
 +      direction is changed.
 +      (next_element_from_buffer): Call composition_compute_stop_pos with
 +      negative ENDPOS if we are scanning backward.
 +      (next_element_from_composition): Pay attention to
 +      IT->cmp_it.reversed_p.
 +
 +2010-05-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (font_range): Return the range for the font found at first.
 +
 +2010-05-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Always define.
 +
 +      * Makefile.in (mktime, X11, register): Move undefs to configure.
 +
 +      * Makefile.in (MSDOS_OBJ): Default to empty, let msdos scripts set it.
 +      (MSDOS_X_OBJ): New variable.
 +      (MSDOS_SUPPORT_REAL): New constant.
 +      (MSDOS_SUPPORT): Set as a variable, not with cpp.
 +      (obj): Use MSDOS_X_OBJ.
 +      (lisp): Use MSDOS_SUPPORT as a variable.
 +
 +      * Makefile.in (REAL_MOUSE_SUPPORT): New constant.
 +      (GPM_MOUSE_SUPPORT): Now it's a constant.
 +      (MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): Set with configure,
 +      not cpp.
 +
 +      * Makefile.in (@NS_IMPL_GNUSTEP_INC@): Use in place of #ifdef.
 +      (ns_appresdir): Remove, unused.
 +
 +      * Makefile.in (SHELL): Move outside cpp section.
 +
 +      * s/netbsd.h (AMPERSAND_FULL_NAME): Remove (defined in AH_BOTTOM).
 +
 +2010-05-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (FONT_DRIVERS): Place with other HAVE_X_WINDOWS stuff.
 +      (TOOLTIP_SUPPORT): Place with other HAVE_WINDOW_SYSTEM stuff.
 +
 +      * Makefile.in (FONT_DRIVERS): If HAVE_X_WINDOWS is defined,
 +      HAVE_WINDOW_SYSTEM must be too.
 +
 +      * Makefile.in (WINNT_SUPPORT): Remove, nt build does not use this file.
 +      (lisp): Remove WINNT_SUPPORT.
 +
 +      * Makefile.in (OLDXMENU, LIBXMENU) [!HAVE_MENUS]:
 +      Let configure set these variables (to empty) in this case as well.
 +
 +      * Makefile.in (LD_SWITCH_X_SITE): Define as a variable, not via cpp.
 +      (LIBX_BASE): Use $LD_SWITCH_X_SITE.
 +
 +      * Makefile.in (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD)
 +      (LIB_MATH, FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS)
 +      (FREETYPE_LIBS, LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS)
 +      (M17N_FLT_LIBS, GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBGPM)
 +      (LIBRESOLV, UNEXEC_OBJ): For clarity, define variables to hold
 +      the values output by configure.
 +      (ALL_CFLAGS, obj, LIBES, temacs${EXEEXT}): Use the above variables.
 +
 +2010-05-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (YMF_PASS_LDFLAGS, LD, LINKER): Simplify the logic.
 +      (LINKER_WAS_SPECIFIED): Remove.
 +
 +      * Makefile.in (LIB_GCC): Set using configure, not cpp.
 +      (GNULIB_VAR) [!ORDINARY_LINK]: Always set to $LIB_GCC.
 +      * m/arm.h (LIB_GCC) [GNU_LINUX]:
 +      * s/cygwin.h (LIB_GCC):
 +      * s/freebsd.h (LIB_GCC):
 +      * s/gnu-linux.h (LIB_GCC):
 +      * s/msdos.h (LIB_GCC):
 +      * s/netbsd.h (LIB_GCC):
 +      Move to configure.
 +
 +2010-05-11  Karel Klíč  <kklic@redhat.com>
 +
 +      * ftfont.c: Fix incorrect parentheses of #if condition for
 +      definining M17N_FLT_USE_NEW_FEATURE.
 +
 +2010-05-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBS_SYSTEM) [MSDOS]: Do not reset.
 +      * s/msdos.h (MSDOS_LIBS_SYSTEM): Remove.
 +
 +2010-05-10  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (init_iterator): Don't turn on bidi reordering in
 +      unibyte buffers.  See
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html.
 +
 +2010-05-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBS_SYSTEM): Set using configure, not cpp.
 +      (LIBS_SYSTEM) [MSDOS]: Reset with MSDOS_LIBS_SYSTEM.
 +      (LIBES): Use LIBS_SYSTEM as a variable.
 +      * s/msdos.h (LIBS_SYSTEM): Rename to MSDOS_LIBS_SYSTEM.  Always define.
 +      * s/aix4-2.h (LIBS_SYSTEM):
 +      * s/freebsd.h (LIBS_SYSTEM):
 +      * s/hpux10-20.h (LIBS_SYSTEM):
 +      * s/sol2-6.h (LIBS_SYSTEM):
 +      * s/unixware.h (LIBS_SYSTEM):
 +      Move to configure.
 +
 +      * s/aix4-2.h (MAIL_USE_LOCKF):
 +      * s/bsd-common.h (MAIL_USE_FLOCK):
 +      * s/darwin.h (MAIL_USE_FLOCK):
 +      * s/gnu-linux.h (MAIL_USE_FLOCK):
 +      * s/irix6-5.h (MAIL_USE_FLOCK):
 +      * s/template.h (MAIL_USE_FLOCK):
 +      Move to configure.
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-05-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * composite.c (autocmp_chars): Save point as marker before calling
 +      auto-composition-function (Bug#5984).
 +
 +      * lisp.h (restore_point_unwind): Add prototype.
 +
 +      * fileio.c (restore_point_unwind): Remove static attribute.
 +
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the
 +      new feature of libotf and m17n-flt.
 +      (ftfont_check_otf) [M17N_FLT_USE_NEW_FEATURE]:
 +      Call OTF_check_features even if no specific feature is given.
 +      (PACK_OTF_TAG) [M17N_FLT_USE_NEW_FEATURE]: New macro.
 +      (ftfont_drive_otf) [M17N_FLT_USE_NEW_FEATURE]: Handle the case
 +      that OUT is NULL.  Use OTF_drive_gsub_with_log and
 +      OTF_drive_gpos_with_log instead of OTF_drive_gsub and
 +      OTF_drive_gpos.
 +      (ftfont_try_otf) [M17N_FLT_USE_NEW_FEATURE]: New function.
 +      (ftfont_shape_by_flt) [M17N_FLT_USE_NEW_FEATURE]:
 +      Setup mflt_enable_new_feature and mflt_try_otf.
 +
 +2010-05-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (Ftool_bar_get_system_style): Correct comment.
 +
 +      * gtkutil.c (xg_pack_tool_bar): Change show_all to show for handle
 +      box and toolbar (Bug #6139).
 +      (xg_create_tool_bar): Remove comment (Bug #6139).
 +      (xg_make_tool_item): Remove gtk_widget_show_all (Bug #6139).
 +      (xg_show_toolbar_item): Add gtk_widget_show for weventbox (Bug #6139).
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/eval.$(O), $(BLD)/w32fns.$(O)):
 +      Update dependencies.
 +
 +2010-05-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.c (update_window_fringes): Set up truncation bitmaps for
 +      R2L lines.
 +
 +2010-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (THIS_IS_MAKEFILE): Remove, unused.
 +
 +      * Makefile.in (LIBS_TERMCAP): Set with configure, not cpp.
 +      (TERMCAP_OBJ): New, set by configure, replacing termcapobj.
 +      (termcapobj): Replace with TERMCAP_OBJ.
 +      (otherobj): Use $TERMCAP_OBJ instead of $termcapobj.
 +      (LIBES): Use LIBS_TERMCAP as a variable.
 +
 +      * s/freebsd.h (osreldate.h): No longer include, since this file
 +      does not use __FreeBSD_version any more.
 +
 +      * s/aix4-2.h (TERMINFO):
 +      * s/cygwin.h (TERMINFO):
 +      * s/darwin.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]:
 +      * s/freebsd.h (TERMINFO, LIBS_TERMCAP):
 +      * s/gnu-linux.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]:
 +      * s/gnu.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]:
 +      * s/hpux10-20.h (TERMINFO, LIBS_TERMCAP):
 +      * s/irix6-5.h (TERMINFO):
 +      * s/netbsd.h (LIBS_TERMCAP):
 +      * s/openbsd.h (TERMINFO, LIBS_TERMCAP):
 +      * s/sol2-6.h (LIBS_TERMCAP) [!TERMINFO]:
 +      * s/usg5-4.h (TERMINFO):
 +      Move to configure.
 +
 +2010-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (unbind_to): Don't unbind a local binding into the global
 +      binding when the local binding disappeared.  Inversely, don't unbind
 +      a global binding into a newly created local binding.
 +      * data.c (set_internal): Make its `buf' arg into a `where' arg so we
 +      can specify the frame to use, when applicable.  Adjust callers.
 +
 +2010-05-07  Vincent Belaïche  <vincent.belaiche@gmail.com>
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * floatfns.c (Fisnan, Fcopysign, Ffrexp, Fldexp): New functions.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c: Include w32.h.
 +      (Fw32_shell_execute): Decode the error message before passing it
 +      to `error'.  (Bug#6126)
 +
 +      * msdos.c (dos_set_window_size):
 +      * w16select.c (Fx_selection_exists_p): Use `Fsymbol_value (foo)'
 +      instead of `XSYMBOL (foo)->value'.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix the MS-DOS build, broken by autoconfiscation.
 +
 +      * Makefile.in: Don't use Make-style comments past the "start of
 +      cpp stuff" line.
 +      (MSDOS_OBJ): Remove xmenu.o (it is now defined by XMENU_OBJ).
 +
 +      * s/msdos.h (UNEXEC): Don't define (@unexec@ in Makefile.in is
 +      edited directly by msdos/sed1v2.inp).
 +
 +2010-05-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LD_SWITCH_SYSTEM): Set with configure, not cpp.
 +      (LD_SWITCH_SYSTEM_EXTRA): New variable, set by configure.
 +      (TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM and $LD_SWITCH_SYSTEM_EXTRA,
 +      move out of cpp section.
 +      * s/freebsd.h (LD_SWITCH_SYSTEM):
 +      * s/gnu-linux.h (LD_SWITCH_SYSTEM):
 +      * s/netbsd.h (LD_SWITCH_SYSTEM):
 +      * s/openbsd.h (LD_SWITCH_SYSTEM): Move to configure.in.
 +
 +2010-05-07  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Define LIB_STANDARD and START_FILES using autoconf.
 +      * s/usg5-4.h (LIB_STANDARD):
 +      * s/netbsd.h (START_FILES):
 +      * s/irix6-5.h (LIB_STANDARD):
 +      * s/hpux10-20.h (LIB_STANDARD, START_FILES):
 +      * s/gnu-linux.h (START_FILES, LIB_STANDARD):
 +      * s/freebsd.h (START_FILES):
 +      * s/darwin.h (START_FILES):
 +      * s/cygwin.h (START_FILES):
 +      * s/aix4-2.h (LIB_STANDARD):
 +      * m/ibmrs6000.h (START_FILES): Remove, move logic to configure.in.
 +      * Makefile.in (STARTFILES): Rename to START_FILES, define using
 +      autoconf, not cpp.
 +
 +2010-05-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove NEED_BSDTTY and NEED_UNISTD_H.
 +      * s/hpux10-20.h (NEED_BSDTTY): Remove.
 +      * s/aix4-2.h (NEED_UNISTD_H): Remove.
 +      * systty.h: Simplify conditionals for including <sys/bsdtty.h>,
 +      <sys/ptyio.h> and <unistd.h>.
 +
 +      * emacs.c (main): Remove NO_DIR_LIBRARY conditional, unused.
 +
 +      * Makefile.in (STARTFILES): Conditionally define to make the usage clear.
 +      * s/gnu.h (START_FILES): Remove empty definition.
 +
 +2010-05-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (x_draw_image_relief): Move declaration of extra to beginning.
 +
 +2010-05-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (CPP, LN_S): Remove unused variables.
 +
 +2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * syntax.c (Fchar_syntax): Check the arg is a character (bug#6080).
 +
 +2010-05-05  Lawrence Mitchell  <wence@gmx.li>
 +
 +      * m/sparc.h: Fix typo in earlier change.
 +
 +2010-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Misc tweaks.
 +      * eval.c (Fdefvaralias): Remove unintended nested if.
 +      (internal_condition_case_2, internal_condition_case_n): Use ANSI type.
 +
 +2010-05-04  Bernhard Herzog  <bh@intevation.de>  (tiny change)
 +
 +      * xsmfns.c (smc_save_yourself_CB): strlen(client_id) => strlen(cwd).
 +
 +2010-05-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove BSD_PGRPS.
 +      * s/bsd-common.h (BSD_PGRPS): Remove undef.
 +      * s/gnu-linux.h (BSD_PGRPS): Remove.
 +      * term.c (dissociate_if_controlling_tty):
 +      * sysdep.c (narrow_foreground_group, widen_foreground_group)
 +      (init_sys_modes, reset_sys_modes):
 +      * emacs.c (main):
 +      * callproc.c (Fcall_process, child_setup): Remove code depending
 +      on BSD_PGRPS.
 +
 +      Remove POSIX_SIGNALS.
 +      * s/usg5-4.h (POSIX_SIGNALS):
 +      * s/netbsd.h (POSIX_SIGNALS):
 +      * s/msdos.h (POSIX_SIGNALS):
 +      * s/ms-w32.h (POSIX_SIGNALS):
 +      * s/hpux11.h (POSIX_SIGNALS):
 +      * s/gnu.h (POSIX_SIGNALS):
 +      * s/gnu-linux.h (POSIX_SIGNALS):
 +      * s/freebsd.h (POSIX_SIGNALS):
 +      * s/darwin.h (POSIX_SIGNALS):
 +      * s/cygwin.h (POSIX_SIGNALS):
 +      * s/aix4-2.h (POSIX_SIGNALS): Remove definition.
 +      * s/unixware.h:
 +      * s/sol2-6.h: Remove comments on POSIX_SIGNALS.
 +      * process.c (create_process):
 +      * syssignal.h:
 +      * sysdep.c (wait_for_termination, init_signals):
 +      * process.c (create_process):
 +      * msdos.c: POSIX_SIGNALS is always defined on all platforms,
 +      remove all code that assumes the contrary.
 +
 +2010-05-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell
 +      variable.
 +      * s/netbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
 +      (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH.
 +      * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
 +      (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH instead of
 +      LD_SWITCH_SYSTEM_tmp.
 +      * Makefile.in (LD_SWITCH_X_SITE_AUX, LD_SWITCH_X_SITE_AUX_RPATH):
 +      New variables, set by configure.
 +
 +      * s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
 +      * s/darwin.h (HEADERPAD_EXTRA, LIBS_NSGUI): Remove.
 +      (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
 +      * Makefile.in (LD_SWITCH_SYSTEM_TEMACS): New variable, set by configure.
 +      (TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM_TEMACS.
 +
 +      * s/aix4-2.h (C_SWITCH_SYSTEM):
 +      * m/alpha.h (C_SWITCH_MACHINE):
 +      Move to configure.in.
 +      * Makefile.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM):
 +      New variables, set by configure.
 +      (ALL_CFLAGS): Use $C_SWITCH_MACHINE and $C_SWITCH_SYSTEM in place of
 +      $c_switch_machine and $c_switch_system.
 +
 +2010-05-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/hpux10-20.h (LIB_STANDARD): New definition.
 +      * Makefile.in (ORDINARY_LINK): Remove setting LIB_STANDARD based
 +      on it, not used anymore.
 +
 +2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * eval.c (internal_condition_case_n): Rename from
 +      internal_condition_case_2.
 +      (internal_condition_case_2): New function.
 +
 +      * xdisp.c (safe_call): Use internal_condition_case_n.
 +
 +      * fileio.c (Fdelete_file, internal_delete_file): New arg FORCE.
 +      (internal_delete_file, Frename_file): Callers changed.
 +
 +      * buffer.c (Fkill_buffer):
 +      * callproc.c (delete_temp_file): Callers changed (Bug#6070).
 +
 +      * lisp.h: Update prototypes.
 +
 +2010-05-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBX_EXTRA, LIBX_BASE): New variables.
 +      (LIBXT_OTHER, LIBX_OTHER): New, set by configure.
 +      (LIBXT): Set with configure, not cpp.
 +      (LIBX): Remove.
 +      (LIBES): Replace $LIBX with $LIBX_BASE and $LIBX_OTHER.
 +
 +2010-05-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/amdx86-64.h (START_FILES, LIB_STANDARD): Remove.
 +      The FreeBSD is not needed, the default works, Solaris version is
 +      not needed, and the remaining case is not supported by configure.
 +
 +2010-05-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsmfns.c (CHDIR_OPT): New define.
 +      (smc_save_yourself_CB): Add CHDIR_OPT to options to use when
 +      restarting emacs.
 +
 +      * xterm.c (x_connection_closed): Call Fkill_emacs instead of
 +      shut_down_emacs.
 +
 +      * emacs.c (USAGE1): Mention --chdir.
 +      (main): Handle --chdir.
 +      (standard_args): Add --chdir.
 +      (fatal_error_signal): Call Fkill_emacs for SIGTERM and SIGHUP (Bug
 +      #5552).
 +
 +2010-05-01  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove LD_SWITCH_MACHINE.
 +      * Makefile.in (LD_SWITCH_MACHINE): Remove definition, unused.
 +      (TEMACS_LDFLAGS): Do not use LD_SWITCH_MACHINE.
 +
 +      Clean up IRIX code.
 +      * m/iris4d.h (TERMINFO, FIRST_PTY_LETTER): Move definitions ...
 +      * s/irix6-5.h (TERMINFO, FIRST_PTY_LETTER): ... here.
 +
 +      Clean up AIX code.
 +      * m/ibmrs6000.inp: Remove file, unused.
 +      * m/ibmrs6000.h (IBMR2AIX): Remove, unused.
 +      (LD_SWITCH_MACHINE): Rename to LD_SWITCH_SYSTEM_TEMACS, and move
 +      definition ...
 +      * s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): ... here.
 +
 +      * sysdep.c (child_setup_tty, init_sys_modes): Remove !IBMR2AIX code,
 +      unused.
 +
 +2010-05-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Emulate POSIX_SIGNALS on MS-Windows.
 +
 +      * s/ms-w32.h (POSIX_SIGNALS, struct sigaction, SIG_BLOCK)
 +      (SIG_SETMASK, SIG_UNBLOCK): Define.
 +
 +      * sysdep.c (sys_signal) [WINDOWSNT]: #ifdef away.
 +      (wait_for_termination) [WINDOWSNT]: Move MS-Windows specific code
 +      from non-POSIX_SIGNALS section to POSIX_SIGNALS section.
 +
 +      * w32.c (sigemptyset, sigaddset, sigfillset, sigprocmask):
 +      New stubs.
 +
 +      Miscellaneous fixes of bidi display.
 +
 +      * xdisp.c (find_row_end): New function, refactored from display_line.
 +      (display_line): Use it.
 +      (extend_face_to_end_of_line): In almost-filled rows, extend only
 +      if the row is R2L and not continued.
 +      (display_line): Fix prepending of truncation glyphs to R2L rows.
 +      Preserve overlay and string info in row->end.
 +      (insert_left_trunc_glyphs): Support addition of left truncation
 +      glyphs to R2L rows.
 +      (set_cursor_from_row): Don't place cursor on the vertical border
 +      glyph between adjacent windows.  Fix a crash when a display string
 +      is continued to the next line.  Don't return zero if cursor was
 +      found by `cursor' property of a display string.
 +      (try_cursor_movement): Don't assume that row->end == (row+1)->start,
 +      test for that explicitly.
 +
 +2010-05-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (gmallocobj, rallocobj, vmlimitobj): Initialize to null,
 +      for clarity.
 +      (OTHER_OBJ): Remove.
 +      (PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New, set by configure.
 +      (otherobj): Use PRE_ALLOC_OBJ, POST_ALLOC_OBJ rather than OTHER_OBJ.
 +
 +2010-05-01  Karel Klíč  <kklic@redhat.com>
 +
 +      * fileio.c (Ffile_selinux_context): Context functions may return null.
 +
 +2010-04-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/gnu.h (POSIX_SIGNALS, START_FILES): New definitions.
 +
 +2010-04-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable.  (Bug#6065)
 +      (OTHER_OBJ): Define as a separate variable, for clarity.
 +
 +2010-04-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c: include limits.h and update file comment.
 +
 +2010-04-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]:
 +      Set with configure, not cpp.
 +      (LIBW): Remove, replace with $TOOLKIT_LIBW.
 +
 +      * Makefile.in (mallocobj): Remove.
 +      (otherobj): Simplify using @OTHER_OBJ@.
 +
 +      * Makefile.in (dispnew.o, frame.o, fringe.o, font.o, fontset.o)
 +      (keyboard.o, window.o, xdisp.o, xfaces.o, menu.o):
 +      Don't bother making nsgui.h dependency platform-specific.
 +
 +      * Makefile.in (nsfns.o): Remove duplicate nsgui.h dependency.
 +
 +2010-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * process.c (read_process_output, exec_sentinel): Don't burp if the
 +      sentinel/filter kills the current buffer (bug#6060).
 +
 +      Fix wrong-docstring problem introduced with hash-consing.  (Bug#6008)
 +      * eval.c (Fautoload): Set doc to a unique number rather than to 0.
 +      Remove unused var `args'.
 +      * lisp.h (XSETCARFASTINT, XSETCDRFASTINT): Remove.
 +      (LOADHIST_ATTACH): Wrap with do...while to avoid surprises for callers.
 +      * doc.c (store_function_docstring): Use XSETCAR.
 +
 +2010-04-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT): New variables.
 +      (WINDOW_SUPPORT) [HAVE_WINDOW_SYSTEM]: Use them.
 +
 +      * Makefile.in (CYGWIN_OBJ): Set with configure, not cpp.
 +
 +      * Makefile.in (GPM_MOUSE_SUPPORT): New, set by configure.
 +      (MOUSE_SUPPORT) [!HAVE_MOUSE]: Use $GPM_MOUSE_SUPPORT.
 +
 +      * Makefile.in (FONT_OBJ): New, set by configure.
 +      (FONT_DRIVERS): Use $FONT_OBJ.
 +
 +      * Makefile.in (LIBXMU): Set with configure, not cpp.
 +      * s/aix4-2.h (LIBXMU):
 +      * s/hpux10-20.h (LIBXMU):
 +      Remove definition, now set in configure.
 +
 +      * Makefile.in (NS_OBJ, NS_SUPPORT): Set with configure, not cpp.
 +
 +      * m/amdx86-64.h [i386]: Move this test to configure.in.
 +
 +2010-04-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBXTR6): Set with configure, not cpp.
 +      * s/unixware.h (NEED_LIBW): Remove definition.
 +
 +      * Makefile.in (LUCID_LIBW, MOTIF_LIBW): Remove, replacing by...
 +      (TOOLKIT_LIBW): New, set by configure.
 +      (@X_TOOLKIT_TYPE@): No longer define it.
 +
 +      * Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW.
 +      (MOTIF_LIBW): Set with configure, not cpp.
 +      * s/aix4-2.h (LIB_MOTIF):
 +      * s/gnu-linux.h (LIB_MOTIF):
 +      * s/unixware.h (LIB_MOTIF): Move to configure.in.
 +
 +2010-04-27  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Reduce CPP usage.
 +      * Makefile.in (LIB_X11_LIB): Remove, inline in the only user.
 +      (obj): Use autoconf for unexec instead of cpp.
 +      (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE):
 +      Remove definitions and undefs.  Inline definitions in the only user.
 +      (ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf.
 +
 +2010-04-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * m/amdx86-64.h (START_FILES, LIB_STANDARD): Change the logic around,
 +      since the defaults (set by the system file) are fine in most cases.
 +      [GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__]: Remove sections.
 +      * m/ibms390x.h (START_FILES, LIB_STANDARD):
 +      * m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]:
 +      * m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]:
 +      Remove definitions, since they are set correctly in s/gnu-linux.h.
 +      * s/freebsd.h (START_FILES, LIB_STANDARD):
 +      * s/gnu-linux.h (START_FILES, LIB_STANDARD):
 +      * s/hpux10-20.h (START_FILES):
 +      * s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1):
 +      Use $CRT_DIR in place of fixed /usr/lib, /lib directories.
 +
 +      * Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
 +      (MOTIF_LIBW): Use $LIBXP.
 +      (otherobj): Use $WIDGET_OBJ.
 +
 +2010-04-26  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (LIBS_MACHINE): Remove, unused.
 +
 +      Use autoconf instead of cpp for LIB_MATH.
 +      * s/darwin.h (LIB_MATH): Do not define here, move to configure.
 +      * s/cygwin.h (LIB_MATH): Likewise.
 +      * Makefile.in (LIB_MATH): Do not define with cpp.
 +      (LIBES): Use autoconf for LIB_MATH.
 +
 +2010-04-26  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.c (Ffind_composition_internal): Fix the return value
 +      for an automatic composition.
 +
 +2010-04-25  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove all NO_ARG_ARRAY uses.
 +      * fns.c (concat2, concat3, nconc2):
 +      * eval.c (apply1, call1, call2, call3, call4, call5, call6)
 +      (call7): Remove NO_ARG_ARRAY usage, assume it's always true.
 +      * m/xtensa.h (NO_ARG_ARRAY):
 +      * m/template.h (NO_ARG_ARRAY):
 +      * m/sparc.h (NO_ARG_ARRAY):
 +      * m/sh3.h (NO_ARG_ARRAY):
 +      * m/mips.h (NO_ARG_ARRAY):
 +      * m/macppc.h (NO_ARG_ARRAY):
 +      * m/iris4d.h (NO_ARG_ARRAY):
 +      * m/intel386.h (NO_ARG_ARRAY):
 +      * m/ibms390x.h (NO_ARG_ARRAY):
 +      * m/ibms390.h (NO_ARG_ARRAY):
 +      * m/ibmrs6000.h (NO_ARG_ARRAY):
 +      * m/ia64.h (NO_ARG_ARRAY):
 +      * m/hp800.h (NO_ARG_ARRAY):
 +      * m/arm.h (NO_ARG_ARRAY):
 +      * m/amdx86-64.h (NO_ARG_ARRAY):
 +      * m/alpha.h (NO_ARG_ARRAY): Remove definition.
 +
 +2010-04-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (display_line): Don't assume 2nd call to
 +      get_next_display_element cannot return zero.  (Bug#6030)
 +      (iterate_out_of_display_property): New function, body from pop_it.
 +      (pop_it): Use it.
 +
 +2010-04-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * m/amdx86-64.h (START_FILES, LIB_STANDARD) [__OpenBSD__]:
 +      For clarity, revert to using fixed /usr/lib rather than $CRT_DIR.
 +      (START_FILES, LIB_STANDARD) [__FreeBSD__]: Merge into the generic case,
 +      since CRT_DIR defaults to /usr/lib.  Suggested by Dan Nicolaescu.
 +
 +2010-04-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
 +      use `get_next_display_element' and `set_iterator_to_next' to
 +      advance to the next character, when looking for the character that
 +      begins the next row.
 +
 +      * .gdbinit: Add a "set Fmake_symbol" line to force GDB to load the
 +      definition of "struct Lisp_Symbol".
 +
 +2010-04-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (CRT_DIR): New variable, set by configure.
 +      * m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
 +      Use $CRT_DIR rather than HAVE_LIB64_DIR.  (Bug#5655)
 +
 +2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in: Remove C_SWITCH_X_MACHINE, unused.
 +
 +      * s/cygwin.h (LIBS_DEBUG): Remove, unused.
 +
 +      Remove redundant flags.
 +      * s/freebsd.h (C_SWITCH_SYSTEM):
 +      * s/hpux10-20.h (C_SWITCH_X_SYSTEM, LD_SWITCH_X_DEFAULT):
 +      * s/netbsd.h (C_SWITCH_SYSTEM):
 +      * s/openbsd.h (LD_SWITCH_X_DEFAULT): Remove, configure takes care
 +      of these.
 +
 +      Simplify m/intel386.h.
 +      * m/intel386.h (CRT0_DUMMIES): Remove, inline value in the only
 +      user: ecrt0.c.
 +      (SOLARIS2): Remove LOAD_AVE_TYPE, LOAD_AVE_CVT, LIBS_MACHINE, unused.
 +      (USG5_4): Move LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE definitions to
 +      the only user: s/unixware.h.
 +      * ecrt0.c: Remove #ifndef static.  Inline CRT0_DUMMIES definition
 +      from m/intel386.h.
 +      * s/unixware.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE):
 +      Definitions moved here from m/intel386.h.
 +
 +      * m/mips.h: Remove #if 0 code.
 +
 +2010-04-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix display of composed characters from L2R scripts in bidi buffers.
 +      * xdisp.c (set_iterator_to_next, next_element_from_composition):
 +      After advancing IT past the composition, resync the bidi iterator
 +      with IT's position.  (Bug#5977)
 +
 +2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (LD_SWITCH_MACHINE_TEMACS): Remove, unused.
 +      (TEMACS_LDFLAGS): Don't use LD_SWITCH_SYSTEM_TEMACS.
 +
 +2010-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * gtkutil.c: Include xsettings.h for Ftool_bar_get_system_style.
 +
 +2010-04-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Support `display' text properties and overlay strings in bidi buffers.
 +      * xdisp.c (pop_it): When the stack is popped after displaying
 +      from a string, bidi-iterate to exit from the text portion covered
 +      by the `display' property or overlay.  (Bug#5988, bug#5920)
 +
 +2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/macppc.h (LD_SWITCH_SYSTEM_TEMACS): Remove #undef.
 +      (LD_SWITCH_MACHINE_TEMACS): Remove, configure sets nocombreloc.
 +
 +      * s/netbsd.h (LD_SWITCH_SYSTEM_TEMACS): Remove, configure sets nocombreloc.
 +      * s/openbsd.h (LD_SWITCH_SYSTEM_TEMACS): Remove.
 +
 +      Simplify STARTFILES definition.
 +      * s/hpux10-20.h (START_FILES): Explicitly define here instead of
 +      relying on Makefile.in to define it.
 +      * s/cygwin.h (START_FILES): Likewise.
 +      * Makefile.in (STARTFILES): Remove conditional code, not needed anymore.
 +
 +      Clean up Solaris code.
 +      * s/sol2-6.h (LD_SWITCH_SYSTEM_TEMACS, C_SWITCH_X_SYSTEM)
 +      (LIB_MOTIF): Remove, configure takes care of this.
 +      (NOT_USING_MOTIF): Remove, unused.
 +      * xrdb.c: Remove #if 0-ed #include.
 +      (SYSV): Remove conditional for old SysV.
 +      * sysdep.c (closedir): Remove conditional code for Solaris,
 +      Solaris has closedir.
 +
 +2010-04-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (read_and_apply_settings): Check if current_font is
 +      NULL before strcmp (Bug#6001).
 +
 +2010-04-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Clean up HP-UX files.
 +      * m/hp800.h (NO_REMAP, VIRT_ADDR_VARIES, DATA_SEG_BITS)
 +      (DATA_START, TEXT_START, LOAD_AVE_TYPE, LOAD_AVE_CVT)
 +      (LDAV_SYMBOL, index, rindex): Move definitions only used in HP-UX ...
 +      * s/hpux10-20.h: ... to the only user, here.
 +
 +2010-04-21  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_find_paragraph_start, bidi_at_paragraph_end): Don't
 +      use buffer-local values of paragraph-start and paragraph-separate.
 +      <paragraph_start_re, paragraph_separate_re>: Rename from
 +      fallback_paragraph_start_re and fallback_paragraph_separate_re.
 +      (Bug#5992)
 +
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c: Qmonospace_font_name, Qtool_bar_style and
 +      current_tool_bar_style are new.
 +      (store_config_changed_event): Rename from store_font_changed_event.
 +      (XSETTINGS_TOOL_BAR_STYLE): New define.
 +      (SEEN_FONT, SEEN_TB_STYLE): New enum values.
 +      (struct xsettings): Add font and tb_style, set xft stuff inside #ifdef
 +      HAVE_XFT.
 +      (something_changedCB): store_font_changed_event is now
 +      store_config_changed_event.
 +      (parse_settings): Rename from parse_xft_settings.
 +      Read non-xft xsettings outside #ifdef HAVE_XFT.
 +      (read_settings): Rename from read_xft_settings.
 +      (apply_xft_settings): Take current settings as parameter.  Do not
 +      call read_(xft)_settings.
 +      (read_and_apply_settings): New function.
 +      (xft_settings_event): Do non-xft stuff out of HAVE_XFT.
 +      Call read_and_apply_settings if there are settings to be read.
 +      (init_xsettings): Rename from init_xfd_settings.
 +      Call read_and_apply_settings unconditionally.
 +      (xsettings_initialize): Call init_xsettings.
 +      (Ftool_bar_get_system_style): New function.
 +      (syms_of_xsettings): Define Qmonospace_font_name and
 +      Qtool_bar_style.  Initialize current_tool_bar_style to nil.
 +      defsubr Stool_bar_get_system_style.  Fprovide on
 +      dynamic-setting.
 +      Move misplaced HAVE_GCONF
 +
 +      * xsettings.h (Ftool_bar_get_system_style): Declare.
 +
 +      * xdisp.c: Vtool_bar_style, tool_bar_max_label_size,
 +      Qtext, Qboth, Qboth_horiz are new.
 +      (syms_of_xdisp): Intern Qtext, Qboth, Qboth_horiz, DEFVAR
 +      Vtool_bar_style, tool_bar_max_label_size.
 +
 +      * lisp.h: Extern declare Qtext, Qboth, Qboth_horiz.
 +
 +      * keyboard.c: QClabel is new.
 +      (parse_tool_bar_item): Take out QClabel from tool bar items.
 +      Try to construct a label if ther is no QClabel.
 +      (syms_of_keyboard): Intern :label as QClabel.
 +
 +      * dispextern.h (tool_bar_item_idx): TOOL_BAR_ITEM_LABEL is new.
 +      (Vtool_bar_style, tool_bar_max_label_size, DEFAULT_TOOL_BAR_LABEL_SIZE):
 +      New.
 +
 +      * Makefile.in (SOME_MACHINE_LISP): font-setting.el renamed to
 +      dynamic-setting.el.
 +
 +      * gtkutil.c (xg_tool_bar_menu_proxy): Handle label in tool bar item.
 +      (xg_make_tool_item, xg_show_toolbar_item): New function.
 +      (update_frame_tool_bar): Take label from TOOL_BAR_ITEM_LABEL.
 +      Call xg_make_tool_item to make a tool bar item.
 +      Call xg_show_toolbar_item.  Use wtoolbar instead of x->toolbar_widget.
 +
 +      * xterm.c (x_draw_image_relief): Take Vtool_bar_button_margin
 +      into account for toolbars.
 +
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * data.c (make_blv): Declarations before code (Bug#5993).
 +
 +2010-04-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (DBUS_OBJ, GTK_OBJ, XMENU_OBJ, XOBJ):
 +      Define using autoconf, not cpp.
 +      (LIBXSM): New variable, set by autoconf.
 +      (LIBXT): Use $LIBXSM.
 +
 +2010-04-21  Dan Nicolaescu  <local_user@dannlt>
 +
 +      Remove NOMULTIPLEJOBS, unused.
 +      * s/template.h (NOMULTIPLEJOBS):
 +      * s/msdos.h (NOMULTIPLEJOBS): Remove, unused.
 +
 +      Simplify LD_SWITCH_SYSTEM_TEMACS usage.
 +      * s/freebsd.h (LD_SWITCH_SYSTEM_TEMACS):
 +      * s/gnu-linux.h (LD_SWITCH_SYSTEM_TEMACS): Remove, configure
 +      detects -znocombreloc and passes it to the linker
 +      * s/hpux10-20.h (LD_SWITCH_SYSTEM_TEMACS): Remove, empty.
 +
 +2010-04-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBSELINUX_LIBS): Move out of #ifdef.
 +
 +2010-04-21  Karel Klíč  <kklic@redhat.com>
 +
 +      * Makefile.in (LIBSELINUX_LIBS): New.
 +      (LIBES): Add $LIBSELINUX_LIBS.
 +      * eval.c, lisp.h (call7): New function.
 +      * fileio.c [HAVE_LIBSELINUX]: Include selinux headers.
 +      (Ffile_selinux_context, Fset_file_selinux_context):
 +      New functions.
 +      (Fcopy_file): New parameter preserve-selinux-context.
 +      (Frename_file): Preserve selinux context when renaming by copy-file.
 +
 +2010-04-21  Juanma Barranquero  <lekktu@gmail.com>
 +            Eli Zaretskii  <eliz@gnu.org>
 +
 +      Don't depend on cm.c or termcap.c on Windows, use stubs.
 +      * makefile.w32-in (OBJ1): Remove cm.$(O) and termcap.$(O).
 +      ($(BLD)/cm.$(O), $(BLD)/termcap.$(O)): Remove.
 +      * w32console.c (current_tty, cost): New vars; lifted from cm.c.
 +      (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear)
 +      (sys_tputs, sys_tgetstr): New stubs.
 +      * s/ms-w32.h (chcheckmagic, cmcostinit, cmgoto, cmputc, Wcm_clear)
 +      (tputs, tgetstr): New; define to sys_*.
 +
 +2010-04-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * buffer.c (syms_of_buffer) <bidi-display-reordering>: Doc fix.
 +
 +2010-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
 +      Just signal a warning rather than an error when inside a let.
 +      (Fmake_variable_frame_local): Add the same test.
 +
 +      * font.c (syms_of_font): Make the style table vars read-only.
 +
 +      * buffer.h (struct buffer): Remove unused var `direction_reversed'.
 +      * buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization.
 +
 +      * bidi.c (bidi_initialize): Simplify fallback_paragraph_*_re init.
 +
 +2010-04-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix R2L paragraph display on TTY.
 +
 +      * xdisp.c (unproduce_glyphs): New function.
 +      (display_line): Use it when produced glyphs are discarded from R2L
 +      glyph rows.
 +      (append_composite_glyph): In R2L rows, prepend the glyph rather
 +      than appending it.
 +
 +      * term.c (append_composite_glyph): In R2L rows, prepend the glyph
 +      rather than append it.  Set up the resolved_level and bidi_type
 +      attributes of the appended glyph.
 +      (produce_special_glyphs): Mirror the backslash continuation
 +      character in R2L lines.
 +
 +      Implement display of R2L paragraphs in GUI sessions.
 +
 +      * xdisp.c [HAVE_WINDOW_SYSTEM]: Add prototype for
 +      append_stretch_glyph.
 +      (set_cursor_from_row) <cursor_x>: Remove unused variable.
 +      Fix off-by-one error in computing x at end of text in the row.
 +      (append_stretch_glyph): In reversed row, prepend the glyph rather
 +      than append it.  Set resolved_level and bidi_type of the glyph.
 +      (extend_face_to_end_of_line): If the row is reversed, prepend a
 +      stretch glyph whose width is such that the rightmost glyph will be
 +      drawn at the right margin of the window.  Fix off-by-one error on
 +      TTY frames in testing whether a line needs face extension.
 +      Fix face extension at ZV.  If this is the last glyph row, use
 +      DEFAULT_FACE_ID, to avoid painting the rest of the window with the
 +      region face.
 +      (set_cursor_from_row, display_line):
 +      Use MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
 +      row->continuation_lines_width.
 +      (next_element_from_buffer): Don't call bidi_paragraph_init if we
 +      are at ZV.  Fixes a crash when reseated to ZV by
 +      try_window_reusing_current_matrix.
 +      (display_and_set_cursor, erase_phys_cursor): Handle negative HPOS,
 +      which happens with R2L glyph rows.  Fixes a crash when inserting a
 +      character at end of an R2L line.
 +      (set_cursor_from_row): Don't be fooled by truncated rows: don't
 +      treat them as having zero-width characters.  Improve comments.
 +      Don't reverse pos_before and pos_after for reversed glyph rows.
 +      Set cursor.x to negative value when the cursor might be on the
 +      left fringe.
 +      (IT_OVERFLOW_NEWLINE_INTO_FRINGE): For R2L lines, consider the
 +      left fringe, not the right one.
 +      (notice_overwritten_cursor, draw_phys_cursor_glyph)
 +      (erase_phys_cursor): For reversed cursor_row, support cursor on
 +      the left fringe.
 +
 +      * fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
 +      of continuation indicators on the fringes.
 +      (draw_fringe_bitmap): For reversed glyph rows, allow cursor on the
 +      left fringe.
 +
 +      * w32term.c (w32_draw_window_cursor): For reversed glyph rows,
 +      draw cursor on the left fringe.
 +
 +      * xterm.c (x_draw_window_cursor): For reversed glyph rows, draw
 +      cursor on the left fringe.
 +
 +      * dispnew.c (update_text_area): Handle reversed desired rows when
 +      the cursor is on the left fringe.
 +      (set_window_cursor_after_update): Limit cursor's hpos by -1 from
 +      below, not by 0, for when the cursor is on the left fringe.
 +
 +2010-04-20  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_event_is_for_scrollbar): Check if grabbed
 +      widget is a scrollbar.
 +
 +2010-04-20  Kenichi Handa  <handa@m17n.org>
 +
 +      * charset.c (char_charset): Consider Vcharset_non_preferred_head
 +      only when the arg CHARSET_LIST is nil.
 +
 +2010-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Make variable forwarding explicit rather the using special values.
 +      Basically, this makes the structure of buffer-local values and object
 +      forwarding explicit in the type of Lisp_Symbols rather than use
 +      special Lisp_Objects for that.  This tends to lead to slightly more
 +      verbose code, but is more C-like, simpler, and makes it easier to make
 +      sure we handled all cases, among other things by letting the compiler
 +      help us check it.
 +      * lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
 +      Removing forwarding objects.
 +      (enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
 +      (struct Lisp_Symbol): Make the various forms of variable-forwarding
 +      explicit rather than hiding them inside Lisp_Object "values".
 +      (XFWDTYPE): New macro.
 +      (XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
 +      (XBUFFER_LOCAL_VALUE): Remove.
 +      (SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
 +      (SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
 +      (SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
 +      (struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
 +      (struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
 +      Remove the Lisp_Misc_* header.
 +      (struct Lisp_Buffer_Local_Value): Redefine.
 +      (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
 +      (struct Lisp_Misc_Any): Add filler to get the right size.
 +      (struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
 +      Lisp_Intfwd.
 +      (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
 +      (DEFVAR_KBOARD): Allocate a forwarding object.
 +      * data.c (do_blv_forwarding, store_blv_forwarding): New macros.
 +      (let_shadows_global_binding_p): New function.
 +      (union Lisp_Val_Fwd): New type.
 +      (make_blv): New function.
 +      (swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
 +      (store_symval_forwarding, swap_in_global_binding, Fboundp)
 +      (swap_in_symval_forwarding, find_symbol_value, Fset)
 +      (let_shadows_buffer_binding_p, set_internal, default_value)
 +      (Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
 +      (Fkill_local_variable, Fmake_variable_frame_local)
 +      (Flocal_variable_p, Flocal_variable_if_set_p)
 +      (Fvariable_binding_locus):
 +      * xdisp.c (select_frame_for_redisplay):
 +      * lread.c (Fintern, Funintern, init_obarray, defvar_int)
 +      (defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
 +      * frame.c (store_frame_param):
 +      * eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
 +      * bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
 +      value structure.
 +      * buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
 +      (clone_per_buffer_values): Only adjust markers into the current buffer.
 +      (reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
 +      (Fbuffer_local_value, set_buffer_internal_1)
 +      (swap_out_buffer_local_variables):
 +      Adapt to the new symbol value structure.
 +      (DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
 +      (defvar_per_buffer): Take a new arg for the fwd object.
 +      (buffer_lisp_local_variables): Return a proper alist (different fix
 +      for bug#4138).
 +      * alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
 +      (Fgarbage_collect): Don't handle buffer_defaults specially.
 +      (mark_object): Handle new symbol value structure rather than the old
 +      special Lisp_Misc_* objects.
 +      (gc_sweep) <symbols>: Free also the buffer-local-value objects.
 +      * term.c (set_tty_color_mode):
 +      * bidi.c (bidi_initialize): Don't access the ->value field directly.
 +      * buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
 +      a buffer_local_flags.
 +      * print.c (print_object): Get rid of impossible forwarding objects.
 +
 +2010-04-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_get_type, bidi_get_category)
 +      (bidi_at_paragraph_end, bidi_resolve_weak, bidi_resolve_neutral)
 +      (bidi_type_of_next_char, bidi_level_of_next_char):
 +      Declare static.  Use `INLINE' rather than `inline'.
 +
 +2010-04-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * dired.c (Ffile_attributes): Fix typo in docstring.
 +
 +2010-04-19  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +
 +      * nsmenu.m (EmacsDialog-runDialogAt:): Declare ret as
 +      NSInteger (Bug#5811).
 +
 +2010-04-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * s/darwin.h (PTY_ITERATION, PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF)
 +      (PTY_OPEN): New defines.  Use openpty (Bug#726, Bug#5819).
  
 -2010-08-09  Peter O'Gorman <pogma@thewrittenword.com>  (tiny change)
 +2010-04-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
 -      * s/hpux10-20.h (HAVE_TERMIOS, NO_TERMIO, ORDINARY_LINK):
 -      New definitions.
 -      (HAVE_TERMIO): Remove.
 +      * frame.h (FRAME_LINE_TO_PIXEL_Y): Add missing parenthesis.
  
 -2010-08-06  Kenichi Handa  <handa@m17n.org>
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * charset.c: Include <stdlib.h>
 -      (struct charset_sort_data): New struct.
 -      (charset_compare): New function.
 -      (Fsort_charsets): New function.
 -      (syms_of_charset): Declare Fsort_charsets as a Lisp function.
 +      * xdisp.c (prepare_menu_bars): Don't call ns_set_doc_edited for
 +      terminal frames (Bug#5837).
  
 -      * coding.c (decode_coding_iso_2022): Fix checking of dimension
 -      number in CTEXT extended segment.
 +2010-04-19  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-08-01  Juanma Barranquero  <lekktu@gmail.com>
 +      * .gdbinit (xsubchartable): New command.
  
 -      * w32fns.c (syms_of_w32fns) <x-max-tooltip-size>: Fix typo in docstring.
 -      * xfns.c (syms_of_xfns) <x-max-tooltip-size>: Reflow docstring.
 +2010-04-19  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-07-30  Juanma Barranquero  <lekktu@gmail.com>
 +      * xdisp.c (display_line): Don't write beyond the last glyph row in
 +      the desired matrix.  Fixes a crash in "emacs -nw" (bug#5972), see
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00075.html
 +      and
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00213.html
  
 -      * fns.c (Fsubstring_no_properties, Fnthcdr, Ffeaturep)
 -      (Fhash_table_size): Fix typos in docstrings.
 -      (Fmake_hash_table): Doc fix.
 +2010-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-07-28  Juanma Barranquero  <lekktu@gmail.com>
 +      * alloc.c (Fpurecopy): Hash-cons if requested.
 +      (syms_of_alloc): Update purify-flag docstring.
  
 -      * minibuf.c (syms_of_minibuf) <read-buffer-function>:
 -      Doc fix (bug#5625).
 +2010-04-18  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-07-27  Ken Brown  <kbrown@cornell.edu>
 +      * gtkutil.c (xg_set_geometry): Set size in geometry string also.
 +      (x_wm_set_size_hint): Set USER_POS in hint_flags (Bug#5968).
  
 -      * dired.c (DIRENTRY_NONEMPTY) [cygwin]: Use d_ino instead of
 -      the MSDOS definition.
 +2010-04-17  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-07-25  Christoph Scholtes  <cschol2112@gmail.com>
 +      Fix a crash when an NSM character is inserted at BEGV.
  
 -      * minibuf.c (Fread_buffer): Doc fix (bug#6528).
 +      * bidi.c (bidi_init_it): Fix initialization of bidi_it->prev.
 +      (bidi_resolve_weak): Don't use prev.type_after_w1 if it is
 +      NEUTRAL_B or UNKNOWN_BT.
  
 -2010-07-22  Christoph Scholtes  <cschol2112@gmail.com>
 +2010-04-16  Eli Zaretskii  <eliz@gnu.org>
  
 -      * window.c (Fwindow_height): Doc fix (bug#6518).
 +      * xdisp.c (set_cursor_from_row): Don't consider possibility of
 +      other rows with cursor unless they are different from this row and
 +      this row is part of a continued line.  (Bug#5943)
  
 -2010-07-21  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-16  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * buffer.c (syms_of_buffer) <fringe-indicator-alist>: Doc fix.
 +      * s/freebsd.h: Restore osreldate.h include.
 +      Suggested by Naohiro Aota.
  
 -2010-07-17  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-04-16  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * gtkutil.c (xg_event_is_for_menubar): Also check that event window
 -      is related to the menu bar (Bug#6499).
 +      * xmenu.c (apply_systemfont_to_menu): *childs was incorrectly used.
  
 -2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-04-16  Ken Brown  <kbrown@cornell.edu>  (tiny change)
  
 -      * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*.
 +      * s/cygwin.h: Avoid linking against static libgcc.
  
 -      * xterm.c (handle_one_xevent): Pass event to x_menubar_window_to_frame.
 +2010-04-15  Juri Linkov  <juri@jurta.org>
  
 -      * xmenu.c (x_activate_menubar): Revert previous fix for Bug#6499,
 -      i.e. don't put back ButtonRelease (Bug#6608).
 +      * window.c: Add Qscroll_command.
 +      Remove Vscroll_preserve_screen_position_commands.
 +      (window_scroll_pixel_based, window_scroll_line_based): Check the
 +      `scroll-command' property on the last command instead of searching
 +      the last command in Vscroll_preserve_screen_position_commands.
 +      (syms_of_window): Initialize and staticpro `Qscroll_command'.
 +      Put Qscroll_command property on Qscroll_up and Qscroll_down.
 +      (scroll-preserve-screen-position): Doc fix.
 +      (Vscroll_preserve_screen_position_commands): Remove variable.
  
 -      * xfns.c (x_menubar_window_to_frame): Take XEvent as second parameter
 -      instead of Window.  Call xg_event_is_for_menubar when
 -      USE_GTK (Bug#6499).
 +2010-04-15  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * gtkutil.h (xg_event_is_for_menubar): Declare.
 +      * xdisp.c (message): Do not use NO_ARG_ARRAY.
  
 -      * gtkutil.c (xg_event_is_for_menubar): New function (Bug#6499).
 +2010-04-14  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-07-14  Eli Zaretskii  <eliz@gnu.org>
 +      Reduce cpp use in Makefile.in.
 +      * Makefile.in (DBUS_CFLAGS, DBUS_LIBS, GCONF_CFLAGS, GCONF_LIBS)
 +      (LIBSOUND, CFLAGS_SOUND, RSVG_LIBS, RSVG_CFLAGS, INTERVALS_H)
 +      (GETLOADAVG_LIBS, RUN_TEMACS): Move to the autoconf section.
 +      (ORDINARY_LINK): Remove, defined in src/s/gnu.h.
 +      (CRT0_COMPILE): Remove, inline it in the only user.
  
 -      * w32fns.c (x_set_foreground_color): Fix setting the cursor color
 -      when it's the same as the old foreground.  (Bug#6609)
 +2010-04-14  Juri Linkov  <juri@jurta.org>
  
 -2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
 +      * window.c (keys_of_window): Rebind `C-v' from `scroll-up' to
 +      `scroll-up-command' and `M-v' from `scroll-down' to
 +      `scroll-down-command'.
  
 -      * xfaces.c (realize_face): Garbage the frame if a face is removed
 -      (Bug#6593).
 +2010-04-14  Juri Linkov  <juri@jurta.org>
  
 -2010-07-05  Andreas Schwab  <schwab@linux-m68k.org>
 +      * window.c (Vscroll_preserve_screen_position_commands): New variable
 +      with the default value as the list of Qscroll_down and Qscroll_up.
 +      (window_scroll_pixel_based, window_scroll_line_based): Search the
 +      last command in the list Vscroll_preserve_screen_position_commands
 +      instead of comparing with Qscroll_up and Qscroll_down.
  
 -      * keyboard.c: Remove duplicate <setjmp.h>.
 -      (read_key_sequence): Remove volatile qualifiers.
 +2010-04-13  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-07-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +      * gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
 +      (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry
 +      does that.
  
 -      * dispextern.h (FRINGE_HEIGHT_BITS): New define.
 -      (struct glyph_row): New members left_fringe_offset and
 -      right_fringe_offset.
 +      * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width
 +      to zero.
  
 -      * xterm.c (x_draw_fringe_bitmap): Don't clip bottom aligned bitmap
 -      specially.
 -      * w32term.c (w32_draw_fringe_bitmap): Likewise.
 -      * nsterm.m (ns_draw_fringe_bitmap): Likewise.
 +2010-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here.
 -      Take account of bitmap offset.
 -      (draw_window_fringes): Take account of window vscroll.
 -      (update_window_fringes): Likewise.  Extend top-aligned top indicator
 -      or bottom-aligned bottom indicator to adjacent rows if it doesn't fit
 -      in one row.  Don't set redraw_fringe_bitmaps_p outside row comparison.
 -      Set left_fringe_offset and right_fringe_offset (Bug#5634, Bug#6325).
 +      * term.c (init_tty): Move common text outside of #ifdef TERMINFO.
  
 -2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +      Try to solve the problem of spurious EOF chars in long lines of text
 +      sent to interactive subprocesses.
 +      * sysdep.c (child_setup_tty): Do not enable ICANON any more.
 +      (system_process_attributes): Remove unused var `ttotal'.
 +      * process.c (send_process): Don't bother breaking long line with EOF
 +      chars when talking to ttys any more.
 +      (wait_reading_process_output): Output a warning when called in such
 +      a way that it could block without being interruptible.
  
 -      * w32fns.c (Qtooltip): Declare.
 -      Suggested by Andy Moreton <andrewjmoreton@gmail.com>.
 +      Try to detect file modification within the same second.
 +      * buffer.h (struct buffer): New field modtime_size.
 +      * buffer.c (reset_buffer): Initialize it.
 +      * fileio.c (Finsert_file_contents, Fwrite_region): Set it.
 +      (Fverify_visited_file_modtime): Check it.
 +      (Fclear_visited_file_modtime, Fset_visited_file_modtime): Clear it.
 +      (Fset_visited_file_modtime): Set (or clear) it.
  
 -2010-07-03  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * xmenu.c (x_activate_menubar): Send Press/Release for Gtk+ to avoid
 -      grab on just Press (Bug#6499).
 +      * process.c (status_notify): Remove unused var `ro'.
  
 -2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-12  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * frame.c (Qtooltip): New var.
 -      (delete_frame): Use it.  Fix faulty if statement.  Don't update
 -      mode line for tooltip frames.  Suggested by Martin Rudalics.
 +      * xfns.c (select_visual): Don't call error if XGetVisualInfo returns
 +      more than one visual (Bug#5938).
  
 -      * xfns.c (x_create_tip_frame):
 -      * w32fns.c (x_create_tip_frame): Use it.
 +2010-04-12  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-06-30  Naohiro Aota  <naota@elisp.net>  (tiny change)
 +      * Makefile.in (C_SWITCH_SYSTEM,C_SWITCH_MACHINE,C_SWITCH_X_SITE):
 +      Undefine.
  
 -      * xftfont.c (xftfont_open): Check font width one by one also when
 -      spacing is dual.
 +2010-04-11  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * ftfont.c (ftfont_open): Ditto.
 +      Remove C_SWITCH_SYSTEM_TEMACS.
 +      * s/darwin.h (C_SWITCH_SYSTEM_TEMACS): Remove.
 +      (malloc, realloc, free): Use emacs, not temacs for conditional
 +      definition.
  
 -2010-06-26  Andreas Schwab  <schwab@linux-m68k.org>
 +      * Makefile.in (C_SWITCH_SYSTEM_TEMACS): Remove.
 +      (ALL_CFLAGS): Do not use C_SWITCH_SYSTEM_TEMACS.
  
 -      * alloc.c (Fmake_byte_code): Don't access undefined argument
 -      (Bug#6517).
 +      Use autoconf, not cpp for some variables.
 +      * Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE)
 +      (C_SWITCH_X_SITE): Define using autoconf, not cpp.
 +      (ALL_CFLAGS): Use them as make variables.
 +      (really-lwlib, really-oldXMenu): Do not pass them.
  
 -2010-06-25  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-11  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * xdisp.c (next_element_from_image): Ensure that after-strings are
 -      read the next time we hit handle_stop (Bug#1336).
 +      * xmenu.c (apply_systemfont_to_dialog): New.
 +      (create_and_show_dialog): Call apply_systemfont_to_dialog if HAVE_XFT.
  
 -2010-06-23  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * lread.c (read1): Signal error if #s is not followed by paren.
 +      * process.c (exec_sentinel): Preserve current-buffer.
  
 -2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
 +      * process.c (read_process_output): Move the save-current-buffer to
 +      apply to both the filter and the non-filter branches.
  
 -      * image.c (free_image): Mark frame as garbaged (Bug#6426).
 +2010-04-10  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * keymap.c (Fdefine_key): Doc fix (Bug#6460).
 +      * s/msdos.h (UNEXEC): New definition.
  
 -2010-06-15  Glenn Morris  <rgm@gnu.org>
 +2010-04-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
 -      * editfns.c (Fbyte_to_string): Pacify compiler.
 +      * dispextern.h (TRY_WINDOW_CHECK_MARGINS)
 +      (TRY_WINDOW_IGNORE_FONTS_CHANGE): New defines.
  
 -2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * xdisp.c (try_window): Change arg from CHECK_MARGINS to FLAGS.
 +      Don't abort with fonts change if TRY_WINDOW_IGNORE_FONTS_CHANGE is
 +      set in FLAGS.  Callers with non-zero CHECK_MARGINS changed to use
 +      TRY_WINDOW_CHECK_MARGINS.
  
 -      * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string.
 -      Check `object's type before accessing its guts.
 +      * xfns.c (Fx_show_tip): Undo last change.  Call try_window with
 +      TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).  Subtract last glyph's
 +      width only when it is for padding.
  
 -2010-06-08  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-09  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * minibuf.c (Fall_completions): Add more checks.
 +      * xfns.c (Fx_show_tip): Call try_window in a loop until
 +      fonts_changed_p is zero (Bug#2423).
  
 -2010-06-08  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-08  Eli Zaretskii  <eliz@gnu.org>
  
 -      * minibuf.c (Fall_completions): Check COLLECTION's size (bug#6378).
 +      * xdisp.c (set_cursor_from_row): Don't dereference glyphs beyond
 +      the end of TEXT_AREA.  (Bug#5856)
  
 -2010-06-03  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-08  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * process.c (conv_lisp_to_sockaddr): Fix conversion of IPv4
 -      address.  (Bug#6346)
 +      * xsettings.c (XSETTINGS_FONT_NAME): Move XSETTINGS_FONT_NAME out of
 +      HAVE_GCONF.
  
 -2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-08  Eli Zaretskii  <eliz@gnu.org>
  
 -      * ccl.c (Fccl_program_p): Fix typo in docstring.
 +      * bidi.c (bidi_resolve_weak): Use prev.type_after_w1, instead of
 +      prev.orig_type, for resolving type of NSM.  (Bug#5858)
  
 -2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-08  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * keymap.c (Fwhere_is_internal): Fix handling of remapping (in thread
 -      of bug#6305).
 +      * xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
 +      (parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
 +      in current_font.
 +      (init_gconf): Read value of SYSTEM_FONT and save it in current_font.
 +      (Ffont_get_system_normal_font, xsettings_get_system_normal_font):
 +      New functions.
 +      (syms_of_xsettings): Initialize current_font.
 +      defsubr Sfont_get_system_normal_font.
  
 -2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +      * xsettings.h (Ffont_get_system_normal_font)
 +      (xsettings_get_system_normal_font): Declare.
  
 -      * xdisp.c (redisplay_window): After redisplay, check if point is
 -      still valid before setting it (Bug#6177).
 +      * xfns.c (extern xlwmenu_default_font): Remove.
 +      (Fx_create_frame): Remove setting of xlwmenu_default_font, moved
 +      to xlwmenu.c.
  
 -2010-05-20  enami tsugutomo  <tsugutomo.enami@jp.sony.com>
 +      * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
 +      menu items in UTF-8.
  
 -      * s/netbsd.h: If terminfo is found, use it in preference to
 -      termcap.  (Bug#6190)  [Backport from trunk]
 +      * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
 +      (apply_systemfont_to_menu): New function.
 +      (set_frame_menubar, create_and_show_popup_menu):
 +      Call apply_systemfont_to_menu.
  
 -2010-05-20  Kevin Ryde  <user42@zip.com.au>
 +2010-04-07  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * keyboard.c (Vlast_command, Vkeyboard_translate_table)
 -      (Voverriding_terminal_local_map, Vsystem_key_alist)
 -      (Vlocal_function_key_map): Fix manual link in docstring (Bug#6224).
 +      * frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use
 +      FRAME_LINE_TO_PIXEL_Y.
  
 -2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * xterm.c (x_set_window_size_1): Don't add border_width/height to
 +      pixelwidth/height.
  
 -      * editfns.c (Fbyte_to_string): New function.
 +2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-05-18  Chong Yidong  <cyd@stupidchicken.com>
 +      Simplify code for HP machines.
 +      * m/hp800.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, NO_REMAP): Do not define
 +      for GNU_LINUX, not needed.
 +      (UNEXEC, NEED_BSDTTY): Move definitions...
 +      * s/hpux10-20.h (UNEXEC, NEED_BSDTTY): ... here.
  
 -      * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
 -      prevent stack overflow if number of arguments is too large
 -      (Bug#6214).
 +      * m/iris4d.h (UNEXEC): Move definition ...
 +      * s/irix6-5.h (UNEXEC): ... here.
  
 -2010-05-11  Eli Zaretskii  <eliz@gnu.org>
 +2010-04-04  Jan Djärv  <jan.h.d@swipnet.se>
  
 -      * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(SRC)/w32.h.
 +      * xfns.c (set_machine_and_pid_properties): New function.
 +      (Fx_create_frame): Call set_machine_and_pid_properties.
  
 -      * w32fns.c: Include w32.h.
 -      (Fw32_shell_execute): Decode the error message before passing it
 -      to `error'.  (Bug#6126)
 +2010-04-03  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-05-11  Karel Klic  <kklic@redhat.com>
 +      * bidi.c (bidi_resolve_explicit, bidi_level_of_next_char):
 +      Check bidi_it->bytepos against ZV_BYTE instead of bidi_it->ch against
 +      BIDI_EOB.  Fixes infloop with vertical cursor motion at ZV.
  
 -      * ftfont.c: Fix incorrect parentheses of #if condition for
 -      definining M17N_FLT_USE_NEW_FEATURE.
 +      * w32fns.c (x_create_tip_frame): Copy `parms' before we modify it
 +      in this function.  (Bug#5703)
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-03  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * Version 23.2 released.
 +      * nsterm.h: Fix last change.
  
 -2010-04-30  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-03  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * composite.c (autocmp_chars): Save point as marker before calling
 -      auto-composition-function (Bug#5984).
 +      * m/intel386.h (NO_REMAP): Move definition ...
 +      * s/msdos.h (NO_REMAP): ... here.
  
 -      * lisp.h (restore_point_unwind): Add prototype.
 +      * m/vax.h (CRT0_DUMMIES): Remove, unused.
  
 -      * fileio.c (restore_point_unwind): Remove static attribute.
 +      * ecrt0.c: Remove MSDOS, m68k and __sparc__ conditionals, file not
 +      used on those platforms.
  
 -2010-04-23  Kenichi Handa  <handa@m17n.org>
 +2010-04-02  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the
 -      new feature of libotf and m17n-flt.
 -      (ftfont_check_otf) [M17N_FLT_USE_NEW_FEATURE]:
 -      Call OTF_check_features even if no specific feature is given.
 -      (PACK_OTF_TAG) [M17N_FLT_USE_NEW_FEATURE]: New macro.
 -      (ftfont_drive_otf) [M17N_FLT_USE_NEW_FEATURE]: Handle the case
 -      that OUT is NULL.  Use OTF_drive_gsub_with_log and
 -      OTF_drive_gpos_with_log instead of OTF_drive_gsub and
 -      OTF_drive_gpos.
 -      (ftfont_try_otf) [M17N_FLT_USE_NEW_FEATURE]: New function.
 -      (ftfont_shape_by_flt) [M17N_FLT_USE_NEW_FEATURE]:
 -      Setup mflt_enable_new_feature and mflt_try_otf.
 +      Remove extern errno declarations.
 +      * xterm.c:
 +      * xrdb.c:
 +      * w32term.c:
 +      * unexec.c:
 +      * unexaix.c:
 +      * sysdep.c:
 +      * process.c:
 +      * lread.c:
 +      * keyboard.c:
 +      * floatfns.c:
 +      * filelock.c:
 +      * fileio.c:
 +      * emacs.c (main):
 +      * ecrt0.c:
 +      * dispnew.c:
 +      * callproc.c:
 +      * buffer.c: Remove errno extern declarations.
 +      * s/netbsd.h (NEED_ERRNO): Remove.
  
 -2010-04-19  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-01  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * dired.c (Ffile_attributes): Fix typo in docstring.
 +      Remove all uses of LIBX11_SYSTEM.
 +      * Makefile.in (LIBX11_SYSTEM): Remove.
 +      * s/msdos.h (LIBX11_SYSTEM): Do not define, define LIBS_SYSTEM
 +      instead.
  
 -2010-04-13  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +2010-04-01  Eli Zaretskii  <eliz@gnu.org>
  
 -      * nsmenu.m (EmacsDialog-runDialogAt:): Declare ret as
 -      NSInteger (Bug#5811).
 +      Remove support for DJGPP v1.x (bug#5813).
  
 -2010-04-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +      * w16select.c (__dpmi_int): Remove DJGPP v1.x compatibility.
 +      * s/msdos.h:
 +      * unexec.c (make_hdr, copy_text_and_data):
 +      * sysdep.c (wait_for_termination, sys_subshell):
 +      * msdos.c (dos_set_window_size, msdos_set_cursor_shape)
 +      (IT_set_terminal_modes, __write, _rename, gethostname)
 +      (gettimeofday, alarm, fork, kill, dos_ttraw, dos_ttcooked)
 +      (run_msdos_command, abort): Remove DJGPP v1.x code and tests of
 +      the value of __DJGPP__.
 +      (nice, pause, sigsetmask, sigblock): Remove DJGPP v1.x
 +      compatibility code.
 +      * lread.c:
 +      * gmalloc.c (memalign):
 +      * fileio.c (Fcopy_file, check_executable, Ffile_modes):
 +      * emacs.c (main):
 +      * dosfns.c (init_dosfns):
 +      * dired.c (file_name_completion_stat): Remove tests of __DJGPP__.
  
 -      * s/darwin.h (PTY_ITERATION, PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF)
 -      (PTY_OPEN): New defines.  Use openpty (Bug#726, Bug#5819).
 +2010-04-01  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-04-08  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +      * xdisp.c (set_cursor_from_row): Fix cursor positioning when the
 +      string with `cursor' property comes from an `after-string'
 +      overlay.  (Bug#5816)
  
 -      * frame.h (FRAME_LINE_TO_PIXEL_Y): Add missing parenthesis.
 +2010-04-01  Glenn Morris  <rgm@gnu.org>
  
 -2010-04-07  Jan Djärv  <jan.h.d@swipnet.se>
 +      * Makefile.in (LIBTIFF, LIBJPEG, LIBPNG, LIBGIF, LIBXPM, XFT_LIBS):
 +      Define as Makefile variables.
 +      (LIBX): Use above variables rather than directly using autoconf.
  
 -      * frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use
 -      FRAME_LINE_TO_PIXEL_Y.
 +2010-03-31  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * xterm.c (x_set_window_size_1): Don't add border_width/height to
 -      pixelwidth/height.
 +      Clean up BSD_SYSTEM use.
 +      * xterm.c:
 +      * process.c:
 +      * emacs.c: Use HAVE_SYS_IOCTL_H instead of BSD_SYSTEM as a guard
 +      for including <sys/ioctl.h>.
 +      * sysdep.c (wait_without_blocking): Remove BSD_SYSTEM case, this
 +      code is only used for MSDOS.
  
 -2010-04-05  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -      * xdisp.c (prepare_menu_bars): Don't call ns_set_doc_edited for
 -      terminal frames (Bug#5837).
 +      * image.c: Add `Qextension_data'.
 +      (syms_of_image): Initialize and staticpro `Qextension_data'.
 +      (Fimage_metadata): Rename from `Fimage_extension_data'.
 +      (gif_load): Put GIF extension data to the property
 +      `Qextension_data'.
  
  2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
  
  2010-03-31  Eli Zaretskii  <eliz@gnu.org>
  
 -      * w32fns.c (x_create_tip_frame): Copy `parms' before we modify it
 -      in this function.  (Bug#5703)
 +      * xdisp.c (highlight_trailing_whitespace): Support highlight of
 +      trailing whitespace in right-to-left rows.
  
 -2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * nsterm.h: Fix last change.
 +      Get rid of the direct_output optimizations.
 +      * keyboard.c (nonundocount): Remove extern declaration.
 +      (command_loop_1): Remove brittle optimisation for cheap and
 +      common operations.
 +      * xdisp.c (redisplay_internal): Don't bother checking
 +      redisplay_performed_directly_p any more.
 +      * sysdep.c (init_sys_modes): Don't call direct_output_forward_char
 +      any more.
 +      * dispnew.c (redisplay_performed_directly_p)
 +      (direct_output_for_insert, direct_output_forward_char):
 +      * dispextern.h (redisplay_performed_directly_p)
 +      (direct_output_for_insert, direct_output_forward_char): Remove.
 +      * cmds.c (nonundocount): Make it static.
  
 -2010-03-30  Bernhard Herzog  <bh@intevation.de>  (tiny change)
 +2010-03-31  Bernhard Herzog  <bh@intevation.de>  (tiny change)
  
        * menu.c (Fx_popup_menu): Use last_event_timestamp (Bug#4930).
  
 -2010-03-30  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-03-31  Jan Djärv  <jan.h.d@swipnet.se>
  
        * xdisp.c (note_mouse_highlight): Don't do highlight if pointer is
        invisible (Bug#5766).
  
 -2010-03-29  Adrian Robert  <adrian.b.robert@gmail.com>
 +2010-03-31  Adrian Robert  <adrian.b.robert@gmail.com>
  
 -      * xdisp.c (x_consider_frame_title, update_window_cursor): Remove
 -      HAVE_NS conditionals.
 +      * xdisp.c (x_consider_frame_title, update_window_cursor):
 +      Remove HAVE_NS conditionals.
        (prepare_menu_bars) [HAVE_NS]: Call ns_set_doc_edited.
  
        * nsfns.m (x_implicitly_set_name): If frame-title-format is t, use
  
        * nsterm.m: Remove unneeded prototype.
  
 -2010-03-28  Glenn Morris  <rgm@gnu.org>
 +2010-03-31  Glenn Morris  <rgm@gnu.org>
  
        * Makefile.in (SOME_MACHINE_OBJECTS): Ensure dbus stuff is always
        in the DOC file.  (Bug#5336)
  
 -2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * xdisp.c (pos_visible_p): Revert 2008-01-25 change (Bug#5730).
  
 -2010-03-20  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * window.c (keys_of_window): Remove redundant/overridden bindings.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (BUFFER_POS_REACHED_P, move_it_in_display_line_to):
 +      Restore original behavior when the iterator is not bidi_p.
 +
 +2010-03-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xdisp.c (syms_of_xdisp): Use intern_c_string instead of intern.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_cache_iterator_state): Invalidate the cache if we
 +      are outside the range of cached character positions.
 +
 +2010-03-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/bidi.$(O)): Add dependency on w32gui.h.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Initial support for bidirectional editing.
 +
 +      * Makefile.in (obj): Include bidi.o.
 +      (bidi.o): New target.
 +
 +      * makefile.w32-in (OBJ1): Add $(BLD)/bidi.$(O).
 +      ($(BLD)/bidi.$(O)): New target.
 +
 +      * bidi.c: New file.
 +
 +      * buffer.h (struct buffer): New members bidi_display_reordering
 +      and bidi_paragraph_direction.
 +
 +      * buffer.c (init_buffer_once): Initialize bidi_display_reordering
 +      and bidi_paragraph_direction.
 +      (syms_of_buffer): Declare Lisp variables bidi-display-reordering
 +      and bidi-paragraph-direction.
 +      (Fbuffer_swap_text): Swap the values of
 +      bidi_display_reordering and bidi_paragraph_direction.
 +
 +      * dispextern.h (BIDI_MAXLEVEL, BIDI_AT_BASE_LEVEL): New macros.
 +      (bidi_type_t, bidi_dir_t): New types.
 +      (bidi_saved_info, bidi_stack, bidi_it): New structures.
 +      (struct it): New members bidi_p, bidi_it, paragraph_embedding,
 +      prev_stop, base_level_stop, and eol_pos.
 +      (bidi_init_it, bidi_get_next_char_visually): New prototypes.
 +      (IT_STACK_SIZE): Enlarge to 5.
 +      (struct glyph_row): New member reversed_p.
 +      <string_buffer_position>: Update prototype.
 +      (PRODUCE_GLYPHS): Set the reversed_p flag in the iterator's
 +      glyph_row if bidi_it.paragraph_dir == R2L.
 +      (struct glyph): New members resolved_level and bidi_type.
 +
 +      * dispnew.c (direct_output_forward_char): Give up if we need bidi
 +      processing or buffer's direction is right-to-left.
 +      (prepare_desired_row): Preserve the reversed_p flag.
 +      (row_equal_p): Compare the reversed_p attributes as well.
 +
 +      * xdisp.c (init_iterator): Initialize it->bidi_p.
 +      Call bidi_init_it and set it->paragraph_embedding from the current
 +      buffer's value of bidi_paragraph_direction.
 +      (reseat_1): Initialize bidi_it.first_elt.
 +      (set_iterator_to_next, next_element_from_buffer): Use the value of
 +      paragraph_embedding to determine the paragraph direction.
 +      (set_iterator_to_next): Under bidi reordering, call
 +      bidi_get_next_char_visually.  Call bidi_paragraph_init if the
 +      new_paragraph flag is set in the bidi iterator.
 +      (next_element_from_buffer): If bidi_it.first_elt is set,
 +      initialize paragraph direction and find the first character to
 +      display in the visual order.  If reseated to a middle of a line,
 +      prime the bidi iterator starting at the line's beginning.
 +      Handle the situation where we overstepped stop_charpos due to
 +      non-linearity of the bidi iteration.  Likewise for when we back up
 +      beyond the previous stop_charpos.  When moving across stop_charpos,
 +      record it in prev_stop.
 +      (display_line): Set row->end and it->start for the next row to the
 +      next character in logical order.  Always extend reversed_p rows to
 +      the end of line, even if they end at ZV.  Copy the reversed_p flag
 +      to the next glyph row.  Keep calling set_cursor_from_row for
 +      bidi-reordered rows even if we already have a possible candidate
 +      for cursor position.  Set row_end after all the row's glyphs have
 +      been produced, by looping over the glyphs.  Record the position
 +      after EOL in it->eol_pos, and use it to set end_pos of the last
 +      row produced for a continued line.
 +      <Qright_to_left, Qleft_to_right>: New variables.
 +      (syms_of_xdisp): Initialize and staticpro them.
 +      (string_buffer_position_lim): New function.
 +      (string_buffer_position): Most of code moved to
 +      string_buffer_position_lim.  Last argument and return value are
 +      now EMACS_INT; all callers changed.
 +      (set_cursor_from_row): Rewritten to support bidirectional text and
 +      reversed glyph rows.
 +      (text_outside_line_unchanged_p, try_window_id):
 +      Disable optimizations if we are reordering bidirectional text and the
 +      paragraph direction can be affected by the change.
 +      (append_glyph, append_composite_glyph)
 +      (produce_image_glyph, append_stretch_glyph): Set the
 +      resolved_level and bidi_type members of each glyph.
 +      (append_glyph): If the glyph row is reversed, prepend the glyph
 +      rather than appending it.
 +      (handle_stop_backwards): New function.
 +      (reseat_1, pop_it, push_it): Set prev_stop and base_level_stop.
 +      (reseat): call handle_stop_backwards to recompute prev_stop and
 +      base_level_stop for the new position.
 +      (handle_invisible_prop): Under bidi iteration, skip invisible text
 +      using bidi_get_next_char_visually.  If we are `reseat'ed, init the
 +      paragraph direction.  Update IT->prev_stop after skipping
 +      invisible text.
 +      (move_it_in_display_line_to): New variables prev_method
 +      and prev_pos.  Compare for strict equality in
 +      BUFFER_POS_REACHED_P.
 +      (try_cursor_movement): Examine all the candidate rows that occlude
 +      point, to return the best match.  If rows are bidi-reordered
 +      and point moved backwards, back up to the row that is not a
 +      continuation line, and start looking for a suitable row from
 +      there.
 +
 +      * term.c (append_glyph): Reverse glyphs by pre-pending them,
 +      rather than appending, if the glyph_row's reversed_p flag is set.
 +      Set the resolved_level and bidi_type members of each glyph.
 +
 +      * .gdbinit (pbiditype): New command.
 +      (pgx): Use it to display bidi level and type of the glyph.
 +      (pitx): Display some bidi information about the iterator.
 +      (prowlims, pmtxrows): New commands.
 +
 +2010-03-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove all uses of C_DEBUG_SWITCH and LIBS_DEBUG.
 +      * s/usg5-4.h (LIBS_DEBUG):
 +      * s/irix6-5.h (C_DEBUG_SWITCH):
 +      * s/gnu-linux.h (LIBS_DEBUG):
 +      * s/darwin.h (LIBS_DEBUG):
 +      * s/bsd-common.h (LIBS_DEBUG):
 +      * s/aix4-2.h (LIBS_DEBUG, C_DEBUG_SWITCH):
 +      * m/iris4d.h (LIBS_DEBUG):
 +      * m/hp800.h (LIBS_DEBUG): Remove definitions.
 +
 +      * Makefile.in (LIBES): Remove reference to LIBS_DEBUG.
 +      (LIBS_DEBUG): Remove definition.
 +
 +2010-03-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * process.c (Fmake_network_process): Don't apply Bug#5173 fix for
 +      Windows.
 +
 +2010-03-25  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * process.c (Fmake_network_process): Don't call turn_on_atimers around
 +      `connect' (Bug#5723).
 +
 +2010-03-25  Helmut Eller  <eller.helmut@gmail.com>
 +
 +      * process.c (Fmake_network_process): Call `select' for interrupted
 +      `connect' rather than creating new socket (Bug#5173).
 +
 +2010-03-24  Jan Djärv  <jan.h.d@swipnet.se>
  
        * frame.c (x_get_arg): Handle RES_TYPE_BOOLEAN_NUMBER (bug #5736).
  
  
        * dispextern.h (resource_types): RES_TYPE_BOOLEAN_NUMBER is new.
  
 -2010-03-20  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-03-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        * xfns.c (Fx_create_frame) [USE_LUCID]: Add BLOCK_INPUT around
        XLoadQueryFont.
  
 -2010-03-16  Kenichi Handa  <handa@m17n.org>
 +2010-03-24  Kenichi Handa  <handa@m17n.org>
  
        * coding.c (decode_coding_ccl): Fix previous change for the
        multibyte case.
        case that the output buffer is fullfilled.
        (encode_coding): Setup ccl program here.
  
 -2010-03-15  Andreas Politz  <politza@fh-trier.de>  (tiny change)
 +2010-03-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/gnu-linux.h (LIBS_SYSTEM): Remove, same as default.
 +
 +      Simplify LIBS_MACHINE definitions.
 +      * m/hp800.h (LIBS_MACHINE): Remove, same as default.
 +      * m/iris4d.h (LIBS_MACHINE): Likewise.
 +      * m/ibmrs6000.h (LIBS_MACHINE): Rename to LIBS_SYSTEM and move ...
 +      * s/aix4-2.h (LIBS_SYSTEM): ... here.
 +      * s/netbsd.h: Remove commented out code.
 +
 +2010-03-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove dead code dealing with POSIX_SIGNALS.
 +      * atimer.c (set_alarm): Remove dead code, all USG systems define
 +      POSIX_SIGNALS.
 +      * data.c (arith_error): Likewise.
 +      * keyboard.c (input_available_signal, handle_user_signal)
 +      (interrupt_signal): Likewise.
 +      * process.c (sigchld_handler): Likewise.
 +      (create_process): Remove if 0 code.  Remove HPUX conditional when
 +      !defined (POSIX_SIGNALS), it cannot be true.
 +      * syssignal.h: Remove USG5_4 and USG conditionals when
 +      !POSIX_SIGNALS, they cannot be true.
 +
 +      * keyboard.c (Fset_input_interrupt_mode): Remove code depending on
 +      NO_SOCK_SIGIO, not used anymore.
 +
 +2010-03-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/vax.h (BSD_SYSTEM, BSD4_2): Remove conditionals, we only
 +      support vax on BSDs.
 +
 +      * m/ibmrs6000.h (ORDINARY_LINK): Move definition ...
 +      * s/aix4-2.h (ORDINARY_LINK): ... here.
 +
 +2010-03-21  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (abs_builddir): Define.
 +      (bootstrap_exe): Use it.
 +      (VPATH): Use $(srcdir) instead of @srcdir@.
 +
 +2010-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * Makefile.in (bootstrap_exe): Use an absolute name.
 +
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove support for old GNU/Linux using libc version 5.
 +      * m/alpha.h (LINUX_SBRK_BUG): Remove definition.
 +      * emacs.c (main): Remove code depending on LINUX_SBRK_BUG.
 +
 +      Consolidate redundant definitions in s/bsd-common.h.
 +      * s/bsd-common.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Define (or undefine) here instead of
 +      doing it in all files that include this one.
 +      * s/gnu.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Remove.
 +      * s/freebsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Remove.
 +      * s/netbsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Remove.
 +
 +      Consolidate redundant definitions.
 +      * s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
 +      it's undefined in all files that include this one.
 +      (POSIX_SIGNALS): Define here instead of doing it in all files that
 +      include this one.
 +      * s/irix6-5.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
 +      (POSIX_SIGNALS): Do not define.
 +      * s/sol2-6.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
 +      (POSIX_SIGNALS): Do not define.
 +      * s/unixware.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
 +      (POSIX_SIGNALS): Do not define.
 +
 +      Remove support for old UNIX System V systems.
 +      * s/unixware.h: Add the contents of s/usg-5-4-2.h.
 +      * s/usg-5-4-2.h: Remove.
 +
 +      Remove support for Solaris on PPC and for old versions.
 +      * s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h.
 +      (LD_SWITCH_SYSTEM, USE_MMAP_FOR_BUFFERS): Remove #defines/#undef
 +      that cancel each other.
 +      * s/sol2-3.h:
 +      * s/sol2-4.h:
 +      * s/sol2-5.h: Remove.
 +      * m/ibmrs6000.h: Remove code for USG5_4, this file is only used on AIX.
 +      (NO_REMAP): Remove, unused.
 +      (UNEXEC): Move definition ...
 +      * s/aix4-2.h (UNEXEC): ... here.
 +
 +      * s/openbsd.h: Remove support for non-ELF and for systems that do
 +      not support shared libraries.
 +      * s/netbsd.h:
 +      * s/freebsd.h: Likewise.
 +
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove non-working support for lynxos 3.0.
 +      * s/lynxos.h: Remove file.
 +
 +      * unexec.c (unexec, adjust_lnnoptrs): Do not depend on
 +      COFF_BSD_SYMBOLS, nothing defines it anymore.
 +
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove obsolete uses of HAVE_SHM.
 +      * emacs.c (standard_args):
 +      (Fdump_emacs):
 +      (syms_of_emacs): Remove code depending on HAVE_SHM.
 +
 +      * alloc.c: Remove HAVE_SHM dependent definition.
 +
 +      * Makefile.in (RUN_TEMACS): Do not depend on HAVE_SHM.
 +
 +2010-03-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs.c (USAGE4): Hard-code bug address.
 +      (REPORT_EMACS_BUG_ADDRESS, REPORT_EMACS_BUG_PRETEST_ADDRESS): Remove.
 +      (bug_reporting_address): Remove.
 +      (main): Don't call bug_reporting_address.
 +
 +      * Makefile.in (XFT_LIBS, LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF)
 +      (LIBGPM, LIBRESOLV): Set using autoconf rather than cpp.
 +
 +2010-03-15  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfns.c (Fx_create_frame):
 +      * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars
 +      on left.
 +
 +2010-03-13  Andreas Politz  <politza@fh-trier.de>  (tiny change)
  
        * editfns.c (Fformat): Account for string precision when computing
        field width (Bug#5710).
  
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfns.c (Fx_create_frame): Set default to Qright.
 +
 +      * frame.c (Vdefault_frame_scroll_bars): Set default to Qright for
 +      all window systems.
 +
 +2010-03-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      These changes remove termcap.c from the build on Posix platforms.
 +      * Makefile.in (termcapobj): Move termcap.o from here...
 +      (MSDOS_OBJ): ...to here.
 +      (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
 +      now identical to when LIBS_TERMCAP is defined.
 +
 +      * term.c: Remove (ifdef'ed away) inclusion of termcap.h.
 +
 +      * cm.c: Remove (ifdef'ed away) inclusion of termcap.h.
 +
 +      * config.in: Regenerated.  (See top-level ChangeLog.)
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
 +2010-03-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Cleanup setup of gl_state in various parts of the code.
 +      * syntax.h (SETUP_BUFFER_SYNTAX_TABLE): New macro.
 +      (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
 +      * syntax.c (find_defun_start, Fchar_syntax, Fmatching_paren)
 +      (skip_chars):
 +      * regex.c (regex_compile): Use it.
 +      (re_compile_pattern): Don't set gl_state.current_syntax_table since
 +      it's now set in regex_compile when/if we need it.
 +
  2010-03-05  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        Make it possible to C-g in a tight bytecode loop again (bug#5680).
        (scroll_end_callback): Remove.
        (xg_create_scroll_bar): Add parameter end_callback, bind it to
        button-release-event.  Replace value-changed event with change-value,
 -      bug #5177,
 +      bug #5177.
        (xg_event_is_for_scrollbar): Only return true if button is less than 4,
        bug #5177.
  
  
  2009-12-12  Eli Zaretskii  <eliz@gnu.org>
  
 -      * dispextern.h (struct text_pos): Use EMACS_INT;
 +      * dispextern.h (struct text_pos): Use EMACS_INT.
        (struct glyph): Use EMACS_INT for charpos.
        (struct it): Use EMACS_INT for stop_charpos, end_charpos,
        region_beg_charpos, region_end_charpos,
        (store_symval_forwarding): Take into account the fact that Ints can
        now have more than one tag.
        * buffer.c (syms_of_buffer): Use LISP_INT_TAG.
 -      buffer_slot_type_mismatch):
 +      (buffer_slot_type_mismatch):
        * xfaces.c (face_attr_equal_p):
        * print.c (print_object):
        * alloc.c (mark_maybe_object, mark_object, survives_gc_p):
  2009-09-18  Adrian Robert  <Adrian.B.Robert@gmail.com>
  
        * emacs.c (inhibit_x_resources): Update doc string for NS.
 -      (main) [HAVE_NS]: Don't process --no-init-file option.  Remove
 -      legacy code for -NXHost.  Fix error printf in daemon case.
 +      (main) [HAVE_NS]: Don't process --no-init-file option.
 +      Remove legacy code for -NXHost.  Fix error printf in daemon case.
  
        * nsterm.h (ns_no_defaults): Remove.
  
        (ns_use_qd_smoothing): Remove legacy variable.
        (EmacsView-windowShouldZoom:): Set frame left_pos, top_pos and
        don't update the NSWindow itself.
 -      (EmacsView-windowWillUseStandardFrame:defaultFrame:): Improve
 -      state detection and store user rect ourselves.  (Bug #3581)
 +      (EmacsView-windowWillUseStandardFrame:defaultFrame:):
 +      Improve state detection and store user rect ourselves.  (Bug #3581)
  
        * nsfont.m (nsfont_draw) [NS_IMPL_COCOA]: Don't use
        ns_use_qd_smoothing.
        * xterm.h: Rename x_non_menubar_window_to_frame to
        x_menubar_window_to_frame.
  
 -      * xterm.c: Remove declarations also in xterm.h
 +      * xterm.c: Remove declarations also in xterm.h.
        (XTmouse_position): Do not return valid positions
        for clicks in the menubar and the toolbar for Gtk+.
  
  
        * makefile.w32-in ($(BLD)/doc.$(O)): Depend on buildobj.h, not on
        $(SRC)/buildobj.h.
 -      (buildobj.h): Renamed from $(SRC)/buildobj.h.
 +      (buildobj.h): Rename from $(SRC)/buildobj.h.
        (make-buildobj-CMD, make-buildobj-SH): Create buildobj.h, not
        $(SRC)/buildobj.h.
        (clean): Add buildobj.h.
  2009-08-21  Adrian Robert  <Adrian.B.Robert@gmail.com>
  
        * nsterm.m (ns_get_color): Update documentation properly for last
 -      change, and clean up loose ends in the code left by it.  Fix
 -      longstanding bug with 16-bit hex parsing, and add support for
 +      change, and clean up loose ends in the code left by it.
 +      Fix longstanding bug with 16-bit hex parsing, and add support for
        yet another X11 format (rgb:r/g/b) for compatibility.
        * nsfns.m (EmacsDialogPanel-runDialogAt): Add declaration of
        timer_check() to avoid crash on Leopard/PPC.  Bug #2154.
  2009-07-04  Eli Zaretskii  <eliz@gnu.org>
  
        Emulation of `getloadavg' on MS-Windows.
 -      * w32.c: Include float.h
 +      * w32.c: Include float.h.
        (g_b_init_get_native_system_info, g_b_init_get_system_times)
        (GetNativeSystemInfo_Proc, GetSystemTimes_Proc): Declare.
        (get_native_system_info, get_system_times): New functions.
        (Fdefine_coding_system_internal): Likewise.
        (setup_coding_system): Likewise.  Remove unneeded casts.
        (detect_coding_iso_2022): Compare Viso_2022_charset_list with
 -      CODING_ATTR_CHARSET_LIST, not CODING_ATTR_SAFE_CHARSETS.  Remove
 -      unneeded casts.
 +      CODING_ATTR_CHARSET_LIST, not CODING_ATTR_SAFE_CHARSETS.
 +      Remove unneeded casts.
  
        * insdel.c (del_range_2): Don't modify gap contents when called
        from decode_coding_object.  (Bug#1809)
  
        * lisp.h: Define Qfont_spec, Qfont_entity, Qfont_object extern.
  
 -      * font.c (Qfont_spec, Qfont_entity, Qfont_object): Definitions
 -      moved to data.c.
 +      * font.c (Qfont_spec, Qfont_entity, Qfont_object):
 +      Definitions moved to data.c.
  
  2009-02-20  Adrian Robert  <Adrian.B.Robert@gmail.com>
  
        here; it will be done in init_frame_faces.
  
        * xterm.h (struct xim_inst_t): Definition moved from xterm.c.
 -      (struct x_display_info): Remove unused member null_pixel.  New
 -      member xim_callback_data.
 +      (struct x_display_info): Remove unused member null_pixel.
 +      New member xim_callback_data.
  
        * xterm.c (struct xim_inst_t): Definition moved to xterm.h.
        (xim_initialize): Save pointer to callback function data.
  
  2008-12-13  Kenichi Handa  <handa@m17n.org>
  
 -      * font.c (font_rescale_ratio): Moved from xfaces.c.
 +      * font.c (font_rescale_ratio): Move from xfaces.c.
        Argument type changed.  Handle a font-spec too.
        (font_score): Check Vface_font_rescale_alist.
        (font_open_entity): Likewise.  (Bug#1547)
  
 -      * xfaces.c (font_rescale_ratio): Moved to font.c.
 +      * xfaces.c (font_rescale_ratio): Move to font.c.
  
  2008-12-13  Chong Yidong  <cyd@stupidchicken.com>
  
  
  2008-12-12  Jason Rumney  <jasonr@gnu.org>
  
 -      * w32fns.c (x_display_info_for_name, Fx_open_connection): Set
 -      Vwindow_system_version to the real w32 major version.
 +      * w32fns.c (x_display_info_for_name, Fx_open_connection):
 +      Set Vwindow_system_version to the real w32 major version.
  
  2008-12-12  Dan Nicolaescu  <dann@ics.uci.edu>
  
  
  2008-12-11  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * term.c (tty_free_frame_resources): Renamed from delete_tty_output;
 +      * term.c (tty_free_frame_resources): Rename from delete_tty_output;
        all callers changed.  Call free_frame_faces to free the face cache.
  
  2008-12-11  Jason Rumney  <jasonr@gnu.org>
        (set_category_set): Extern it.
  
        * category.c (hash_get_category_set): New function.
 -      (Fmodify_category_entry): Adjusted for the change of
 +      (Fmodify_category_entry): Adjust for the change of
        char_table_ref_and_range.  Call hash_get_category_set to get a
        category set to store in the table.
  
        (SET_TEMP_CHARSET_WORK_ENCODER, GET_TEMP_CHARSET_WORK_ENCODER)
        (SET_TEMP_CHARSET_WORK_DECODER, GET_TEMP_CHARSET_WORK_DECODER):
        New macros.
 -      (load_charset_map): Meaning of control_flag changed.  If
 -      inhibit_load_charset_map is nonzero, setup a table in
 +      (load_charset_map): Meaning of control_flag changed.
 +      If inhibit_load_charset_map is nonzero, setup a table in
        temp_charset_work.
        (load_charset): New argument control_flag.
        (map_charset_for_dump): New function.
        (syms_of_charset): Make `inhibit-load-charset-map' a Lisp
        variable.
  
 -      * chartab.c (sub_char_table_ref_and_range): Adjusted for the
 +      * chartab.c (sub_char_table_ref_and_range): Adjust for the
        change of char_table_ref_and_range.
        (char_table_ref_and_range): Change the meaning of argument FROM
        and TO.  Now the caller must provide initial values for *FROM
        and *TO.
  
 -      * fontset.c (fontset_add): Adjusted for the change of
 +      * fontset.c (fontset_add): Adjust for the change of
        char_table_ref_and_range.
        (fontset_get_font_group): Likewise.
        (Ffontset_info): Likewise.
  
 -      * keymap.c (describe_vector): Adjusted for the change of
 +      * keymap.c (describe_vector): Adjust for the change of
        char_table_ref_and_range.  For char-table, put boundary between
        non-ASCII and 8-bit characters.
  
        <after-change-functions>: Reflow docstrings.
  
  2008-08-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
 -          Ken Raeburn  <raeburn@gnu.org>
 +            Ken Raeburn  <raeburn@gnu.org>
  
        Dock menu customization, based on a patch by Ken Raeburn, plus some
        other fixes.
  
        * s/darwin.h: Add #define DARWIN_OS.  Get rid of C_SWITCH_SYSTEM def.
        Change LIBS_MACGUI to LIBS_NSGUI.  Move temacs-conditionalized defs
 -      closer to C_SWITCH_SYSTEM_TEMACS so usage is understood.  Expand
 -      comment on NO_SOCK_SIGIO.
 +      closer to C_SWITCH_SYSTEM_TEMACS so usage is understood.
 +      Expand comment on NO_SOCK_SIGIO.
  
  2008-08-03  Chong Yidong  <cyd@stupidchicken.com>
  
  
  2008-07-15  Chris Hall  <chris@web.workinglinux.com>  (tiny change)
  
 -      * callproc.c (set_initial_environment): Initialize
 -      Vprocess_environment under CANNOT_DUMP (fixes crash when
 +      * callproc.c (set_initial_environment):
 +      Initialize Vprocess_environment under CANNOT_DUMP (fixes crash when
        batch-compiling for bootstrap).
  
  2008-07-15  Chris Hall  <chris@web.workinglinux.com>  (tiny change)
 -          YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +            YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
 -      (make_initial_frame): Call init_frame_faces(f) in CANNOT_DUMP case --
 -      fix crash due to different init order.
 +      * frame.c (make_initial_frame): Call init_frame_faces(f) in
 +      CANNOT_DUMP case -- fix crash due to different init order.
  
  2008-07-15  Adrian Robert  <Adrian.B.Robert@gmail.com>
  
        * m/macppc.h:
        * m/alpha.h: Use GNU_LINUX instead of LINUX.  Reorganize conditionals.
  
 -      * m/ibms390x.h (XINT, XUINT): Don't define, same as the default
 +      * m/ibms390x.h (XINT, XUINT): Don't define, same as the default.
        (SPECIAL_EMACS_INT):
        * m/ia64.h (SPECIAL_EMACS_INT):
        * m/amdx86-64.h (SPECIAL_EMACS_INT):
  2008-07-10  Dan Nicolaescu  <dann@ics.uci.edu>
  
        * fileio.c:
 -      * sysdep.c
 +      * sysdep.c:
        * systty.h:
        * m/ibmrs6000.h:
        * m/iris4d.h:
  
        * xftfont.c (struct xftfont_info): New member ft_size.  Make the
        member order compatible with struct ftfont_info.
 -      (xftfont_open): Add FC_CHARSET to the pattern.  Set
 -      xftfont_info->ft_size.  Don't unlock the face.  Check BDF
 +      (xftfont_open): Add FC_CHARSET to the pattern.
 +      Set xftfont_info->ft_size.  Don't unlock the face.  Check BDF
        properties if appropriate.
        (xftfont_close): Unlock the face.
        (xftfont_anchor_point, xftfont_shape): Deleted.
        (USG_SHARED_LIBRARIES): Remove duplicate definition.
  
  2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
 -          Eli Zaretskii  <eliz@gnu.org>
 +            Eli Zaretskii  <eliz@gnu.org>
  
        * makefile.w32-in (LOCAL_FLAGS):
        Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
        truncate only if the window width is below that integer.
        (start_display, resize_mini_window, produce_stretch_glyph)
        (display_string, move_it_in_display_line_to): Use line_wrap.
 -      (back_to_previous_visible_line_start, reseat_1): Reset
 -      string_from_display_prop_p.
 +      (back_to_previous_visible_line_start, reseat_1):
 +      Reset string_from_display_prop_p.
        (display_line): Extend default face to end of line when wrapping.
  
  2008-06-24  Kim F. Storm  <storm@cua.dk>
        the property of LFACE_FONT of LFACE (if any).
  
  2008-06-21  Seiji Zenitani  <zenitani@mac.com>
 -          Ryo Yoshitake  <ryo@shiftmode.net>
 +            Ryo Yoshitake  <ryo@shiftmode.net>
  
        * xterm.c (x_set_frame_alpha): Add x_catch_errors for bug#437.
  
        definitions from xmenu.c.  Suggested by Adrian Robert.
  
        * xmenu.c: Remove platform-independent menu definitions.
 -      (menu_items menu_items_inuse, menu_items_allocated)
 +      (menu_items, menu_items_inuse, menu_items_allocated)
        (menu_items_used, menu_items_n_panes)
        (menu_items_submenu_depth): Move to keyboard.h.
        (init_menu_items, finish_menu_items, unuse_menu_items)
        * xterm.c (x_set_frame_alpha): Move declarations before statements.
  
  2008-05-21  Seiji Zenitani  <zenitani@mac.com>
 -          Ryo Yoshitake  <ryo@shiftmode.net>
 +            Ryo Yoshitake  <ryo@shiftmode.net>
  
        * frame.c (Qalpha): Add a new frame parameter `alpha'.
        (Vframe_alpha_lower_limit): New variable.
        (struct glyph_string): New member underline_position and
        underline_thickness.
        (enum lface_attribute_index): Remove LFACE_AVGWIDTH_INDEX.
 -      (struct face): Change type of `font' to `struct font *'.  Remove
 -      members `font_name', `font_info_id'.
 +      (struct face): Change type of `font' to `struct font *'.
 +      Remove members `font_name', `font_info_id'.
        (per_char_metric, encode_char): Delete externs.
        (calc_pixel_width_or_height): Adjust the prototype.
  
        (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
        (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
        (struct font_spec, struct font_entity): New structs.
 -      (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h.
 +      (FONT_ENCODING_NOT_DECIDED): Move from fontset.h.
        (struct font): Many members from old "struct font_info" moved to
        here.  Members font and entity deleted.
        (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
        (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
        (CHECK_FONT_GET_OBJECT): Likewise.
        (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
 -      (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h.
 -      (struct font_driver): New members case_sensitive anc check.  Type
 -      of the member list and open changed.
 +      (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move from font.h.
 +      (struct font_driver): New members case_sensitive anc check.
 +      Type of the member list and open changed.
        (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
        (font_symbolic_width, font_find_object, font_get_spec)
        (font_set_lface_from_name): Delete extern.
        (enable_font_backend): Delete it.
        (Qfont_spec, Qfont_entity, Qfont_object): New variables.
        (CHECK_VALIDATE_FONT_SPEC): Delete it.
 -      (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h.
 +      (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move to font.h.
        (null_string): Delete it.
        (null_vector): Make it static.
        (font_family_alist): Delete it.
        (QCextra, QClanguage): Delete it.
        (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables.
        (font_make_spec, font_make_entity, font_make_object)
 -      (font_intern_prop): Renamed from intern_downcase.  Don't downcase
 +      (font_intern_prop): Rename from intern_downcase.  Don't downcase
        the string.  Callers changed.
 -      (font_pixel_size): Adjusted for the format change of font-related
 +      (font_pixel_size): Adjust for the format change of font-related
        objects.
        (prop_name_to_numeric, prop_numeric_to_name): Delete them.
        (font_style_to_value, font_style_symbolic): New function.
        (font_registry_charsets): Use Fassoc_string instead of
        assq_no_quit.
        (font_prop_validate_symbol): Don't return null_string.
 -      (font_prop_validate_style): Adjusted for the change of
 +      (font_prop_validate_style): Adjust for the change of
        style-related values in a font vector.
        (font_property_table): Delete entries for QClanguage and
        QCantialias, add entries for QCavgwidth.
        (get_font_prop_index): Delete the 2nd argument FROM.
        (font_prop_validate): Arguments changed.
 -      (font_put_extra): Adjusted for the change of font-related objects.
 +      (font_put_extra): Adjust for the change of font-related objects.
        (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd)
        (font_parse_fcname, font_unparse_fcname)
        (font_prepare_composition): Likewise.
 -      (font_parse_family_registry): Renamed from font_merge_old_spec.
 +      (font_parse_family_registry): Rename from font_merge_old_spec.
        (otf_open): Delete the 1st arg entity.
 -      (font_otf_capability): Adjusted for the above change.
 +      (font_otf_capability): Adjust for the above change.
        (font_score): New arg alternate_families.  Adjusted for the change
        of font-related objects.
        (font_sort_entites): New arg best_only.
        (font_match_p): Check alternate families.
        (font_find_object): Delete it.
        (font_check_object): New function.
 -      (font_clear_cache): Adjusted for the change of font-related objects.
 +      (font_clear_cache): Adjust for the change of font-related objects.
        (font_delete_unmatched): New arg.
        (font_list_entities): Call font_driver->list with a spec that
        doesn't specify style-related properties.
        (font_matching_entity): Arguments changed.  Caller changed.
 -      (font_open_entity): Adjusted for the change of font-related objects.
 +      (font_open_entity): Adjust for the change of font-related objects.
        (font_close_object, font_has_char, font_encode_char)
        (font_get_name, font_get_spec): Likewise.
        (font_spec_from_name, font_clear_prop, font_update_lface):
        New functions.
        (font_find_for_lface, font_open_for_lface, font_load_for_lface)
        (font_prepare_for_face, font_done_for_face, font_open_by_name)
 -      (font_at): Adjusted for the change of font-related objects.
 +      (font_at): Adjust for the change of font-related objects.
        (font_range): New function.
        (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts)
 -      (Ffont_xlfd_name): Adjusted for the change of font-related objects.
 +      (Ffont_xlfd_name): Adjust for the change of font-related objects.
        (Fcopy_font_spec, Fmerge_font_spec): New function.
 -      (Ffont_family_list): Renamed from list-families.
 +      (Ffont_family_list): Rename from list-families.
        (Finternal_set_font_style_table): Arguments changed.
        (Ffont_fill_gstring, Ffont_shape_text, Fopen_font)
 -      (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjusted for the
 +      (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjust for the
        change of font-related objects.
        (syms_of_font): Delete "ifdef USE_FONT_BACKEND".  DEFSYM new symbols.
  
        * fontset.h (struct font_info): Delete it.  Most members go to
        struct font.
 -      (FONT_ENCODING_NOT_DECIDED): Moved to font.h.
 +      (FONT_ENCODING_NOT_DECIDED): Move to font.h.
        (enum FONT_SPEC_INDEX): Delete it.
        (font_info, list_fonts_func, load_font_func, query_font_func)
        (set_frame_fontset_func, find_ccl_program_func)
 -      (get_font_repertory_func, new_fontset_from_font_name): Delete
 -      externs.
 +      (get_font_repertory_func, new_fontset_from_font_name):
 +      Delete externs.
        (fontset_from_font_name): Extern it.
        (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID)
        (FONT_INFO_FROM_FACE): Deleted.
        (face_for_char): Likewise.  Call face_for_char with font_object.
        (fs_load_font): Delete.  Delete #pragma surrounding it.
        (fs_query_fontset): Use strcasecmp instead of strcmp.
 -      (generate_ascii_font_name): Adjusted for the format change of
 +      (generate_ascii_font_name): Adjust for the format change of
        font-spec.
        (Fset_fontset_font): Likewise.  Use new macros to set elements of
        font-def.
        (Fnew_fontset): Use font_unparse_xlfd to generate
        FONTSET_ASCII (fontset).
        (new_fontset_from_font_name): Deleted.
 -      (fontset_from_font): Renamed from new_fontset_from_font.  Check if
 +      (fontset_from_font): Rename from new_fontset_from_font.  Check if
        a fontset is already created for the font.  FIx updating of
        Vfontset_alias_alist.
        (fontset_ascii_font): Deleted.
 -      (Ffont_info): Adjusted for the format change of font-spec.
 +      (Ffont_info): Adjust for the format change of font-spec.
        (Finternal_char_font): Likewise.
        (Ffontset_info): Likewise.
        (syms_of_fontset): Don't check load_font_func.
        (x_set_font_backend): Use FRAME_FONT macro to check if a font is
        already set for the frame.
  
 -      * ftfont.c (ftfont_pattern_entity): Argument FRAME removed.  Make
 -      a font-entity by font_make_entity.  Use font_intern_prop instead
 +      * ftfont.c (ftfont_pattern_entity): Argument FRAME removed.
 +      Make a font-entity by font_make_entity.  Use font_intern_prop instead
        of intern_downcase.  Use FONT_SET_STYLE to set a style-related
        font property.  If a font is scalable, set avgwidth property to 0.
        Set font-entity property by font_put_extra.
        (ftfont_list_generic_family): Argument SPEC and REGISTRY removed.
 -      (ffont_driver): Adjusted for the change of struct font_driver.
 +      (ffont_driver): Adjust for the change of struct font_driver.
        (ftfont_spec_pattern): New function.
        (ftfont_list): Return a list, not vector.
        (ftfont_match): Use ftfont_spec_pattern to get a pattern.
        font property.  Don't update dpyinfo->smallest_font_height and
        dpyinfo->smallest_char_width.
        (ftfont_close): Don't free `struct font'.
 -      (ftfont_has_char): Adjusted for the format change of font-entity.
 +      (ftfont_has_char): Adjust for the format change of font-entity.
        (ftfont_encode_char, ftfont_text_extents): Likewise.
  
        * ftxfont.c (ftxfont_list): Return a list, not vector.
        font property.  Don't update dpyinfo->smallest_font_height and
        dpyinfo->smallest_char_width.
        (ftxfont_close): Don't decrease FRAME_X_DISPLAY_INFO (f)->n_fonts.
 -      (ftxfont_draw): Adjusted for the change of struct font.
 +      (ftxfont_draw): Adjust for the change of struct font.
  
 -      * image.c (image_ascent): Don't include "charset.h".  Include
 -      "character.h" and "font.h".
 +      * image.c (image_ascent): Don't include "charset.h".
 +      Include "character.h" and "font.h".
  
        * lisp.h (enum pvec_type): New member PREV_FONT.
        (Fassoc_string): EXFUN it.
        'struct font *'.
        (get_char_face_and_encoding): Assign the whole encoding task to
        the `encode-char' method of a font driver.
 -      (fill_composite_glyph_string): Adjusted for the change of `struct
 +      (fill_composite_glyph_string): Adjust for the change of `struct
        face' and `struct glyph_string'.
        (fill_glyph_string): Likewise.
        (get_per_char_metric): Arguments changed.
 -      (x_get_glyph_overhangs): Adjusted for the change of `struct face'
 +      (x_get_glyph_overhangs): Adjust for the change of `struct face'
        and `struct glyph_string'.
        (produce_stretch_glyph, calc_line_height_property)
        (x_produce_glyphs): Likewise.
  
        * xfaces.c: Throughout the file, delete all USE_FONT_BACKEND
        conditionals.  Don't check enable_font_backend.  Delete all codes
 -      used only when USE_FONT_BACKEND is not defined.  Use
 -      FONT_XXX_NAME_NUMERIC instead of face_numeric_xxx.
 +      used only when USE_FONT_BACKEND is not defined.
 +      Use FONT_XXX_NAME_NUMERIC instead of face_numeric_xxx.
        (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth)
        (Qp): Extern them.
        (clear_font_table, load_face_font, xlfd_lookup_field_contents):
        by FONTP.
        (lface_fully_specified_p): Don't check LFACE_AVGWIDTH.
        (set_lface_from_font_name): Delete it.
 -      (set_lface_from_font): Renamed from
 +      (set_lface_from_font): Rename from
        set_lface_from_font_and_fontset.  Caller changed.  Don't set
        LFACE_AVGWIDTH.  Use FONT_XXX_FOR_FACE to get a symbol suitable
        for face.
        * xfont.c: Include <stdlib.h> and "ccl.h".
        (struct xfont_info): New structure.
        (xfont_query_font): Deleted.
 -      (xfont_find_ccl_program): Renamed from x_find_ccl_program and
 +      (xfont_find_ccl_program): Rename from x_find_ccl_program and
        moved from xterm.c.
 -      (xfont_driver): Adjusted for the change of struct font_driver.
 +      (xfont_driver): Adjust for the change of struct font_driver.
        (compare_font_names): New function.
 -      (xfont_list_pattern): Sort font names case insensitively.  Make
 -      font_entity by calling font_make_entity.  Avoid auto-scaled fonts.
 +      (xfont_list_pattern): Sort font names case insensitively.
 +      Make font_entity by calling font_make_entity.  Avoid auto-scaled fonts.
        (xfont_list): Return a list, not vector.
        (xfont_match): If the font doesn't have QCname property, generate
        a name from the other font properties.
        font property.  Don't update dpyinfo->smallest_font_height and
        dpyinfo->smallest_char_width.
        (xfont_close): Don't free struct font.
 -      (xfont_prepare_face): Adjusted for the change of struct font.
 +      (xfont_prepare_face): Adjust for the change of struct font.
        (xfont_done_face): Deleted.
 -      (xfont_has_char): Adjusted for the change of struct font.
 +      (xfont_has_char): Adjust for the change of struct font.
        (xfont_encode_char, xfont_draw): Likewise.
        (xfont_check): New function.
  
 -      * xftfont.c (xftfont_list): Adjusted for the change of `list'
 +      * xftfont.c (xftfont_list): Adjust for the change of `list'
        callback function.
 -      (xftfont_match): Adjusted for the format change of font-entity.
 -      (xftfont_open): Adjusted for the format change of font-entity and
 +      (xftfont_match): Adjust for the format change of font-entity.
 +      (xftfont_open): Adjust for the format change of font-entity and
        font-object.  Adjusted for the change of struct font.  Return a
        font-object.  Don't update dpyinfo->smallest_font_height and
        dpyinfo->smallest_char_width.
        used only when USE_FONT_BACKEND is not defined.  Don't include ccl.h.
        (x_per_char_metric, x_encode_char): Deleted.
        (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont.
 -      (x_compute_glyph_string_overhangs): Adjusted for the change of
 +      (x_compute_glyph_string_overhangs): Adjust for the change of
        `struct face'.
        (x_draw_glyph_string_foreground)
        (x_draw_composite_glyph_string_foreground): Likewise.
        (x_draw_glyph_string): Likewise.  Use font->underline_position and
        font->underline_thickness.
 -      (x_new_font): Renamed from x_new_fontset2.
 +      (x_new_font): Rename from x_new_fontset2.
        (x_new_fontset, x_get_font_info, x_list_fonts): Deleted.
        (x_check_font): Call `check' method of a font driver.
        (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font)
        (x_query_font, x_get_font_repertory): Deleted.
 -      (x_find_ccl_program): Renamed and moved to xfont.c.
 -      (x_redisplay_interface): Adjusted for the change of `struct
 +      (x_find_ccl_program): Rename and moved to xfont.c.
 +      (x_redisplay_interface): Adjust for the change of `struct
        redisplay_interface'.
  
        * w32fns.c: Throughout the file, delete all USE_FONT_BACKEND
        (w32font_close): Don't free struct font.  Adjusted for the change
        of struct w32font_info.
        (w32font_encode_char, w32font_text_extents, w32font_draw):
 -      Adjusted for the change of struct w32font_info.
 +      Adjust for the change of struct w32font_info.
        (w32font_draw): Likewise.
        (w32font_list_internal): Return a list, not vector.
        (w32font_open_internal): Change the 4th arg to font-object.
        Use FONT_SET_STYLE to set a style-related font property.  If a
        font is scalable, set avgwidth property to 0.  Set font-entity
        property by font_put_extra.
 -      (font_matches_spec): Adjusted for the format change of font-entity.
 +      (font_matches_spec): Adjust for the format change of font-entity.
        (w32_weight_table, w32_decode_weight): New variables.
        (w32_encode_weight): New function.
 -      (fill_in_logfont): Adjusted for the format change of font-spec.
 +      (fill_in_logfont): Adjust for the format change of font-spec.
        (w32font_full_name): Use FONT_WEIGHT_SYMBOLIC to get a symbol
        weight value.
 -      (w32font_driver): Adjusted for the change of struct font_driver.
 +      (w32font_driver): Adjust for the change of struct font_driver.
  
        * w32term.h: Throughout the file, delete all USE_FONT_BACKEND
        conditionals.  Don't check enable_font_backend.  Surround non-used
        code by "#ifdef OLD_FONT" and "endif".
        (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
 -      (FONT_AVG_WIDTH): Adjusted for the change of struct font.
 +      (FONT_AVG_WIDTH): Adjust for the change of struct font.
  
        * w32term.c: Throughout the file, delete all USE_FONT_BACKEND
        conditionals.  Don't check enable_font_backend.  Delete all codes
        * w32uniscribe.c: Delete USE_FONT_BACKEND conditional.
        (uniscribe_open): Return value changed to font-object.
        Adjusted for the format change of font-object.
 -      (uniscribe_otf_capability): Adjusted for the change of struct font.
 +      (uniscribe_otf_capability): Adjust for the change of struct font.
        (add_opentype_font_name_to_list): Don't downcase names.
 -      (uniscribe_font_driver): Adjusted for the change of struct
 +      (uniscribe_font_driver): Adjust for the change of struct
        font_driver.
  
  2008-05-13  Chong Yidong  <cyd@stupidchicken.com>
        Report an error when image size is invalid.
        Read two bytes at a time when raw images have max_color_idx above 255.
  
 -2008-04-05  Eli Zaretskii  <eliz@gnu.org>
 -
 -      * w32.c (readdir): If FindFirstFile/FindNextFile return in
 -      cFileName a file name that includes `?' characters, use the 8+3
 -      alias in cAlternateFileName instead.
 -
  2008-04-05  Kenichi Handa  <handa@ni.aist.go.jp>
  
        * ccl.c (ccl_driver): If ccl->quit_silently is nonzero, don't
        * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call
        xg_frame_resized when the event is for the edit widget.
  
 -      * gtkutil.h (xg_frame_resized): Renamed from xg_resize_widgets.
 +      * gtkutil.h (xg_frame_resized): Rename from xg_resize_widgets.
  
        * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or
        set_char_size.
 -      (xg_frame_resized): Renamed from xg_resize_widgets.  Remove all
 +      (xg_frame_resized): Rename from xg_resize_widgets.  Remove all
        operations on widgets here.  Just set frame size if needed.
        (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions.
        (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing.
  
  2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
  
 -      * coding.c (decode_coding_object, encode_coding_object): Adjust
 -      marker positions after conversion.
 +      * coding.c (decode_coding_object, encode_coding_object):
 +      Adjust marker positions after conversion.
  
        * lisp.h (struct Lisp_Marker): New member need_adjustment.
  
  
  2008-02-01  Jason Rumney  <jasonr@gnu.org>
  
 -      * w32term.c (x_set_glyph_string_clipping): Use
 -      get_glyph_string_clip_rects.
 +      * w32term.c (x_set_glyph_string_clipping):
 +      Use get_glyph_string_clip_rects.
        (x_set_glyph_string_clipping_exactly, x_draw_glyph_string):
        Adjust for the change of struct glyph_string.
  
        * xftfont.c (xftfont_draw): Adjust for the change of struct
        glyph_string.
  
 -      * xterm.c (x_set_glyph_string_clipping): Use
 -      get_glyph_string_clip_rects.
 +      * xterm.c (x_set_glyph_string_clipping):
 +      Use get_glyph_string_clip_rects.
        (x_set_glyph_string_clipping_exactly, x_draw_glyph_string):
        Adjust for the change of struct glyph_string.
  
        constant.  Save QCspacing value.  Save list of scripts instead of
        binary subranges.
        (w32_generic_family, logfonts_match, font_matches_spec): New functions.
 -      (add_font_entity_to_list): Use font_callback_data struct.  Filter
 -      unwanted fonts.
 +      (add_font_entity_to_list): Use font_callback_data struct.
 +      Filter unwanted fonts.
        (add_one_font_entity_to_list): Use font_callback_data struct.
        (w32_registry): Default to iso10646_1.
        (fill_in_logfont): Use dpi from extra slot.  Don't bother with
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * xterm.c (x_draw_composite_glyph_string_foreground): Fix
 -      indexing into elements of s->cmp and s->char2b.
 +      * xterm.c (x_draw_composite_glyph_string_foreground):
 +      Fix indexing into elements of s->cmp and s->char2b.
  
  2008-02-01  Juanma Barranquero  <lekktu@gmail.com>
  
  
        * font.c (font_parse_fcname, font_parse_name): Don't change :name
        property of FONT.
 -      (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring): Define
 -      them unconditionally.
 +      (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring):
 +      Define them unconditionally.
        (font_matching_entity): New function.
        (font_open_by_name): Try font_matching_entity if exact match is
        not found.
        (font_prepare_composition): Set cmp->glyph_len.
        (font_open_entity): Set font->scalable.
        (Ffont_get): Handle :otf property.
 -      (Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates): New
 -      functions.
 +      (Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates):
 +      New functions.
        (Fquery_font): Use font->font.full_name.
        (syms_of_font): Defsubr Sfont_otf_gsub, Sfont_otf_gpos, and
        Sfont_otf_alternates.
        (font_at): New function.
        (Ffont_get): If FONT is a font-object, get entity from it.
        (Ffont_make_gstring): Initialize elements of glyphs with nil.
 -      (Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX.  Fix
 -      range check.
 +      (Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX.
 +      Fix range check.
        (Ffont_at): New function.
        (syms_of_font): Defsubr Sfont_at.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        * font.h (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST)
 -      (LGLYPH_SET_WIDTH): Adjusted for the change of LGLYPH format.
 +      (LGLYPH_SET_WIDTH): Adjust for the change of LGLYPH format.
        (LGLYPH_ADJUSTMENT, LGLYPH_SET_ADJUSTMENT): New macros.
  
        * font.c (font_merge_old_spec): Treat '*' in foundry as a wild card.
        (font_prop_validate_extra): Delete.
        (font_prop_validate_spacing): New function.
        (font_property_table): Add elements for all known properties.
 -      (get_font_prop_index): Rename from check_font_prop_name.  New
 -      argument FROM.  Change caller.
 +      (get_font_prop_index): Rename from check_font_prop_name.
 +      New argument FROM.  Change caller.
        (font_prop_validate): Validate all known properties.
        (font_put_extra): Delete argument force.  Change caller.
        (font_expand_wildcards): Make it static.  Fix the way of shrinking
        (font_open_for_lface, font_open_by_name): Fix handling of font size.
        (Ffont_spec): Add QCname property that contains only unknown properties.
  
 -      * ftfont.c (ftfont_list): Use assq_no_quit, not Fassq.  Don't
 -      include weight in listing pattern, instead check weight of each
 +      * ftfont.c (ftfont_list): Use assq_no_quit, not Fassq.
 +      Don't include weight in listing pattern, instead check weight of each
        listed font.  Don't include scalable in pattern.  Pay attention to
        FONT_PIXEL_SIZE_QUANTUM.
  
  
        * font.c (XLFD_SMALLNUM_MASK): Delete this macro.
        (XLFD_LARGENUM_MASK): Delete XLFD_ENCODING_MASK from it.
 -      (font_expand_wildcards): Fix handling ENCODING field.  Avoid
 -      unnecessary checks for weight, slant, and swidth.
 +      (font_expand_wildcards): Fix handling ENCODING field.
 +      Avoid unnecessary checks for weight, slant, and swidth.
        (font_parse_fcname): New function.
        (font_unparse_fcname): New function.
        (font_parse_name): New function.
        * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to
        XLFD_XXX_INDEX.
        (enum xlfd_field_mask): New enum.
 -      (intern_font_field): Changed argument.  Change caller.  If digits
 +      (intern_font_field): Change argument.  Change caller.  If digits
        are followed by non-digits, return a symbol.
        (font_expand_wildcards): New function.
        (font_parse_xlfd): Fix wildcard handling.
        * xfns.c [USE_FONT_BACKEND]: Include "font.h".
        (x_default_font_parameter) [USE_FONT_BACKEND]: New function.
        (Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
 -      nonzero, register all available font drivers.  Call
 -      x_default_font_parameter for deciding a font.
 +      nonzero, register all available font drivers.
 +      Call x_default_font_parameter for deciding a font.
        (x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
  
        * xterm.c [USE_FONT_BACKEND]: Include "font.h".
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
 -      condition to terminate the loop.
 +      * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION):
 +      Fix condition to terminate the loop.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * xterm.c (x_set_glyph_string_clipping_exactly): Set
 -      src->clip_head and src->clip_tail temporarily instead of src->hl.
 +      * xterm.c (x_set_glyph_string_clipping_exactly):
 +      Set src->clip_head and src->clip_tail temporarily instead of src->hl.
  
        * ccl.c (CCL_WRITE_STRING): Handle a flag bit for multibyte
        character sequence.
        (BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
        (x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
  
 -      * xterm.c (x_draw_composite_glyph_string_foreground): Check
 -      s->face is NULL or not.
 +      * xterm.c (x_draw_composite_glyph_string_foreground):
 +      Check s->face is NULL or not.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        Qnil.  Use JIS_TO_SJIS instead of ENCODE_SJIS.
        (decode_mac_font_name): Use decode_coding_c_string instead of
        decode_coding.
 -      (x_load_font): Initialize fontp->fontset to -1.  Set
 -      fontp->encoding_type.
 +      (x_load_font): Initialize fontp->fontset to -1.
 +      Set fontp->encoding_type.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        * search.c (search_buffer): Give up BM search on case-fold-search
        if one of a target character has a case-equivalence of different
 -      byte length even if that target charcter is an ASCII.
 +      byte length even if that target character is an ASCII.
        (simple_search): Fix calculation of byte length of matched text.
        (boyer_moore): Fix handling of case-equivalent multibyte characters.
  
        (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
        (UNIDATA): New variable.
        (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
 -      (bootstrap-emacs${EXEEXT}): Depends on charprop.el.  Run
 -      $(RUN_TEMACS) unconditionally.
 +      (bootstrap-emacs${EXEEXT}): Depends on charprop.el.
 +      Run $(RUN_TEMACS) unconditionally.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
  
        * w32select.c (validate_coding_system)
        (setup_windows_coding_system): New functions.
 -      (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
 -      setup_windows_coding_system.
 -      (setup_config, Fw32_get_clipboard_data): Use
 -      validate_coding_system.
 +      (convert_to_handle_as_coded, Fw32_get_clipboard_data):
 +      Use setup_windows_coding_system.
 +      (setup_config, Fw32_get_clipboard_data):
 +      Use validate_coding_system.
        (Fx_selection_exists): Move call to setup_config to a place
        where signals are allowed.
  
  
        * fontset.c (fs_load_font): Use fast_string_match_ignore_case
        instead of fast_c_string_match_ignore_case.
 -      (find_font_encoding): Change argument to Lisp_Object.  Use
 -      fast_string_match_ignore_case instead of
 +      (find_font_encoding): Change argument to Lisp_Object.
 +      Use fast_string_match_ignore_case instead of
        fast_c_string_match_ignore_case.  Change caller.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
        Qundecided.
        (Fterminal_coding_system): Return nil if terminal coding system is
        `undecided'.
 -      (syms_of_coding): Define coding-system `undecided' here.  Setup
 -      terminal_coding as `undecided'.
 +      (syms_of_coding): Define coding-system `undecided' here.
 +      Setup terminal_coding as `undecided'.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * xdisp.c (message_dolog, set_message_1): Call
 -      unibyte_char_to_multibyte with arg type int.
 +      * xdisp.c (message_dolog, set_message_1):
 +      Call unibyte_char_to_multibyte with arg type int.
  
        * lread.c (read1): Fix reading of a char-table.
  
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * coding.c (Ffind_coding_systems_region_internal): Include
 -      raw-text and no-conversion in the result.
 +      * coding.c (Ffind_coding_systems_region_internal):
 +      Include raw-text and no-conversion in the result.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
  
        * fontset.c: Include "intervals.h".
        (fontset_face): Fix comparing of Lisp_Objects.
 -      (free_face_fontset, new_fontset_from_font_name): Fix
 -      Lisp_Object/int mixup.
 +      (free_face_fontset, new_fontset_from_font_name):
 +      Fix Lisp_Object/int mixup.
  
        * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
  
        * coding.c: Add many prototypes for static functions.
        (get_translation_table): Allow max_lookup to be NULL.
        (decode_coding, Ffind_coding_systems_region_internal)
 -      (Funencodable_char_position, Fcheck_coding_systems_region): Call
 -      get_translation_table with max_lookup NULL.
 +      (Funencodable_char_position, Fcheck_coding_systems_region):
 +      Call get_translation_table with max_lookup NULL.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        (Fdefine_coding_system_internal): Accept list of translation
        tables as :encode-translation-table and :decode-translation-table.
        (Fcoding_system_put): New function.
 -      (syms_of_coding): Declare new symbols.  Defsubr
 -      Scoding_system_put.
 +      (syms_of_coding): Declare new symbols.
 +      Defsubr Scoding_system_put.
        (decode_coding_sjis, encode_coding_sjis): Handle 4th charset,
        typically JISX0212.
  
        * chartab.c (map_sub_char_table_for_charset): Fix args to
        c_function with.
  
 -      * coding.h (enum coding_result_code): Delete
 -      CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
 +      * coding.h (enum coding_result_code):
 +      Delete CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
  
        * coding.c (Qinsufficient_source, Qinconsistent_eol)
        (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New variables.
  
        * w32console.c: Include character.h.  Use terminal_encode_buffer
        from term.c.
 -      (write_glyphs): Use new version of encode_terminal_code.  Use
 -      encode_coding_object in place of encode_coding.
 +      (write_glyphs): Use new version of encode_terminal_code.
 +      Use encode_coding_object in place of encode_coding.
  
        * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
        encoding becomes encoding_type.
        * charset.h (charset_unicode): Extern it.
  
        * charset.c (string_xstring_p): Check by (C >= 0x100).
 -      (find_charsets_in_text): Change format of the arc CHARSETS.  New
 -      arg MULTIBYTE.
 +      (find_charsets_in_text): Change format of the arc CHARSETS.
 +      New arg MULTIBYTE.
        (Ffind_charset_region, Ffind_charset_string): Adjust for the
        change of find_charsets_in_text.
        (Fsplit_char): Fix doc.  Never return unknown.
  
        * chartab.c (char_table_translate): Use CHARACTERP, not INTEGERP.
  
 -      * coding.c (Fdefine_coding_system_alias): Update
 -      Vcoding_system_list.
 +      * coding.c (Fdefine_coding_system_alias):
 +      Update Vcoding_system_list.
  
        * fontset.c (load_font_get_repertory): Pay attention to the case
        that ENCODING of a font is specified by a char-table.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * term.c (encode_terminal_code): Don't handle glyph-table.  Check
 -      if a character is encodable by the terminal coding system.  If
 -      not, produces proper number of `?'s.  Update
 +      * term.c (encode_terminal_code): Don't handle glyph-table.
 +      Check if a character is encodable by the terminal coding system.
 +      If not, produces proper number of `?'s.  Update
        terminal_encode_buffer and terminal_encode_buf_size if necessary.
        (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
 -      variables.
 +      * term.c (terminal_encode_buffer, terminal_encode_buf_size):
 +      New variables.
        (encode_terminal_code): Change argument.  Encode multiple
        characters at once.  Store the result of encoding in
        terminal_encode_buffer.
  
        * casetab.c (set_case_table): Remove unused var.
  
 -      * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
 -      unused vars.
 +      * window.c (Fdisplay_buffer, Fframe_selected_window):
 +      Remove unused vars.
  
  2008-02-01  Dave Love  <fx@gnu.org>
  
        (update_compositions, Ffind_composition_internal): Make buffer
        positions EMACS_INT.
  
 -      * composite.h (find_composition, update_compositions): Make
 -      position args EMACS_INT.
 +      * composite.h (find_composition, update_compositions):
 +      Make position args EMACS_INT.
  
        * keyboard.c (adjust_point_for_property): Make beg and end EMACS_INT.
  
  
  2008-02-01  Andreas Schwab  <schwab@suse.de>
  
 -      * chartab.c (map_char_table, map_char_table_for_charset): Protect
 -      `range' from GC.
 +      * chartab.c (map_char_table, map_char_table_for_charset):
 +      Protect `range' from GC.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
        It is the same as RE_MULTIBYTE_P (bufp) now.
        <exactn>: Translate via multibyte.
 -      <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH.  Don't
 -      translate it.
 +      <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH.
 +      Don't translate it.
        <charset, charset_not>: Fetch a character by
        RE_STRING_CHAR_AND_LENGTH.  Translate via multibyte.
        <duplicate>: Call bcmp_translate with the last arg `multibyte'.
        FONT_SPEC_INDEX.  If font_spec is a string, extract the registry
        name by using split_font_name_into_vector.
        (Fnew_fontset): If no ASCII font is specified in FONTLIST,
 -      generate a proper font name from the fontset name.  Update
 -      Vfontset_alias_alist.
 +      generate a proper font name from the fontset name.
 +      Update Vfontset_alias_alist.
        (n_auto_fontsets): New variable.
        (new_fontset_from_font_name): New function.
        (Ffont_info): Store the information about fonts generated from the
        sequence is valid in this coding system.  Change callers.
        (MAX_ANNOTATION_LENGTH): New macro.
        (ADD_ANNOTATION_DATA): New macro.
 -      (ADD_COMPOSITION_DATA): Change argument.  Change callers.  Call
 -      ADD_ANNOTATION_DATA.  Change the format of annotation data.
 +      (ADD_COMPOSITION_DATA): Change argument.  Change callers.
 +      Call ADD_ANNOTATION_DATA.  Change the format of annotation data.
        (ADD_CHARSET_DATA): New macro.
        (emacs_mule_char): New argument ID.  Change callers.
        (decode_coding_emacs_mule, decode_coding_iso_2022)
        (produce_composition): Adjust for the new annotation data format.
        (produce_charset): New function.
        (produce_annotation): Handle charset annotation.
 -      (handle_composition_annotation, handle_charset_annotation): New
 -      functions.
 +      (handle_composition_annotation, handle_charset_annotation):
 +      New functions.
        (consume_chars): Handle charset annotation.  Utilize the above two
        functions.
        (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
  
        * coding.c (detect_coding_charset): If only ASCII bytes are found,
        return 0.
 -      (Fdefine_coding_system_internal): Setup
 -      CODING_ATTR_ASCII_COMPAT (attrs) correctly.
 +      (Fdefine_coding_system_internal):
 +      Setup CODING_ATTR_ASCII_COMPAT (attrs) correctly.
  
  2008-02-01  Dave Love  <fx@gnu.org>
  
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * coding.c (decode_coding): Fix args to translate_chars.  Pay
 -      attention to Vstandard_translation_table_for_decode.
 +      * coding.c (decode_coding): Fix args to translate_chars.
 +      Pay attention to Vstandard_translation_table_for_decode.
        (encode_coding): Fix args to translate_chars.  Pay attention to
        Vstandard_translation_table_for_encode.
  
  
        * character.h (CHAR_STRING, CHAR_STRING_ADVANCE): Call char_string
        if C is greater than MAX_3_BYTE_CHAR.
 -      (STRING_CHAR, STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE): Call
 -      string_char instead of string_char_with_unification.
 +      (STRING_CHAR, STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE):
 +      Call string_char instead of string_char_with_unification.
  
  2008-02-01  Dave Love  <fx@gnu.org>
  
  
        * keyboard.c (read_key_sequence): Fix type error.
  
 -      * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
 -      type error.
 +      * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte):
 +      Fix type error.
  
        * fontset.c (fontset_add): Return Lisp_Object.
  
        * regex.h (struct re_pattern_buffer): New member target_multibyte.
  
        * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
 -      (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte.  If
 -      that is zero, convert an eight-bit char to multibyte.
 +      (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte.
 +      If that is zero, convert an eight-bit char to multibyte.
        (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
        non-emacs case.
        (PATFETCH): Convert an eight-bit char to multibyte.
        multibyte always 1.
        (re_search_2): In emacs, set the locale variable multibyte to 1,
        otherwise to 0.  New local variable target_multibyte.  Check it
 -      to decide the multibyteness of STR1 and STR2.  If
 -      target_multibyte is zero, convert unibyte chars to multibyte
 +      to decide the multibyteness of STR1 and STR2.
 +      If target_multibyte is zero, convert unibyte chars to multibyte
        before translating and checking fastmap.
        (TARGET_CHAR_AND_LENGTH): New macro.
        (re_match_2_internal): In emacs, set the locale variable multibyte
 -      to 1, otherwise to 0.  New local variable target_multibyte.  Check
 -      it to decide the multibyteness of STR1 and STR2.  Use
 -      TARGET_CHAR_AND_LENGTH to fetch a character from D.
 +      to 1, otherwise to 0.  New local variable target_multibyte.
 +      Check it to decide the multibyteness of STR1 and STR2.
 +      Use TARGET_CHAR_AND_LENGTH to fetch a character from D.
        <charset, charset_not>: If multibyte is nonzero, check fastmap
        only for ASCII chars.  Call bcmp_translate with
        target_multibyte, not with multibyte.
  
        * lisp.h (Fset_buffer_multibyte): Adjust prototype.
  
 -      * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjust
 -      for the change of Fset_buffer_multibyte.
 +      * xdisp.c (setup_echo_area_for_printing, set_message_1):
 +      Adjust for the change of Fset_buffer_multibyte.
  
        * fns.c (Fstring_to_multibyte): New function.
        (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
        (find_font_encoding): New function.
        (list_fontsets): Use STRINGP, not ! NILP.
        (accumulate_script_ranges): New function.
 -      (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
 -      re-written to handle new fontset structure.
 +      (Fset_fontset_font, Fnew_fontset, Ffontset_info):
 +      Completely re-written to handle new fontset structure.
        (Ffontset_font): Return a copy of element.
 -      (syms_of_fontset): Define symbols Qprepend and Qappend.  Fix
 -      docstring of font-encoding-alist.
 +      (syms_of_fontset): Define symbols Qprepend and Qappend.
 +      Fix docstring of font-encoding-alist.
  
        * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
        (Fset_fotset_font): Fix arguments to 5.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * xdisp.c (face_before_or_after_it_pos): Call
 -      FETCH_MULTIBYTE_CHAR with byte postion, not char position.
 +      * xdisp.c (face_before_or_after_it_pos):
 +      Call FETCH_MULTIBYTE_CHAR with byte postion, not char position.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        * charset.c (charset_ordered_list_tick): New variable.
        (Fdefine_charset_internal): Increment charset_ordered_list_tick.
        (Funify_charset): New optional arg DEUNIFY.  If it is non-nil,
 -      deunify intead of unify a charset.
 +      deunify instead of unify a charset.
        (string_xstring_p): Add `const' to local variables.
        (find_charsets_in_text): Add `const' to arguments and local variables.
 -      (encode_char): Adjust for the change of Funify_charset.  Fix
 -      detecting of invalid code.
 +      (encode_char): Adjust for the change of Funify_charset.
 +      Fix detecting of invalid code.
        (Fset_charset_priority): Increment charset_ordered_list_tick.
        (Fmap_charset_chars): Fix handling of default value for FROM_CODE
        and TO_CODE.
  
  2008-02-01  Dave Love  <fx@gnu.org>
  
 -      * casetab.c (init_casetab_once, init_casetab_once): Fix
 -      CHAR_TABLE_SET call.
 +      * casetab.c (init_casetab_once, init_casetab_once):
 +      Fix CHAR_TABLE_SET call.
  
        * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        * category.c (Fmodify_category_entry): Don't modify the contents
 -      of category_set for characters out of the range.  Avoid
 -      unnecessary modification.
 +      of category_set for characters out of the range.
 +      Avoid unnecessary modification.
  
        * character.h (MAYBE_UNIFY_CHAR): Adjust for the change of
        Vchar_unify_table.  The default value of the table is now nil.
        * character.c (syms_of_character): Setup Vchar_width_table for
        eight-bit-control and raw-byte chars.
  
 -      * charset.h (enum define_charset_arg_index): Delete
 -      charset_arg_parents and add charset_arg_subset and
 +      * charset.h (enum define_charset_arg_index):
 +      Delete charset_arg_parents and add charset_arg_subset and
        charset_arg_superset.
        (enum charset_attr_index): Delete charset_parents and add
        charset_subset and charset_superset.
  
        * charset.c (load_charset_map): Set the default value of encoder
        and deunifier char-tables to nil.
 -      (map_charset_chars): Change argument.  Change callers.  Use
 -      map_char_table_for_charset instead of map_char_table.
 +      (map_charset_chars): Change argument.  Change callers.
 +      Use map_char_table_for_charset instead of map_char_table.
        (Fmap_charset_chars): New optional args from_code and to_code.
        (Fdefine_charset_internal): Adjust for the change of
        `define-charset' (:parents -> :subset or :superset).
        Fdefine_charset_internal.
        (Ffind_charset_string): Setup the vector `charsets' correctly.
  
 -      * chartab.c (sub_char_table_ref_and_range): New arg default.  Fix
 -      the previous change.
 +      * chartab.c (sub_char_table_ref_and_range): New arg default.
 +      Fix the previous change.
        (char_table_ref_and_range): Adjust for the above change.
        (map_sub_char_table_for_charset): New function.
        (map_char_table_for_charset): New function.
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
 -      (emacs_mule_char): New arg src.  Delete arg `composition'.  Change
 -      caller.  Handle 2-byte and 3-byte charsets correctly.
 +      (emacs_mule_char): New arg src.  Delete arg `composition'.
 +      Change caller.  Handle 2-byte and 3-byte charsets correctly.
        (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from
        DECODE_EMACS_MULE_COMPOSITION_RULE.  Change caller.
        (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
 -      (DECODE_EMACS_MULE_21_COMPOSITION): Call
 -      DECODE_EMACS_MULE_COMPOSITION_RULE_21.  Produce correct annotation
 +      (DECODE_EMACS_MULE_21_COMPOSITION):
 +      Call DECODE_EMACS_MULE_COMPOSITION_RULE_21.  Produce correct annotation
        sequence.
        (decode_coding_emacs_mule): Handle composition correctly.  Rewind
        `src' and `consumed_chars' correctly before calling emacs_mule_char.
  
        * character.h (string_escape_byte8): Declare.
  
 -      * charset.c (load_charset_map, load_charset_map_from_file): Remove
 -      unused vars.
 +      * charset.c (load_charset_map, load_charset_map_from_file):
 +      Remove unused vars.
        (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
        (Fmap_charset_chars): Doc fix.
  
        * coding.c (coding_set_source): Delete the local variable beg_byte.
        (encode_coding_charset, Fdefine_coding_system_internal):
        Delete the local variable charset.
 -      (Fdefine_coding_system_internal): Setup
 -      attrs[coding_attr_charset_valids] correctly.
 +      (Fdefine_coding_system_internal):
 +      Setup attrs[coding_attr_charset_valids] correctly.
  
        * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
        member to check if CODE is valid or not.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
 -      * coding.c (decode_coding_charset, encode_coding_charset): Handle
 -      multiple charsets correctly.
 +      * coding.c (decode_coding_charset, encode_coding_charset):
 +      Handle multiple charsets correctly.
  
  2008-02-01  Kenichi Handa  <handa@m17n.org>
  
        (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
        (GC_SUB_CHAR_TABLE_P): New macro.
        (Fencode_coding_string, Fdecode_coding_string): Update EXFUN.
 -      (code_convert_string_norecord): Deleted extern.
 +      (code_convert_string_norecord): Delete extern.
        (init_character_once, syms_of_character, init_charset)
        (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
  
@@@ -29364,10 -22536,10 +29415,10 @@@ See ChangeLog.10 for earlier changes
  
  ;; Local Variables:
  ;; coding: utf-8
 -;; add-log-time-zone-rule: t
  ;; End:
  
 -    Copyright (C) 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 +  Copyright (C) 2007, 2008, 2009, 2010
 +    Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
    You should have received a copy of the GNU General Public License
    along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
  
 -;; arch-tag: dfb6ad96-1550-4905-9e53-d2059ee84c40
diff --combined src/fileio.c
index c2b93a6bd8b601c64e3f3c1795f9a31894c944ff,da19c1e2a215e85dc7d2bb684d10c744611cf32b..881dc92acab521249bf43c2837cfeb561a9a11fb
@@@ -1,8 -1,7 +1,8 @@@
  /* File IO for GNU Emacs.
 -   Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996,
 -                 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 -                 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 +
 +Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997,
 +  1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
 +  2009, 2010  Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
@@@ -21,7 -20,11 +21,7 @@@ along with GNU Emacs.  If not, see <htt
  
  #include <config.h>
  #include <limits.h>
 -
 -#ifdef HAVE_FCNTL_H
  #include <fcntl.h>
 -#endif
 -
  #include <stdio.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <ctype.h>
  #include <errno.h>
  
 -#ifndef vax11c
 -#ifndef USE_CRT_DLL
 -extern int errno;
 -#endif
 +#ifdef HAVE_LIBSELINUX
 +#include <selinux/selinux.h>
 +#include <selinux/context.h>
  #endif
  
  #include "lisp.h"
  #ifdef WINDOWSNT
  #define NOMINMAX 1
  #include <windows.h>
 -#include <stdlib.h>
  #include <fcntl.h>
  #endif /* not WINDOWSNT */
  
  #ifdef MSDOS
  #include "msdos.h"
  #include <sys/param.h>
 -#if __DJGPP__ >= 2
  #include <fcntl.h>
 -#include <string.h>
 -#endif
  #endif
  
  #ifdef DOS_NT
 -#define CORRECT_DIR_SEPS(s) \
 -  do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
 -       else unixtodos_filename (s); \
 -  } while (0)
  /* On Windows, drive letters must be alphabetic - on DOS, the Netware
     redirector allows the six letters between 'Z' and 'a' as well. */
  #ifdef MSDOS
  #endif
  
  #include "commands.h"
 -extern int use_dialog_box;
 -extern int use_file_dialog;
 -
 -#ifndef O_WRONLY
 -#define O_WRONLY 1
 -#endif
 -
 -#ifndef O_RDONLY
 -#define O_RDONLY 0
 -#endif
  
  #ifndef S_ISLNK
  #  define lstat stat
@@@ -175,6 -197,10 +175,6 @@@ Lisp_Object Vauto_save_visited_file_nam
  /* Whether or not to continue auto-saving after a large deletion.  */
  Lisp_Object Vauto_save_include_big_deletions;
  
 -/* On NT, specifies the directory separator character, used (eg.) when
 -   expanding file names.  This can be bound to / or \. */
 -Lisp_Object Vdirectory_sep_char;
 -
  #ifdef HAVE_FSYNC
  /* Nonzero means skip the call to fsync in Fwrite-region.  */
  int write_region_inhibit_fsync;
@@@ -195,10 -221,16 +195,10 @@@ Lisp_Object Qcopy_directory
  /* Lisp function for recursively deleting directories.  */
  Lisp_Object Qdelete_directory;
  
 -extern Lisp_Object Vuser_login_name;
 -
  #ifdef WINDOWSNT
  extern Lisp_Object Vw32_get_true_file_attributes;
  #endif
  
 -extern int minibuf_level;
 -
 -extern int minibuffer_auto_raise;
 -
  /* These variables describe handlers that have "already" had a chance
     to handle the current operation.
  
@@@ -215,13 -247,15 +215,13 @@@ Lisp_Object Qfile_name_history
  
  Lisp_Object Qcar_less_than_car;
  
 -static int a_write P_ ((int, Lisp_Object, int, int,
 -                      Lisp_Object *, struct coding_system *));
 -static int e_write P_ ((int, Lisp_Object, int, int, struct coding_system *));
 +static int a_write (int, Lisp_Object, int, int,
 +                    Lisp_Object *, struct coding_system *);
 +static int e_write (int, Lisp_Object, int, int, struct coding_system *);
  
  \f
  void
 -report_file_error (string, data)
 -     const char *string;
 -     Lisp_Object data;
 +report_file_error (const char *string, Lisp_Object data)
  {
    Lisp_Object errstring;
    int errorno = errno;
  }
  
  Lisp_Object
 -close_file_unwind (fd)
 -     Lisp_Object fd;
 +close_file_unwind (Lisp_Object fd)
  {
    emacs_close (XFASTINT (fd));
    return Qnil;
  /* Restore point, having saved it as a marker.  */
  
  Lisp_Object
 -restore_point_unwind (location)
 -     Lisp_Object location;
 +restore_point_unwind (Lisp_Object location)
  {
    Fgoto_char (location);
    Fset_marker (location, Qnil, Qnil);
@@@ -303,8 -339,6 +303,8 @@@ Lisp_Object Qfile_accessible_directory_
  Lisp_Object Qfile_modes;
  Lisp_Object Qset_file_modes;
  Lisp_Object Qset_file_times;
 +Lisp_Object Qfile_selinux_context;
 +Lisp_Object Qset_file_selinux_context;
  Lisp_Object Qfile_newer_than_file_p;
  Lisp_Object Qinsert_file_contents;
  Lisp_Object Qwrite_region;
@@@ -321,7 -355,8 +321,7 @@@ If OPERATION equals `inhibit-file-name-
  any handlers that are members of `inhibit-file-name-handlers',
  but we still do run any other handlers.  This lets handlers
  use the standard functions without calling themselves recursively.  */)
 -     (filename, operation)
 -     Lisp_Object filename, operation;
 +  (Lisp_Object filename, Lisp_Object operation)
  {
    /* This function must not munge the match data.  */
    Lisp_Object chain, inhibited_handlers, result;
@@@ -377,7 -412,8 +377,7 @@@ DEFUN ("file-name-directory", Ffile_nam
  Return nil if FILENAME does not include a directory.
  Otherwise return a directory name.
  Given a Unix syntax file name, returns a string ending in slash.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
  #ifndef DOS_NT
    register const unsigned char *beg;
    filename = FILE_SYSTEM_CASE (filename);
  #ifdef DOS_NT
    beg = (unsigned char *) alloca (SBYTES (filename) + 1);
 -  bcopy (SDATA (filename), beg, SBYTES (filename) + 1);
 +  memcpy (beg, SDATA (filename), SBYTES (filename) + 1);
  #else
    beg = SDATA (filename);
  #endif
          p = beg + strlen (beg);
        }
      }
 -  CORRECT_DIR_SEPS (beg);
 +  dostounix_filename (beg);
  #endif /* DOS_NT */
  
    return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename));
@@@ -451,7 -487,8 +451,7 @@@ DEFUN ("file-name-nondirectory", Ffile_
  For example, in a Unix-syntax file name,
  this is everything after the last slash,
  or the entire name if it contains no slash.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    register const unsigned char *beg, *p, *end;
    Lisp_Object handler;
@@@ -491,7 -528,8 +491,7 @@@ If FILENAME refers to a file which is n
  then this should return nil.
  The `call-process' and `start-process' functions use this function to
  get a current directory to run processes in.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object handler;
  
  
  \f
  char *
 -file_name_as_directory (out, in)
 -     char *out, *in;
 +file_name_as_directory (char *out, char *in)
  {
    int size = strlen (in) - 1;
  
    /* For Unix syntax, Append a slash if necessary */
    if (!IS_DIRECTORY_SEP (out[size]))
      {
 -      /* Cannot use DIRECTORY_SEP, which could have any value */
 -      out[size + 1] = '/';
 +      out[size + 1] = DIRECTORY_SEP;
        out[size + 2] = '\0';
      }
  #ifdef DOS_NT
 -  CORRECT_DIR_SEPS (out);
 +  dostounix_filename (out);
  #endif
    return out;
  }
@@@ -540,7 -580,8 +540,7 @@@ a directory is different from its name 
  The result can be used as the value of `default-directory'
  or passed as second argument to `expand-file-name'.
  For a Unix-syntax file name, just appends a slash.  */)
 -     (file)
 -     Lisp_Object file;
 +  (Lisp_Object file)
  {
    char *buf;
    Lisp_Object handler;
   */
  
  int
 -directory_file_name (src, dst)
 -     char *src, *dst;
 +directory_file_name (char *src, char *dst)
  {
    long slen;
  
        )
      dst[slen - 1] = 0;
  #ifdef DOS_NT
 -  CORRECT_DIR_SEPS (dst);
 +  dostounix_filename (dst);
  #endif
    return 1;
  }
@@@ -598,7 -640,8 +598,7 @@@ This is the name of the file that hold
  This operation exists because a directory is also a file, but its name as
  a directory is different from its name as a file.
  In Unix-syntax, this function just removes the final slash.  */)
 -     (directory)
 -     Lisp_Object directory;
 +  (Lisp_Object directory)
  {
    char *buf;
    Lisp_Object handler;
@@@ -651,7 -694,9 +651,7 @@@ static unsigned make_temp_name_count, m
     generated.  */
  
  Lisp_Object
 -make_temp_name (prefix, base64_p)
 -     Lisp_Object prefix;
 -     int base64_p;
 +make_temp_name (Lisp_Object prefix, int base64_p)
  {
    Lisp_Object val;
    int len, clen;
    if (!STRING_MULTIBYTE (prefix))
      STRING_SET_UNIBYTE (val);
    data = SDATA (val);
 -  bcopy(SDATA (prefix), data, len);
 +  memcpy (data, SDATA (prefix), len);
    p = data + len;
  
 -  bcopy (pidbuf, p, pidlen);
 +  memcpy (p, pidbuf, pidlen);
    p += pidlen;
  
    /* Here we try to minimize useless stat'ing when this function is
@@@ -770,7 -815,8 +770,7 @@@ probably use `make-temp-file' instead, 
  * If you are creating the file in the user's home directory.
  * If you are creating a directory rather than an ordinary file.
  * If you are taking special precautions as `make-temp-file' does.  */)
 -     (prefix)
 -     Lisp_Object prefix;
 +  (Lisp_Object prefix)
  {
    return make_temp_name (prefix, 0);
  }
@@@ -782,6 -828,8 +782,8 @@@ DEFUN ("expand-file-name", Fexpand_file
  Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
  \(does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or missing,
  the current buffer's value of `default-directory' is used.
+ NAME should be a string that is a valid file name for the underlying
+ filesystem.
  File name components that are `.' are removed, and
  so are file name components followed by `..', along with the `..' itself;
  note that these simplifications are done without checking the resulting
@@@ -798,7 -846,8 +800,7 @@@ non-intuitive results for the root dire
  \(expand-file-name ".." "/") returns "/..".  For this reason, use
  \(directory-file-name (file-name-directory dirname)) to traverse a
  filesystem tree, not (expand-file-name ".."  dirname).  */)
 -     (name, default_directory)
 -     Lisp_Object name, default_directory;
 +  (Lisp_Object name, Lisp_Object default_directory)
  {
    /* These point to SDATA and need to be careful with string-relocation
       during GC (via DECODE_FILE).  */
  
         To avoid this, we set default_directory to the root of the
         current drive.  */
 -      extern char *emacs_root_dir (void);
 -
        default_directory = build_string (emacs_root_dir ());
  #else
        default_directory = build_string ("/");
  
    /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
    nm = (unsigned char *) alloca (SBYTES (name) + 1);
 -  bcopy (SDATA (name), nm, SBYTES (name) + 1);
 +  memcpy (nm, SDATA (name), SBYTES (name) + 1);
  
  #ifdef DOS_NT
    /* Note if special escape prefix is present, but remove for now.  */
        if (!lose)
        {
  #ifdef DOS_NT
 -        /* Make sure directories are all separated with / or \ as
 -           desired, but avoid allocation of a new string when not
 -           required. */
 -        CORRECT_DIR_SEPS (nm);
 +        /* Make sure directories are all separated with /, but
 +           avoid allocation of a new string when not required. */
 +        dostounix_filename (nm);
  #ifdef WINDOWSNT
          if (IS_DIRECTORY_SEP (nm[1]))
            {
          unsigned char *o, *p;
          for (p = nm; *p && (!IS_DIRECTORY_SEP (*p)); p++);
          o = alloca (p - nm + 1);
 -        bcopy ((char *) nm, o, p - nm);
 +        memcpy (o, nm, p - nm);
          o [p - nm] = 0;
  
          BLOCK_INPUT;
          )
        {
          unsigned char *temp = (unsigned char *) alloca (length);
 -        bcopy (newdir, temp, length - 1);
 +        memcpy (temp, newdir, length - 1);
          temp[length - 1] = 0;
          newdir = temp;
        }
        target[0] = '/';
        target[1] = ':';
        }
 -    CORRECT_DIR_SEPS (target);
 +    dostounix_filename (target);
  #endif /* DOS_NT */
  
      result = make_specified_string (target, -1, o - target, multibyte);
@@@ -1431,11 -1483,11 +1433,11 @@@ See also the function `substitute-in-fi
        /* Get past ~ to user */
        unsigned char *user = nm + 1;
        /* Find end of name. */
 -      unsigned char *ptr = (unsigned char *) index (user, '/');
 +      unsigned char *ptr = (unsigned char *) strchr (user, '/');
        int len = ptr ? ptr - user : strlen (user);
        /* Copy the user name into temp storage. */
        o = (unsigned char *) alloca (len + 1);
 -      bcopy ((char *) user, o, len);
 +      memcpy (o, user, len);
        o[len] = 0;
  
        /* Look up the user name. */
  \f
  /* If /~ or // appears, discard everything through first slash.  */
  static int
 -file_name_absolute_p (filename)
 -     const unsigned char *filename;
 +file_name_absolute_p (const unsigned char *filename)
  {
    return
      (IS_DIRECTORY_SEP (*filename) || *filename == '~'
  }
  
  static unsigned char *
 -search_embedded_absfilename (nm, endp)
 -     unsigned char *nm, *endp;
 +search_embedded_absfilename (unsigned char *nm, unsigned char *endp)
  {
    unsigned char *p, *s;
  
            {
              unsigned char *o = alloca (s - p + 1);
              struct passwd *pw;
 -            bcopy (p, o, s - p);
 +            memcpy (o, p, s - p);
              o [s - p] = 0;
  
              /* If we have ~user and `user' exists, discard
@@@ -1581,7 -1635,8 +1583,7 @@@ the entire variable name in braces
  If `/~' appears, all of FILENAME through that `/' is discarded.
  If `//' appears, everything up to and including the first of
  those `/' is discarded.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    unsigned char *nm;
  
       decode of environment variables, causing the original Lisp_String
       data to be relocated.  */
    nm = (unsigned char *) alloca (SBYTES (filename) + 1);
 -  bcopy (SDATA (filename), nm, SBYTES (filename) + 1);
 +  memcpy (nm, SDATA (filename), SBYTES (filename) + 1);
  
  #ifdef DOS_NT
 -  CORRECT_DIR_SEPS (nm);
 +  dostounix_filename (nm);
    substituted = (strcmp (nm, SDATA (filename)) != 0);
  #endif
    endp = nm + SBYTES (filename);
     (directory-file-name (expand-file-name FOO)).  */
  
  Lisp_Object
 -expand_and_dir_to_file (filename, defdir)
 -     Lisp_Object filename, defdir;
 +expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir)
  {
    register Lisp_Object absname;
  
     If QUICK is nonzero, we ask for y or n, not yes or no.  */
  
  void
 -barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick)
 -     Lisp_Object absname;
 -     unsigned char *querystring;
 -     int interactive;
 -     struct stat *statptr;
 -     int quick;
 +barf_or_query_if_file_exists (Lisp_Object absname, const unsigned char *querystring, int interactive, struct stat *statptr, int quick)
  {
    register Lisp_Object tem, encoded_filename;
    struct stat statbuf;
        tem = format2 ("File %s already exists; %s anyway? ",
                     absname, build_string (querystring));
        if (quick)
 -      tem = Fy_or_n_p (tem);
 +      tem = call1 (intern ("y-or-n-p"), tem);
        else
        tem = do_yes_or_no_p (tem);
        UNGCPRO;
    return;
  }
  
 -DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 5,
 +DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6,
         "fCopy file: \nGCopy %s to file: \np\nP",
         doc: /* Copy FILE to NEWNAME.  Both args must be strings.
  If NEWNAME names a directory, copy FILE there.
@@@ -1868,11 -1929,10 +1870,11 @@@ last-modified time as the old one.  (Th
  A prefix arg makes KEEP-TIME non-nil.
  
  If PRESERVE-UID-GID is non-nil, we try to transfer the
 -uid and gid of FILE to NEWNAME.  */)
 -  (file, newname, ok_if_already_exists, keep_time, preserve_uid_gid)
 -     Lisp_Object file, newname, ok_if_already_exists, keep_time;
 -     Lisp_Object preserve_uid_gid;
 +uid and gid of FILE to NEWNAME.
 +
 +If PRESERVE-SELINUX-CONTEXT is non-nil and SELinux is enabled
 +on the system, we copy the SELinux context of FILE to NEWNAME.  */)
 +  (Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists, Lisp_Object keep_time, Lisp_Object preserve_uid_gid, Lisp_Object preserve_selinux_context)
  {
    int ifd, ofd, n;
    char buf[16 * 1024];
    int count = SPECPDL_INDEX ();
    int input_file_statable_p;
    Lisp_Object encoded_file, encoded_newname;
 +#if HAVE_LIBSELINUX
 +  security_context_t con;
 +  int fail, conlength = 0;
 +#endif
  
    encoded_file = encoded_newname = Qnil;
    GCPRO4 (file, newname, encoded_file, encoded_newname);
    if (NILP (handler))
      handler = Ffind_file_name_handler (newname, Qcopy_file);
    if (!NILP (handler))
 -    RETURN_UNGCPRO (call6 (handler, Qcopy_file, file, newname,
 -                         ok_if_already_exists, keep_time, preserve_uid_gid));
 +    RETURN_UNGCPRO (call7 (handler, Qcopy_file, file, newname,
 +                         ok_if_already_exists, keep_time, preserve_uid_gid,
 +                         preserve_selinux_context));
  
    encoded_file = ENCODE_FILE (file);
    encoded_newname = ENCODE_FILE (newname);
       copyable by us. */
    input_file_statable_p = (fstat (ifd, &st) >= 0);
  
 -#if !defined (MSDOS) || __DJGPP__ > 1
 +#if HAVE_LIBSELINUX
 +  if (!NILP (preserve_selinux_context) && is_selinux_enabled ())
 +    {
 +      conlength = fgetfilecon (ifd, &con);
 +      if (conlength == -1)
 +      report_file_error ("Doing fgetfilecon", Fcons (file, Qnil));
 +    }
 +#endif
 +
    if (out_st.st_mode != 0
        && st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino)
      {
        report_file_error ("Input and output files are the same",
                         Fcons (file, Fcons (newname, Qnil)));
      }
 -#endif
  
  #if defined (S_ISREG) && defined (S_ISLNK)
    if (input_file_statable_p)
      }
  #endif        /* not MSDOS */
  
 +#if HAVE_LIBSELINUX
 +  if (conlength > 0)
 +    {
 +      /* Set the modified context back to the file. */
 +      fail = fsetfilecon (ofd, con);
 +      if (fail)
 +      report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil));
 +
 +      freecon (con);
 +    }
 +#endif
 +
    /* Closing the output clobbers the file times on some systems.  */
    if (emacs_close (ofd) < 0)
      report_file_error ("I/O error", Fcons (newname, Qnil));
  
    emacs_close (ifd);
  
 -#if defined (__DJGPP__) && __DJGPP__ > 1
 +#ifdef MSDOS
    if (input_file_statable_p)
      {
        /* In DJGPP v2.0 and later, fstat usually returns true file mode bits,
        if ((_djstat_flags & _STFAIL_WRITEBIT) == 0)
        chmod (SDATA (encoded_newname), st.st_mode & 07777);
      }
 -#endif /* DJGPP version 2 or newer */
 +#endif /* MSDOS */
  #endif /* not WINDOWSNT */
  
    /* Discard the unwind protects.  */
  DEFUN ("make-directory-internal", Fmake_directory_internal,
         Smake_directory_internal, 1, 1, 0,
         doc: /* Create a new directory named DIRECTORY.  */)
 -     (directory)
 -     Lisp_Object directory;
 +  (Lisp_Object directory)
  {
    const unsigned char *dir;
    Lisp_Object handler;
  DEFUN ("delete-directory-internal", Fdelete_directory_internal,
         Sdelete_directory_internal, 1, 1, 0,
         doc: /* Delete the directory named DIRECTORY.  Does not follow symlinks.  */)
 -     (directory)
 -     Lisp_Object directory;
 +  (Lisp_Object directory)
  {
    const unsigned char *dir;
    Lisp_Object handler;
  
    CHECK_STRING (directory);
    directory = Fdirectory_file_name (Fexpand_file_name (directory, Qnil));
 -
 -  if (delete_by_moving_to_trash)
 -    return call1 (Qmove_file_to_trash, directory);
 -
    encoded_dir = ENCODE_FILE (directory);
 -
    dir = SDATA (encoded_dir);
  
    if (rmdir (dir) != 0)
    return Qnil;
  }
  
 -DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 1, "fDelete file: ",
 +DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2,
 +       "(list (read-file-name \
 +                (if (and delete-by-moving-to-trash (null current-prefix-arg)) \
 +                    \"Move file to trash: \" \"Delete file: \") \
 +                nil default-directory (confirm-nonexistent-file-or-buffer)) \
 +              (null current-prefix-arg))",
         doc: /* Delete file named FILENAME.  If it is a symlink, remove the symlink.
 -If file has multiple names, it continues to exist with the other names.  */)
 -     (filename)
 -     Lisp_Object filename;
 +If file has multiple names, it continues to exist with the other names.
 +TRASH non-nil means to trash the file instead of deleting, provided
 +`delete-by-moving-to-trash' is non-nil.
 +
 +When called interactively, TRASH is t if no prefix argument is given.
 +With a prefix argument, TRASH is nil.  */)
 +  (Lisp_Object filename, Lisp_Object trash)
  {
    Lisp_Object handler;
    Lisp_Object encoded_file;
  
    handler = Ffind_file_name_handler (filename, Qdelete_file);
    if (!NILP (handler))
 -    return call2 (handler, Qdelete_file, filename);
 +    return call3 (handler, Qdelete_file, filename, trash);
  
 -  if (delete_by_moving_to_trash)
 +  if (delete_by_moving_to_trash && !NILP (trash))
      return call1 (Qmove_file_to_trash, filename);
  
    encoded_file = ENCODE_FILE (filename);
  }
  
  static Lisp_Object
 -internal_delete_file_1 (ignore)
 -     Lisp_Object ignore;
 +internal_delete_file_1 (Lisp_Object ignore)
  {
    return Qt;
  }
  
 -/* Delete file FILENAME, returning 1 if successful and 0 if failed.  */
 +/* Delete file FILENAME, returning 1 if successful and 0 if failed.
 +   This ignores `delete-by-moving-to-trash'.  */
  
  int
 -internal_delete_file (filename)
 -     Lisp_Object filename;
 +internal_delete_file (Lisp_Object filename)
  {
    Lisp_Object tem;
 -  tem = internal_condition_case_1 (Fdelete_file, filename,
 +
 +  tem = internal_condition_case_2 (Fdelete_file, filename, Qnil,
                                   Qt, internal_delete_file_1);
    return NILP (tem);
  }
@@@ -2199,7 -2233,8 +2201,7 @@@ Signals a `file-already-exists' error i
  unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
  A number as third arg means request confirmation if NEWNAME already exists.
  This is what happens in interactive use with M-x.  */)
 -     (file, newname, ok_if_already_exists)
 -     Lisp_Object file, newname, ok_if_already_exists;
 +  (Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists)
  {
    Lisp_Object handler;
    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
               have copy-file prompt again.  */
            Fcopy_file (file, newname,
                        NILP (ok_if_already_exists) ? Qnil : Qt,
 -                      Qt, Qt);
 +                      Qt, Qt, Qt);
  
          count = SPECPDL_INDEX ();
          specbind (Qdelete_by_moving_to_trash, Qnil);
              )
            call2 (Qdelete_directory, file, Qt);
          else
 -          Fdelete_file (file);
 +          Fdelete_file (file, Qnil);
          unbind_to (count, Qnil);
        }
        else
@@@ -2296,7 -2331,8 +2298,7 @@@ Signals a `file-already-exists' error i
  unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
  A number as third arg means request confirmation if NEWNAME already exists.
  This is what happens in interactive use with M-x.  */)
 -     (file, newname, ok_if_already_exists)
 -     Lisp_Object file, newname, ok_if_already_exists;
 +  (Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists)
  {
    Lisp_Object handler;
    Lisp_Object encoded_file, encoded_newname;
@@@ -2351,7 -2387,8 +2353,7 @@@ Signals a `file-already-exists' error i
  unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
  A number as third arg means request confirmation if LINKNAME already exists.
  This happens for interactive use with M-x.  */)
 -     (filename, linkname, ok_if_already_exists)
 -     Lisp_Object filename, linkname, ok_if_already_exists;
 +  (Lisp_Object filename, Lisp_Object linkname, Lisp_Object ok_if_already_exists)
  {
    Lisp_Object handler;
    Lisp_Object encoded_filename, encoded_linkname;
@@@ -2426,7 -2463,8 +2428,7 @@@ DEFUN ("file-name-absolute-p", Ffile_na
         1, 1, 0,
         doc: /* Return t if file FILENAME specifies an absolute file name.
  On Unix, this is a name starting with a `/' or a `~'.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    CHECK_STRING (filename);
    return file_name_absolute_p (SDATA (filename)) ? Qt : Qnil;
  /* Return nonzero if file FILENAME exists and can be executed.  */
  
  static int
 -check_executable (filename)
 -     char *filename;
 +check_executable (char *filename)
  {
  #ifdef DOS_NT
    int len = strlen (filename);
    struct stat st;
    if (stat (filename, &st) < 0)
      return 0;
 -#if defined (WINDOWSNT) || (defined (MSDOS) && __DJGPP__ > 1)
    return ((st.st_mode & S_IEXEC) != 0);
 -#else
 -  return (S_ISREG (st.st_mode)
 -        && len >= 5
 -        && (xstrcasecmp ((suffix = filename + len-4), ".com") == 0
 -            || xstrcasecmp (suffix, ".exe") == 0
 -            || xstrcasecmp (suffix, ".bat") == 0)
 -        || (st.st_mode & S_IFMT) == S_IFDIR);
 -#endif /* not WINDOWSNT */
  #else /* not DOS_NT */
  #ifdef HAVE_EUIDACCESS
    return (euidaccess (filename, 1) >= 0);
  /* Return nonzero if file FILENAME exists and can be written.  */
  
  static int
 -check_writable (filename)
 -     char *filename;
 +check_writable (const char *filename)
  {
  #ifdef MSDOS
    struct stat st;
@@@ -2485,7 -2534,8 +2487,7 @@@ DEFUN ("file-exists-p", Ffile_exists_p
  See also `file-readable-p' and `file-attributes'.
  This returns nil for a symlink to a nonexistent file.
  Use `file-symlink-p' to test for such links.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object absname;
    Lisp_Object handler;
  DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0,
         doc: /* Return t if FILENAME can be executed by you.
  For a directory, this means you can access files in that directory.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object absname;
    Lisp_Object handler;
  DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0,
         doc: /* Return t if file FILENAME exists and you can read it.
  See also `file-exists-p' and `file-attributes'.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object absname;
    Lisp_Object handler;
     on the RT/PC.  */
  DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
         doc: /* Return t if file FILENAME can be written or created by you.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object absname, dir, encoded;
    Lisp_Object handler;
@@@ -2623,7 -2676,8 +2625,7 @@@ DEFUN ("access-file", Faccess_file, Sac
         doc: /* Access file FILENAME, and get an error if that does not work.
  The second argument STRING is used in the error message.
  If there is no error, returns nil.  */)
 -     (filename, string)
 -     Lisp_Object filename, string;
 +  (Lisp_Object filename, Lisp_Object string)
  {
    Lisp_Object handler, encoded_filename, absname;
    int fd;
@@@ -2656,7 -2710,8 +2658,7 @@@ Otherwise it returns nil
  
  This function returns t when given the name of a symlink that
  points to a nonexistent file.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object handler;
  
      {
        bufsize *= 2;
        buf = (char *) xrealloc (buf, bufsize);
 -      bzero (buf, bufsize);
 +      memset (buf, 0, bufsize);
  
        errno = 0;
        valsize = readlink (SDATA (filename), buf, bufsize);
    while (valsize >= bufsize);
  
    val = make_string (buf, valsize);
 -  if (buf[0] == '/' && index (buf, ':'))
 +  if (buf[0] == '/' && strchr (buf, ':'))
      val = concat2 (build_string ("/:"), val);
    xfree (buf);
    val = DECODE_FILE (val);
@@@ -2720,7 -2775,8 +2722,7 @@@ DEFUN ("file-directory-p", Ffile_direct
         doc: /* Return t if FILENAME names an existing directory.
  Symbolic links to directories count as directories.
  See `file-symlink-p' to distinguish symlinks.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    register Lisp_Object absname;
    struct stat st;
@@@ -2749,7 -2805,8 +2751,7 @@@ directory as a buffer's current directo
  A directory name spec may be given instead; then the value is t
  if the directory so specified exists and really is a readable and
  searchable directory.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object handler;
    int tem;
@@@ -2773,7 -2830,8 +2775,7 @@@ DEFUN ("file-regular-p", Ffile_regular_
  This is the sort of file that holds an ordinary stream of data bytes.
  Symbolic links to regular files count as regular files.
  See `file-symlink-p' to distinguish symlinks.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    register Lisp_Object absname;
    struct stat st;
  #endif
  }
  \f
 +DEFUN ("file-selinux-context", Ffile_selinux_context,
 +       Sfile_selinux_context, 1, 1, 0,
 +       doc: /* Return SELinux context of file named FILENAME,
 +as a list ("user", "role", "type", "range"). Return (nil, nil, nil, nil)
 +if file does not exist, is not accessible, or SELinux is disabled */)
 +  (Lisp_Object filename)
 +{
 +  Lisp_Object absname;
 +  Lisp_Object values[4];
 +  Lisp_Object handler;
 +#if HAVE_LIBSELINUX
 +  security_context_t con;
 +  int conlength;
 +  context_t context;
 +#endif
 +
 +  absname = expand_and_dir_to_file (filename, current_buffer->directory);
 +
 +  /* If the file name has special constructs in it,
 +     call the corresponding file handler.  */
 +  handler = Ffind_file_name_handler (absname, Qfile_selinux_context);
 +  if (!NILP (handler))
 +    return call2 (handler, Qfile_selinux_context, absname);
 +
 +  absname = ENCODE_FILE (absname);
 +
 +  values[0] = Qnil;
 +  values[1] = Qnil;
 +  values[2] = Qnil;
 +  values[3] = Qnil;
 +#if HAVE_LIBSELINUX
 +  if (is_selinux_enabled ())
 +    {
 +      conlength = lgetfilecon (SDATA (absname), &con);
 +      if (conlength > 0)
 +      {
 +        context = context_new (con);
 +        if (context_user_get (context))
 +          values[0] = build_string (context_user_get (context));
 +        if (context_role_get (context))
 +          values[1] = build_string (context_role_get (context));
 +        if (context_type_get (context))
 +          values[2] = build_string (context_type_get (context));
 +        if (context_range_get (context))
 +          values[3] = build_string (context_range_get (context));
 +        context_free (context);
 +      }
 +      if (con)
 +      freecon (con);
 +    }
 +#endif
 +
 +  return Flist (sizeof(values) / sizeof(values[0]), values);
 +}
 +\f
 +DEFUN ("set-file-selinux-context", Fset_file_selinux_context,
 +       Sset_file_selinux_context, 2, 2, 0,
 +       doc: /* Set SELinux context of file named FILENAME to CONTEXT
 +as a list ("user", "role", "type", "range"). Has no effect if SELinux
 +is disabled. */)
 +  (Lisp_Object filename, Lisp_Object context)
 +{
 +  Lisp_Object absname, encoded_absname;
 +  Lisp_Object handler;
 +  Lisp_Object user = CAR_SAFE (context);
 +  Lisp_Object role = CAR_SAFE (CDR_SAFE (context));
 +  Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context)));
 +  Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context))));
 +#if HAVE_LIBSELINUX
 +  security_context_t con;
 +  int fail, conlength;
 +  context_t parsed_con;
 +#endif
 +
 +  absname = Fexpand_file_name (filename, current_buffer->directory);
 +
 +  /* If the file name has special constructs in it,
 +     call the corresponding file handler.  */
 +  handler = Ffind_file_name_handler (absname, Qset_file_selinux_context);
 +  if (!NILP (handler))
 +    return call3 (handler, Qset_file_selinux_context, absname, context);
 +
 +  encoded_absname = ENCODE_FILE (absname);
 +
 +#if HAVE_LIBSELINUX
 +  if (is_selinux_enabled ())
 +    {
 +      /* Get current file context. */
 +      conlength = lgetfilecon (SDATA (encoded_absname), &con);
 +      if (conlength > 0)
 +      {
 +        parsed_con = context_new (con);
 +        /* Change the parts defined in the parameter.*/
 +        if (STRINGP (user))
 +          {
 +            if (context_user_set (parsed_con, SDATA (user)))
 +              error ("Doing context_user_set");
 +          }
 +        if (STRINGP (role))
 +          {
 +            if (context_role_set (parsed_con, SDATA (role)))
 +              error ("Doing context_role_set");
 +          }
 +        if (STRINGP (type))
 +          {
 +            if (context_type_set (parsed_con, SDATA (type)))
 +              error ("Doing context_type_set");
 +          }
 +        if (STRINGP (range))
 +          {
 +            if (context_range_set (parsed_con, SDATA (range)))
 +              error ("Doing context_range_set");
 +          }
 +
 +        /* Set the modified context back to the file. */
 +        fail = lsetfilecon (SDATA (encoded_absname), context_str (parsed_con));
 +        if (fail)
 +          report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
 +
 +        context_free (parsed_con);
 +      }
 +      else
 +      report_file_error("Doing lgetfilecon", Fcons (absname, Qnil));
 +
 +      if (con)
 +      freecon (con);
 +    }
 +#endif
 +
 +  return Qnil;
 +}
 +\f
  DEFUN ("file-modes", Ffile_modes, Sfile_modes, 1, 1, 0,
         doc: /* Return mode bits of file named FILENAME, as an integer.
  Return nil, if file does not exist or is not accessible.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object absname;
    struct stat st;
  
    if (stat (SDATA (absname), &st) < 0)
      return Qnil;
 -#if defined (MSDOS) && __DJGPP__ < 2
 -  if (check_executable (SDATA (absname)))
 -    st.st_mode |= S_IEXEC;
 -#endif /* MSDOS && __DJGPP__ < 2 */
  
    return make_number (st.st_mode & 07777);
  }
@@@ -2975,7 -2906,8 +2977,7 @@@ Only the 12 low bits of MODE are used
  
  Interactively, mode bits are read by `read-file-modes', which accepts
  symbolic notation, like the `chmod' command from GNU Coreutils.  */)
 -  (filename, mode)
 -     Lisp_Object filename, mode;
 +  (Lisp_Object filename, Lisp_Object mode)
  {
    Lisp_Object absname, encoded_absname;
    Lisp_Object handler;
@@@ -3001,7 -2933,8 +3003,7 @@@ DEFUN ("set-default-file-modes", Fset_d
         doc: /* Set the file permission bits for newly created files.
  The argument MODE should be an integer; only the low 9 bits are used.
  This setting is inherited by subprocesses.  */)
 -     (mode)
 -     Lisp_Object mode;
 +  (Lisp_Object mode)
  {
    CHECK_NUMBER (mode);
  
  DEFUN ("default-file-modes", Fdefault_file_modes, Sdefault_file_modes, 0, 0, 0,
         doc: /* Return the default file protection for created files.
  The value is an integer.  */)
 -     ()
 +  (void)
  {
    int realmask;
    Lisp_Object value;
    return value;
  }
  \f
 -extern int lisp_time_argument P_ ((Lisp_Object, time_t *, int *));
  
  DEFUN ("set-file-times", Fset_file_times, Sset_file_times, 1, 2, 0,
         doc: /* Set times of file FILENAME to TIME.
@@@ -3032,7 -2966,8 +3034,7 @@@ Set both access and modification times
  Return t on success, else nil.
  Use the current time if TIME is nil.  TIME is in the format of
  `current-time'. */)
 -  (filename, time)
 -     Lisp_Object filename, time;
 +  (Lisp_Object filename, Lisp_Object time)
  {
    Lisp_Object absname, encoded_absname;
    Lisp_Object handler;
  #ifdef HAVE_SYNC
  DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "",
         doc: /* Tell Unix to finish all pending disk updates.  */)
 -     ()
 +  (void)
  {
    sync ();
    return Qnil;
@@@ -3091,7 -3026,8 +3093,7 @@@ DEFUN ("file-newer-than-file-p", Ffile_
         doc: /* Return t if file FILE1 is newer than file FILE2.
  If FILE1 does not exist, the answer is nil;
  otherwise, if FILE2 does not exist, the answer is t.  */)
 -     (file1, file2)
 -     Lisp_Object file1, file2;
 +  (Lisp_Object file1, Lisp_Object file2)
  {
    Lisp_Object absname1, absname2;
    struct stat st;
@@@ -3156,7 -3092,8 +3158,7 @@@ Lisp_Object Qfind_buffer_file_type
        o set back the buffer multibyteness.  */
  
  static Lisp_Object
 -decide_coding_unwind (unwind_data)
 -     Lisp_Object unwind_data;
 +decide_coding_unwind (Lisp_Object unwind_data)
  {
    Lisp_Object multibyte, undo_list, buffer;
  
@@@ -3188,12 -3125,12 +3190,12 @@@ static EMACS_INT non_regular_nbytes
  
  
  /* Read from a non-regular file.
 -   Read non_regular_trytry bytes max from non_regular_fd.
 +   Read non_regular_nbytes bytes max from non_regular_fd.
     Non_regular_inserted specifies where to put the read bytes.
     Value is the number of bytes read.  */
  
  static Lisp_Object
 -read_non_regular ()
 +read_non_regular (Lisp_Object ignore)
  {
    EMACS_INT nbytes;
  
     in insert-file-contents.  */
  
  static Lisp_Object
 -read_non_regular_quit ()
 +read_non_regular_quit (Lisp_Object ignore)
  {
    return Qnil;
  }
@@@ -3240,7 -3177,8 +3242,7 @@@ the number of characters that replace p
  This function does code conversion according to the value of
  `coding-system-for-read' or `file-coding-system-alist', and sets the
  variable `last-coding-system-used' to the coding system actually used.  */)
 -     (filename, visit, beg, end, replace)
 -     Lisp_Object filename, visit, beg, end, replace;
 +  (Lisp_Object filename, Lisp_Object visit, Lisp_Object beg, Lisp_Object end, Lisp_Object replace)
  {
    struct stat st;
    register int fd;
                                  conversion_buffer);
          unprocessed = coding.carryover_bytes;
          if (coding.carryover_bytes > 0)
 -          bcopy (coding.carryover, read_buf, unprocessed);
 +          memcpy (read_buf, coding.carryover, unprocessed);
        }
        UNGCPRO;
        emacs_close (fd);
        if (NILP (handler))
        {
          current_buffer->modtime = st.st_mtime;
 +        current_buffer->modtime_size = st.st_size;
          current_buffer->filename = orig_filename;
        }
  
    RETURN_UNGCPRO (unbind_to (count, val));
  }
  \f
 -static Lisp_Object build_annotations P_ ((Lisp_Object, Lisp_Object));
 +static Lisp_Object build_annotations (Lisp_Object, Lisp_Object);
  
  static Lisp_Object
 -build_annotations_unwind (arg)
 -     Lisp_Object arg;
 +build_annotations_unwind (Lisp_Object arg)
  {
    Vwrite_region_annotation_buffers = arg;
    return Qnil;
  /* Decide the coding-system to encode the data with.  */
  
  static Lisp_Object
 -choose_write_coding_system (start, end, filename,
 -                          append, visit, lockname, coding)
 -     Lisp_Object start, end, filename, append, visit, lockname;
 -     struct coding_system *coding;
 +choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
 +                          Lisp_Object append, Lisp_Object visit, Lisp_Object lockname,
 +                          struct coding_system *coding)
  {
    Lisp_Object val;
    Lisp_Object eol_parent = Qnil;
@@@ -4519,7 -4458,8 +4521,7 @@@ This does code conversion according to 
  
  This calls `write-region-annotate-functions' at the start, and
  `write-region-post-annotation-function' at the end.  */)
 -     (start, end, filename, append, visit, lockname, mustbenew)
 -     Lisp_Object start, end, filename, append, visit, lockname, mustbenew;
 +  (Lisp_Object start, Lisp_Object end, Lisp_Object filename, Lisp_Object append, Lisp_Object visit, Lisp_Object lockname, Lisp_Object mustbenew)
  {
    register int desc;
    int failure;
       to avoid a "file has changed on disk" warning on
       next attempt to save.  */
    if (visiting)
 -    current_buffer->modtime = st.st_mtime;
 +    {
 +      current_buffer->modtime = st.st_mtime;
 +      current_buffer->modtime_size = st.st_size;
 +    }
  
    if (failure)
      error ("IO error writing %s: %s", SDATA (filename),
    return Qnil;
  }
  \f
 -Lisp_Object merge ();
 +Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object);
  
  DEFUN ("car-less-than-car", Fcar_less_than_car, Scar_less_than_car, 2, 2, 0,
         doc: /* Return t if (car A) is numerically less than (car B).  */)
 -     (a, b)
 -     Lisp_Object a, b;
 +  (Lisp_Object a, Lisp_Object b)
  {
    return Flss (Fcar (a), Fcar (b));
  }
     as save-excursion would do.  */
  
  static Lisp_Object
 -build_annotations (start, end)
 -     Lisp_Object start, end;
 +build_annotations (Lisp_Object start, Lisp_Object end)
  {
    Lisp_Object annotations;
    Lisp_Object p, res;
     The return value is negative in case of system call failure.  */
  
  static int
 -a_write (desc, string, pos, nchars, annot, coding)
 -     int desc;
 -     Lisp_Object string;
 -     register int nchars;
 -     int pos;
 -     Lisp_Object *annot;
 -     struct coding_system *coding;
 +a_write (int desc, Lisp_Object string, int pos, register int nchars, Lisp_Object *annot, struct coding_system *coding)
  {
    Lisp_Object tem;
    int nextpos;
     are indexes to the string STRING.  */
  
  static int
 -e_write (desc, string, start, end, coding)
 -     int desc;
 -     Lisp_Object string;
 -     int start, end;
 -     struct coding_system *coding;
 +e_write (int desc, Lisp_Object string, int start, int end, struct coding_system *coding)
  {
    if (STRINGP (string))
      {
  }
  \f
  DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime,
 -       Sverify_visited_file_modtime, 1, 1, 0,
 +       Sverify_visited_file_modtime, 0, 1, 0,
         doc: /* Return t if last mod time of BUF's visited file matches what BUF records.
  This means that the file has not been changed since it was visited or saved.
 +If BUF is omitted or nil, it defaults to the current buffer.
  See Info node `(elisp)Modification Time' for more details.  */)
 -     (buf)
 -     Lisp_Object buf;
 +  (Lisp_Object buf)
  {
    struct buffer *b;
    struct stat st;
    Lisp_Object handler;
    Lisp_Object filename;
  
 -  CHECK_BUFFER (buf);
 -  b = XBUFFER (buf);
 +  if (NILP (buf))
 +    b = current_buffer;
 +  else
 +    {
 +      CHECK_BUFFER (buf);
 +      b = XBUFFER (buf);
 +    }
  
    if (!STRINGP (b->filename)) return Qt;
    if (b->modtime == 0) return Qt;
        else
        st.st_mtime = 0;
      }
 -  if (st.st_mtime == b->modtime
 -      /* If both are positive, accept them if they are off by one second.  */
 -      || (st.st_mtime > 0 && b->modtime > 0
 -        && (st.st_mtime == b->modtime + 1
 -            || st.st_mtime == b->modtime - 1)))
 +  if ((st.st_mtime == b->modtime
 +       /* If both are positive, accept them if they are off by one second.  */
 +       || (st.st_mtime > 0 && b->modtime > 0
 +         && (st.st_mtime == b->modtime + 1
 +             || st.st_mtime == b->modtime - 1)))
 +      && (st.st_size == b->modtime_size
 +          || b->modtime_size < 0))
      return Qt;
    return Qnil;
  }
@@@ -5103,10 -5045,9 +5105,10 @@@ DEFUN ("clear-visited-file-modtime", Fc
         Sclear_visited_file_modtime, 0, 0, 0,
         doc: /* Clear out records of last mod time of visited file.
  Next attempt to save will certainly not complain of a discrepancy.  */)
 -     ()
 +  (void)
  {
    current_buffer->modtime = 0;
 +  current_buffer->modtime_size = -1;
    return Qnil;
  }
  
@@@ -5117,7 -5058,7 +5119,7 @@@ The value is a list of the form (HIGH L
  that `file-attributes' returns.  If the current buffer has no recorded
  file modification time, this function returns 0.
  See Info node `(elisp)Modification Time' for more details.  */)
 -     ()
 +  (void)
  {
    if (! current_buffer->modtime)
      return make_number (0);
@@@ -5132,13 -5073,11 +5134,13 @@@ or if the file itself has been changed 
  An argument specifies the modification time value to use
  \(instead of that of the visited file), in the form of a list
  \(HIGH . LOW) or (HIGH LOW).  */)
 -     (time_list)
 -     Lisp_Object time_list;
 +  (Lisp_Object time_list)
  {
    if (!NILP (time_list))
 -    current_buffer->modtime = cons_to_long (time_list);
 +    {
 +      current_buffer->modtime = cons_to_long (time_list);
 +      current_buffer->modtime_size = -1;
 +    }
    else
      {
        register Lisp_Object filename;
        filename = ENCODE_FILE (filename);
  
        if (stat (SDATA (filename), &st) >= 0)
 -      current_buffer->modtime = st.st_mtime;
 +        {
 +        current_buffer->modtime = st.st_mtime;
 +          current_buffer->modtime_size = st.st_size;
 +        }
      }
  
    return Qnil;
  }
  \f
  Lisp_Object
 -auto_save_error (error)
 -     Lisp_Object error;
 +auto_save_error (Lisp_Object error)
  {
    Lisp_Object args[3], msg;
    int i, nbytes;
    GCPRO1 (msg);
    nbytes = SBYTES (msg);
    SAFE_ALLOCA (msgbuf, char *, nbytes);
 -  bcopy (SDATA (msg), msgbuf, nbytes);
 +  memcpy (msgbuf, SDATA (msg), nbytes);
  
    for (i = 0; i < 3; ++i)
      {
  }
  
  Lisp_Object
 -auto_save_1 ()
 +auto_save_1 (void)
  {
    struct stat st;
    Lisp_Object modes;
  }
  
  static Lisp_Object
 -do_auto_save_unwind (arg)  /* used as unwind-protect function */
 -     Lisp_Object arg;
 +do_auto_save_unwind (Lisp_Object arg)  /* used as unwind-protect function */
 +                     
  {
    FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
    auto_saving = 0;
  }
  
  static Lisp_Object
 -do_auto_save_unwind_1 (value)  /* used as unwind-protect function */
 -     Lisp_Object value;
 +do_auto_save_unwind_1 (Lisp_Object value)  /* used as unwind-protect function */
 +                       
  {
    minibuffer_auto_raise = XINT (value);
    return Qnil;
  }
  
  static Lisp_Object
 -do_auto_save_make_dir (dir)
 -     Lisp_Object dir;
 +do_auto_save_make_dir (Lisp_Object dir)
  {
    Lisp_Object mode;
  
  }
  
  static Lisp_Object
 -do_auto_save_eh (ignore)
 -     Lisp_Object ignore;
 +do_auto_save_eh (Lisp_Object ignore)
  {
    return Qnil;
  }
@@@ -5278,7 -5217,8 +5280,7 @@@ Normally we run the normal hook `auto-s
  
  A non-nil NO-MESSAGE argument means do not print any message if successful.
  A non-nil CURRENT-ONLY argument means save only current buffer.  */)
 -     (no_message, current_only)
 -     Lisp_Object no_message, current_only;
 +  (Lisp_Object no_message, Lisp_Object current_only)
  {
    struct buffer *old = current_buffer, *b;
    Lisp_Object tail, buf;
@@@ -5479,7 -5419,7 +5481,7 @@@ DEFUN ("set-buffer-auto-saved", Fset_bu
         Sset_buffer_auto_saved, 0, 0, 0,
         doc: /* Mark current buffer as auto-saved with its current text.
  No auto-save file will be written until the buffer changes again.  */)
 -     ()
 +  (void)
  {
    /* FIXME: This should not be called in indirect buffers, since
       they're not autosaved.  */
  DEFUN ("clear-buffer-auto-save-failure", Fclear_buffer_auto_save_failure,
         Sclear_buffer_auto_save_failure, 0, 0, 0,
         doc: /* Clear any record of a recent auto-save failure in the current buffer.  */)
 -     ()
 +  (void)
  {
    current_buffer->auto_save_failure_time = -1;
    return Qnil;
@@@ -5504,7 -5444,7 +5506,7 @@@ DEFUN ("recent-auto-save-p", Frecent_au
  More precisely, if it has been auto-saved since last read from or saved
  in the visited file.  If the buffer has no visited file,
  then any auto-save counts as "recent".  */)
 -     ()
 +  (void)
  {
    /* FIXME: maybe we should return nil for indirect buffers since
       they're never autosaved.  */
@@@ -5518,7 -5458,7 +5520,7 @@@ DEFUN ("next-read-file-uses-dialog-p", 
         doc: /* Return t if a call to `read-file-name' will use a dialog.
  The return value is only relevant for a call to `read-file-name' that happens
  before any other event (mouse or keypress) is handled.  */)
 -  ()
 +  (void)
  {
  #if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK)
    if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
  }
  
  Lisp_Object
 -Fread_file_name (prompt, dir, default_filename, mustmatch, initial, predicate)
 -     Lisp_Object prompt, dir, default_filename, mustmatch, initial, predicate;
 +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, gcpro2;
    Lisp_Object args[7];
  
  \f
  void
 -syms_of_fileio ()
 +syms_of_fileio (void)
  {
    Qoperations = intern_c_string ("operations");
    Qexpand_file_name = intern_c_string ("expand-file-name");
    Qfile_modes = intern_c_string ("file-modes");
    Qset_file_modes = intern_c_string ("set-file-modes");
    Qset_file_times = intern_c_string ("set-file-times");
 +  Qfile_selinux_context = intern_c_string("file-selinux-context");
 +  Qset_file_selinux_context = intern_c_string("set-file-selinux-context");
    Qfile_newer_than_file_p = intern_c_string ("file-newer-than-file-p");
    Qinsert_file_contents = intern_c_string ("insert-file-contents");
    Qwrite_region = intern_c_string ("write-region");
    staticpro (&Qfile_modes);
    staticpro (&Qset_file_modes);
    staticpro (&Qset_file_times);
 +  staticpro (&Qfile_selinux_context);
 +  staticpro (&Qset_file_selinux_context);
    staticpro (&Qfile_newer_than_file_p);
    staticpro (&Qinsert_file_contents);
    staticpro (&Qwrite_region);
@@@ -5684,6 -5621,11 +5686,6 @@@ of file names regardless of the curren
    Fput (Qfile_date_error, Qerror_message,
        make_pure_c_string ("Cannot set file date"));
  
 -  DEFVAR_LISP ("directory-sep-char", &Vdirectory_sep_char,
 -             doc: /* Directory separator character for built-in functions that return file names.
 -The value is always ?/.  Don't use this variable, just use `/'.  */);
 -  XSETFASTINT (Vdirectory_sep_char, '/');
 -
    DEFVAR_LISP ("file-name-handler-alist", &Vfile_name_handler_alist,
               doc: /* *Alist of elements (REGEXP . HANDLER) for file names handled specially.
  If a file name matches REGEXP, then all I/O on that file is done by calling
@@@ -5806,10 -5748,8 +5808,10 @@@ A non-nil value may result in data loss
  
    DEFVAR_BOOL ("delete-by-moving-to-trash", &delete_by_moving_to_trash,
                 doc: /* Specifies whether to use the system's trash can.
 -When non-nil, the function `move-file-to-trash' will be used by
 -`delete-file' and `delete-directory'.  */);
 +When non-nil, certain file deletion commands use the function
 +`move-file-to-trash' instead of deleting files outright.
 +This includes interactive calls to `delete-file' and
 +`delete-directory' and the Dired deletion commands.  */);
    delete_by_moving_to_trash = 0;
    Qdelete_by_moving_to_trash = intern_c_string ("delete-by-moving-to-trash");
    Qmove_file_to_trash = intern_c_string ("move-file-to-trash");
    defsubr (&Sfile_modes);
    defsubr (&Sset_file_modes);
    defsubr (&Sset_file_times);
 +  defsubr (&Sfile_selinux_context);
 +  defsubr (&Sset_file_selinux_context);
    defsubr (&Sset_default_file_modes);
    defsubr (&Sdefault_file_modes);
    defsubr (&Sfile_newer_than_file_p);
  #endif
  }
  
 -/* arch-tag: 64ba3fd7-f844-4fb2-ba4b-427eb928786c
 -   (do not change this comment) */
diff --combined src/image.c
index 07f573ca893aab1a6ce891629bd6894746c7fcac,6842f27eed7cc7cbba0ab72a5a4e2459a2107095..41c9cb8f5348e1d1e80dc2abe40ad6eb39ed6cf6
@@@ -94,6 -94,11 +94,11 @@@ typedef struct w32_bitmap_record Bitmap
     without modifying lots of files).  */
  extern void x_query_colors (struct frame *f, XColor *colors, int ncolors);
  extern void x_query_color (struct frame *f, XColor *color);
+ /* Version of libpng that we were compiled with, or -1 if no PNG
+    support was compiled in.  This is tested by w32-win.el to correctly
+    set up the alist used to search for PNG libraries.  */
+ Lisp_Object Qlibpng_version;
  #endif /* HAVE_NTGUI */
  
  #ifdef HAVE_NS
@@@ -126,20 -131,17 +131,20 @@@ typedef struct ns_bitmap_record Bitmap_
  
  Lisp_Object Vx_bitmap_file_path;
  
 +/* The symbol `postscript' identifying images of this type.  */
 +
 +Lisp_Object Qpostscript;
  
 -static void x_disable_image P_ ((struct frame *, struct image *));
 -static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object,
 -                                Lisp_Object));
 +static void x_disable_image (struct frame *, struct image *);
 +static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
 +                              Lisp_Object);
  
 -static void init_color_table P_ ((void));
 -static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b));
 +static void init_color_table (void);
 +static unsigned long lookup_rgb_color (struct frame *f, int r, int g, int b);
  #ifdef COLOR_TABLE_SUPPORT
 -static void free_color_table P_ ((void));
 -static unsigned long *colors_in_color_table P_ ((int *n));
 -static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p));
 +static void free_color_table (void);
 +static unsigned long *colors_in_color_table (int *n);
 +static unsigned long lookup_pixel_color (struct frame *f, unsigned long p);
  #endif
  
  /* Code to deal with bitmaps.  Bitmaps are referenced by their bitmap
@@@ -160,7 -162,7 +165,7 @@@ XGetImage (Display *display, Pixmap pix
             unsigned long plane_mask, int format)
  {
    /* TODO: not sure what this function is supposed to do.. */
 -  ns_retain_object(pixmap);
 +  ns_retain_object (pixmap);
    return pixmap;
  }
  
  unsigned long
  XGetPixel (XImagePtr ximage, int x, int y)
  {
 -  return ns_get_pixel(ximage, x, y);
 +  return ns_get_pixel (ximage, x, y);
  }
  
  /* use with imgs created by ns_image_for_XPM; alpha set to 1;
  void
  XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
  {
 -  ns_put_pixel(ximage, x, y, pixel);
 +  ns_put_pixel (ximage, x, y, pixel);
  }
  #endif /* HAVE_NS */
  
  /* Functions to access the contents of a bitmap, given an id.  */
  
  int
 -x_bitmap_height (f, id)
 -     FRAME_PTR f;
 -     int id;
 +x_bitmap_height (FRAME_PTR f, int id)
  {
    return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
  }
  
  int
 -x_bitmap_width (f, id)
 -     FRAME_PTR f;
 -     int id;
 +x_bitmap_width (FRAME_PTR f, int id)
  {
    return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
  }
  
  #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
  int
 -x_bitmap_pixmap (f, id)
 -     FRAME_PTR f;
 -     int id;
 +x_bitmap_pixmap (FRAME_PTR f, int id)
  {
    return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
  }
  
  #ifdef HAVE_X_WINDOWS
  int
 -x_bitmap_mask (f, id)
 -     FRAME_PTR f;
 -     int id;
 +x_bitmap_mask (FRAME_PTR f, int id)
  {
    return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
  }
  /* Allocate a new bitmap record.  Returns index of new record.  */
  
  static int
 -x_allocate_bitmap_record (f)
 -     FRAME_PTR f;
 +x_allocate_bitmap_record (FRAME_PTR f)
  {
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    int i;
  /* Add one reference to the reference count of the bitmap with id ID.  */
  
  void
 -x_reference_bitmap (f, id)
 -     FRAME_PTR f;
 -     int id;
 +x_reference_bitmap (FRAME_PTR f, int id)
  {
    ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
  }
  /* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS.  */
  
  int
 -x_create_bitmap_from_data (f, bits, width, height)
 -     struct frame *f;
 -     char *bits;
 -     unsigned int width, height;
 +x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
  {
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    int id;
  #endif /* HAVE_NTGUI */
  
  #ifdef HAVE_NS
 -  void *bitmap = ns_image_from_XBM(bits, width, height);
 +  void *bitmap = ns_image_from_XBM (bits, width, height);
    if (!bitmap)
        return -1;
  #endif
  /* Create bitmap from file FILE for frame F.  */
  
  int
 -x_create_bitmap_from_file (f, file)
 -     struct frame *f;
 -     Lisp_Object file;
 +x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
  {
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
  
  #ifdef HAVE_NS
    int id;
 -  void *bitmap = ns_image_from_file(file);
 +  void *bitmap = ns_image_from_file (file);
  
    if (!bitmap)
        return -1;
    dpyinfo->bitmaps[id - 1].refcount = 1;
    dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1);
    dpyinfo->bitmaps[id - 1].depth = 1;
 -  dpyinfo->bitmaps[id - 1].height = ns_image_width(bitmap);
 -  dpyinfo->bitmaps[id - 1].width = ns_image_height(bitmap);
 +  dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap);
 +  dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap);
    strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file));
    return id;
  #endif
  /* Free bitmap B.  */
  
  static void
 -free_bitmap_record (dpyinfo, bm)
 -     Display_Info *dpyinfo;
 -     Bitmap_Record *bm;
 +free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
  {
  #ifdef HAVE_X_WINDOWS
    XFreePixmap (dpyinfo->display, bm->pixmap);
  #endif /* HAVE_NTGUI */
  
  #ifdef HAVE_NS
 -  ns_release_object(bm->img);
 +  ns_release_object (bm->img);
  #endif
  
    if (bm->file)
  /* Remove reference to bitmap with id number ID.  */
  
  void
 -x_destroy_bitmap (f, id)
 -     FRAME_PTR f;
 -     int id;
 +x_destroy_bitmap (FRAME_PTR f, int id)
  {
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
  /* Free all the bitmaps for the display specified by DPYINFO.  */
  
  void
 -x_destroy_all_bitmaps (dpyinfo)
 -     Display_Info *dpyinfo;
 +x_destroy_all_bitmaps (Display_Info *dpyinfo)
  {
    int i;
    Bitmap_Record *bm = dpyinfo->bitmaps;
  /* Useful functions defined in the section
     `Image type independent image structures' below. */
  
 -static unsigned long four_corners_best P_ ((XImagePtr ximg,
 -                                          int *corners,
 -                                          unsigned long width,
 -                                          unsigned long height));
 +static unsigned long four_corners_best (XImagePtr ximg,
 +                                        int *corners,
 +                                        unsigned long width,
 +                                        unsigned long height);
  
 -static int x_create_x_image_and_pixmap P_ ((struct frame *f, int width, int height,
 -                                          int depth, XImagePtr *ximg,
 -                                          Pixmap *pixmap));
 +static int x_create_x_image_and_pixmap (struct frame *f, int width, int height,
 +                                        int depth, XImagePtr *ximg,
 +                                        Pixmap *pixmap);
  
 -static void x_destroy_x_image P_ ((XImagePtr ximg));
 +static void x_destroy_x_image (XImagePtr ximg);
  
  
  /* Create a mask of a bitmap. Note is this not a perfect mask.
     It's nicer with some borders in this context */
  
  int
 -x_create_bitmap_mask (f, id)
 -     struct frame *f;
 -     int id;
 +x_create_bitmap_mask (struct frame *f, int id)
  {
    Pixmap pixmap, mask;
    XImagePtr ximg, mask_img;
@@@ -567,6 -592,10 +572,6 @@@ static struct image_type *image_types
  
  Lisp_Object Vimage_types;
  
 -/* An alist of image types and libraries that implement the type.  */
 -
 -Lisp_Object Vimage_library_alist;
 -
  /* Cache for delayed-loading image types.  */
  
  static Lisp_Object Vimage_type_cache;
@@@ -577,9 -606,12 +582,9 @@@ Lisp_Object Qxbm
  
  /* Keywords.  */
  
 -extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
 -extern Lisp_Object QCdata, QCtype;
 -extern Lisp_Object Qcenter;
 -Lisp_Object QCascent, QCmargin, QCrelief, Qcount;
 +Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data;
  Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
 -Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask;
 +Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry, QCcrop, QCrotation;
  
  /* Other symbols.  */
  
@@@ -592,13 -624,13 +597,13 @@@ Lisp_Object Vimage_cache_eviction_delay
  
  /* Function prototypes.  */
  
 -static Lisp_Object define_image_type P_ ((struct image_type *type, int loaded));
 -static struct image_type *lookup_image_type P_ ((Lisp_Object symbol));
 -static void image_error P_ ((char *format, Lisp_Object, Lisp_Object));
 -static void x_laplace P_ ((struct frame *, struct image *));
 -static void x_emboss P_ ((struct frame *, struct image *));
 -static int x_build_heuristic_mask P_ ((struct frame *, struct image *,
 -                                     Lisp_Object));
 +static Lisp_Object define_image_type (struct image_type *type, int loaded);
 +static struct image_type *lookup_image_type (Lisp_Object symbol);
 +static void image_error (const char *format, Lisp_Object, Lisp_Object);
 +static void x_laplace (struct frame *, struct image *);
 +static void x_emboss (struct frame *, struct image *);
 +static int x_build_heuristic_mask (struct frame *, struct image *,
 +                                   Lisp_Object);
  
  #define CACHE_IMAGE_TYPE(type, status) \
    do { Vimage_type_cache = Fcons (Fcons (type, status), Vimage_type_cache); } while (0)
     image_types and caches the loading status of TYPE.  */
  
  static Lisp_Object
 -define_image_type (type, loaded)
 -     struct image_type *type;
 -     int loaded;
 +define_image_type (struct image_type *type, int loaded)
  {
    Lisp_Object success;
  
        /* Make a copy of TYPE to avoid a bus error in a dumped Emacs.
           The initialized data segment is read-only.  */
        struct image_type *p = (struct image_type *) xmalloc (sizeof *p);
 -      bcopy (type, p, sizeof *p);
 +      memcpy (p, type, sizeof *p);
        p->next = image_types;
        image_types = p;
        success = Qt;
     structure.  Value is null if SYMBOL is not a known image type.  */
  
  static INLINE struct image_type *
 -lookup_image_type (symbol)
 -     Lisp_Object symbol;
 +lookup_image_type (Lisp_Object symbol)
  {
    struct image_type *type;
  
    /* We must initialize the image-type if it hasn't been already.  */
 -  if (NILP (Finit_image_library (symbol, Vimage_library_alist)))
 +  if (NILP (Finit_image_library (symbol, Vdynamic_library_alist)))
      return 0;                 /* unimplemented */
  
    for (type = image_types; type; type = type->next)
     image type.  */
  
  int
 -valid_image_p (object)
 -     Lisp_Object object;
 +valid_image_p (Lisp_Object object)
  {
    int valid_p = 0;
  
     therefore simply displays a message.  */
  
  static void
 -image_error (format, arg1, arg2)
 -     char *format;
 -     Lisp_Object arg1, arg2;
 +image_error (const char *format, Lisp_Object arg1, Lisp_Object arg2)
  {
    add_to_log (format, arg1, arg2);
  }
@@@ -727,7 -765,7 +732,7 @@@ enum image_value_typ
  struct image_keyword
  {
    /* Name of keyword.  */
 -  char *name;
 +  const char *name;
  
    /* The type of value allowed.  */
    enum image_value_type type;
  };
  
  
 -static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *,
 -                               int, Lisp_Object));
 -static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *));
 +static int parse_image_spec (Lisp_Object, struct image_keyword *,
 +                             int, Lisp_Object);
 +static Lisp_Object image_spec_value (Lisp_Object, Lisp_Object, int *);
  
  
  /* Parse image spec SPEC according to KEYWORDS.  A valid image spec
     allowed keyword/value pairs.  Value is non-zero if SPEC is valid.  */
  
  static int
 -parse_image_spec (spec, keywords, nkeywords, type)
 -     Lisp_Object spec;
 -     struct image_keyword *keywords;
 -     int nkeywords;
 -     Lisp_Object type;
 +parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
 +                int nkeywords, Lisp_Object type)
  {
    int i;
    Lisp_Object plist;
     to 1 if KEY was found in SPEC, set it to 0 otherwise.  */
  
  static Lisp_Object
 -image_spec_value (spec, key, found)
 -     Lisp_Object spec, key;
 -     int *found;
 +image_spec_value (Lisp_Object spec, Lisp_Object key, int *found)
  {
    Lisp_Object tail;
  
@@@ -922,7 -965,8 +927,7 @@@ PIXELS non-nil means return the size i
  size in canonical character units.
  FRAME is the frame on which the image will be displayed.  FRAME nil
  or omitted means use the selected frame.  */)
 -     (spec, pixels, frame)
 -     Lisp_Object spec, pixels, frame;
 +  (Lisp_Object spec, Lisp_Object pixels, Lisp_Object frame)
  {
    Lisp_Object size;
  
@@@ -952,7 -996,8 +957,7 @@@ DEFUN ("image-mask-p", Fimage_mask_p, S
         doc: /* Return t if image SPEC has a mask bitmap.
  FRAME is the frame on which the image will be displayed.  FRAME nil
  or omitted means use the selected frame.  */)
 -     (spec, frame)
 -     Lisp_Object spec, frame;
 +  (Lisp_Object spec, Lisp_Object frame)
  {
    Lisp_Object mask;
  
    return mask;
  }
  
 -DEFUN ("image-extension-data", Fimage_extension_data, Simage_extension_data, 1, 2, 0,
 -       doc: /* Return extension data for image SPEC.
 +DEFUN ("image-metadata", Fimage_metadata, Simage_metadata, 1, 2, 0,
 +       doc: /* Return metadata for image SPEC.
  FRAME is the frame on which the image will be displayed.  FRAME nil
  or omitted means use the selected frame.  */)
 -     (spec, frame)
 -     Lisp_Object spec, frame;
 +  (Lisp_Object spec, Lisp_Object frame)
  {
    Lisp_Object ext;
  
                 Image type independent image structures
   ***********************************************************************/
  
 -static struct image *make_image P_ ((Lisp_Object spec, unsigned hash));
 -static void free_image P_ ((struct frame *f, struct image *img));
 -static int check_image_size P_ ((struct frame *f, int width, int height));
 +static struct image *make_image (Lisp_Object spec, unsigned hash);
 +static void free_image (struct frame *f, struct image *img);
 +static int check_image_size (struct frame *f, int width, int height);
  
  #define MAX_IMAGE_SIZE 6.0
  Lisp_Object Vmax_image_size;
     SPEC.  SPEC has a hash value of HASH.  */
  
  static struct image *
 -make_image (spec, hash)
 -     Lisp_Object spec;
 -     unsigned hash;
 +make_image (Lisp_Object spec, unsigned int hash)
  {
    struct image *img = (struct image *) xmalloc (sizeof *img);
    Lisp_Object file = image_spec_value (spec, QCfile, NULL);
  
    xassert (valid_image_p (spec));
 -  bzero (img, sizeof *img);
 +  memset (img, 0, sizeof *img);
    img->dependencies = NILP (file) ? Qnil : list1 (file);
    img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL));
    xassert (img->type != NULL);
  /* Free image IMG which was used on frame F, including its resources.  */
  
  static void
 -free_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +free_image (struct frame *f, struct image *img)
  {
    if (img)
      {
     otherwise, return 0. */
  
  int
 -check_image_size (f, width, height)
 -     struct frame *f;
 -     int width;
 -     int height;
 +check_image_size (struct frame *f, int width, int height)
  {
    int w, h;
  
     drawing an image.  */
  
  void
 -prepare_image_for_display (f, img)
 -     struct frame *f;
 -     struct image *img;
 +prepare_image_for_display (struct frame *f, struct image *img)
  {
    EMACS_TIME t;
  
     drawn in face FACE.  */
  
  int
 -image_ascent (img, face, slice)
 -     struct image *img;
 -     struct face *face;
 -     struct glyph_slice *slice;
 +image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
  {
    int height;
    int ascent;
     On W32, XIMG is assumed to a device context with the bitmap selected.  */
  
  static RGB_PIXEL_COLOR
 -four_corners_best (ximg, corners, width, height)
 -     XImagePtr_or_DC ximg;
 -     int *corners;
 -     unsigned long width, height;
 +four_corners_best (XImagePtr_or_DC ximg, int *corners,
 +                 unsigned long width, unsigned long height)
  {
    RGB_PIXEL_COLOR corner_pixels[4], best;
    int i, best_count;
  #elif defined (HAVE_NS)
  
  #define Destroy_Image(ximg, dummy) \
 -  ns_release_object(ximg)
 +  ns_release_object (ximg)
  
  #define Free_Pixmap(display, pixmap) \
 -  ns_release_object(pixmap)
 +  ns_release_object (pixmap)
  
  #else
  
     use for the heuristic.  */
  
  RGB_PIXEL_COLOR
 -image_background (img, f, ximg)
 -     struct image *img;
 -     struct frame *f;
 -     XImagePtr_or_DC ximg;
 +image_background (struct image *img, struct frame *f, XImagePtr_or_DC ximg)
  {
    if (! img->background_valid)
      /* IMG doesn't have a background yet, try to guess a reasonable value.  */
     existing XImage object to use for the heuristic.  */
  
  int
 -image_background_transparent (img, f, mask)
 -     struct image *img;
 -     struct frame *f;
 -     XImagePtr_or_DC mask;
 +image_background_transparent (struct image *img, struct frame *f, XImagePtr_or_DC mask)
  {
    if (! img->background_transparent_valid)
      /* IMG doesn't have a background yet, try to guess a reasonable value.  */
                  Helper functions for X image types
   ***********************************************************************/
  
 -static void x_clear_image_1 P_ ((struct frame *, struct image *, int,
 -                               int, int));
 -static void x_clear_image P_ ((struct frame *f, struct image *img));
 -static unsigned long x_alloc_image_color P_ ((struct frame *f,
 -                                            struct image *img,
 -                                            Lisp_Object color_name,
 -                                            unsigned long dflt));
 +static void x_clear_image_1 (struct frame *, struct image *, int,
 +                             int, int);
 +static void x_clear_image (struct frame *f, struct image *img);
 +static unsigned long x_alloc_image_color (struct frame *f,
 +                                          struct image *img,
 +                                          Lisp_Object color_name,
 +                                          unsigned long dflt);
  
  
  /* Clear X resources of image IMG on frame F.  PIXMAP_P non-zero means
     the image, if any.  */
  
  static void
 -x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
 -     struct frame *f;
 -     struct image *img;
 -     int pixmap_p, mask_p, colors_p;
 +x_clear_image_1 (struct frame *f, struct image *img, int pixmap_p, int mask_p,
 +               int colors_p)
  {
    if (pixmap_p && img->pixmap)
      {
  /* Free X resources of image IMG which is used on frame F.  */
  
  static void
 -x_clear_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +x_clear_image (struct frame *f, struct image *img)
  {
    BLOCK_INPUT;
    x_clear_image_1 (f, img, 1, 1, 1);
     color.  */
  
  static unsigned long
 -x_alloc_image_color (f, img, color_name, dflt)
 -     struct frame *f;
 -     struct image *img;
 -     Lisp_Object color_name;
 -     unsigned long dflt;
 +x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
 +                   unsigned long dflt)
  {
    XColor color;
    unsigned long result;
                             Image Cache
   ***********************************************************************/
  
 -static struct image *search_image_cache P_ ((struct frame *, Lisp_Object, unsigned));
 -static void cache_image P_ ((struct frame *f, struct image *img));
 -static void postprocess_image P_ ((struct frame *, struct image *));
 +static struct image *search_image_cache (struct frame *, Lisp_Object, unsigned);
 +static void cache_image (struct frame *f, struct image *img);
 +static void postprocess_image (struct frame *, struct image *);
  
  /* Return a new, initialized image cache that is allocated from the
     heap.  Call free_image_cache to free an image cache.  */
  
  struct image_cache *
 -make_image_cache ()
 +make_image_cache (void)
  {
    struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c);
    int size;
  
 -  bzero (c, sizeof *c);
 +  memset (c, 0, sizeof *c);
    c->size = 50;
    c->images = (struct image **) xmalloc (c->size * sizeof *c->images);
    size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
    c->buckets = (struct image **) xmalloc (size);
 -  bzero (c->buckets, size);
 +  memset (c->buckets, 0, size);
    return c;
  }
  
  /* Find an image matching SPEC in the cache, and return it.  If no
     image is found, return NULL.  */
  static struct image *
 -search_image_cache (f, spec, hash)
 -     struct frame *f;
 -     Lisp_Object spec;
 -     unsigned hash;
 +search_image_cache (struct frame *f, Lisp_Object spec, unsigned int hash)
  {
    struct image *img;
    struct image_cache *c = FRAME_IMAGE_CACHE (f);
  /* Search frame F for an image with spec SPEC, and free it.  */
  
  static void
 -uncache_image (f, spec)
 -     struct frame *f;
 -     Lisp_Object spec;
 +uncache_image (struct frame *f, Lisp_Object spec)
  {
    struct image *img = search_image_cache (f, spec, sxhash (spec, 0));
    if (img)
     caches.  */
  
  void
 -free_image_cache (f)
 -     struct frame *f;
 +free_image_cache (struct frame *f)
  {
    struct image_cache *c = FRAME_IMAGE_CACHE (f);
    if (c)
@@@ -1513,56 -1592,29 +1518,56 @@@ clear_image_cache (struct frame *f, Lis
  {
    struct image_cache *c = FRAME_IMAGE_CACHE (f);
  
 -  if (c && (!NILP (filter) || INTEGERP (Vimage_cache_eviction_delay)))
 +  if (c)
      {
 -      EMACS_TIME t;
 -      unsigned long old;
 -      int i, nfreed;
 -
 -      EMACS_GET_TIME (t);
 -      old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay);
 +      int i, nfreed = 0;
  
        /* Block input so that we won't be interrupted by a SIGIO
         while being in an inconsistent state.  */
        BLOCK_INPUT;
  
 -      for (i = nfreed = 0; i < c->used; ++i)
 +      if (!NILP (filter))
        {
 -        struct image *img = c->images[i];
 -        if (img != NULL
 -            && (NILP (filter) ? img->timestamp < old
 -                : (EQ (Qt, filter)
 -                   || !NILP (Fmember (filter, img->dependencies)))))
 +        /* Filter image cache.  */
 +        for (i = 0; i < c->used; ++i)
            {
 -            free_image (f, img);
 -            ++nfreed;
 +            struct image *img = c->images[i];
 +            if (img && (EQ (Qt, filter)
 +                        || !NILP (Fmember (filter, img->dependencies))))
 +              {
 +                free_image (f, img);
 +                ++nfreed;
 +              }
 +          }
 +      }
 +      else if (INTEGERP (Vimage_cache_eviction_delay))
 +      {
 +        /* Free cache based on timestamp.  */
 +        EMACS_TIME t;
 +        unsigned long old;
 +        int delay, nimages = 0;
 +
 +        for (i = 0; i < c->used; ++i)
 +          if (c->images[i])
 +            nimages++;
 +
 +        /* If the number of cached images has grown unusually large,
 +           decrease the cache eviction delay (Bug#6230).  */
 +        delay = XFASTINT (Vimage_cache_eviction_delay);
 +        if (nimages > 40)
 +          delay = max (1, 1600 * delay / (nimages*nimages));
 +
 +        EMACS_GET_TIME (t);
 +        old = EMACS_SECS (t) - delay;
 +
 +        for (i = 0; i < c->used; ++i)
 +          {
 +            struct image *img = c->images[i];
 +            if (img && img->timestamp < old)
 +              {
 +                free_image (f, img);
 +                ++nfreed;
 +              }
            }
        }
  
@@@ -1608,7 -1660,8 +1613,7 @@@ FILTER nil or a frame means clear all i
  FILTER t means clear the image caches of all frames.
  Anything else, means only clear those images which refer to FILTER,
  which is then usually a filename.  */)
 -     (filter)
 -     Lisp_Object filter;
 +  (Lisp_Object filter)
  {
    if (!(EQ (filter, Qnil) || FRAMEP (filter)))
      clear_image_caches (filter);
  }
  
  
 -DEFUN ("image-refresh", Fimage_refresh, Simage_refresh,
 +DEFUN ("image-flush", Fimage_flush, Simage_flush,
         1, 2, 0,
 -       doc: /* Refresh the image with specification SPEC on frame FRAME.
 -If SPEC specifies an image file, the displayed image is updated with
 -the current contents of that file.
 +       doc: /* Fush the image with specification SPEC on frame FRAME.
 +This removes the image from the Emacs image cache.  If SPEC specifies
 +an image file, the next redisplay of this image will read from the
 +current contents of that file.
 +
  FRAME nil or omitted means use the selected frame.
  FRAME t means refresh the image on all frames.  */)
 -     (spec, frame)
 -     Lisp_Object spec, frame;
 +  (Lisp_Object spec, Lisp_Object frame)
  {
    if (!valid_image_p (spec))
      error ("Invalid image specification");
     by the image's specification,  */
  
  static void
 -postprocess_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +postprocess_image (struct frame *f, struct image *img)
  {
    /* Manipulation of the image's mask.  */
    if (img->pixmap)
     SPEC must be a valid Lisp image specification (see valid_image_p).  */
  
  int
 -lookup_image (f, spec)
 -     struct frame *f;
 -     Lisp_Object spec;
 +lookup_image (struct frame *f, Lisp_Object spec)
  {
    struct image_cache *c;
    struct image *img;
    unsigned hash;
 -  struct gcpro gcpro1;
    EMACS_TIME now;
  
    /* F must be a window-system frame, and SPEC must be a valid image
  
    c = FRAME_IMAGE_CACHE (f);
  
 -  GCPRO1 (spec);
 -
    /* Look up SPEC in the hash table of the image cache.  */
    hash = sxhash (spec, 0);
    img = search_image_cache (f, spec, hash);
    /* If not found, create a new image and cache it.  */
    if (img == NULL)
      {
 -      extern Lisp_Object Qpostscript;
 -
        BLOCK_INPUT;
        img = make_image (spec, hash);
        cache_image (f, img);
    EMACS_GET_TIME (now);
    img->timestamp = EMACS_SECS (now);
  
 -  UNGCPRO;
 -
    /* Value is the image id.  */
    return img->id;
  }
  /* Cache image IMG in the image cache of frame F.  */
  
  static void
 -cache_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +cache_image (struct frame *f, struct image *img)
  {
    struct image_cache *c = FRAME_IMAGE_CACHE (f);
    int i;
  /* Mark Lisp objects in image IMG.  */
  
  static void
 -mark_image (img)
 -     struct image *img;
 +mark_image (struct image *img)
  {
    mark_object (img->spec);
    mark_object (img->dependencies);
@@@ -1911,7 -1977,7 +1916,7 @@@ mark_image_cache (struct image_cache *c
  #ifdef HAVE_NTGUI
  
  /* Macro for defining functions that will be loaded from image DLLs.  */
 -#define DEF_IMGLIB_FN(func) int (FAR CDECL *fn_##func)()
 +#define DEF_IMGLIB_FN(func,args) int (FAR CDECL *fn_##func)args
  
  /* Macro for loading those image functions from the library.  */
  #define LOAD_IMGLIB_FN(lib,func) {                                    \
    }
  
  /* Load a DLL implementing an image type.
 -   The `image-library-alist' variable associates a symbol,
 -   identifying an image type, to a list of possible filenames.
 +   The argument LIBRARIES is usually the variable
 +   `dynamic-library-alist', which associates a symbol, identifying
 +   an external DLL library, to a list of possible filenames.
     The function returns NULL if no library could be loaded for
 -   the given image type, or if the library was previously loaded;
 +   the given symbol, or if the library was previously loaded;
     else the handle of the DLL.  */
  static HMODULE
  w32_delayed_load (Lisp_Object libraries, Lisp_Object type)
  
  #endif /* HAVE_NTGUI */
  
 -static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int,
 -                                          XImagePtr *, Pixmap *));
 -static void x_destroy_x_image P_ ((XImagePtr));
 -static void x_put_x_image P_ ((struct frame *, XImagePtr, Pixmap, int, int));
 +static int x_create_x_image_and_pixmap (struct frame *, int, int, int,
 +                                        XImagePtr *, Pixmap *);
 +static void x_destroy_x_image (XImagePtr);
 +static void x_put_x_image (struct frame *, XImagePtr, Pixmap, int, int);
  
  
  /* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on
     should indicate the bit depth of the image.  */
  
  static int
 -x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap)
 -     struct frame *f;
 -     int width, height, depth;
 -     XImagePtr *ximg;
 -     Pixmap *pixmap;
 +x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
 +                           XImagePtr *ximg, Pixmap *pixmap)
  {
  #ifdef HAVE_X_WINDOWS
    Display *display = FRAME_X_DISPLAY (f);
        return 0;
      }
  
 -  header = &((*ximg)->info.bmiHeader);
 -  bzero (&((*ximg)->info), sizeof (BITMAPINFO));
 +  header = &(*ximg)->info.bmiHeader;
 +  memset (&(*ximg)->info, 0, sizeof (BITMAPINFO));
    header->biSize = sizeof (*header);
    header->biWidth = width;
    header->biHeight = -height;  /* negative indicates a top-down bitmap.  */
  #endif /* HAVE_NTGUI */
  
  #ifdef HAVE_NS
 -  *pixmap = ns_image_for_XPM(width, height, depth);
 +  *pixmap = ns_image_for_XPM (width, height, depth);
    if (*pixmap == 0)
      {
        *ximg = NULL;
  /* Destroy XImage XIMG.  Free XIMG->data.  */
  
  static void
 -x_destroy_x_image (ximg)
 -     XImagePtr ximg;
 +x_destroy_x_image (XImagePtr ximg)
  {
    xassert (interrupt_input_blocked);
    if (ximg)
        xfree (ximg);
  #endif /* HAVE_NTGUI */
  #ifdef HAVE_NS
 -      ns_release_object(ximg);
 +      ns_release_object (ximg);
  #endif /* HAVE_NS */
      }
  }
     are width and height of both the image and pixmap.  */
  
  static void
 -x_put_x_image (f, ximg, pixmap, width, height)
 -     struct frame *f;
 -     XImagePtr ximg;
 -     Pixmap pixmap;
 -     int width, height;
 +x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int height)
  {
  #ifdef HAVE_X_WINDOWS
    GC gc;
  
  #ifdef HAVE_NS
    xassert (ximg == pixmap);
 -  ns_retain_object(ximg);
 +  ns_retain_object (ximg);
  #endif
  }
  
                              File Handling
   ***********************************************************************/
  
 -static unsigned char *slurp_file P_ ((char *, int *));
 +static unsigned char *slurp_file (char *, int *);
  
  
  /* Find image file FILE.  Look in data-directory/images, then
     found, or nil if not found.  */
  
  Lisp_Object
 -x_find_image_file (file)
 -     Lisp_Object file;
 +x_find_image_file (Lisp_Object file)
  {
    Lisp_Object file_found, search_path;
 -  struct gcpro gcpro1, gcpro2;
    int fd;
  
 -  file_found = Qnil;
    /* TODO I think this should use something like image-load-path
       instead.  Unfortunately, that can contain non-string elements.  */
    search_path = Fcons (Fexpand_file_name (build_string ("images"),
                                          Vdata_directory),
                       Vx_bitmap_file_path);
 -  GCPRO2 (file_found, search_path);
  
    /* Try to find FILE in data-directory/images, then x-bitmap-file-path.  */
    fd = openp (search_path, file, Qnil, &file_found, Qnil);
        close (fd);
      }
  
 -  UNGCPRO;
    return file_found;
  }
  
     occurred.  *SIZE is set to the size of the file.  */
  
  static unsigned char *
 -slurp_file (file, size)
 -     char *file;
 -     int *size;
 +slurp_file (char *file, int *size)
  {
    FILE *fp = NULL;
    unsigned char *buf = NULL;
                              XBM images
   ***********************************************************************/
  
 -static int xbm_scan P_ ((unsigned char **, unsigned char *, char *, int *));
 -static int xbm_load P_ ((struct frame *f, struct image *img));
 -static int xbm_load_image P_ ((struct frame *f, struct image *img,
 -                             unsigned char *, unsigned char *));
 -static int xbm_image_p P_ ((Lisp_Object object));
 -static int xbm_read_bitmap_data P_ ((struct frame *f,
 -                                   unsigned char *, unsigned char *,
 -                                   int *, int *, unsigned char **, int));
 -static int xbm_file_p P_ ((Lisp_Object));
 +static int xbm_scan (unsigned char **, unsigned char *, char *, int *);
 +static int xbm_load (struct frame *f, struct image *img);
 +static int xbm_load_image (struct frame *f, struct image *img,
 +                           unsigned char *, unsigned char *);
 +static int xbm_image_p (Lisp_Object object);
 +static int xbm_read_bitmap_data (struct frame *f,
 +                                 unsigned char *, unsigned char *,
 +                                 int *, int *, unsigned char **, int);
 +static int xbm_file_p (Lisp_Object);
  
  
  /* Indices of image specification fields in xbm_format, below.  */
@@@ -2335,11 -2415,12 +2340,11 @@@ enum xbm_toke
     displayed is used.  */
  
  static int
 -xbm_image_p (object)
 -     Lisp_Object object;
 +xbm_image_p (Lisp_Object object)
  {
    struct image_keyword kw[XBM_LAST];
  
 -  bcopy (xbm_format, kw, sizeof kw);
 +  memcpy (kw, xbm_format, sizeof kw);
    if (!parse_image_spec (object, kw, XBM_LAST, Qxbm))
      return 0;
  
     scanning a number, store its value in *IVAL.  */
  
  static int
 -xbm_scan (s, end, sval, ival)
 -     unsigned char **s, *end;
 -     char *sval;
 -     int *ival;
 +xbm_scan (unsigned char **s, unsigned char *end, char *sval, int *ival)
  {
    unsigned int c;
  
@@@ -2529,7 -2613,7 +2534,7 @@@ w32_create_pixmap_from_bitmap_data (in
    w1 = (width + 7) / 8;         /* nb of 8bits elt in X bitmap */
    w2 = ((width + 15) / 16) * 2; /* nb of 16bits elt in W32 bitmap */
    bits = (unsigned char *) alloca (height * w2);
 -  bzero (bits, height * w2);
 +  memset (bits, 0, height * w2);
    for (i = 0; i < height; i++)
      {
        p = bits + i*w2;
  }
  
  static void
 -convert_mono_to_color_image (f, img, foreground, background)
 -     struct frame *f;
 -     struct image *img;
 -     COLORREF foreground, background;
 +convert_mono_to_color_image (struct frame *f, struct image *img,
 +                           COLORREF foreground, COLORREF background)
  {
    HDC hdc, old_img_dc, new_img_dc;
    HGDIOBJ old_prev, new_prev;
  
  
  static void
 -Create_Pixmap_From_Bitmap_Data (f, img, data, fg, bg, non_default_colors)
 -     struct frame *f;
 -     struct image *img;
 -     char *data;
 -     RGB_PIXEL_COLOR fg, bg;
 -     int non_default_colors;
 +Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
 +                              RGB_PIXEL_COLOR fg, RGB_PIXEL_COLOR bg,
 +                              int non_default_colors)
  {
  #ifdef HAVE_NTGUI
    img->pixmap
      convert_mono_to_color_image (f, img, fg, bg);
  
  #elif defined (HAVE_NS)
 -  img->pixmap = ns_image_from_XBM(data, img->width, img->height);
 +  img->pixmap = ns_image_from_XBM (data, img->width, img->height);
  
  #else
    img->pixmap
     invalid (the bitmap remains unread).  */
  
  static int
 -xbm_read_bitmap_data (f, contents, end, width, height, data, inhibit_image_error)
 -     struct frame *f;
 -     unsigned char *contents, *end;
 -     int *width, *height;
 -     unsigned char **data;
 -     int inhibit_image_error;
 +xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *end,
 +                    int *width, int *height, unsigned char **data,
 +                    int inhibit_image_error)
  {
    unsigned char *s = contents;
    char buffer[BUFSIZ];
     successful.  */
  
  static int
 -xbm_load_image (f, img, contents, end)
 -     struct frame *f;
 -     struct image *img;
 -     unsigned char *contents, *end;
 +xbm_load_image (struct frame *f, struct image *img, unsigned char *contents,
 +              unsigned char *end)
  {
    int rc;
    unsigned char *data;
  /* Value is non-zero if DATA looks like an in-memory XBM file.  */
  
  static int
 -xbm_file_p (data)
 -     Lisp_Object data;
 +xbm_file_p (Lisp_Object data)
  {
    int w, h;
    return (STRINGP (data)
     non-zero if successful.  */
  
  static int
 -xbm_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +xbm_load (struct frame *f, struct image *img)
  {
    int success_p = 0;
    Lisp_Object file_name;
        Lisp_Object file;
        unsigned char *contents;
        int size;
 -      struct gcpro gcpro1;
  
        file = x_find_image_file (file_name);
 -      GCPRO1 (file);
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", file_name, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (contents == NULL)
        {
          image_error ("Error loading XBM image `%s'", img->spec, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        success_p = xbm_load_image (f, img, contents, contents + size);
 -      UNGCPRO;
      }
    else
      {
        in_memory_file_p = xbm_file_p (data);
  
        /* Parse the image specification.  */
 -      bcopy (xbm_format, fmt, sizeof fmt);
 +      memcpy (fmt, xbm_format, sizeof fmt);
        parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm);
        xassert (parsed_p);
  
                {
                  Lisp_Object line = XVECTOR (data)->contents[i];
                  if (STRINGP (line))
 -                  bcopy (SDATA (line), p, nbytes);
 +                  memcpy (p, SDATA (line), nbytes);
                  else
 -                  bcopy (XBOOL_VECTOR (line)->data, p, nbytes);
 +                  memcpy (p, XBOOL_VECTOR (line)->data, nbytes);
                }
            }
          else if (STRINGP (data))
              invertedBits = bits;
              nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
                * img->height;
 -            bits = (char *) alloca(nbytes);
 +            bits = (char *) alloca (nbytes);
              for (i = 0; i < nbytes; i++)
                bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
            }
  
  #if defined (HAVE_XPM) || defined (HAVE_NS)
  
 -static int xpm_image_p P_ ((Lisp_Object object));
 -static int xpm_load P_ ((struct frame *f, struct image *img));
 -static int xpm_valid_color_symbols_p P_ ((Lisp_Object));
 +static int xpm_image_p (Lisp_Object object);
 +static int xpm_load (struct frame *f, struct image *img);
 +static int xpm_valid_color_symbols_p (Lisp_Object);
  
  #endif /* HAVE_XPM || HAVE_NS */
  
@@@ -3086,12 -3188,12 +3091,12 @@@ static struct image_type xpm_type 
  
  #ifdef ALLOC_XPM_COLORS
  
 -static void xpm_init_color_cache P_ ((struct frame *, XpmAttributes *));
 -static void xpm_free_color_cache P_ ((void));
 -static int xpm_lookup_color P_ ((struct frame *, char *, XColor *));
 -static int xpm_color_bucket P_ ((char *));
 -static struct xpm_cached_color *xpm_cache_color P_ ((struct frame *, char *,
 -                                                   XColor *, int));
 +static void xpm_init_color_cache (struct frame *, XpmAttributes *);
 +static void xpm_free_color_cache (void);
 +static int xpm_lookup_color (struct frame *, char *, XColor *);
 +static int xpm_color_bucket (char *);
 +static struct xpm_cached_color *xpm_cache_color (struct frame *, char *,
 +                                                 XColor *, int);
  
  /* An entry in a hash table used to cache color definitions of named
     colors.  This cache is necessary to speed up XPM image loading in
@@@ -3119,7 -3221,9 +3124,7 @@@ struct xpm_cached_color **xpm_color_cac
  /* Initialize the color cache.  */
  
  static void
 -xpm_init_color_cache (f, attrs)
 -     struct frame *f;
 -     XpmAttributes *attrs;
 +xpm_init_color_cache (struct frame *f, XpmAttributes *attrs)
  {
    size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache;
    xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes);
  /* Free the color cache.  */
  
  static void
 -xpm_free_color_cache ()
 +xpm_free_color_cache (void)
  {
    struct xpm_cached_color *p, *next;
    int i;
     cache.  */
  
  static int
 -xpm_color_bucket (color_name)
 -     char *color_name;
 +xpm_color_bucket (char *color_name)
  {
    unsigned h = 0;
    char *s;
     entry added.  */
  
  static struct xpm_cached_color *
 -xpm_cache_color (f, color_name, color, bucket)
 -     struct frame *f;
 -     char *color_name;
 -     XColor *color;
 -     int bucket;
 +xpm_cache_color (struct frame *f, char *color_name, XColor *color, int bucket)
  {
    size_t nbytes;
    struct xpm_cached_color *p;
     allocation failed.  */
  
  static int
 -xpm_lookup_color (f, color_name, color)
 -     struct frame *f;
 -     char *color_name;
 -     XColor *color;
 +xpm_lookup_color (struct frame *f, char *color_name, XColor *color)
  {
    struct xpm_cached_color *p;
    int h = xpm_color_bucket (color_name);
       with transparency, and it's useful.  */
    else if (strcmp ("opaque", color_name) == 0)
      {
 -      bzero (color, sizeof (XColor));  /* Is this necessary/correct?  */
 +      memset (color, 0, sizeof (XColor));  /* Is this necessary/correct?  */
        color->pixel = FRAME_FOREGROUND_PIXEL (f);
        p = xpm_cache_color (f, color_name, color, h);
      }
     if successful.  */
  
  static int
 -xpm_alloc_color (dpy, cmap, color_name, color, closure)
 -     Display *dpy;
 -     Colormap cmap;
 -     char *color_name;
 -     XColor *color;
 -     void *closure;
 +xpm_alloc_color (Display *dpy, Colormap cmap, char *color_name, XColor *color,
 +               void *closure)
  {
    return xpm_lookup_color ((struct frame *) closure, color_name, color);
  }
     non-zero if successful.  */
  
  static int
 -xpm_free_colors (dpy, cmap, pixels, npixels, closure)
 -     Display *dpy;
 -     Colormap cmap;
 -     Pixel *pixels;
 -     int npixels;
 -     void *closure;
 +xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void *closure)
  {
    return 1;
  }
  
  /* XPM library details.  */
  
 -DEF_IMGLIB_FN (XpmFreeAttributes);
 -DEF_IMGLIB_FN (XpmCreateImageFromBuffer);
 -DEF_IMGLIB_FN (XpmReadFileToImage);
 -DEF_IMGLIB_FN (XImageFree);
 +DEF_IMGLIB_FN (XpmFreeAttributes, (XpmAttributes *));
 +DEF_IMGLIB_FN (XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **,
 +                                        xpm_XImage **, XpmAttributes *));
 +DEF_IMGLIB_FN (XpmReadFileToImage, (Display *, char *, xpm_XImage **,
 +                                  xpm_XImage **, XpmAttributes *));
 +DEF_IMGLIB_FN (XImageFree, (xpm_XImage *));
  
  static int
  init_xpm_functions (Lisp_Object libraries)
     cdr are strings.  */
  
  static int
 -xpm_valid_color_symbols_p (color_symbols)
 -     Lisp_Object color_symbols;
 +xpm_valid_color_symbols_p (Lisp_Object color_symbols)
  {
    while (CONSP (color_symbols))
      {
  /* Value is non-zero if OBJECT is a valid XPM image specification.  */
  
  static int
 -xpm_image_p (object)
 -     Lisp_Object object;
 +xpm_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[XPM_LAST];
 -  bcopy (xpm_format, fmt, sizeof fmt);
 +  memcpy (fmt, xpm_format, sizeof fmt);
    return (parse_image_spec (object, fmt, XPM_LAST, Qxpm)
          /* Either `:file' or `:data' must be present.  */
          && fmt[XPM_FILE].count + fmt[XPM_DATA].count == 1
  
  #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
  int
 -x_create_bitmap_from_xpm_data (f, bits)
 -     struct frame *f;
 -     char **bits;
 +x_create_bitmap_from_xpm_data (struct frame *f, const char **bits)
  {
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    int id, rc;
    XpmAttributes attrs;
    Pixmap bitmap, mask;
  
 -  bzero (&attrs, sizeof attrs);
 +  memset (&attrs, 0, sizeof attrs);
  
    attrs.visual = FRAME_X_VISUAL (f);
    attrs.colormap = FRAME_X_COLORMAP (f);
  #ifdef HAVE_XPM
  
  static int
 -xpm_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +xpm_load (struct frame *f, struct image *img)
  {
    int rc;
    XpmAttributes attrs;
  
    /* Configure the XPM lib.  Use the visual of frame F.  Allocate
       close colors.  Return colors allocated.  */
 -  bzero (&attrs, sizeof attrs);
 +  memset (&attrs, 0, sizeof attrs);
  
  #ifndef HAVE_NTGUI
    attrs.visual = FRAME_X_VISUAL (f);
        /* Allocate an XpmColorSymbol array.  */
        size = attrs.numsymbols * sizeof *xpm_syms;
        xpm_syms = (XpmColorSymbol *) alloca (size);
 -      bzero (xpm_syms, size);
 +      memset (xpm_syms, 0, size);
        attrs.colorsymbols = xpm_syms;
  
        /* Fill the color symbol array.  */
           CONSP (tail);
           ++i, tail = XCDR (tail))
        {
 -        Lisp_Object name = XCAR (XCAR (tail));
 -        Lisp_Object color = XCDR (XCAR (tail));
 -        xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1);
 -        strcpy (xpm_syms[i].name, SDATA (name));
 -        xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1);
 -        strcpy (xpm_syms[i].value, SDATA (color));
 +        Lisp_Object name;
 +        Lisp_Object color;
 +
 +        if (!CONSP (XCAR (tail)))
 +          {
 +            xpm_syms[i].name = "";
 +            xpm_syms[i].value = "";
 +            continue;
 +          }
 +        name = XCAR (XCAR (tail));
 +        color = XCDR (XCAR (tail));
 +        if (STRINGP (name))
 +          {
 +            xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1);
 +            strcpy (xpm_syms[i].name, SDATA (name));
 +          }
 +        else
 +          xpm_syms[i].name = "";
 +        if (STRINGP (color))
 +          {
 +            xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1);
 +            strcpy (xpm_syms[i].value, SDATA (color));
 +          }
 +        else
 +          xpm_syms[i].value = "";
        }
      }
  
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
 +#ifdef ALLOC_XPM_COLORS
 +        xpm_free_color_cache ();
 +#endif
          return 0;
        }
  
    else
      {
        Lisp_Object buffer = image_spec_value (img->spec, QCdata, NULL);
 +      if (!STRINGP (buffer))
 +      {
 +        image_error ("Invalid image data `%s'", buffer, Qnil);
 +#ifdef ALLOC_XPM_COLORS
 +        xpm_free_color_cache ();
 +#endif
 +        return 0;
 +      }
  #ifdef HAVE_NTGUI
        /* XpmCreatePixmapFromBuffer is not available in the Windows port
         of libxpm.  But XpmCreateImageFromBuffer almost does what we want.  */
  /* XPM support functions for NS where libxpm is not available.
     Only XPM version 3 (without any extensions) is supported.  */
  
 -static int xpm_scan P_ ((const unsigned char **, const unsigned char *,
 -                       const unsigned char **, int *));
 +static int xpm_scan (const unsigned char **, const unsigned char *,
 +                     const unsigned char **, int *);
  static Lisp_Object xpm_make_color_table_v
 -  P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
 -       Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
 -static void xpm_put_color_table_v P_ ((Lisp_Object, const unsigned char *,
 -                                     int, Lisp_Object));
 -static Lisp_Object xpm_get_color_table_v P_ ((Lisp_Object,
 -                                            const unsigned char *, int));
 +  (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
 +   Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
 +static void xpm_put_color_table_v (Lisp_Object, const unsigned char *,
 +                                   int, Lisp_Object);
 +static Lisp_Object xpm_get_color_table_v (Lisp_Object,
 +                                          const unsigned char *, int);
  static Lisp_Object xpm_make_color_table_h
 -  P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
 -       Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
 -static void xpm_put_color_table_h P_ ((Lisp_Object, const unsigned char *,
 -                                     int, Lisp_Object));
 -static Lisp_Object xpm_get_color_table_h P_ ((Lisp_Object,
 -                                            const unsigned char *, int));
 -static int xpm_str_to_color_key P_ ((const char *));
 -static int xpm_load_image P_ ((struct frame *, struct image *,
 -                             const unsigned char *, const unsigned char *));
 +  (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
 +   Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
 +static void xpm_put_color_table_h (Lisp_Object, const unsigned char *,
 +                                   int, Lisp_Object);
 +static Lisp_Object xpm_get_color_table_h (Lisp_Object,
 +                                          const unsigned char *, int);
 +static int xpm_str_to_color_key (const char *);
 +static int xpm_load_image (struct frame *, struct image *,
 +                           const unsigned char *, const unsigned char *);
  
  /* Tokens returned from xpm_scan.  */
  
@@@ -3675,10 -3770,9 +3680,10 @@@ enum xpm_toke
     length of the corresponding token, respectively.  */
  
  static int
 -xpm_scan (s, end, beg, len)
 -     const unsigned char **s, *end, **beg;
 -     int *len;
 +xpm_scan (const unsigned char **s,
 +          const unsigned char *end,
 +          const unsigned char **beg,
 +          int *len)
  {
    int c;
  
     hash table is used.  */
  
  static Lisp_Object
 -xpm_make_color_table_v (put_func, get_func)
 -     void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object);
 -     Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int);
 +xpm_make_color_table_v (void (**put_func) (Lisp_Object,
 +                                           const unsigned char *,
 +                                           int,
 +                                           Lisp_Object),
 +                        Lisp_Object (**get_func) (Lisp_Object,
 +                                                  const unsigned char *,
 +                                                  int))
  {
    *put_func = xpm_put_color_table_v;
    *get_func = xpm_get_color_table_v;
  }
  
  static void
 -xpm_put_color_table_v (color_table, chars_start, chars_len, color)
 -     Lisp_Object color_table;
 -     const unsigned char *chars_start;
 -     int chars_len;
 -     Lisp_Object color;
 +xpm_put_color_table_v (Lisp_Object color_table,
 +                       const unsigned char *chars_start,
 +                       int chars_len,
 +                       Lisp_Object color)
  {
    XVECTOR (color_table)->contents[*chars_start] = color;
  }
  
  static Lisp_Object
 -xpm_get_color_table_v (color_table, chars_start, chars_len)
 -     Lisp_Object color_table;
 -     const unsigned char *chars_start;
 -     int chars_len;
 +xpm_get_color_table_v (Lisp_Object color_table,
 +                       const unsigned char *chars_start,
 +                       int chars_len)
  {
    return XVECTOR (color_table)->contents[*chars_start];
  }
  
  static Lisp_Object
 -xpm_make_color_table_h (put_func, get_func)
 -     void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object);
 -     Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int);
 +xpm_make_color_table_h (void (**put_func) (Lisp_Object,
 +                                           const unsigned char *,
 +                                           int,
 +                                           Lisp_Object),
 +                        Lisp_Object (**get_func) (Lisp_Object,
 +                                                  const unsigned char *,
 +                                                  int))
  {
    *put_func = xpm_put_color_table_h;
    *get_func = xpm_get_color_table_h;
  }
  
  static void
 -xpm_put_color_table_h (color_table, chars_start, chars_len, color)
 -     Lisp_Object color_table;
 -     const unsigned char *chars_start;
 -     int chars_len;
 -     Lisp_Object color;
 +xpm_put_color_table_h (Lisp_Object color_table,
 +                       const unsigned char *chars_start,
 +                       int chars_len,
 +                       Lisp_Object color)
  {
    struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
    unsigned hash_code;
  }
  
  static Lisp_Object
 -xpm_get_color_table_h (color_table, chars_start, chars_len)
 -     Lisp_Object color_table;
 -     const unsigned char *chars_start;
 -     int chars_len;
 +xpm_get_color_table_h (Lisp_Object color_table,
 +                       const unsigned char *chars_start,
 +                       int chars_len)
  {
    struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
    int i = hash_lookup (table, make_unibyte_string (chars_start, chars_len),
@@@ -3826,7 -3916,8 +3831,7 @@@ enum xpm_color_key 
  static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"};
  
  static int
 -xpm_str_to_color_key (s)
 -     const char *s;
 +xpm_str_to_color_key (const char *s)
  {
    int i;
  
  }
  
  static int
 -xpm_load_image (f, img, contents, end)
 -     struct frame *f;
 -     struct image *img;
 -     const unsigned char *contents, *end;
 +xpm_load_image (struct frame *f,
 +                struct image *img,
 +                const unsigned char *contents,
 +                const unsigned char *end)
  {
    const unsigned char *s = contents, *beg, *str;
    unsigned char buffer[BUFSIZ];
    if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0))
      goto failure;
    s += 9;
 -  match();
 +  match ();
    expect_ident ("static");
    expect_ident ("char");
    expect ('*');
                     (!EQ (color_val, Qt) ? PIX_MASK_DRAW
                      : (have_mask = 1, PIX_MASK_RETAIN)));
  #else
 -          if (EQ(color_val, Qt))
 -            ns_set_alpha(ximg, x, y, 0);
 +          if (EQ (color_val, Qt))
 +            ns_set_alpha (ximg, x, y, 0);
  #endif
        }
        if (y + 1 < height)
  }
  
  static int
 -xpm_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +xpm_load (struct frame *f,
 +          struct image *img)
  {
    int success_p = 0;
    Lisp_Object file_name;
        Lisp_Object file;
        unsigned char *contents;
        int size;
 -      struct gcpro gcpro1;
  
        file = x_find_image_file (file_name);
 -      GCPRO1 (file);
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", file_name, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (contents == NULL)
        {
          image_error ("Error loading XPM image `%s'", img->spec, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        success_p = xpm_load_image (f, img, contents, contents + size);
        xfree (contents);
 -      UNGCPRO;
      }
    else
      {
        Lisp_Object data;
  
        data = image_spec_value (img->spec, QCdata, NULL);
 +      if (!STRINGP (data))
 +      {
 +        image_error ("Invalid image data `%s'", data, Qnil);
 +        return 0;
 +      }
        success_p = xpm_load_image (f, img, SDATA (data),
                                  SDATA (data) + SBYTES (data));
      }
@@@ -4162,11 -4254,11 +4167,11 @@@ int ct_colors_allocated
  /* Initialize the color table.  */
  
  static void
 -init_color_table ()
 +init_color_table (void)
  {
    int size = CT_SIZE * sizeof (*ct_table);
    ct_table = (struct ct_color **) xmalloc (size);
 -  bzero (ct_table, size);
 +  memset (ct_table, 0, size);
    ct_colors_allocated = 0;
  }
  
  /* Free memory associated with the color table.  */
  
  static void
 -free_color_table ()
 +free_color_table (void)
  {
    int i;
    struct ct_color *p, *next;
     G, B, and make an entry in the color table.  */
  
  static unsigned long
 -lookup_rgb_color (f, r, g, b)
 -     struct frame *f;
 -     int r, g, b;
 +lookup_rgb_color (struct frame *f, int r, int g, int b)
  {
    unsigned hash = CT_HASH_RGB (r, g, b);
    int i = hash % CT_SIZE;
     table.  If not already present, allocate it.  Value is PIXEL.  */
  
  static unsigned long
 -lookup_pixel_color (f, pixel)
 -     struct frame *f;
 -     unsigned long pixel;
 +lookup_pixel_color (struct frame *f, unsigned long pixel)
  {
    int i = pixel % CT_SIZE;
    struct ct_color *p;
     allocated via xmalloc.  Set *N to the number of colors.  */
  
  static unsigned long *
 -colors_in_color_table (n)
 -     int *n;
 +colors_in_color_table (int *n)
  {
    int i, j;
    struct ct_color *p;
  #else /* COLOR_TABLE_SUPPORT */
  
  static unsigned long
 -lookup_rgb_color (f, r, g, b)
 -     struct frame *f;
 -     int r, g, b;
 +lookup_rgb_color (struct frame *f, int r, int g, int b)
  {
    unsigned long pixel;
  
  }
  
  static void
 -init_color_table ()
 +init_color_table (void)
  {
  }
  #endif /* COLOR_TABLE_SUPPORT */
                              Algorithms
   ***********************************************************************/
  
 -static XColor *x_to_xcolors P_ ((struct frame *, struct image *, int));
 -static void x_from_xcolors P_ ((struct frame *, struct image *, XColor *));
 -static void x_detect_edges P_ ((struct frame *, struct image *, int[9], int));
 +static XColor *x_to_xcolors (struct frame *, struct image *, int);
 +static void x_from_xcolors (struct frame *, struct image *, XColor *);
 +static void x_detect_edges (struct frame *, struct image *, int[9], int);
  
  #ifdef HAVE_NTGUI
  static void XPutPixel (XImagePtr , int, int, COLORREF);
@@@ -4440,7 -4539,10 +4445,7 @@@ static int laplace_matrix[9] = 
     allocated with xmalloc; it must be freed by the caller.  */
  
  static XColor *
 -x_to_xcolors (f, img, rgb_p)
 -     struct frame *f;
 -     struct image *img;
 -     int rgb_p;
 +x_to_xcolors (struct frame *f, struct image *img, int rgb_p)
  {
    int x, y;
    XColor *colors, *p;
     stored in ximg->data.  */
  
  static void
 -XPutPixel (ximg, x, y, color)
 -     XImagePtr  ximg;
 -     int x, y;
 -     COLORREF color;
 +XPutPixel (XImagePtr ximg, int x, int y, COLORREF color)
  {
    int width = ximg->info.bmiHeader.biWidth;
    int height = ximg->info.bmiHeader.biHeight;
     COLORS will be freed; an existing IMG->pixmap will be freed, too.  */
  
  static void
 -x_from_xcolors (f, img, colors)
 -     struct frame *f;
 -     struct image *img;
 -     XColor *colors;
 +x_from_xcolors (struct frame *f, struct image *img, XColor *colors)
  {
    int x, y;
    XImagePtr oimg = NULL;
     outgoing image.  */
  
  static void
 -x_detect_edges (f, img, matrix, color_adjust)
 -     struct frame *f;
 -     struct image *img;
 -     int matrix[9], color_adjust;
 +x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjust)
  {
    XColor *colors = x_to_xcolors (f, img, 1);
    XColor *new, *p;
     on frame F.  */
  
  static void
 -x_emboss (f, img)
 -     struct frame *f;
 -     struct image *img;
 +x_emboss (struct frame *f, struct image *img)
  {
    x_detect_edges (f, img, emboss_matrix, 0xffff / 2);
  }
     to draw disabled buttons, for example.  */
  
  static void
 -x_laplace (f, img)
 -     struct frame *f;
 -     struct image *img;
 +x_laplace (struct frame *f, struct image *img)
  {
    x_detect_edges (f, img, laplace_matrix, 45000);
  }
     number.  */
  
  static void
 -x_edge_detection (f, img, matrix, color_adjust)
 -     struct frame *f;
 -     struct image *img;
 -     Lisp_Object matrix, color_adjust;
 +x_edge_detection (struct frame *f, struct image *img, Lisp_Object matrix,
 +                Lisp_Object color_adjust)
  {
    int i = 0;
    int trans[9];
  /* Transform image IMG on frame F so that it looks disabled.  */
  
  static void
 -x_disable_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +x_disable_image (struct frame *f, struct image *img)
  {
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  #ifdef HAVE_NTGUI
     heuristically.  Value is non-zero if successful. */
  
  static int
 -x_build_heuristic_mask (f, img, how)
 -     struct frame *f;
 -     struct image *img;
 -     Lisp_Object how;
 +x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
  {
    XImagePtr_or_DC ximg;
  #ifndef HAVE_NTGUI
    /* Create the bit array serving as mask.  */
    row_width = (img->width + 7) / 8;
    mask_img = xmalloc (row_width * img->height);
 -  bzero (mask_img, row_width * img->height);
 +  memset (mask_img, 0, row_width * img->height);
  
    /* Create a memory device context for IMG->pixmap.  */
    frame_dc = get_frame_dc (f);
                                  ? PIX_MASK_DRAW : PIX_MASK_RETAIN));
  #else
        if (XGetPixel (ximg, x, y) == bg)
 -        ns_set_alpha(ximg, x, y, 0);
 +        ns_set_alpha (ximg, x, y, 0);
  #endif /* HAVE_NS */
  #ifndef HAVE_NS
    /* Fill in the background_transparent field while we have the mask handy. */
                       PBM (mono, gray, color)
   ***********************************************************************/
  
 -static int pbm_image_p P_ ((Lisp_Object object));
 -static int pbm_load P_ ((struct frame *f, struct image *img));
 -static int pbm_scan_number P_ ((unsigned char **, unsigned char *));
 +static int pbm_image_p (Lisp_Object object);
 +static int pbm_load (struct frame *f, struct image *img);
 +static int pbm_scan_number (unsigned char **, unsigned char *);
  
  /* The symbol `pbm' identifying images of this type.  */
  
@@@ -5005,11 -5127,12 +5010,11 @@@ static struct image_type pbm_type 
  /* Return non-zero if OBJECT is a valid PBM image specification.  */
  
  static int
 -pbm_image_p (object)
 -     Lisp_Object object;
 +pbm_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[PBM_LAST];
  
 -  bcopy (pbm_format, fmt, sizeof fmt);
 +  memcpy (fmt, pbm_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm))
      return 0;
     end of input.  */
  
  static int
 -pbm_scan_number (s, end)
 -     unsigned char **s, *end;
 +pbm_scan_number (unsigned char **s, unsigned char *end)
  {
    int c = 0, val = -1;
  
@@@ -5099,18 -5223,23 +5104,18 @@@ pbm_read_file (file, size
  /* Load PBM image IMG for use on frame F.  */
  
  static int
 -pbm_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +pbm_load (struct frame *f, struct image *img)
  {
    int raw_p, x, y;
    int width, height, max_color_idx = 0;
    XImagePtr ximg;
    Lisp_Object file, specified_file;
    enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type;
 -  struct gcpro gcpro1;
    unsigned char *contents = NULL;
    unsigned char *end, *p;
    int size;
  
    specified_file = image_spec_value (img->spec, QCfile, NULL);
 -  file = Qnil;
 -  GCPRO1 (file);
  
    if (STRINGP (specified_file))
      {
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (contents == NULL)
        {
          image_error ("Error reading `%s'", file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
      {
        Lisp_Object data;
        data = image_spec_value (img->spec, QCdata, NULL);
 +      if (!STRINGP (data))
 +      {
 +        image_error ("Invalid image data `%s'", data, Qnil);
 +        return 0;
 +      }
        p = SDATA (data);
        end = p + SBYTES (data);
      }
        image_error ("Not a PBM image: `%s'", img->spec, Qnil);
      error:
        xfree (contents);
 -      UNGCPRO;
        return 0;
      }
  
        unsigned long bg = FRAME_BACKGROUND_PIXEL (f);
  
        /* Parse the image specification.  */
 -      bcopy (pbm_format, fmt, sizeof fmt);
 +      memcpy (fmt, pbm_format, sizeof fmt);
        parse_image_spec (img->spec, fmt, PBM_LAST, Qpbm);
  
        /* Get foreground and background colors, maybe allocate colors.  */
       img->width = width;
       img->height = height; */
  
 -  UNGCPRO;
    xfree (contents);
    return 1;
  }
  
  /* Function prototypes.  */
  
 -static int png_image_p P_ ((Lisp_Object object));
 -static int png_load P_ ((struct frame *f, struct image *img));
 +static int png_image_p (Lisp_Object object);
 +static int png_load (struct frame *f, struct image *img);
  
  /* The symbol `png' identifying images of this type.  */
  
@@@ -5419,10 -5547,11 +5424,10 @@@ static struct image_type png_type 
  /* Return non-zero if OBJECT is a valid PNG image specification.  */
  
  static int
 -png_image_p (object)
 -     Lisp_Object object;
 +png_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[PNG_LAST];
 -  bcopy (png_format, fmt, sizeof fmt);
 +  memcpy (fmt, png_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, PNG_LAST, Qpng))
      return 0;
  #ifdef HAVE_NTGUI
  /* PNG library details.  */
  
 -DEF_IMGLIB_FN (png_get_io_ptr);
 -DEF_IMGLIB_FN (png_sig_cmp);
 -DEF_IMGLIB_FN (png_create_read_struct);
 -DEF_IMGLIB_FN (png_create_info_struct);
 -DEF_IMGLIB_FN (png_destroy_read_struct);
 -DEF_IMGLIB_FN (png_set_read_fn);
 -DEF_IMGLIB_FN (png_set_sig_bytes);
 -DEF_IMGLIB_FN (png_read_info);
 -DEF_IMGLIB_FN (png_get_IHDR);
 -DEF_IMGLIB_FN (png_get_valid);
 -DEF_IMGLIB_FN (png_set_strip_16);
 -DEF_IMGLIB_FN (png_set_expand);
 -DEF_IMGLIB_FN (png_set_gray_to_rgb);
 -DEF_IMGLIB_FN (png_set_background);
 -DEF_IMGLIB_FN (png_get_bKGD);
 -DEF_IMGLIB_FN (png_read_update_info);
 -DEF_IMGLIB_FN (png_get_channels);
 -DEF_IMGLIB_FN (png_get_rowbytes);
 -DEF_IMGLIB_FN (png_read_image);
 -DEF_IMGLIB_FN (png_read_end);
 -DEF_IMGLIB_FN (png_error);
 +DEF_IMGLIB_FN (png_get_io_ptr, (png_structp));
 +DEF_IMGLIB_FN (png_sig_cmp, (png_bytep, png_size_t, png_size_t));
 +DEF_IMGLIB_FN (png_create_read_struct, (png_const_charp, png_voidp,
 +                                      png_error_ptr, png_error_ptr));
 +DEF_IMGLIB_FN (png_create_info_struct, (png_structp));
 +DEF_IMGLIB_FN (png_destroy_read_struct, (png_structpp, png_infopp, png_infopp));
 +DEF_IMGLIB_FN (png_set_read_fn, (png_structp, png_voidp, png_rw_ptr));
 +DEF_IMGLIB_FN (png_set_sig_bytes, (png_structp, int));
 +DEF_IMGLIB_FN (png_read_info, (png_structp, png_infop));
 +DEF_IMGLIB_FN (png_get_IHDR, (png_structp, png_infop,
 +                            png_uint_32 *, png_uint_32 *,
 +                            int *, int *, int *, int *, int *));
 +DEF_IMGLIB_FN (png_get_valid, (png_structp, png_infop, png_uint_32));
 +DEF_IMGLIB_FN (png_set_strip_16, (png_structp));
 +DEF_IMGLIB_FN (png_set_expand, (png_structp));
 +DEF_IMGLIB_FN (png_set_gray_to_rgb, (png_structp));
 +DEF_IMGLIB_FN (png_set_background, (png_structp, png_color_16p,
 +                                  int, int, double));
 +DEF_IMGLIB_FN (png_get_bKGD, (png_structp, png_infop, png_color_16p *));
 +DEF_IMGLIB_FN (png_read_update_info, (png_structp, png_infop));
 +DEF_IMGLIB_FN (png_get_channels, (png_structp, png_infop));
 +DEF_IMGLIB_FN (png_get_rowbytes, (png_structp, png_infop));
 +DEF_IMGLIB_FN (png_read_image, (png_structp, png_bytepp));
 +DEF_IMGLIB_FN (png_read_end, (png_structp, png_infop));
 +DEF_IMGLIB_FN (png_error, (png_structp, png_const_charp));
  
  static int
  init_png_functions (Lisp_Object libraries)
  
  #endif /* HAVE_NTGUI */
  
+ /* libpng before 1.4.0 didn't have png_jmpbuf; v1.4.0 and later
+    deprecate direct access to png_ptr fields.  */
+ #ifndef png_jmpbuf
+ # define png_jmpbuf(PTR)  ((PTR)->jmpbuf)
+ #endif
  /* Error and warning handlers installed when the PNG library
     is initialized.  */
  
  static void
 -my_png_error (png_ptr, msg)
 -     png_struct *png_ptr;
 -     char *msg;
 +my_png_error (png_struct *png_ptr, const char *msg)
  {
    xassert (png_ptr != NULL);
+   /* Avoid compiler warning about deprecated direct access to
+      png_ptr's fields in libpng versions 1.4.x.  */
    image_error ("PNG error: %s", build_string (msg), Qnil);
-   longjmp (png_ptr->jmpbuf, 1);
+   longjmp (png_jmpbuf (png_ptr), 1);
  }
  
  
  static void
 -my_png_warning (png_ptr, msg)
 -     png_struct *png_ptr;
 -     char *msg;
 +my_png_warning (png_struct *png_ptr, const char *msg)
  {
    xassert (png_ptr != NULL);
    image_error ("PNG warning: %s", build_string (msg), Qnil);
@@@ -5557,7 -5694,10 +5570,7 @@@ struct png_memory_storag
     bytes from the input to DATA.  */
  
  static void
 -png_read_from_memory (png_ptr, data, length)
 -     png_structp png_ptr;
 -     png_bytep data;
 -     png_size_t length;
 +png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length)
  {
    struct png_memory_storage *tbr
      = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr);
    if (length > tbr->len - tbr->index)
      fn_png_error (png_ptr, "Read error");
  
 -  bcopy (tbr->bytes + tbr->index, data, length);
 +  memcpy (data, tbr->bytes + tbr->index, length);
    tbr->index = tbr->index + length;
  }
  
     bytes from the input to DATA.  */
  
  static void
 -png_read_from_file (png_ptr, data, length)
 -     png_structp png_ptr;
 -     png_bytep data;
 -     png_size_t length;
 +png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length)
  {
    FILE *fp = (FILE *) fn_png_get_io_ptr (png_ptr);
  
     successful.  */
  
  static int
 -png_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +png_load (struct frame *f, struct image *img)
  {
    Lisp_Object file, specified_file;
    Lisp_Object specified_data;
    int x, y, i;
    XImagePtr ximg, mask_img = NULL;
 -  struct gcpro gcpro1;
    png_struct *png_ptr = NULL;
    png_info *info_ptr = NULL, *end_info = NULL;
    FILE *volatile fp = NULL;
    /* Find out what file to load.  */
    specified_file = image_spec_value (img->spec, QCfile, NULL);
    specified_data = image_spec_value (img->spec, QCdata, NULL);
 -  file = Qnil;
 -  GCPRO1 (file);
  
    if (NILP (specified_data))
      {
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (!fp)
        {
          image_error ("Cannot open image file `%s'", file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
          || fn_png_sig_cmp (sig, 0, sizeof sig))
        {
          image_error ("Not a PNG file: `%s'", file, Qnil);
 -        UNGCPRO;
          fclose (fp);
          return 0;
        }
      }
    else
      {
 +      if (!STRINGP (specified_data))
 +      {
 +        image_error ("Invalid image data `%s'", specified_data, Qnil);
 +        return 0;
 +      }
 +
        /* Read from memory.  */
        tbr.bytes = SDATA (specified_data);
        tbr.len = SBYTES (specified_data);
          || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig))
        {
          image_error ("Not a PNG image: `%s'", img->spec, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
    if (!png_ptr)
      {
        if (fp) fclose (fp);
 -      UNGCPRO;
        return 0;
      }
  
      {
        fn_png_destroy_read_struct (&png_ptr, NULL, NULL);
        if (fp) fclose (fp);
 -      UNGCPRO;
        return 0;
      }
  
      {
        fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
        if (fp) fclose (fp);
 -      UNGCPRO;
        return 0;
      }
  
    /* Set error jump-back.  We come back here when the PNG library
       detects an error.  */
-   if (setjmp (png_ptr->jmpbuf))
+   if (setjmp (png_jmpbuf (png_ptr)))
      {
      error:
        if (png_ptr)
        xfree (pixels);
        xfree (rows);
        if (fp) fclose (fp);
 -      UNGCPRO;
        return 0;
      }
  
            {
              png_color_16 user_bg;
  
 -            bzero (&user_bg, sizeof 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;
          color.pixel = FRAME_BACKGROUND_PIXEL (f);
          x_query_color (f, &color);
  
 -        bzero (&frame_background, sizeof frame_background);
 +        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;
        x_destroy_x_image (mask_img);
      }
  
 -  UNGCPRO;
    return 1;
  }
  
@@@ -5951,8 -6102,8 +5964,8 @@@ png_load (struct frame *f, struct imag
  
  #if defined (HAVE_JPEG) || defined (HAVE_NS)
  
 -static int jpeg_image_p P_ ((Lisp_Object object));
 -static int jpeg_load P_ ((struct frame *f, struct image *img));
 +static int jpeg_image_p (Lisp_Object object);
 +static int jpeg_load (struct frame *f, struct image *img);
  
  /* The symbol `jpeg' identifying images of this type.  */
  
@@@ -6006,11 -6157,12 +6019,11 @@@ static struct image_type jpeg_type 
  /* Return non-zero if OBJECT is a valid JPEG image specification.  */
  
  static int
 -jpeg_image_p (object)
 -     Lisp_Object object;
 +jpeg_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[JPEG_LAST];
  
 -  bcopy (jpeg_format, fmt, sizeof fmt);
 +  memcpy (fmt, jpeg_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg))
      return 0;
  #ifdef HAVE_NTGUI
  
  /* JPEG library details.  */
 -DEF_IMGLIB_FN (jpeg_CreateDecompress);
 -DEF_IMGLIB_FN (jpeg_start_decompress);
 -DEF_IMGLIB_FN (jpeg_finish_decompress);
 -DEF_IMGLIB_FN (jpeg_destroy_decompress);
 -DEF_IMGLIB_FN (jpeg_read_header);
 -DEF_IMGLIB_FN (jpeg_read_scanlines);
 -DEF_IMGLIB_FN (jpeg_std_error);
 -DEF_IMGLIB_FN (jpeg_resync_to_restart);
 +DEF_IMGLIB_FN (jpeg_CreateDecompress, (j_decompress_ptr, int, size_t));
 +DEF_IMGLIB_FN (jpeg_start_decompress, (j_decompress_ptr));
 +DEF_IMGLIB_FN (jpeg_finish_decompress, (j_decompress_ptr));
 +DEF_IMGLIB_FN (jpeg_destroy_decompress, (j_decompress_ptr));
 +DEF_IMGLIB_FN (jpeg_read_header, (j_decompress_ptr, boolean));
 +DEF_IMGLIB_FN (jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, JDIMENSION));
 +DEF_IMGLIB_FN (jpeg_std_error, (struct jpeg_error_mgr *));
 +DEF_IMGLIB_FN (jpeg_resync_to_restart, (j_decompress_ptr, int));
  
  static int
  init_jpeg_functions (Lisp_Object libraries)
  /* Wrapper since we can't directly assign the function pointer
     to another function pointer that was declared more completely easily.  */
  static boolean
 -jpeg_resync_to_restart_wrapper (cinfo, desired)
 -     j_decompress_ptr cinfo;
 -     int desired;
 +jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired)
  {
    return fn_jpeg_resync_to_restart (cinfo, desired);
  }
@@@ -6103,7 -6257,8 +6116,7 @@@ struct my_jpeg_error_mg
  
  
  static void
 -my_error_exit (cinfo)
 -     j_common_ptr cinfo;
 +my_error_exit (j_common_ptr cinfo)
  {
    struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err;
    longjmp (mgr->setjmp_buffer, 1);
     libjpeg.doc from the JPEG lib distribution.  */
  
  static void
 -our_common_init_source (cinfo)
 -     j_decompress_ptr cinfo;
 +our_common_init_source (j_decompress_ptr cinfo)
  {
  }
  
     jpeg_finish_decompress() after all data has been processed.  */
  
  static void
 -our_common_term_source (cinfo)
 -     j_decompress_ptr cinfo;
 +our_common_term_source (j_decompress_ptr cinfo)
  {
  }
  
  static JOCTET our_memory_buffer[2];
  
  static boolean
 -our_memory_fill_input_buffer (cinfo)
 -     j_decompress_ptr cinfo;
 +our_memory_fill_input_buffer (j_decompress_ptr cinfo)
  {
    /* Insert a fake EOI marker.  */
    struct jpeg_source_mgr *src = cinfo->src;
     is the JPEG data source manager.  */
  
  static void
 -our_memory_skip_input_data (cinfo, num_bytes)
 -     j_decompress_ptr cinfo;
 -     long num_bytes;
 +our_memory_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
  {
    struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src;
  
     reading the image.  */
  
  static void
 -jpeg_memory_src (cinfo, data, len)
 -     j_decompress_ptr cinfo;
 -     JOCTET *data;
 -     unsigned int len;
 +jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, unsigned int len)
  {
    struct jpeg_source_mgr *src;
  
@@@ -6217,7 -6380,8 +6230,7 @@@ struct jpeg_stdio_mg
     whenever more data is needed.  The data is read from a FILE *.  */
  
  static boolean
 -our_stdio_fill_input_buffer (cinfo)
 -     j_decompress_ptr cinfo;
 +our_stdio_fill_input_buffer (j_decompress_ptr cinfo)
  {
    struct jpeg_stdio_mgr *src;
  
     is the JPEG data source manager.  */
  
  static void
 -our_stdio_skip_input_data (cinfo, num_bytes)
 -     j_decompress_ptr cinfo;
 -     long num_bytes;
 +our_stdio_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
  {
    struct jpeg_stdio_mgr *src;
    src = (struct jpeg_stdio_mgr *) cinfo->src;
     reading the image.  */
  
  static void
 -jpeg_file_src (cinfo, fp)
 -     j_decompress_ptr cinfo;
 -     FILE *fp;
 +jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
  {
    struct jpeg_stdio_mgr *src;
  
     from the JPEG lib.  */
  
  static int
 -jpeg_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +jpeg_load (struct frame *f, struct image *img)
  {
    struct jpeg_decompress_struct cinfo;
    struct my_jpeg_error_mgr mgr;
    int rc;
    unsigned long *colors;
    int width, height;
 -  struct gcpro gcpro1;
  
    /* Open the JPEG file.  */
    specified_file = image_spec_value (img->spec, QCfile, NULL);
    specified_data = image_spec_value (img->spec, QCdata, NULL);
 -  file = Qnil;
 -  GCPRO1 (file);
  
    if (NILP (specified_data))
      {
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (fp == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
 -        UNGCPRO;
          return 0;
        }
      }
 +  else if (!STRINGP (specified_data))
 +    {
 +      image_error ("Invalid image data `%s'", specified_data, Qnil);
 +      return 0;
 +    }
  
    /* Customize libjpeg's error handling to call my_error_exit when an
       error is detected.  This function will perform a longjmp.
  
        /* Free pixmap and colors.  */
        x_clear_image (f, img);
 -
 -      UNGCPRO;
        return 0;
      }
  
    /* Put the image into the pixmap.  */
    x_put_x_image (f, ximg, img->pixmap, width, height);
    x_destroy_x_image (ximg);
 -  UNGCPRO;
    return 1;
  }
  
  static int
  jpeg_load (struct frame *f, struct image *img)
  {
 -  return ns_load_image(f, img,
 -                       image_spec_value (img->spec, QCfile, NULL),
 -                       image_spec_value (img->spec, QCdata, NULL));
 +  return ns_load_image (f, img,
 +                      image_spec_value (img->spec, QCfile, NULL),
 +                      image_spec_value (img->spec, QCdata, NULL));
  }
  #endif  /* HAVE_NS */
  
  
  #if defined (HAVE_TIFF) || defined (HAVE_NS)
  
 -static int tiff_image_p P_ ((Lisp_Object object));
 -static int tiff_load P_ ((struct frame *f, struct image *img));
 +static int tiff_image_p (Lisp_Object object);
 +static int tiff_load (struct frame *f, struct image *img);
  
  /* The symbol `tiff' identifying images of this type.  */
  
@@@ -6558,10 -6731,11 +6571,10 @@@ static struct image_type tiff_type 
  /* Return non-zero if OBJECT is a valid TIFF image specification.  */
  
  static int
 -tiff_image_p (object)
 -     Lisp_Object object;
 +tiff_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[TIFF_LAST];
 -  bcopy (tiff_format, fmt, sizeof fmt);
 +  memcpy (fmt, tiff_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff))
      return 0;
  #ifdef HAVE_NTGUI
  
  /* TIFF library details.  */
 -DEF_IMGLIB_FN (TIFFSetErrorHandler);
 -DEF_IMGLIB_FN (TIFFSetWarningHandler);
 -DEF_IMGLIB_FN (TIFFOpen);
 -DEF_IMGLIB_FN (TIFFClientOpen);
 -DEF_IMGLIB_FN (TIFFGetField);
 -DEF_IMGLIB_FN (TIFFReadRGBAImage);
 -DEF_IMGLIB_FN (TIFFClose);
 -DEF_IMGLIB_FN (TIFFSetDirectory);
 +DEF_IMGLIB_FN (TIFFSetErrorHandler, (TIFFErrorHandler));
 +DEF_IMGLIB_FN (TIFFSetWarningHandler, (TIFFErrorHandler));
 +DEF_IMGLIB_FN (TIFFOpen, (const char *, const char *));
 +DEF_IMGLIB_FN (TIFFClientOpen, (const char *, const char *, thandle_t,
 +                              TIFFReadWriteProc, TIFFReadWriteProc,
 +                              TIFFSeekProc, TIFFCloseProc, TIFFSizeProc,
 +                              TIFFMapFileProc, TIFFUnmapFileProc));
 +DEF_IMGLIB_FN (TIFFGetField, (TIFF *, ttag_t, ...));
 +DEF_IMGLIB_FN (TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int));
 +DEF_IMGLIB_FN (TIFFClose, (TIFF *));
 +DEF_IMGLIB_FN (TIFFSetDirectory, (TIFF *, tdir_t));
  
  static int
  init_tiff_functions (Lisp_Object libraries)
@@@ -6641,25 -6812,34 +6654,25 @@@ typedef struc
  tiff_memory_source;
  
  static size_t
 -tiff_read_from_memory (data, buf, size)
 -     thandle_t data;
 -     tdata_t buf;
 -     tsize_t size;
 +tiff_read_from_memory (thandle_t data, tdata_t buf, tsize_t size)
  {
    tiff_memory_source *src = (tiff_memory_source *) data;
  
    if (size > src->len - src->index)
      return (size_t) -1;
 -  bcopy (src->bytes + src->index, buf, size);
 +  memcpy (buf, src->bytes + src->index, size);
    src->index += size;
    return size;
  }
  
  static size_t
 -tiff_write_from_memory (data, buf, size)
 -     thandle_t data;
 -     tdata_t buf;
 -     tsize_t size;
 +tiff_write_from_memory (thandle_t data, tdata_t buf, tsize_t size)
  {
    return (size_t) -1;
  }
  
  static toff_t
 -tiff_seek_in_memory (data, off, whence)
 -     thandle_t data;
 -     toff_t off;
 -     int whence;
 +tiff_seek_in_memory (thandle_t data, toff_t off, int whence)
  {
    tiff_memory_source *src = (tiff_memory_source *) data;
    int idx;
  }
  
  static int
 -tiff_close_memory (data)
 -     thandle_t data;
 +tiff_close_memory (thandle_t data)
  {
    /* NOOP */
    return 0;
  }
  
  static int
 -tiff_mmap_memory (data, pbase, psize)
 -     thandle_t data;
 -     tdata_t *pbase;
 -     toff_t *psize;
 +tiff_mmap_memory (thandle_t data, tdata_t *pbase, toff_t *psize)
  {
    /* It is already _IN_ memory. */
    return 0;
  }
  
  static void
 -tiff_unmap_memory (data, base, size)
 -     thandle_t data;
 -     tdata_t base;
 -     toff_t size;
 +tiff_unmap_memory (thandle_t data, tdata_t base, toff_t size)
  {
    /* We don't need to do this. */
  }
  
  static toff_t
 -tiff_size_of_memory (data)
 -     thandle_t data;
 +tiff_size_of_memory (thandle_t data)
  {
    return ((tiff_memory_source *) data)->len;
  }
  
  
  static void
 -tiff_error_handler (title, format, ap)
 -     const char *title, *format;
 -     va_list ap;
 +tiff_error_handler (const char *title, const char *format, va_list ap)
  {
    char buf[512];
    int len;
  
  
  static void
 -tiff_warning_handler (title, format, ap)
 -     const char *title, *format;
 -     va_list ap;
 +tiff_warning_handler (const char *title, const char *format, va_list ap)
  {
    char buf[512];
    int len;
     successful.  */
  
  static int
 -tiff_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +tiff_load (struct frame *f, struct image *img)
  {
    Lisp_Object file, specified_file;
    Lisp_Object specified_data;
    uint32 *buf;
    int rc, rc2;
    XImagePtr ximg;
 -  struct gcpro gcpro1;
    tiff_memory_source memsrc;
    Lisp_Object image;
  
    specified_file = image_spec_value (img->spec, QCfile, NULL);
    specified_data = image_spec_value (img->spec, QCdata, NULL);
 -  file = Qnil;
 -  GCPRO1 (file);
  
    fn_TIFFSetErrorHandler (tiff_error_handler);
    fn_TIFFSetWarningHandler (tiff_warning_handler);
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (tiff == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
 -        UNGCPRO;
          return 0;
        }
      }
    else
      {
 +      if (!STRINGP (specified_data))
 +      {
 +        image_error ("Invalid image data `%s'", specified_data, Qnil);
 +        return 0;
 +      }
 +
        /* Memory source! */
        memsrc.bytes = SDATA (specified_data);
        memsrc.len = SBYTES (specified_data);
        memsrc.index = 0;
  
 -      /* Casting return value avoids a GCC warning on W32.  */
 -      tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r", &memsrc,
 +      /* Casting arguments return value avoids a GCC warning on W32.  */
 +      tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r",
 +                                      (thandle_t) &memsrc,
                                        (TIFFReadWriteProc) tiff_read_from_memory,
                                        (TIFFReadWriteProc) tiff_write_from_memory,
                                        tiff_seek_in_memory,
        if (!tiff)
        {
          image_error ("Cannot open memory source for `%s'", img->spec, Qnil);
 -        UNGCPRO;
          return 0;
        }
      }
          image_error ("Invalid image number `%s' in image `%s'",
                       image, img->spec);
          fn_TIFFClose (tiff);
 -        UNGCPRO;
          return 0;
        }
      }
      {
        image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
        fn_TIFFClose (tiff);
 -      UNGCPRO;
        return 0;
      }
  
      {
        image_error ("Error reading TIFF image `%s'", img->spec, Qnil);
        xfree (buf);
 -      UNGCPRO;
        return 0;
      }
  
    if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))
      {
        xfree (buf);
 -      UNGCPRO;
        return 0;
      }
  
    x_destroy_x_image (ximg);
    xfree (buf);
  
 -  UNGCPRO;
    return 1;
  }
  
  static int
  tiff_load (struct frame *f, struct image *img)
  {
 -  return ns_load_image(f, img,
 -                       image_spec_value (img->spec, QCfile, NULL),
 -                       image_spec_value (img->spec, QCdata, NULL));
 +  return ns_load_image (f, img,
 +                        image_spec_value (img->spec, QCfile, NULL),
 +                        image_spec_value (img->spec, QCdata, NULL));
  }
  #endif  /* HAVE_NS */
  
  
  #if defined (HAVE_GIF) || defined (HAVE_NS)
  
 -static int gif_image_p P_ ((Lisp_Object object));
 -static int gif_load P_ ((struct frame *f, struct image *img));
 -static void gif_clear_image P_ ((struct frame *f, struct image *img));
 +static int gif_image_p (Lisp_Object object);
 +static int gif_load (struct frame *f, struct image *img);
 +static void gif_clear_image (struct frame *f, struct image *img);
  
  /* The symbol `gif' identifying images of this type.  */
  
@@@ -6985,9 -7183,11 +6998,9 @@@ static struct image_type gif_type 
  /* Free X resources of GIF image IMG which is used on frame F.  */
  
  static void
 -gif_clear_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +gif_clear_image (struct frame *f, struct image *img)
  {
 -  /* IMG->data.ptr_val may contain extension data.  */
 +  /* IMG->data.ptr_val may contain metadata with extension data.  */
    img->data.lisp_val = Qnil;
    x_clear_image (f, img);
  }
  /* Return non-zero if OBJECT is a valid GIF image specification.  */
  
  static int
 -gif_image_p (object)
 -     Lisp_Object object;
 +gif_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[GIF_LAST];
 -  bcopy (gif_format, fmt, sizeof fmt);
 +  memcpy (fmt, gif_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, GIF_LAST, Qgif))
      return 0;
  #ifdef HAVE_NTGUI
  
  /* GIF library details.  */
 -DEF_IMGLIB_FN (DGifCloseFile);
 -DEF_IMGLIB_FN (DGifSlurp);
 -DEF_IMGLIB_FN (DGifOpen);
 -DEF_IMGLIB_FN (DGifOpenFileName);
 +DEF_IMGLIB_FN (DGifCloseFile, (GifFileType *));
 +DEF_IMGLIB_FN (DGifSlurp, (GifFileType *));
 +DEF_IMGLIB_FN (DGifOpen, (void *, InputFunc));
 +DEF_IMGLIB_FN (DGifOpenFileName, (const char *));
  
  static int
  init_gif_functions (Lisp_Object libraries)
@@@ -7078,14 -7279,17 +7091,14 @@@ gif_memory_source
  static gif_memory_source *current_gif_memory_src;
  
  static int
 -gif_read_from_memory (file, buf, len)
 -     GifFileType *file;
 -     GifByteType *buf;
 -     int len;
 +gif_read_from_memory (GifFileType *file, GifByteType *buf, int len)
  {
    gif_memory_source *src = current_gif_memory_src;
  
    if (len > src->len - src->index)
      return -1;
  
 -  bcopy (src->bytes + src->index, buf, len);
 +  memcpy (buf, src->bytes + src->index, len);
    src->index += len;
    return len;
  }
  static const int interlace_start[] = {0, 4, 2, 1};
  static const int interlace_increment[] = {8, 8, 4, 2};
  
 +#define GIF_LOCAL_DESCRIPTOR_EXTENSION 249
 +
  static int
 -gif_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +gif_load (struct frame *f, struct image *img)
  {
    Lisp_Object file, specified_file;
    Lisp_Object specified_data;
    int rc, width, height, x, y, i;
 +  boolean transparent_p;
    XImagePtr ximg;
    ColorMapObject *gif_color_map;
    unsigned long pixel_colors[256];
    GifFileType *gif;
 -  struct gcpro gcpro1;
    Lisp_Object image;
    int ino, image_height, image_width;
    gif_memory_source memsrc;
    unsigned char *raster;
 +  unsigned int transparency_color_index;
  
    specified_file = image_spec_value (img->spec, QCfile, NULL);
    specified_data = image_spec_value (img->spec, QCdata, NULL);
 -  file = Qnil;
 -  GCPRO1 (file);
  
    if (NILP (specified_data))
      {
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", specified_file, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (gif == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
 -        UNGCPRO;
          return 0;
        }
      }
    else
      {
 +      if (!STRINGP (specified_data))
 +      {
 +        image_error ("Invalid image data `%s'", specified_data, Qnil);
 +        return 0;
 +      }
 +
        /* Read from memory! */
        current_gif_memory_src = &memsrc;
        memsrc.bytes = SDATA (specified_data);
        if (!gif)
        {
          image_error ("Cannot open memory source `%s'", img->spec, Qnil);
 -        UNGCPRO;
          return 0;
        }
      }
      {
        image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
        fn_DGifCloseFile (gif);
 -      UNGCPRO;
        return 0;
      }
  
      {
        image_error ("Error reading `%s'", img->spec, Qnil);
        fn_DGifCloseFile (gif);
 -      UNGCPRO;
        return 0;
      }
  
        image_error ("Invalid image number `%s' in image `%s'",
                   image, img->spec);
        fn_DGifCloseFile (gif);
 -      UNGCPRO;
        return 0;
      }
  
 +  for (i = 0; i < gif->SavedImages[ino].ExtensionBlockCount; i++)
 +    if ((gif->SavedImages[ino].ExtensionBlocks[i].Function
 +       == GIF_LOCAL_DESCRIPTOR_EXTENSION)
 +      && gif->SavedImages[ino].ExtensionBlocks[i].ByteCount == 4
 +      /* Transparency enabled?  */
 +      && gif->SavedImages[ino].ExtensionBlocks[i].Bytes[0] & 1)
 +      {
 +      transparent_p = 1;
 +      transparency_color_index
 +        = (unsigned char) gif->SavedImages[ino].ExtensionBlocks[i].Bytes[3];
 +      }
 +
    img->corners[TOP_CORNER] = gif->SavedImages[ino].ImageDesc.Top;
    img->corners[LEFT_CORNER] = gif->SavedImages[ino].ImageDesc.Left;
    image_height = gif->SavedImages[ino].ImageDesc.Height;
      {
        image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
        fn_DGifCloseFile (gif);
 -      UNGCPRO;
        return 0;
      }
  
    if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))
      {
        fn_DGifCloseFile (gif);
 -      UNGCPRO;
        return 0;
      }
  
    if (!gif_color_map)
      gif_color_map = gif->SColorMap;
    init_color_table ();
 -  bzero (pixel_colors, sizeof pixel_colors);
 +  memset (pixel_colors, 0, sizeof pixel_colors);
  
    if (gif_color_map)
      for (i = 0; i < gif_color_map->ColorCount; ++i)
        {
 -        int r = gif_color_map->Colors[i].Red << 8;
 -        int g = gif_color_map->Colors[i].Green << 8;
 -        int b = gif_color_map->Colors[i].Blue << 8;
 -        pixel_colors[i] = lookup_rgb_color (f, r, g, b);
 +      if (transparent_p && transparency_color_index == i)
 +        {
 +          Lisp_Object specified_bg
 +            = image_spec_value (img->spec, QCbackground, NULL);
 +          pixel_colors[i] = STRINGP (specified_bg)
 +            ? x_alloc_image_color (f, img, specified_bg,
 +                                   FRAME_BACKGROUND_PIXEL (f))
 +            : FRAME_BACKGROUND_PIXEL (f);
 +        }
 +      else
 +        {
 +          int r = gif_color_map->Colors[i].Red << 8;
 +          int g = gif_color_map->Colors[i].Green << 8;
 +          int b = gif_color_map->Colors[i].Blue << 8;
 +          pixel_colors[i] = lookup_rgb_color (f, r, g, b);
 +        }
        }
  
  #ifdef COLOR_TABLE_SUPPORT
          }
      }
  
 -  /* Save GIF image extension data for `image-extension-data'.
 -     Format is (count IMAGES FUNCTION "BYTES" ...).  */
 +  /* Save GIF image extension data for `image-metadata'.
 +     Format is (count IMAGES extension-data (FUNCTION "BYTES" ...)).  */
    img->data.lisp_val = Qnil;
    if (gif->SavedImages[ino].ExtensionBlockCount > 0)
      {
        img->data.lisp_val = Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount),
                                    Fcons (make_number (ext->Function),
                                           img->data.lisp_val));
 -      img->data.lisp_val = Fnreverse (img->data.lisp_val);
 +      img->data.lisp_val = Fcons (Qextension_data,
 +                                Fcons (Fnreverse (img->data.lisp_val),
 +                                       Qnil));
      }
    if (gif->ImageCount > 1)
      img->data.lisp_val = Fcons (Qcount,
    x_put_x_image (f, ximg, img->pixmap, width, height);
    x_destroy_x_image (ximg);
  
 -  UNGCPRO;
    return 1;
  }
  
  static int
  gif_load (struct frame *f, struct image *img)
  {
 -  return ns_load_image(f, img,
 -                       image_spec_value (img->spec, QCfile, NULL),
 -                       image_spec_value (img->spec, QCdata, NULL));
 +  return ns_load_image (f, img,
 +                        image_spec_value (img->spec, QCfile, NULL),
 +                      image_spec_value (img->spec, QCdata, NULL));
  }
  #endif /* HAVE_NS */
  
  #endif /* HAVE_GIF */
  
  
 +/***********************************************************************
 +                               imagemagick
 +***********************************************************************/
 +#if defined (HAVE_IMAGEMAGICK)
 +Lisp_Object Vimagemagick_render_type;
 +
 +/* The symbol `imagemagick' identifying images of this type.  */
 +
 +Lisp_Object Qimagemagick;
 +Lisp_Object Vimagemagick_render_type;
 +
 +/* Indices of image specification fields in imagemagick_format, below.  */
 +
 +enum imagemagick_keyword_index
 +  {
 +    IMAGEMAGICK_TYPE,
 +    IMAGEMAGICK_DATA,
 +    IMAGEMAGICK_FILE,
 +    IMAGEMAGICK_ASCENT,
 +    IMAGEMAGICK_MARGIN,
 +    IMAGEMAGICK_RELIEF,
 +    IMAGEMAGICK_ALGORITHM,
 +    IMAGEMAGICK_HEURISTIC_MASK,
 +    IMAGEMAGICK_MASK,
 +    IMAGEMAGICK_BACKGROUND,
 +    IMAGEMAGICK_HEIGHT,
 +    IMAGEMAGICK_WIDTH,
 +    IMAGEMAGICK_ROTATION,
 +    IMAGEMAGICK_CROP,
 +    IMAGEMAGICK_LAST
 +  };
 +
 +/* Vector of image_keyword structures describing the format
 +   of valid user-defined image specifications.  */
 +
 +static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] =
 +  {
 +    {":type",         IMAGE_SYMBOL_VALUE,                     1},
 +    {":data",         IMAGE_STRING_VALUE,                     0},
 +    {":file",         IMAGE_STRING_VALUE,                     0},
 +    {":ascent",               IMAGE_ASCENT_VALUE,                     0},
 +    {":margin",               IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,   0},
 +    {":relief",               IMAGE_INTEGER_VALUE,                    0},
 +    {":conversion",   IMAGE_DONT_CHECK_VALUE_TYPE,            0},
 +    {":heuristic-mask",       IMAGE_DONT_CHECK_VALUE_TYPE,            0},
 +    {":mask",         IMAGE_DONT_CHECK_VALUE_TYPE,            0},
 +    {":background",   IMAGE_STRING_OR_NIL_VALUE,              0},
 +    {":height",               IMAGE_INTEGER_VALUE,                    0},
 +    {":width",                IMAGE_INTEGER_VALUE,                    0},
 +    {":rotation",     IMAGE_NUMBER_VALUE,                     0},
 +    {":crop",         IMAGE_DONT_CHECK_VALUE_TYPE,            0}
 +  };
 +/* Free X resources of imagemagick image IMG which is used on frame F.  */
 +
 +static void
 +imagemagick_clear_image (struct frame *f,
 +                         struct image *img)
 +{
 +  x_clear_image (f, img);
 +}
 +
 +
 +
 +/* Return non-zero if OBJECT is a valid IMAGEMAGICK image specification.  Do
 +   this by calling parse_image_spec and supplying the keywords that
 +   identify the IMAGEMAGICK format.   */
 +
 +static int
 +imagemagick_image_p (Lisp_Object object)
 +{
 +  struct image_keyword fmt[IMAGEMAGICK_LAST];
 +  memcpy (fmt, imagemagick_format, sizeof fmt);
 +
 +  if (!parse_image_spec (object, fmt, IMAGEMAGICK_LAST, Qimagemagick))
 +    return 0;
 +
 +  /* Must specify either the :data or :file keyword.  */
 +  return fmt[IMAGEMAGICK_FILE].count + fmt[IMAGEMAGICK_DATA].count == 1;
 +}
 +
 +/* The GIF library also defines DrawRectangle, but its never used in Emacs.
 +   Therefore rename the function so it doesnt collide with ImageMagick.  */
 +#define DrawRectangle DrawRectangleGif
 +#include <wand/MagickWand.h>
 +
 +/* imagemagick_load_image is a helper function for imagemagick_load,
 +   which does the actual loading given contents and size, apart from
 +   frame and image structures, passed from imagemagick_load.
 +
 +   Uses librimagemagick to do most of the image processing.
 +
 +   non-zero when successful.
 +*/
 +
 +static int
 +imagemagick_load_image (/* Pointer to emacs frame structure.  */
 +                        struct frame *f,
 +                        /* Pointer to emacs image structure.  */
 +                        struct image *img,
 +                        /* String containing the IMAGEMAGICK data to
 +                           be parsed.  */
 +                        unsigned char *contents,
 +                        /* Size of data in bytes.  */
 +                        unsigned int size,
 +                        /* Filename, either pass filename or
 +                           contents/size.  */
 +                        unsigned char *filename)
 +{
 +  unsigned long width;
 +  unsigned long height;
 +
 +  MagickBooleanType
 +    status;
 +
 +  XImagePtr ximg;
 +  Lisp_Object specified_bg;
 +  XColor background;
 +  int x;
 +  int y;
 +
 +  MagickWand  *image_wand;
 +  MagickWand  *ping_wand;
 +  PixelIterator *iterator;
 +  PixelWand  **pixels;
 +  MagickPixelPacket  pixel;
 +  Lisp_Object image;
 +  Lisp_Object value;
 +  Lisp_Object crop, geometry;
 +  long ino;
 +  int desired_width, desired_height;
 +  double rotation;
 +  int imagemagick_rendermethod;
 +  int pixelwidth;
 +  ImageInfo  *image_info;
 +  ExceptionInfo *exception;
 +  Image * im_image;
 +
 +
 +  /* Handle image index for image types who can contain more than one
 +     image.  Interface :index is same as for GIF.  First we "ping" the
 +     image to see how many sub-images it contains. Pinging is faster
 +     than loading the image to find out things about it.  */
 +  image = image_spec_value (img->spec, QCindex, NULL);
 +  ino = INTEGERP (image) ? XFASTINT (image) : 0;
 +  ping_wand = NewMagickWand ();
 +  MagickSetResolution (ping_wand, 2, 2);
 +  if (filename != NULL)
 +    {
 +      status = MagickPingImage (ping_wand, filename);
 +    }
 +  else
 +    {
 +      status = MagickPingImageBlob (ping_wand, contents, size);
 +    }
 +
 +  if (ino >= MagickGetNumberImages (ping_wand))
 +    {
 +      image_error ("Invalid image number `%s' in image `%s'",
 +                 image, img->spec);
 +      DestroyMagickWand (ping_wand);
 +      return 0;
 +    }
 +
 +  if (MagickGetNumberImages(ping_wand) > 1)
 +    img->data.lisp_val =
 +      Fcons (Qcount,
 +             Fcons (make_number (MagickGetNumberImages (ping_wand)),
 +                    img->data.lisp_val));
 +
 +  DestroyMagickWand (ping_wand);
 +  /* Now, after pinging, we know how many images are inside the
 +     file. If its not a bundle, just one.  */
 +
 +  if (filename != NULL)
 +    {
 +      image_info = CloneImageInfo ((ImageInfo *) NULL);
 +      (void) strcpy (image_info->filename, filename);
 +      image_info->number_scenes = 1;
 +      image_info->scene = ino;
 +      exception = AcquireExceptionInfo ();
 +
 +      im_image = ReadImage (image_info, exception);
 +      CatchException (exception);
 +
 +      image_wand = NewMagickWandFromImage (im_image);
 +    }
 +  else
 +    {
 +      image_wand = NewMagickWand ();
 +      status = MagickReadImageBlob (image_wand, contents, size);
 +    }
 +  image_error ("im read failed", Qnil, Qnil);
 +  if (status == MagickFalse) goto imagemagick_error;
 +
 +  /* If width and/or height is set in the display spec assume we want
 +     to scale to those values.  if either h or w is unspecified, the
 +     unspecified should be calculated from the specified to preserve
 +     aspect ratio.  */
 +
 +  value = image_spec_value (img->spec, QCwidth, NULL);
 +  desired_width = (INTEGERP (value)  ? XFASTINT (value) : -1);
 +  value = image_spec_value (img->spec, QCheight, NULL);
 +  desired_height = (INTEGERP (value) ? XFASTINT (value) : -1);
 +
 +  height = MagickGetImageHeight (image_wand);
 +  width = MagickGetImageWidth (image_wand);
 +
 +  if(desired_width != -1 && desired_height == -1)
 +    {
 +      /* w known, calculate h.  */
 +      desired_height = (double) desired_width / width * height;
 +    }
 +  if(desired_width == -1 && desired_height != -1)
 +    {
 +      /* h known, calculate w.  */
 +      desired_width = (double) desired_height / height * width;
 +    }
 +  if(desired_width != -1 && desired_height != -1)
 +    {
 +      status = MagickScaleImage (image_wand, desired_width, desired_height);
 +      if (status == MagickFalse)
 +      {
 +        image_error ("Imagemagick scale failed", Qnil, Qnil);
 +        goto imagemagick_error;
 +      }
 +    }
 +
 +
 +  /* crop behaves similar to image slicing in Emacs but is more memory
 +     efficient.  */
 +  crop = image_spec_value (img->spec, QCcrop, NULL);
 +
 +  if (CONSP (crop) && INTEGERP (XCAR (crop)))
 +    {
 +      /* After some testing, it seems MagickCropImage is the fastest
 +         crop function in ImageMagick.  This crop function seems to do
 +         less copying than the alternatives, but it still reads the
 +         entire image into memory before croping, which is aparently
 +         difficult to avoid when using imagemagick.  */
 +
 +      int w, h, x, y;
 +      w = XFASTINT (XCAR (crop));
 +      crop = XCDR (crop);
 +      if (CONSP (crop) && INTEGERP (XCAR (crop)))
 +      {
 +        h = XFASTINT (XCAR (crop));
 +        crop = XCDR (crop);
 +        if (CONSP (crop) && INTEGERP (XCAR (crop)))
 +          {
 +            x = XFASTINT (XCAR (crop));
 +            crop = XCDR (crop);
 +            if (CONSP (crop) && INTEGERP (XCAR (crop)))
 +              {
 +                y = XFASTINT (XCAR (crop));
 +                MagickCropImage (image_wand, w, h, x, y);
 +              }
 +          }
 +      }
 +    }
 +
 +  /* Furthermore :rotation. we need background color and angle for
 +     rotation.  */
 +  /*
 +    TODO background handling for rotation specified_bg =
 +    image_spec_value (img->spec, QCbackground, NULL); if (!STRINGP
 +    (specified_bg).  */
 +  value = image_spec_value (img->spec, QCrotation, NULL);
 +  if (FLOATP (value))
 +    {
 +      PixelWand* background = NewPixelWand ();
 +      PixelSetColor (background, "#ffffff");/*TODO remove hardcode*/
 +
 +      rotation = extract_float (value);
 +
 +      status = MagickRotateImage (image_wand, background, rotation);
 +      DestroyPixelWand (background);
 +      if (status == MagickFalse)
 +        {
 +          image_error ("Imagemagick image rotate failed", Qnil, Qnil);
 +          goto imagemagick_error;
 +        }
 +    }
 +
 +  /* Finaly we are done manipulating the image, figure out resulting
 +     width, height, and then transfer ownerwship to Emacs.  */
 +  height = MagickGetImageHeight (image_wand);
 +  width = MagickGetImageWidth (image_wand);
 +  if (status == MagickFalse)
 +    {
 +      image_error ("Imagemagick image get size failed", Qnil, Qnil);
 +      goto imagemagick_error;
 +    }
 +
 +  if (! check_image_size (f, width, height))
 +    {
 +      image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
 +      goto imagemagick_error;
 +    }
 +
 +  /* We can now get a valid pixel buffer from the imagemagick file, if all
 +     went ok.  */
 +
 +  init_color_table ();
 +  imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type)
 +                              ? XFASTINT (Vimagemagick_render_type) : 0);
 +  if (imagemagick_rendermethod == 0)
 +    {
 +      /* Try to create a x pixmap to hold the imagemagick pixmap.  */
 +      if (!x_create_x_image_and_pixmap (f, width, height, 0,
 +                                        &ximg, &img->pixmap))
 +        {
 +          image_error("Imagemagick X bitmap allocation failure", Qnil, Qnil);
 +          goto imagemagick_error;
 +        }
 +
 +      /* Copy imagegmagick image to x with primitive yet robust pixel
 +         pusher loop.  This has been tested a lot with many different
 +         images.  */
 +
 +      /* Copy pixels from the imagemagick image structure to the x image map. */
 +      iterator = NewPixelIterator (image_wand);
 +      if (iterator == (PixelIterator *) NULL)
 +        {
 +          image_error ("Imagemagick pixel iterator creation failed",
 +                       Qnil, Qnil);
 +          goto imagemagick_error;
 +        }
 +
 +      for (y = 0; y < (long) MagickGetImageHeight (image_wand); y++)
 +        {
 +          pixels = PixelGetNextIteratorRow (iterator, &width);
 +          if (pixels == (PixelWand **) NULL)
 +            break;
 +          for (x = 0; x < (long) width; x++)
 +            {
 +              PixelGetMagickColor (pixels[x], &pixel);
 +              XPutPixel (ximg, x, y,
 +                         lookup_rgb_color (f,
 +                                           pixel.red,
 +                                           pixel.green,
 +                                           pixel.blue));
 +            }
 +        }
 +      DestroyPixelIterator (iterator);
 +    }
 +
 +  if (imagemagick_rendermethod == 1)
 +    {
 +      /* Magicexportimage is normaly faster than pixelpushing.  This
 +         method is also well tested. Some aspects of this method are
 +         ad-hoc and needs to be more researched. */
 +      int imagedepth = 24;/*MagickGetImageDepth(image_wand);*/
 +      char* exportdepth = imagedepth <= 8 ? "I" : "BGRP";/*"RGBP";*/
 +      /* Try to create a x pixmap to hold the imagemagick pixmap.  */
 +      if (!x_create_x_image_and_pixmap (f, width, height, imagedepth,
 +                                        &ximg, &img->pixmap))
 +      {
 +        image_error("Imagemagick X bitmap allocation failure", Qnil, Qnil);
 +        goto imagemagick_error;
 +      }
 +
 +
 +      /* Oddly, the below code doesnt seem to work:*/
 +      /* switch(ximg->bitmap_unit){ */
 +      /* case 8: */
 +      /*   pixelwidth=CharPixel; */
 +      /*   break; */
 +      /* case   16: */
 +      /*   pixelwidth=ShortPixel; */
 +      /*   break; */
 +      /* case   32: */
 +      /*   pixelwidth=LongPixel; */
 +      /*   break; */
 +      /* } */
 +      /*
 +        Here im just guessing the format of the bitmap.
 +        happens to work fine for:
 +        - bw djvu images
 +        on rgb display.
 +        seems about 3 times as fast as pixel pushing(not carefully measured)
 +      */
 +      pixelwidth = CharPixel;/*??? TODO figure out*/
 +#ifdef HAVE_MAGICKEXPORTIMAGEPIXELS
 +      MagickExportImagePixels (image_wand,
 +                             0, 0,
 +                             width, height,
 +                             exportdepth,
 +                             pixelwidth,
 +                             /*&(img->pixmap));*/
 +                             ximg->data);
 +#else
 +      image_error ("You dont have MagickExportImagePixels, upgrade ImageMagick!",
 +                 Qnil, Qnil);
 +#endif
 +    }
 +
 +
 +#ifdef COLOR_TABLE_SUPPORT
 +  /* Remember colors allocated for this image.  */
 +  img->colors = colors_in_color_table (&img->ncolors);
 +  free_color_table ();
 +#endif /* COLOR_TABLE_SUPPORT */
 +
 +
 +  img->width  = width;
 +  img->height = height;
 +
 +  /* Put the image into the pixmap, then free the X image and its
 +     buffer.  */
 +  x_put_x_image (f, ximg, img->pixmap, width, height);
 +  x_destroy_x_image (ximg);
 +
 +
 +  /* Final cleanup. image_wand should be the only resource left. */
 +  DestroyMagickWand (image_wand);
 +
 +  return 1;
 +
 + imagemagick_error:
 +  /* TODO more cleanup.  */
 +  image_error ("Error parsing IMAGEMAGICK image `%s'", img->spec, Qnil);
 +  return 0;
 +}
 +
 +
 +/* Load IMAGEMAGICK image IMG for use on frame F.  Value is non-zero if
 +   successful. this function will go into the imagemagick_type structure, and
 +   the prototype thus needs to be compatible with that structure.  */
 +
 +static int
 +imagemagick_load (struct frame *f,
 +                  struct image *img)
 +{
 +  int success_p = 0;
 +  Lisp_Object file_name;
 +
 +  /* If IMG->spec specifies a file name, create a non-file spec from it.  */
 +  file_name = image_spec_value (img->spec, QCfile, NULL);
 +  if (STRINGP (file_name))
 +    {
 +      Lisp_Object file;
 +
 +      file = x_find_image_file (file_name);
 +      if (!STRINGP (file))
 +      {
 +        image_error ("Cannot find image file `%s'", file_name, Qnil);
 +        return 0;
 +      }
 +      success_p = imagemagick_load_image (f, img, 0, 0, SDATA (file));
 +    }
 +  /* Else its not a file, its a lisp object.  Load the image from a
 +     lisp object rather than a file.  */
 +  else
 +    {
 +      Lisp_Object data;
 +
 +      data = image_spec_value (img->spec, QCdata, NULL);
 +      if (!STRINGP (data))
 +      {
 +        image_error ("Invalid image data `%s'", data, Qnil);
 +        return 0;
 +      }
 +      success_p = imagemagick_load_image (f, img, SDATA (data),
 +                                          SBYTES (data), NULL);
 +    }
 +
 +  return success_p;
 +}
 +
 +/* Structure describing the image type `imagemagick'.  Its the same
 +   type of structure defined for all image formats, handled by Emacs
 +   image functions.  See struct image_type in dispextern.h.  */
 +
 +static struct image_type imagemagick_type =
 +  {
 +    /* An identifier showing that this is an image structure for the
 +       IMAGEMAGICK format.  */
 +    &Qimagemagick,
 +    /* Handle to a function that can be used to identify a IMAGEMAGICK
 +       file.  */
 +    imagemagick_image_p,
 +    /* Handle to function used to load a IMAGEMAGICK file.  */
 +    imagemagick_load,
 +    /* Handle to function to free resources for IMAGEMAGICK.  */
 +    imagemagick_clear_image,
 +    /* An internal field to link to the next image type in a list of
 +       image types, will be filled in when registering the format.  */
 +    NULL
 +  };
 +
 +
 +
 +
 +DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0,
 +       doc: /* Return image file types supported by ImageMagick.
 +Since ImageMagick recognizes a lot of file-types that clash with Emacs,
 +such as .c, we want to be able to alter the list at the lisp level.  */)
 +  (void)
 +{
 +  Lisp_Object typelist = Qnil;
 +  unsigned long numf;
 +  ExceptionInfo ex;
 +  char **imtypes = GetMagickList ("*", &numf, &ex);
 +  int i;
 +  Lisp_Object Qimagemagicktype;
 +  for (i = 0; i < numf; i++)
 +    {
 +      Qimagemagicktype = intern (imtypes[i]);
 +      typelist = Fcons (Qimagemagicktype, typelist);
 +    }
 +  return typelist;
 +}
 +
 +#endif        /* defined (HAVE_IMAGEMAGICK) */
 +
 +
  \f
  /***********************************************************************
                                 SVG
  
  /* Function prototypes.  */
  
 -static int svg_image_p P_ ((Lisp_Object object));
 -static int svg_load P_ ((struct frame *f, struct image *img));
 +static int svg_image_p (Lisp_Object object);
 +static int svg_load (struct frame *f, struct image *img);
  
 -static int svg_load_image P_ ((struct frame *, struct image *,
 -                             unsigned char *, unsigned int));
 +static int svg_load_image (struct frame *, struct image *,
 +                           unsigned char *, unsigned int);
  
  /* The symbol `svg' identifying images of this type. */
  
@@@ -7966,10 -7632,11 +7979,10 @@@ static struct image_type svg_type 
     identify the SVG format.   */
  
  static int
 -svg_image_p (object)
 -     Lisp_Object object;
 +svg_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[SVG_LAST];
 -  bcopy (svg_format, fmt, sizeof fmt);
 +  memcpy (fmt, svg_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, SVG_LAST, Qsvg))
      return 0;
@@@ -8068,7 -7735,9 +8081,7 @@@ init_svg_functions (Lisp_Object librari
     the prototype thus needs to be compatible with that structure.  */
  
  static int
 -svg_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +svg_load (struct frame *f, struct image *img)
  {
    int success_p = 0;
    Lisp_Object file_name;
        Lisp_Object file;
        unsigned char *contents;
        int size;
 -      struct gcpro gcpro1;
  
        file = x_find_image_file (file_name);
 -      GCPRO1 (file);
        if (!STRINGP (file))
        {
          image_error ("Cannot find image file `%s'", file_name, Qnil);
 -        UNGCPRO;
          return 0;
        }
  
        if (contents == NULL)
        {
          image_error ("Error loading SVG image `%s'", img->spec, Qnil);
 -        UNGCPRO;
          return 0;
        }
        /* If the file was slurped into memory properly, parse it.  */
        success_p = svg_load_image (f, img, contents, size);
        xfree (contents);
 -      UNGCPRO;
      }
    /* Else its not a file, its a lisp object.  Load the image from a
       lisp object rather than a file.  */
        Lisp_Object data;
  
        data = image_spec_value (img->spec, QCdata, NULL);
 +      if (!STRINGP (data))
 +      {
 +        image_error ("Invalid image data `%s'", data, Qnil);
 +        return 0;
 +      }
        success_p = svg_load_image (f, img, SDATA (data), SBYTES (data));
      }
  
  
     Returns non-zero when successful.  */
  static int
 -svg_load_image (f, img, contents, size)
 -    /* Pointer to emacs frame structure.  */
 -     struct frame *f;
 -     /* Pointer to emacs image structure.  */
 -     struct image *img;
 -     /* String containing the SVG XML data to be parsed.  */
 -     unsigned char *contents;
 -     /* Size of data in bytes.  */
 -     unsigned int size;
 +svg_load_image (struct frame *f,         /* Pointer to emacs frame structure.  */
 +              struct image *img,       /* Pointer to emacs image structure.  */
 +              unsigned char *contents, /* String containing the SVG XML data to be parsed.  */
 +              unsigned int size)       /* Size of data in bytes.  */
  {
    RsvgHandle *rsvg_handle;
    RsvgDimensionData dimension_data;
        background.pixel = FRAME_BACKGROUND_PIXEL (f);
        x_query_color (f, &background);
  #else
 -      ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1);
 +      ns_query_color (FRAME_BACKGROUND_COLOR (f), &background, 1);
  #endif
      }
  
  #define HAVE_GHOSTSCRIPT 1
  #endif /* HAVE_X_WINDOWS */
  
 -/* The symbol `postscript' identifying images of this type.  */
 -
 -Lisp_Object Qpostscript;
 -
  #ifdef HAVE_GHOSTSCRIPT
  
 -static int gs_image_p P_ ((Lisp_Object object));
 -static int gs_load P_ ((struct frame *f, struct image *img));
 -static void gs_clear_image P_ ((struct frame *f, struct image *img));
 +static int gs_image_p (Lisp_Object object);
 +static int gs_load (struct frame *f, struct image *img);
 +static void gs_clear_image (struct frame *f, struct image *img);
  
  /* Keyword symbols.  */
  
@@@ -8354,7 -8032,9 +8367,7 @@@ static struct image_type gs_type 
  /* Free X resources of Ghostscript image IMG which is used on frame F.  */
  
  static void
 -gs_clear_image (f, img)
 -     struct frame *f;
 -     struct image *img;
 +gs_clear_image (struct frame *f, struct image *img)
  {
    /* IMG->data.ptr_val may contain a recorded colormap.  */
    xfree (img->data.ptr_val);
     specification.  */
  
  static int
 -gs_image_p (object)
 -     Lisp_Object object;
 +gs_image_p (Lisp_Object object)
  {
    struct image_keyword fmt[GS_LAST];
    Lisp_Object tem;
    int i;
  
 -  bcopy (gs_format, fmt, sizeof fmt);
 +  memcpy (fmt, gs_format, sizeof fmt);
  
    if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript))
      return 0;
     if successful.  */
  
  static int
 -gs_load (f, img)
 -     struct frame *f;
 -     struct image *img;
 +gs_load (struct frame *f, struct image *img)
  {
    char buffer[100];
    Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width;
 -  struct gcpro gcpro1, gcpro2;
    Lisp_Object frame;
    double in_width, in_height;
    Lisp_Object pixel_colors = Qnil;
       = 1/72 in, xdpi and ydpi are stored in the frame's X display
       info.  */
    pt_width = image_spec_value (img->spec, QCpt_width, NULL);
 -  in_width = XFASTINT (pt_width) / 72.0;
 +  in_width = INTEGERP (pt_width) ? XFASTINT (pt_width) / 72.0 : 0;
    img->width = in_width * FRAME_X_DISPLAY_INFO (f)->resx;
    pt_height = image_spec_value (img->spec, QCpt_height, NULL);
 -  in_height = XFASTINT (pt_height) / 72.0;
 +  in_height = INTEGERP (pt_height) ? XFASTINT (pt_height) / 72.0 : 0;
    img->height = in_height * FRAME_X_DISPLAY_INFO (f)->resy;
  
    if (!check_image_size (f, img->width, img->height))
       if successful.  We do not record_unwind_protect here because
       other places in redisplay like calling window scroll functions
       don't either.  Let the Lisp loader use `unwind-protect' instead.  */
 -  GCPRO2 (window_and_pixmap_id, pixel_colors);
 -
    sprintf (buffer, "%lu %lu",
           (unsigned long) FRAME_X_WINDOW (f),
           (unsigned long) img->pixmap);
                              make_number (img->height),
                              window_and_pixmap_id,
                              pixel_colors);
 -  UNGCPRO;
    return PROCESSP (img->data.lisp_val);
  }
  
     telling Emacs that Ghostscript has finished drawing.  */
  
  void
 -x_kill_gs_process (pixmap, f)
 -     Pixmap pixmap;
 -     struct frame *f;
 +x_kill_gs_process (Pixmap pixmap, struct frame *f)
  {
    struct image_cache *c = FRAME_IMAGE_CACHE (f);
    int class, i;
  
  DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0,
         doc: /* Value is non-nil if SPEC is a valid image specification.  */)
 -  (spec)
 -     Lisp_Object spec;
 +  (Lisp_Object spec)
  {
    return valid_image_p (spec) ? Qt : Qnil;
  }
  
  
  DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "")
 -  (spec)
 -     Lisp_Object spec;
 +  (Lisp_Object spec)
  {
    int id = -1;
  
@@@ -8619,8 -8310,9 +8632,8 @@@ Return non-nil if TYPE is a supported i
  
  Image types pbm and xbm are prebuilt; other types are loaded here.
  Libraries to load are specified in alist LIBRARIES (usually, the value
 -of `image-library-alist', which see).  */)
 -  (type, libraries)
 -  Lisp_Object type, libraries;
 +of `dynamic-library-alist', which see).  */)
 +  (Lisp_Object type, Lisp_Object libraries)
  {
    Lisp_Object tested;
  
      return CHECK_LIB_AVAILABLE (&svg_type, init_svg_functions, libraries);
  #endif
  
 +#if defined (HAVE_IMAGEMAGICK)
 +  if (EQ (type, Qimagemagick))
 +    {
 +      /* MagickWandGenesis() initializes the imagemagick library.  */
 +      MagickWandGenesis ();
 +      return CHECK_LIB_AVAILABLE (&imagemagick_type, init_imagemagick_functions,
 +                                libraries);
 +    }
 +#endif
 +
  #ifdef HAVE_GHOSTSCRIPT
    if (EQ (type, Qpostscript))
      return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries);
  }
  
  void
 -syms_of_image ()
 +syms_of_image (void)
  {
 -  extern Lisp_Object Qrisky_local_variable;   /* Syms_of_xdisp has already run.  */
 -
    /* Initialize this only once, since that's what we do with Vimage_types
       and they are supposed to be in sync.  Initializing here gives correct
       operation on GNU/Linux of calling dump-emacs after loading some images.  */
@@@ -8695,6 -8379,20 +8708,6 @@@ Each element of the list is a symbol fo
  To check whether it is really supported, use `image-type-available-p'.  */);
    Vimage_types = Qnil;
  
 -  DEFVAR_LISP ("image-library-alist", &Vimage_library_alist,
 -    doc: /* Alist of image types vs external libraries needed to display them.
 -
 -Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
 -representing a supported image type, and the rest are strings giving
 -alternate filenames for the corresponding external libraries.
 -
 -Emacs tries to load the libraries in the order they appear on the
 -list; if none is loaded, the running session of Emacs won't
 -support the image type.  Types 'pbm and 'xbm don't need to be
 -listed; they are always supported.  */);
 -  Vimage_library_alist = Qnil;
 -  Fput (intern_c_string ("image-library-alist"), Qrisky_local_variable, Qt);
 -
    DEFVAR_LISP ("max-image-size", &Vmax_image_size,
      doc: /* Maximum size of images.
  Emacs will not load an image into memory if its pixel width or
@@@ -8723,8 -8421,6 +8736,8 @@@ non-numeric, there is no explicit limi
  
    Qcount = intern_c_string ("count");
    staticpro (&Qcount);
 +  Qextension_data = intern_c_string ("extension-data");
 +  staticpro (&Qextension_data);
  
    QCascent = intern_c_string (":ascent");
    staticpro (&QCascent);
    staticpro (&QCheuristic_mask);
    QCindex = intern_c_string (":index");
    staticpro (&QCindex);
 +  QCgeometry = intern_c_string (":geometry");
 +  staticpro (&QCgeometry);
 +  QCcrop = intern_c_string (":crop");
 +  staticpro (&QCcrop);
 +  QCrotation = intern_c_string (":rotation");
 +  staticpro (&QCrotation);
    QCmatrix = intern_c_string (":matrix");
    staticpro (&QCmatrix);
    QCcolor_adjustment = intern_c_string (":color-adjustment");
    staticpro (&QCpt_height);
  #endif /* HAVE_GHOSTSCRIPT */
  
+ #ifdef HAVE_NTGUI
+   Qlibpng_version = intern_c_string ("libpng-version");
+   staticpro (&Qlibpng_version);
+ #if HAVE_PNG
+   SET_SYMBOL_VAL (XSYMBOL (Qlibpng_version), make_number (PNG_LIBPNG_VER));
+ #else
+   SET_SYMBOL_VAL (XSYMBOL (Qlibpng_version), make_number (-1));
+ #endif
+ #endif
  #if defined (HAVE_XPM) || defined (HAVE_NS)
    Qxpm = intern_c_string ("xpm");
    staticpro (&Qxpm);
    ADD_IMAGE_TYPE (Qpng);
  #endif
  
 +#if defined (HAVE_IMAGEMAGICK)
 +  Qimagemagick = intern_c_string ("imagemagick");
 +  staticpro (&Qimagemagick);
 +  ADD_IMAGE_TYPE (Qimagemagick);
 +#endif
 +
  #if defined (HAVE_RSVG)
    Qsvg = intern_c_string ("svg");
    staticpro (&Qsvg);
  #endif /* HAVE_RSVG  */
  
    defsubr (&Sinit_image_library);
 +#ifdef HAVE_IMAGEMAGICK
 +  defsubr (&Simagemagick_types);
 +#endif
    defsubr (&Sclear_image_cache);
 -  defsubr (&Simage_refresh);
 +  defsubr (&Simage_flush);
    defsubr (&Simage_size);
    defsubr (&Simage_mask_p);
 -  defsubr (&Simage_extension_data);
 +  defsubr (&Simage_metadata);
  
  #if GLYPH_DEBUG
    defsubr (&Simagep);
@@@ -8853,23 -8544,15 +8876,23 @@@ A cross is always drawn on black & whit
    Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS);
  
    DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay,
 -    doc: /* Time after which cached images are removed from the cache.
 -When an image has not been displayed this many seconds, remove it
 -from the image cache.  Value must be an integer or nil with nil
 -meaning don't clear the cache.  */);
 -  Vimage_cache_eviction_delay = make_number (30 * 60);
 +    doc: /* Maximum time after which images are removed from the cache.
 +When an image has not been displayed this many seconds, Emacs
 +automatically removes it from the image cache.  If the cache contains
 +a large number of images, the actual eviction time may be shorter.
 +The value can also be nil, meaning the cache is never cleared.
 +
 +The function `clear-image-cache' disregards this variable.  */);
 +  Vimage_cache_eviction_delay = make_number (300);
 +#ifdef HAVE_IMAGEMAGICK
 +  DEFVAR_LISP ("imagemagick-render-type", &Vimagemagick_render_type,
 +               doc: /* Choose between ImageMagick render methods.  */);
 +#endif
 +
  }
  
  void
 -init_image ()
 +init_image (void)
  {
  }
  
diff --combined src/keyboard.c
index 27c311d72e20f0a422078640be688a25390cb490,503859372816b1e0e731a943cbcde6781210fa42..7759549fa23cc7b13cdcdb77ac7823cd98f4ac8a
@@@ -42,7 -42,6 +42,7 @@@ along with GNU Emacs.  If not, see <htt
  #include "puresize.h"
  #include "systime.h"
  #include "atimer.h"
 +#include "process.h"
  #include <errno.h>
  
  #ifdef HAVE_GTK_AND_PTHREAD
@@@ -62,7 -61,9 +62,7 @@@
  #include <unistd.h>
  #endif
  
 -#ifdef HAVE_FCNTL_H
  #include <fcntl.h>
 -#endif
  
  /* This is to get the definitions of the XK_ symbols.  */
  #ifdef HAVE_X_WINDOWS
  #include "nsterm.h"
  #endif
  
 -#ifndef USE_CRT_DLL
 -extern int errno;
 -#endif
 -
  /* Variables for blockinput.h: */
  
  /* Non-zero if interrupt input is blocked right now.  */
@@@ -144,6 -149,10 +144,6 @@@ int this_single_command_key_start
  static int before_command_key_count;
  static int before_command_echo_length;
  
 -extern int minbuf_level;
 -
 -extern int message_enable_multibyte;
 -
  /* If non-nil, the function that implements the display of help.
     It's called with one argument, the help string to display.  */
  
@@@ -212,12 -221,6 +212,12 @@@ Lisp_Object Vprefix_help_command
  /* List of items that should move to the end of the menu bar.  */
  Lisp_Object Vmenu_bar_final_items;
  
 +/* Expression to evaluate for the tool bar separator image.
 +   This is used for build_desired_tool_bar_string only.  For GTK, we
 +   use GTK tool bar seperators.  */
 +
 +Lisp_Object Vtool_bar_separator_image_expression;
 +
  /* Non-nil means show the equivalent key-binding for
     any M-x command that has one.
     The value can be a length of time to show the message for.
@@@ -246,6 -249,9 +246,6 @@@ Lisp_Object Vminibuffer_message_timeout
     ASCII character.  */
  int quit_char;
  
 -extern Lisp_Object current_global_map;
 -extern int minibuf_level;
 -
  /* If non-nil, this is a map that overrides all other local maps.  */
  Lisp_Object Voverriding_local_map;
  
@@@ -304,7 -310,7 +304,7 @@@ EMACS_INT extra_keyboard_modifiers
  Lisp_Object meta_prefix_char;
  
  /* Last size recorded for a current buffer which is not a minibuffer.  */
 -static int last_non_minibuf_size;
 +static EMACS_INT last_non_minibuf_size;
  
  /* Number of idle seconds before an auto-save and garbage collection.  */
  static Lisp_Object Vauto_save_timeout;
@@@ -337,7 -343,7 +337,7 @@@ Lisp_Object real_this_command
  Lisp_Object Vthis_original_command;
  
  /* The value of point when the last command was started.  */
 -int last_point_position;
 +EMACS_INT last_point_position;
  
  /* The buffer that was current when the last command was started.  */
  Lisp_Object last_point_position_buffer;
@@@ -361,15 -367,6 +361,15 @@@ Lisp_Object Vlast_event_frame
     X Windows wants this for selection ownership.  */
  unsigned long last_event_timestamp;
  
 +/* If non-nil, active regions automatically become the window selection.  */
 +Lisp_Object Vselect_active_regions;
 +
 +/* The text in the active region prior to modifying the buffer.
 +   Used by the `select-active-regions' feature.  */
 +Lisp_Object Vsaved_region_selection;
 +
 +Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame;
 +
  Lisp_Object Qself_insert_command;
  Lisp_Object Qforward_char;
  Lisp_Object Qbackward_char;
@@@ -433,6 -430,8 +433,6 @@@ FILE *dribble
  /* Nonzero if input is available.  */
  int input_pending;
  
 -extern char *pending_malloc_warning;
 -
  /* Circular buffer for pre-read keyboard input.  */
  
  static struct input_event kbd_buffer[KBD_BUFFER_SIZE];
@@@ -472,6 -471,8 +472,6 @@@ Lisp_Object Qmake_frame_visible
  Lisp_Object Qselect_window;
  Lisp_Object Qhelp_echo;
  
 -extern Lisp_Object Qremap;
 -
  #if defined (HAVE_MOUSE) || defined (HAVE_GPM)
  Lisp_Object Qmouse_fixup_help_message;
  #endif
@@@ -495,10 -496,11 +495,10 @@@ Lisp_Object Qconfig_changed_event
  Lisp_Object Qevent_kind;
  Lisp_Object Qevent_symbol_elements;
  
 -/* menu item parts */
 +/* menu and tool bar item parts */
  Lisp_Object Qmenu_enable;
  Lisp_Object QCenable, QCvisible, QChelp, QCfilter, QCkeys, QCkey_sequence;
 -Lisp_Object QCbutton, QCtoggle, QCradio;
 -extern Lisp_Object Qmenu_item;
 +Lisp_Object QCbutton, QCtoggle, QCradio, QClabel, QCvert_only;
  
  /* An event header symbol HEAD may have a property named
     Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS);
@@@ -518,14 -520,21 +518,14 @@@ Lisp_Object Qmode_line
  Lisp_Object Qvertical_line;
  Lisp_Object Qvertical_scroll_bar;
  Lisp_Object Qmenu_bar;
 -extern Lisp_Object Qleft_margin, Qright_margin;
 -extern Lisp_Object Qleft_fringe, Qright_fringe;
 -extern Lisp_Object QCmap;
  
 -Lisp_Object recursive_edit_unwind (), command_loop ();
 -Lisp_Object Fthis_command_keys ();
 +Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void);
 +Lisp_Object Fthis_command_keys (void);
  Lisp_Object Qextended_command_history;
 -EMACS_TIME timer_check ();
 -
 -extern Lisp_Object Vhistory_length, Vtranslation_table_for_input;
 +EMACS_TIME timer_check (int do_it_now);
  
 -extern char *x_get_keysym_name ();
 -
 -static void record_menu_key ();
 -static int echo_length ();
 +static void record_menu_key (Lisp_Object c);
 +static int echo_length (void);
  
  Lisp_Object Qpolling_period;
  
@@@ -538,6 -547,8 +538,6 @@@ Lisp_Object Vtimer_idle_list
  /* Incremented whenever a timer is run.  */
  int timers_run;
  
 -extern Lisp_Object Vprint_level, Vprint_length;
 -
  /* Address (if not 0) of EMACS_TIME to zero out if a SIGIO interrupt
     happens.  */
  EMACS_TIME *input_available_clear_time;
@@@ -603,54 -614,71 +603,54 @@@ Lisp_Object Venable_disabled_menus_and_
  #define READABLE_EVENTS_IGNORE_SQUEEZABLES    (1 << 2)
  
  /* Function for init_keyboard to call with no args (if nonzero).  */
 -void (*keyboard_init_hook) ();
 -
 -static int read_avail_input P_ ((int));
 -static void get_input_pending P_ ((int *, int));
 -static int readable_events P_ ((int));
 -static Lisp_Object read_char_x_menu_prompt P_ ((int, Lisp_Object *,
 -                                              Lisp_Object, int *));
 -static Lisp_Object read_char_x_menu_prompt ();
 -static Lisp_Object read_char_minibuf_menu_prompt P_ ((int, int,
 -                                                    Lisp_Object *));
 -static Lisp_Object make_lispy_event P_ ((struct input_event *));
 +void (*keyboard_init_hook) (void);
 +
 +static int read_avail_input (int);
 +static void get_input_pending (int *, int);
 +static int readable_events (int);
 +static Lisp_Object read_char_x_menu_prompt (int, Lisp_Object *,
 +                                            Lisp_Object, int *);
 +static Lisp_Object read_char_minibuf_menu_prompt (int, int,
 +                                                  Lisp_Object *);
 +static Lisp_Object make_lispy_event (struct input_event *);
  #if defined (HAVE_MOUSE) || defined (HAVE_GPM)
 -static Lisp_Object make_lispy_movement P_ ((struct frame *, Lisp_Object,
 -                                          enum scroll_bar_part,
 -                                          Lisp_Object, Lisp_Object,
 -                                          unsigned long));
 -#endif
 -static Lisp_Object modify_event_symbol P_ ((int, unsigned, Lisp_Object,
 -                                          Lisp_Object, char **,
 -                                          Lisp_Object *, unsigned));
 -static Lisp_Object make_lispy_switch_frame P_ ((Lisp_Object));
 -static void save_getcjmp P_ ((jmp_buf));
 -static void save_getcjmp ();
 -static void restore_getcjmp P_ ((jmp_buf));
 -static Lisp_Object apply_modifiers P_ ((int, Lisp_Object));
 -static void clear_event P_ ((struct input_event *));
 -static Lisp_Object restore_kboard_configuration P_ ((Lisp_Object));
 -static SIGTYPE interrupt_signal P_ ((int signalnum));
 +static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object,
 +                                        enum scroll_bar_part,
 +                                        Lisp_Object, Lisp_Object,
 +                                        unsigned long);
 +#endif
 +static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object,
 +                                        Lisp_Object, const char *const *,
 +                                        Lisp_Object *, unsigned);
 +static Lisp_Object make_lispy_switch_frame (Lisp_Object);
 +static void save_getcjmp (jmp_buf);
 +static void restore_getcjmp (jmp_buf);
 +static Lisp_Object apply_modifiers (int, Lisp_Object);
 +static void clear_event (struct input_event *);
 +static Lisp_Object restore_kboard_configuration (Lisp_Object);
 +static SIGTYPE interrupt_signal (int signalnum);
  #ifdef SIGIO
  static SIGTYPE input_available_signal (int signo);
  #endif
 -static void handle_interrupt P_ ((void));
 -static void timer_start_idle P_ ((void));
 -static void timer_stop_idle P_ ((void));
 -static void timer_resume_idle P_ ((void));
 -static SIGTYPE handle_user_signal P_ ((int));
 -static char *find_user_signal_name P_ ((int));
 -static int store_user_signal_events P_ ((void));
 +static void handle_interrupt (void);
 +static void timer_start_idle (void);
 +static void timer_stop_idle (void);
 +static void timer_resume_idle (void);
 +static SIGTYPE handle_user_signal (int);
 +static char *find_user_signal_name (int);
 +static int store_user_signal_events (void);
  
  /* Nonzero means don't try to suspend even if the operating system seems
     to support it.  */
  static int cannot_suspend;
  
 -extern Lisp_Object Qidentity, Qonly;
  \f
 -/* Install the string STR as the beginning of the string of echoing,
 -   so that it serves as a prompt for the next character.
 -   Also start echoing.  */
 -
 -void
 -echo_prompt (str)
 -     Lisp_Object str;
 -{
 -  current_kboard->echo_string = str;
 -  current_kboard->echo_after_prompt = SCHARS (str);
 -  echo_now ();
 -}
 -
  /* Add C to the echo string, if echoing is going on.
     C can be a character, which is printed prettily ("M-C-x" and all that
     jazz), or a symbol, whose name is printed.  */
  
  void
 -echo_char (c)
 -     Lisp_Object c;
 +echo_char (Lisp_Object c)
  {
    if (current_kboard->immediate_echo)
      {
              ptr = buffer + offset;
            }
  
 -        bcopy (text, ptr, len);
 +        memcpy (ptr, text, len);
          ptr += len;
        }
  
     empty, so that it serves as a mini-prompt for the very next character.  */
  
  void
 -echo_dash ()
 +echo_dash (void)
  {
    /* Do nothing if not echoing at all.  */
    if (NILP (current_kboard->echo_string))
      return;
  
 +  if (this_command_key_count == 0)
 +    return;
 +
    if (!current_kboard->immediate_echo
        && SCHARS (current_kboard->echo_string) == 0)
      return;
     doing so.  */
  
  void
 -echo_now ()
 +echo_now (void)
  {
    if (!current_kboard->immediate_echo)
      {
  /* Turn off echoing, for the start of a new command.  */
  
  void
 -cancel_echoing ()
 +cancel_echoing (void)
  {
    current_kboard->immediate_echo = 0;
    current_kboard->echo_after_prompt = -1;
  /* Return the length of the current echo string.  */
  
  static int
 -echo_length ()
 +echo_length (void)
  {
    return (STRINGP (current_kboard->echo_string)
          ? SCHARS (current_kboard->echo_string)
     switches frames while entering a key sequence.  */
  
  static void
 -echo_truncate (nchars)
 -     int nchars;
 +echo_truncate (EMACS_INT nchars)
  {
    if (STRINGP (current_kboard->echo_string))
      current_kboard->echo_string
  \f
  /* Functions for manipulating this_command_keys.  */
  static void
 -add_command_key (key)
 -     Lisp_Object key;
 +add_command_key (Lisp_Object key)
  {
  #if 0 /* Not needed after we made Freset_this_command_lengths
         do the job immediately.  */
  
  \f
  Lisp_Object
 -recursive_edit_1 ()
 +recursive_edit_1 (void)
  {
    int count = SPECPDL_INDEX ();
    Lisp_Object val;
  /* When an auto-save happens, record the "time", and don't do again soon.  */
  
  void
 -record_auto_save ()
 +record_auto_save (void)
  {
    last_auto_save = num_nonmacro_input_events;
  }
  /* Make an auto save happen as soon as possible at command level.  */
  
  void
 -force_auto_save_soon ()
 +force_auto_save_soon (void)
  {
    last_auto_save = - auto_save_interval - 1;
  
@@@ -961,7 -988,7 +961,7 @@@ To get out of the recursive edit, a com
  that tells this function to return.
  Alternatively, `(throw 'exit t)' makes this function signal an error.
  This function is called by the editor initialization to begin editing.  */)
 -     ()
 +  (void)
  {
    int count = SPECPDL_INDEX ();
    Lisp_Object buffer;
  }
  
  Lisp_Object
 -recursive_edit_unwind (buffer)
 -     Lisp_Object buffer;
 +recursive_edit_unwind (Lisp_Object buffer)
  {
    if (BUFFERP (buffer))
      Fset_buffer (buffer);
@@@ -1038,7 -1066,8 +1038,7 @@@ single_kboard_state (
     get out of it.  */
  
  void
 -not_single_kboard_state (kboard)
 -     KBOARD *kboard;
 +not_single_kboard_state (KBOARD *kboard)
  {
    if (kboard == current_kboard)
      single_kboard = 0;
@@@ -1057,7 -1086,8 +1057,7 @@@ struct kboard_stac
  static struct kboard_stack *kboard_stack;
  
  void
 -push_kboard (k)
 -     struct kboard *k;
 +push_kboard (struct kboard *k)
  {
    struct kboard_stack *p
      = (struct kboard_stack *) xmalloc (sizeof (struct kboard_stack));
  }
  
  void
 -pop_kboard ()
 +pop_kboard (void)
  {
    struct terminal *t;
    struct kboard_stack *p = kboard_stack;
    locked, then this function will throw an errow.  */
  
  void
 -temporarily_switch_to_single_kboard (f)
 -     struct frame *f;
 +temporarily_switch_to_single_kboard (struct frame *f)
  {
    int was_locked = single_kboard;
    if (was_locked)
@@@ -1145,7 -1176,8 +1145,7 @@@ record_single_kboard_state (
  #endif
  
  static Lisp_Object
 -restore_kboard_configuration (was_locked)
 -     Lisp_Object was_locked;
 +restore_kboard_configuration (Lisp_Object was_locked)
  {
    if (NILP (was_locked))
      single_kboard = 0;
     by printing an error message and returning to the editor command loop.  */
  
  Lisp_Object
 -cmd_error (data)
 -     Lisp_Object data;
 +cmd_error (Lisp_Object data)
  {
    Lisp_Object old_level, old_length;
    char macroerror[50];
     string.  */
  
  void
 -cmd_error_internal (data, context)
 -     Lisp_Object data;
 -     char *context;
 +cmd_error_internal (Lisp_Object data, const char *context)
  {
    struct frame *sf = SELECTED_FRAME ();
  
    Vsignaling_function = Qnil;
  }
  \f
 -Lisp_Object command_loop_1 ();
 -Lisp_Object command_loop_2 ();
 -Lisp_Object top_level_1 ();
 +Lisp_Object command_loop_1 (void);
 +Lisp_Object command_loop_2 (Lisp_Object);
 +Lisp_Object top_level_1 (Lisp_Object);
  
  /* Entry to editor-command-loop.
     This level has the catches for exiting/returning to editor command loop.
     It returns nil to exit recursive edit, t to abort it.  */
  
  Lisp_Object
 -command_loop ()
 +command_loop (void)
  {
    if (command_loop_level > 0 || minibuf_level > 0)
      {
     returned due to end of file (or end of kbd macro).  */
  
  Lisp_Object
 -command_loop_2 ()
 +command_loop_2 (Lisp_Object ignore)
  {
    register Lisp_Object val;
  
  }
  
  Lisp_Object
 -top_level_2 ()
 +top_level_2 (void)
  {
    return Feval (Vtop_level);
  }
  
  Lisp_Object
 -top_level_1 ()
 +top_level_1 (Lisp_Object ignore)
  {
    /* On entry to the outer level, run the startup file */
    if (!NILP (Vtop_level))
  DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",
         doc: /* Exit all recursive editing levels.
  This also exits all active minibuffers.  */)
 -     ()
 +  (void)
  {
  #ifdef HAVE_WINDOW_SYSTEM
    if (display_hourglass_p)
    while (INPUT_BLOCKED_P)
      UNBLOCK_INPUT;
  
 -  return Fthrow (Qtop_level, Qnil);
 +  Fthrow (Qtop_level, Qnil);
  }
  
  DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
         doc: /* Exit from the innermost recursive edit or minibuffer.  */)
 -     ()
 +  (void)
  {
    if (command_loop_level > 0 || minibuf_level > 0)
      Fthrow (Qexit, Qnil);
  
    error ("No recursive edit is in progress");
 -  return Qnil;
  }
  
  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)
  {
    if (command_loop_level > 0 || minibuf_level > 0)
      Fthrow (Qexit, Qt);
  
    error ("No recursive edit is in progress");
 -  return Qnil;
  }
  \f
  #if defined (HAVE_MOUSE) || defined (HAVE_GPM)
     of this function.  */
  
  static Lisp_Object
 -tracking_off (old_value)
 -     Lisp_Object old_value;
 +tracking_off (Lisp_Object old_value)
  {
    do_mouse_tracking = old_value;
    if (NILP (old_value))
@@@ -1419,7 -1457,8 +1419,7 @@@ Within a `track-mouse' form, mouse moti
  you can read with `read-event'.
  Normally, mouse motion is ignored.
  usage: (track-mouse BODY...)  */)
 -     (args)
 -     Lisp_Object args;
 +  (Lisp_Object args)
  {
    int count = SPECPDL_INDEX ();
    Lisp_Object val;
  int ignore_mouse_drag_p;
  
  static FRAME_PTR
 -some_mouse_moved ()
 +some_mouse_moved (void)
  {
    Lisp_Object tail, frame;
  
  /* This is the actual command reading loop,
     sans error-handling encapsulation.  */
  
 -static int read_key_sequence P_ ((Lisp_Object *, int, Lisp_Object,
 -                                int, int, int));
 -void safe_run_hooks P_ ((Lisp_Object));
 -static void adjust_point_for_property P_ ((int, int));
 +static int read_key_sequence (Lisp_Object *, int, Lisp_Object,
 +                              int, int, int);
 +void safe_run_hooks (Lisp_Object);
 +static void adjust_point_for_property (EMACS_INT, int);
  
  /* Cancel hourglass from protect_unwind.
     ARG is not used.  */
  #ifdef HAVE_WINDOW_SYSTEM
  static Lisp_Object
 -cancel_hourglass_unwind (arg)
 -     Lisp_Object arg;
 +cancel_hourglass_unwind (Lisp_Object arg)
  {
    cancel_hourglass ();
    return Qnil;
  }
  #endif
  
 -extern int nonundocount;      /* Declared in cmds.c.  */
 +/* 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, ...  */
 +EXFUN (Fwindow_system, 1);
  
  Lisp_Object
 -command_loop_1 ()
 +command_loop_1 (void)
  {
    Lisp_Object cmd;
 -  int lose;
    Lisp_Object keybuf[30];
    int i;
    int prev_modiff = 0;
        }
        else
        {
 -        if (NILP (current_kboard->Vprefix_arg))
 -          {
 -            /* In case we jump to directly_done.  */
 -            Vcurrent_prefix_arg = current_kboard->Vprefix_arg;
 -
 -            /* Recognize some common commands in common situations and
 -               do them directly.  */
 -            if (EQ (Vthis_command, Qforward_char) && PT < ZV
 -                && NILP (Vthis_command_keys_shift_translated)
 -                && !CONSP (Vtransient_mark_mode))
 -              {
 -                  struct Lisp_Char_Table *dp
 -                  = window_display_table (XWINDOW (selected_window));
 -                lose = FETCH_CHAR (PT_BYTE);
 -                SET_PT (PT + 1);
 -                if (! NILP (Vpost_command_hook))
 -                  /* Put this before calling adjust_point_for_property
 -                     so it will only get called once in any case.  */
 -                  goto directly_done;
 -                if (current_buffer == prev_buffer
 -                    && last_point_position != PT
 -                    && NILP (Vdisable_point_adjustment)
 -                    && NILP (Vglobal_disable_point_adjustment))
 -                  adjust_point_for_property (last_point_position, 0);
 -                already_adjusted = 1;
 -                if (PT == last_point_position + 1
 -                    && (dp
 -                        ? (VECTORP (DISP_CHAR_VECTOR (dp, lose))
 -                           ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1
 -                           : (NILP (DISP_CHAR_VECTOR (dp, lose))
 -                              && (lose >= 0x20 && lose < 0x7f)))
 -                        : (lose >= 0x20 && lose < 0x7f))
 -                    /* To extract the case of continuation on
 -                         wide-column characters.  */
 -                    && ASCII_BYTE_P (lose)
 -                    && (XFASTINT (XWINDOW (selected_window)->last_modified)
 -                        >= MODIFF)
 -                    && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
 -                        >= OVERLAY_MODIFF)
 -                    && (XFASTINT (XWINDOW (selected_window)->last_point)
 -                        == PT - 1)
 -                    && !windows_or_buffers_changed
 -                    && EQ (current_buffer->selective_display, Qnil)
 -                    && !detect_input_pending ()
 -                    && NILP (XWINDOW (selected_window)->column_number_displayed)
 -                    && NILP (Vexecuting_kbd_macro))
 -                  direct_output_forward_char (1);
 -                goto directly_done;
 -              }
 -            else if (EQ (Vthis_command, Qbackward_char) && PT > BEGV
 -                     && NILP (Vthis_command_keys_shift_translated)
 -                     && !CONSP (Vtransient_mark_mode))
 -              {
 -                  struct Lisp_Char_Table *dp
 -                  = window_display_table (XWINDOW (selected_window));
 -                SET_PT (PT - 1);
 -                lose = FETCH_CHAR (PT_BYTE);
 -                if (! NILP (Vpost_command_hook))
 -                  goto directly_done;
 -                if (current_buffer == prev_buffer
 -                    && last_point_position != PT
 -                    && NILP (Vdisable_point_adjustment)
 -                    && NILP (Vglobal_disable_point_adjustment))
 -                  adjust_point_for_property (last_point_position, 0);
 -                already_adjusted = 1;
 -                if (PT == last_point_position - 1
 -                    && (dp
 -                        ? (VECTORP (DISP_CHAR_VECTOR (dp, lose))
 -                           ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1
 -                           : (NILP (DISP_CHAR_VECTOR (dp, lose))
 -                              && (lose >= 0x20 && lose < 0x7f)))
 -                        : (lose >= 0x20 && lose < 0x7f))
 -                    && (XFASTINT (XWINDOW (selected_window)->last_modified)
 -                        >= MODIFF)
 -                    && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
 -                        >= OVERLAY_MODIFF)
 -                    && (XFASTINT (XWINDOW (selected_window)->last_point)
 -                        == PT + 1)
 -                    && !windows_or_buffers_changed
 -                    && EQ (current_buffer->selective_display, Qnil)
 -                    && !detect_input_pending ()
 -                    && NILP (XWINDOW (selected_window)->column_number_displayed)
 -                    && NILP (Vexecuting_kbd_macro))
 -                  direct_output_forward_char (-1);
 -                goto directly_done;
 -              }
 -            else if (EQ (Vthis_command, Qself_insert_command)
 -                     /* Try this optimization only on char keystrokes.  */
 -                     && NATNUMP (last_command_event)
 -                     && CHAR_VALID_P (XFASTINT (last_command_event), 0))
 -              {
 -                unsigned int c
 -                  = translate_char (Vtranslation_table_for_input,
 -                                    XFASTINT (last_command_event));
 -                int value;
 -                if (NILP (Vexecuting_kbd_macro)
 -                    && !EQ (minibuf_window, selected_window))
 -                  {
 -                    if (!nonundocount || nonundocount >= 20)
 -                      {
 -                        Fundo_boundary ();
 -                        nonundocount = 0;
 -                      }
 -                    nonundocount++;
 -                  }
 -
 -                lose = ((XFASTINT (XWINDOW (selected_window)->last_modified)
 -                         < MODIFF)
 -                        || (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
 -                            < OVERLAY_MODIFF)
 -                        || (XFASTINT (XWINDOW (selected_window)->last_point)
 -                            != PT)
 -                        || MODIFF <= SAVE_MODIFF
 -                        || windows_or_buffers_changed
 -                        || !EQ (current_buffer->selective_display, Qnil)
 -                        || detect_input_pending ()
 -                        || !NILP (XWINDOW (selected_window)->column_number_displayed)
 -                        || !NILP (Vexecuting_kbd_macro));
 -
 -                value = internal_self_insert (c, 0);
 -
 -                if (value == 2)
 -                  nonundocount = 0;
 -
 -                  frame_make_pointer_invisible ();
 -
 -                if (! NILP (Vpost_command_hook))
 -                  /* Put this before calling adjust_point_for_property
 -                     so it will only get called once in any case.  */
 -                  goto directly_done;
 -
 -                /* VALUE == 1 when AFTER-CHANGE functions are
 -                   installed which is the case most of the time
 -                   because FONT-LOCK installs one.  */
 -                if (!lose && !value)
 -                  direct_output_for_insert (c);
 -                goto directly_done;
 -              }
 -          }
 -
          /* Here for a command that isn't executed directly */
  
 -          {
  #ifdef HAVE_WINDOW_SYSTEM
              int scount = SPECPDL_INDEX ();
  
                }
  #endif
  
 -            nonundocount = 0;
              if (NILP (current_kboard->Vprefix_arg)) /* FIXME: Why?  --Stef  */
                Fundo_boundary ();
              Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
              unbind_to (scount, Qnil);
  #endif
            }
 -      }
 -    directly_done: ;
        current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg;
  
        /* Note that the value cell will never directly contain nil
          this_single_command_key_start = 0;
        }
  
 -      if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
 +      if (!NILP (current_buffer->mark_active)
 +        && !NILP (Vrun_hooks))
        {
          /* In Emacs 22, setting transient-mark-mode to `only' was a
             way of turning it on for just one command.  This usage is
            Vtransient_mark_mode = Qidentity;
  
          if (!NILP (Vdeactivate_mark))
 +          /* If `select-active-regions' is non-nil, this call to
 +             `deactivate-mark' also sets the PRIMARY selection.  */
            call0 (Qdeactivate_mark);
 -        else if (current_buffer != prev_buffer || MODIFF != prev_modiff)
 -          call1 (Vrun_hooks, intern ("activate-mark-hook"));
 +        else
 +          {
 +            /* Even if not deactivating the mark, set PRIMARY if
 +               `select-active-regions' is non-nil.  */
 +            if (!NILP (Fwindow_system (Qnil))
 +                /* Even if mark_active is non-nil, the actual buffer
 +                   marker may not have been set yet (Bug#7044).  */
 +                && XMARKER (current_buffer->mark)->buffer
 +                && (EQ (Vselect_active_regions, Qonly)
 +                    ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
 +                    : (!NILP (Vselect_active_regions)
 +                       && !NILP (Vtransient_mark_mode)))
 +                && !EQ (Vthis_command, Qhandle_switch_frame))
 +              {
 +                EMACS_INT beg =
 +                  XINT (Fmarker_position (current_buffer->mark));
 +                EMACS_INT end = PT;
 +                if (beg < end)
 +                  call2 (Qx_set_selection, QPRIMARY,
 +                         make_buffer_string (beg, end, 0));
 +                else if (beg > end)
 +                  call2 (Qx_set_selection, QPRIMARY,
 +                         make_buffer_string (end, beg, 0));
 +                /* Don't set empty selections.  */
 +              }
 +
 +            if (current_buffer != prev_buffer || MODIFF != prev_modiff)
 +              call1 (Vrun_hooks, intern ("activate-mark-hook"));
 +          }
 +
 +        Vsaved_region_selection = Qnil;
        }
  
      finalize:
      }
  }
  
 -extern Lisp_Object Qcomposition, Qdisplay;
 -
  /* Adjust point to a boundary of a region that has such a property
     that should be treated intangible.  For the moment, we check
     `composition', `display' and `invisible' properties.
     LAST_PT is the last position of point.  */
  
 -extern Lisp_Object Qafter_string, Qbefore_string;
 -extern Lisp_Object get_pos_property P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
 -
  static void
 -adjust_point_for_property (last_pt, modified)
 -     int last_pt;
 -     int modified;
 +adjust_point_for_property (EMACS_INT last_pt, int modified)
  {
    EMACS_INT beg, end;
    Lisp_Object val, overlay, tmp;
       user can keep inserting another character at point or keep
       deleting characters around point.  */
    int check_composition = ! modified, check_display = 1, check_invisible = 1;
 -  int orig_pt = PT;
 +  EMACS_INT orig_pt = PT;
  
    /* FIXME: cycling is probably not necessary because these properties
       can't be usefully combined anyway.  */
  /* Subroutine for safe_run_hooks: run the hook HOOK.  */
  
  static Lisp_Object
 -safe_run_hooks_1 (hook)
 -     Lisp_Object hook;
 +safe_run_hooks_1 (void)
  {
    if (NILP (Vrun_hooks))
      return Qnil;
  /* Subroutine for safe_run_hooks: handle an error by clearing out the hook.  */
  
  static Lisp_Object
 -safe_run_hooks_error (data)
 -     Lisp_Object data;
 +safe_run_hooks_error (Lisp_Object data)
  {
    Lisp_Object args[3];
    args[0] = build_string ("Error in %s: %s");
     to mysteriously evaporate.  */
  
  void
 -safe_run_hooks (hook)
 -     Lisp_Object hook;
 +safe_run_hooks (Lisp_Object hook)
  {
    int count = SPECPDL_INDEX ();
    specbind (Qinhibit_quit, hook);
@@@ -2070,7 -2230,7 +2070,7 @@@ struct atimer *poll_timer
     there.  */
  
  void
 -poll_for_input_1 ()
 +poll_for_input_1 (void)
  {
  /* Tell ns_read_socket() it is being called asynchronously so it can avoid
     doing anything dangerous. */
     poll_timer.  */
  
  void
 -poll_for_input (timer)
 -     struct atimer *timer;
 +poll_for_input (struct atimer *timer)
  {
    if (poll_suppress_count == 0)
      {
     This function is called unconditionally from various places.  */
  
  void
 -start_polling ()
 +start_polling (void)
  {
  #ifdef POLL_FOR_INPUT
    /* XXX This condition was (read_socket_hook && !interrupt_input),
  /* Nonzero if we are using polling to handle input asynchronously.  */
  
  int
 -input_polling_used ()
 +input_polling_used (void)
  {
  #ifdef POLL_FOR_INPUT
    /* XXX This condition was (read_socket_hook && !interrupt_input),
  /* Turn off polling.  */
  
  void
 -stop_polling ()
 +stop_polling (void)
  {
  #ifdef POLL_FOR_INPUT
    /* XXX This condition was (read_socket_hook && !interrupt_input),
     and start or stop polling accordingly.  */
  
  void
 -set_poll_suppress_count (count)
 -     int count;
 +set_poll_suppress_count (int count)
  {
  #ifdef POLL_FOR_INPUT
    if (count == 0 && poll_suppress_count != 0)
     But don't decrease it.  */
  
  void
 -bind_polling_period (n)
 -     int n;
 +bind_polling_period (int n)
  {
  #ifdef POLL_FOR_INPUT
    int new = polling_period;
  /* Apply the control modifier to CHARACTER.  */
  
  int
 -make_ctrl_char (c)
 -     int c;
 +make_ctrl_char (int c)
  {
    /* Save the upper bits here.  */
    int upper = c & ~0177;
     from X code running asynchronously.  */
  
  void
 -show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo)
 -     Lisp_Object help, window, object, pos;
 -     int ok_to_overwrite_keystroke_echo;
 +show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
 +              Lisp_Object pos, int ok_to_overwrite_keystroke_echo)
  {
    if (!NILP (help) && !STRINGP (help))
      {
  \f
  /* Input of single characters from keyboard */
  
 -Lisp_Object print_help ();
 -static Lisp_Object kbd_buffer_get_event ();
 -static void record_char ();
 +Lisp_Object print_help (Lisp_Object object);
 +static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu,
 +                                       struct timeval *end_time);
 +static void record_char (Lisp_Object c);
  
  static Lisp_Object help_form_saved_window_configs;
  static Lisp_Object
@@@ -2383,8 -2547,13 +2383,8 @@@ do { if (polling_stopped_here) start_po
     Value is t if we showed a menu and the user rejected it.  */
  
  Lisp_Object
 -read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
 -     int commandflag;
 -     int nmaps;
 -     Lisp_Object *maps;
 -     Lisp_Object prev_event;
 -     int *used_mouse_menu;
 -     EMACS_TIME *end_time;
 +read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event,
 +         int *used_mouse_menu, struct timeval *end_time)
  {
    volatile Lisp_Object c;
    int count, jmpcount;
  
    if (INTERACTIVE && NILP (c))
      {
 -      int delay_level, buffer_size;
 +      int delay_level;
 +      EMACS_INT buffer_size;
  
        /* Slow down auto saves logarithmically in size of current buffer,
         and garbage collect while we're at it.  */
     Record it for echoing, for this-command-keys, and so on.  */
  
  static void
 -record_menu_key (c)
 -     Lisp_Object c;
 +record_menu_key (Lisp_Object c)
  {
    /* Wipe the echo area.  */
    clear_message (1, 0);
  /* Return 1 if should recognize C as "the help character".  */
  
  int
 -help_char_p (c)
 -     Lisp_Object c;
 +help_char_p (Lisp_Object c)
  {
    Lisp_Object tail;
  
  /* Record the input event C in various ways.  */
  
  static void
 -record_char (c)
 -     Lisp_Object c;
 +record_char (Lisp_Object c)
  {
    int recorded = 0;
  
  }
  
  Lisp_Object
 -print_help (object)
 -     Lisp_Object object;
 +print_help (Lisp_Object object)
  {
    struct buffer *old = current_buffer;
    Fprinc (object, Qnil);
     See read_process_output.  */
  
  static void
 -save_getcjmp (temp)
 -     jmp_buf temp;
 +save_getcjmp (jmp_buf temp)
  {
 -  bcopy (getcjmp, temp, sizeof getcjmp);
 +  memcpy (temp, getcjmp, sizeof getcjmp);
  }
  
  static void
 -restore_getcjmp (temp)
 -     jmp_buf temp;
 +restore_getcjmp (jmp_buf temp)
  {
 -  bcopy (temp, getcjmp, sizeof getcjmp);
 +  memcpy (getcjmp, temp, sizeof getcjmp);
  }
  \f
  /* Low level keyboard/mouse input.
  /* Return true if there are any events in the queue that read-char
     would return.  If this returns false, a read-char would block.  */
  static int
 -readable_events (flags)
 -     int flags;
 +readable_events (int flags)
  {
 -#ifdef HAVE_DBUS
 -  /* Check whether a D-Bus message has arrived.  */
 -  if (xd_pending_messages () > 0)
 -    return 1;
 -#endif /* HAVE_DBUS */
 -
    if (flags & READABLE_EVENTS_DO_TIMERS_NOW)
      timer_check (1);
  
  int stop_character;
  
  static KBOARD *
 -event_to_kboard (event)
 -     struct input_event *event;
 +event_to_kboard (struct input_event *event)
  {
    Lisp_Object frame;
    frame = event->frame_or_window;
@@@ -3621,7 -3803,8 +3621,7 @@@ Lisp_Object Vthrow_on_input
  /* Store an event obtained at interrupt level into kbd_buffer, fifo */
  
  void
 -kbd_buffer_store_event (event)
 -     register struct input_event *event;
 +kbd_buffer_store_event (register struct input_event *event)
  {
    kbd_buffer_store_event_hold (event, 0);
  }
   */
  
  void
 -kbd_buffer_store_event_hold (event, hold_quit)
 -     register struct input_event *event;
 -     struct input_event *hold_quit;
 +kbd_buffer_store_event_hold (register struct input_event *event,
 +                           struct input_event *hold_quit)
  {
    if (event->kind == NO_EVENT)
      abort ();
  
          if (hold_quit)
            {
 -            bcopy (event, (char *) hold_quit, sizeof (*event));
 +            memcpy (hold_quit, event, sizeof (*event));
              return;
            }
  
  /* Put an input event back in the head of the event queue.  */
  
  void
 -kbd_buffer_unget_event (event)
 -     register struct input_event *event;
 +kbd_buffer_unget_event (register struct input_event *event)
  {
    if (kbd_fetch_ptr == kbd_buffer)
      kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE;
  }
  
  
 -/* Generate HELP_EVENT input_events in BUFP which has room for
 -   SIZE events.  If there's not enough room in BUFP, ignore this
 -   event.
 +/* Generate a HELP_EVENT input_event and store it in the keyboard
 +   buffer.
  
     HELP is the help form.
  
 -   FRAME is the frame on which the help is generated.  OBJECT is the
 -   Lisp object where the help was found (a buffer, a string, an
 -   overlay, or nil if neither from a string nor from a buffer.  POS is
 -   the position within OBJECT where the help was found.
 -
 -   Value is the number of input_events generated.  */
 +   FRAME and WINDOW are the frame and window where the help is
 +   generated.  OBJECT is the Lisp object where the help was found (a
 +   buffer, a string, an overlay, or nil if neither from a string nor
 +   from a buffer).  POS is the position within OBJECT where the help
 +   was found.  */
  
  void
 -gen_help_event (help, frame, window, object, pos)
 -     Lisp_Object help, frame, object, window;
 -     int pos;
 +gen_help_event (Lisp_Object help, Lisp_Object frame, Lisp_Object window,
 +              Lisp_Object object, EMACS_INT pos)
  {
    struct input_event event;
  
  /* Store HELP_EVENTs for HELP on FRAME in the input queue.  */
  
  void
 -kbd_buffer_store_help_event (frame, help)
 -     Lisp_Object frame, help;
 +kbd_buffer_store_help_event (Lisp_Object frame, Lisp_Object help)
  {
    struct input_event event;
  
  /* Discard any mouse events in the event buffer by setting them to
     NO_EVENT.  */
  void
 -discard_mouse_events ()
 +discard_mouse_events (void)
  {
    struct input_event *sp;
    for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
     are no real input events.  */
  
  int
 -kbd_buffer_events_waiting (discard)
 -     int discard;
 +kbd_buffer_events_waiting (int discard)
  {
    struct input_event *sp;
  
  /* Clear input event EVENT.  */
  
  static INLINE void
 -clear_event (event)
 -     struct input_event *event;
 +clear_event (struct input_event *event)
  {
    event->kind = NO_EVENT;
  }
     We always read and discard one event.  */
  
  static Lisp_Object
 -kbd_buffer_get_event (kbp, used_mouse_menu, end_time)
 -     KBOARD **kbp;
 -     int *used_mouse_menu;
 -     EMACS_TIME *end_time;
 +kbd_buffer_get_event (KBOARD **kbp,
 +                      int *used_mouse_menu,
 +                      struct timeval *end_time)
  {
    register int c;
    Lisp_Object obj;
        /* One way or another, wait until input is available; then, if
         interrupt handlers have not read it, read it now.  */
  
 -#ifdef HAVE_DBUS
 -      /* Read D-Bus messages.  */
 -      xd_read_queued_messages ();
 -#endif /* HAVE_DBUS */
 -
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  #ifdef SIGIO
        gobble_input (0);
     then return, without reading any user-visible events.  */
  
  void
 -swallow_events (do_display)
 -     int do_display;
 +swallow_events (int do_display)
  {
    int old_timers_run;
  
     for the sake of running idle-time timers.  */
  
  static void
 -timer_start_idle ()
 +timer_start_idle (void)
  {
    Lisp_Object timers;
  
  /* Record that Emacs is no longer idle, so stop running idle-time timers.  */
  
  static void
 -timer_stop_idle ()
 +timer_stop_idle (void)
  {
    EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
  }
  /* Resume idle timer from last idle start time.  */
  
  static void
 -timer_resume_idle ()
 +timer_resume_idle (void)
  {
    if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
      return;
@@@ -4387,6 -4585,8 +4387,6 @@@ struct input_event last_timer_event
     ...).  Each element has the form (FUN . ARGS).  */
  Lisp_Object pending_funcalls;
  
 -extern Lisp_Object Qapply;
 -
  /* Check whether a timer has fired.  To prevent larger problems we simply
     disregard elements that are not proper timers.  Do not make a circular
     timer list for the time being.
     should be done.  */
  
  static EMACS_TIME
 -timer_check_2 ()
 +timer_check_2 (void)
  {
    EMACS_TIME nexttime;
    EMACS_TIME now, idleness_now;
     Now we always run timers directly.  */
  
  EMACS_TIME
 -timer_check (do_it_now)
 -     int do_it_now;
 +timer_check (int do_it_now)
  {
    EMACS_TIME nexttime;
  
@@@ -4624,7 -4825,7 +4624,7 @@@ The value when Emacs is not idle is nil
  
  The microsecond count is zero on systems that do not provide
  resolution finer than a second.  */)
 -  ()
 +  (void)
  {
    if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
      {
@@@ -4758,7 -4959,7 +4758,7 @@@ static const int lispy_accent_codes[] 
  /* This is a list of Lisp names for special "accent" characters.
     It parallels lispy_accent_codes.  */
  
 -static char *lispy_accent_keys[] =
 +static const char *const lispy_accent_keys[] =
  {
    "dead-circumflex",
    "dead-grave",
  #ifdef HAVE_NTGUI
  #define FUNCTION_KEY_OFFSET 0x0
  
 -char *lispy_function_keys[] =
 +const char *const lispy_function_keys[] =
    {
      0,                /* 0                      */
  
      0,               /* VK_OEM_102        0xE2 */
      "ico-help",      /* VK_ICO_HELP       0xE3 */
      "ico-00",        /* VK_ICO_00         0xE4 */
 -    0,               /* VK_PROCESSKEY     0xE5 */
 +    0,               /* VK_PROCESSKEY     0xE5 - used by IME */
      "ico-clear",     /* VK_ICO_CLEAR      0xE6 */
 -    "packet",        /* VK_PACKET         0xE7 */
 +    0,               /* VK_PACKET         0xE7  - used to pass unicode chars */
      0,               /*                   0xE8 */
      "reset",         /* VK_OEM_RESET      0xE9 */
      "jump",          /* VK_OEM_JUMP       0xEA */
  
  /* Some of these duplicate the "Media keys" on newer keyboards,
     but they are delivered to the application in a different way.  */
 -static char *lispy_multimedia_keys[] =
 +static const char *const lispy_multimedia_keys[] =
    {
      0,
      "browser-back",
     the XK_kana_A case below.  */
  #if 0
  #ifdef XK_kana_A
 -static char *lispy_kana_keys[] =
 +static const char *const lispy_kana_keys[] =
    {
      /* X Keysym value */
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  /* 0x400 .. 0x40f */
  
  /* You'll notice that this table is arranged to be conveniently
     indexed by X Windows keysym values.  */
 -static char *lispy_function_keys[] =
 +static const char *const lispy_function_keys[] =
    {
      /* X Keysym value */
  
  /* ISO 9995 Function and Modifier Keys; the first byte is 0xFE.  */
  #define ISO_FUNCTION_KEY_OFFSET 0xfe00
  
 -static char *iso_lispy_function_keys[] =
 +static const char *const iso_lispy_function_keys[] =
    {
      0, 0, 0, 0, 0, 0, 0, 0,   /* 0xfe00 */
      0, 0, 0, 0, 0, 0, 0, 0,   /* 0xfe08 */
  
  Lisp_Object Vlispy_mouse_stem;
  
 -static char *lispy_wheel_names[] =
 +static const char *const lispy_wheel_names[] =
  {
    "wheel-up", "wheel-down", "wheel-left", "wheel-right"
  };
  
  /* drag-n-drop events are generated when a set of selected files are
     dragged from another application and dropped onto an Emacs window.  */
 -static char *lispy_drag_n_drop_names[] =
 +static const char *const lispy_drag_n_drop_names[] =
  {
    "drag-n-drop"
  };
@@@ -5209,7 -5410,7 +5209,7 @@@ Lisp_Object Qup, Qdown, Qbottom, Qend_s
  Lisp_Object Qtop, Qratio;
  
  /* An array of scroll bar parts, indexed by an enum scroll_bar_part value.  */
 -Lisp_Object *scroll_bar_parts[] = {
 +static Lisp_Object *const scroll_bar_parts[] = {
    &Qabove_handle, &Qhandle, &Qbelow_handle,
    &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio
  };
@@@ -5249,137 -5450,128 +5249,137 @@@ EMACS_INT double_click_fuzz
  
  int double_click_count;
  
 -/* Return position of a mouse click or wheel event */
 +/* X and Y are frame-relative coordinates for a click or wheel event.
 +   Return a Lisp-style event list.  */
  
  static Lisp_Object
 -make_lispy_position (f, x, y, time)
 -     struct frame *f;
 -     Lisp_Object *x, *y;
 -     unsigned long time;
 +make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
 +                   unsigned long time)
  {
 -  Lisp_Object window;
    enum window_part part;
    Lisp_Object posn = Qnil;
    Lisp_Object extra_info = Qnil;
 -  int wx, wy;
 -
 -  /* Set `window' to the window under frame pixel coordinates (x,y)  */
 -  if (f)
 -    window = window_from_coordinates (f, XINT (*x), XINT (*y),
 -                                    &part, &wx, &wy, 0);
 -  else
 -    window = Qnil;
 +  /* Coordinate pixel positions to return.  */
 +  int xret = 0, yret = 0;
 +  /* The window under frame pixel coordinates (x,y)  */
 +  Lisp_Object window = f
 +    ? window_from_coordinates (f, XINT (x), XINT (y), &part, 0)
 +    : Qnil;
  
    if (WINDOWP (window))
      {
        /* It's a click in window window at frame coordinates (x,y)  */
        struct window *w = XWINDOW (window);
        Lisp_Object string_info = Qnil;
 -      int textpos = -1, rx = -1, ry = -1;
 -      int dx = -1, dy = -1;
 +      EMACS_INT textpos = -1;
 +      int col = -1, row = -1;
 +      int dx  = -1, dy  = -1;
        int width = -1, height = -1;
        Lisp_Object object = Qnil;
  
 -      /* Set event coordinates to window-relative coordinates
 -       for constructing the Lisp event below.  */
 -      XSETINT (*x, wx);
 -      XSETINT (*y, wy);
 +      /* Pixel coordinates relative to the window corner.  */
 +      int wx = XINT (x) - WINDOW_LEFT_EDGE_X (w);
 +      int wy = XINT (y) - WINDOW_TOP_EDGE_Y (w);
  
 +      /* For text area clicks, return X, Y relative to the corner of
 +       this text area.  Note that dX, dY etc are set below, by
 +       buffer_posn_from_coords.  */
        if (part == ON_TEXT)
        {
 -        wx += WINDOW_LEFT_MARGIN_WIDTH (w);
 +        xret = XINT (x) - window_box_left (w, TEXT_AREA);
 +        yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
        }
 +      /* For mode line and header line clicks, return X, Y relative to
 +       the left window edge.  Use mode_line_string to look for a
 +       string on the click position.  */
        else if (part == ON_MODE_LINE || part == ON_HEADER_LINE)
        {
 -        /* Mode line or header line.  Look for a string under
 -           the mouse that may have a `local-map' property.  */
          Lisp_Object string;
 -        int charpos;
 -
 -        posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line;
 -        rx = wx, ry = wy;
 -        string = mode_line_string (w, part, &rx, &ry, &charpos,
 +        EMACS_INT charpos;
 +
 +        posn = (part == ON_MODE_LINE) ? Qmode_line : Qheader_line;
 +        /* Note that mode_line_string takes COL, ROW as pixels and
 +           converts them to characters.  */
 +        col = wx;
 +        row = wy;
 +        string = mode_line_string (w, part, &col, &row, &charpos,
                                     &object, &dx, &dy, &width, &height);
          if (STRINGP (string))
            string_info = Fcons (string, make_number (charpos));
 -        if (w == XWINDOW (selected_window)
 -            && current_buffer == XBUFFER (w->buffer))
 -          textpos = PT;
 -        else
 -          textpos = XMARKER (w->pointm)->charpos;
 -      }
 -      else if (part == ON_VERTICAL_BORDER)
 -      {
 -        posn = Qvertical_line;
 -        wx = -1;
 -        dx = 0;
 -        width = 1;
 +        textpos = (w == XWINDOW (selected_window)
 +                   && current_buffer == XBUFFER (w->buffer))
 +          ? PT : XMARKER (w->pointm)->charpos;
 +
 +        xret = wx;
 +        yret = wy;
        }
 +      /* For fringes and margins, Y is relative to the area's (and the
 +       window's) top edge, while X is meaningless.  */
        else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
        {
          Lisp_Object string;
 -        int charpos;
 +        EMACS_INT charpos;
  
          posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin;
 -        rx = wx, ry = wy;
 -        string = marginal_area_string (w, part, &rx, &ry, &charpos,
 +        col = wx;
 +        row = wy;
 +        string = marginal_area_string (w, part, &col, &row, &charpos,
                                         &object, &dx, &dy, &width, &height);
          if (STRINGP (string))
            string_info = Fcons (string, make_number (charpos));
 -        if (part == ON_LEFT_MARGIN)
 -          wx = 0;
 -        else
 -          wx = window_box_right_offset (w, TEXT_AREA) - 1;
 +        yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
        }
        else if (part == ON_LEFT_FRINGE)
        {
          posn = Qleft_fringe;
 -        rx = 0;
 -        dx = wx;
 -        wx = (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
 -              ? 0
 -              : window_box_width (w, LEFT_MARGIN_AREA));
 -        dx -= wx;
 +        col = 0;
 +        dx = wx
 +          - (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
 +             ? 0 : window_box_width (w, LEFT_MARGIN_AREA));
 +        dy = yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
        }
        else if (part == ON_RIGHT_FRINGE)
        {
          posn = Qright_fringe;
 -        rx = 0;
 -        dx = wx;
 -        wx = (window_box_width (w, LEFT_MARGIN_AREA)
 -              + window_box_width (w, TEXT_AREA)
 -              + (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
 -                 ? window_box_width (w, RIGHT_MARGIN_AREA)
 -                 : 0));
 -        dx -= wx;
 +        col = 0;
 +        dx = wx
 +          - window_box_width (w, LEFT_MARGIN_AREA)
 +          - window_box_width (w, TEXT_AREA)
 +          - (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
 +             ? window_box_width (w, RIGHT_MARGIN_AREA)
 +             : 0);
 +        dy = yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
        }
 -      else
 +      else if (part == ON_VERTICAL_BORDER)
        {
 -        /* Note: We have no special posn for part == ON_SCROLL_BAR.  */
 -        wx = max (WINDOW_LEFT_MARGIN_WIDTH (w), wx);
 +        posn = Qvertical_line;
 +        width = 1;
 +        dx = 0;
 +        dy = yret = wy;
        }
 +      /* Nothing special for part == ON_SCROLL_BAR.  */
  
 +      /* 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)
        {
          Lisp_Object string2, object2 = Qnil;
          struct display_pos p;
          int dx2, dy2;
          int width2, height2;
 -        string2 = buffer_posn_from_coords (w, &wx, &wy, &p,
 +        /* The pixel X coordinate passed to buffer_posn_from_coords
 +           is the X coordinate relative to the text area for
 +           text-area clicks, zero otherwise.  */
 +        int x2 = (part == ON_TEXT) ? xret : 0;
 +        int y2 = wy;
 +
 +        string2 = buffer_posn_from_coords (w, &x2, &y2, &p,
                                             &object2, &dx2, &dy2,
                                             &width2, &height2);
          textpos = CHARPOS (p.pos);
 -        if (rx < 0) rx = wx;
 -        if (ry < 0) ry = wy;
 +        if (col < 0) col = x2;
 +        if (row < 0) row = y2;
          if (dx < 0) dx = dx2;
          if (dy < 0) dy = dy2;
          if (width < 0) width = width2;
  #endif
  
        /* Object info */
 -      extra_info = Fcons (object,
 -                        Fcons (Fcons (make_number (dx),
 -                                      make_number (dy)),
 -                               Fcons (Fcons (make_number (width),
 -                                             make_number (height)),
 -                                      Qnil)));
 +      extra_info
 +      = list3 (object,
 +               Fcons (make_number (dx), make_number (dy)),
 +               Fcons (make_number (width), make_number (height)));
  
        /* String info */
        extra_info = Fcons (string_info,
                          Fcons (make_number (textpos),
 -                               Fcons (Fcons (make_number (rx),
 -                                             make_number (ry)),
 +                               Fcons (Fcons (make_number (col),
 +                                             make_number (row)),
                                        extra_info)));
      }
    else if (f != 0)
 -    {
 -      XSETFRAME (window, f);
 -    }
 +    XSETFRAME (window, f);
    else
 -    {
 -      window = Qnil;
 -      XSETFASTINT (*x, 0);
 -      XSETFASTINT (*y, 0);
 -    }
 +    window = Qnil;
  
    return Fcons (window,
                Fcons (posn,
 -                     Fcons (Fcons (*x, *y),
 +                     Fcons (Fcons (make_number (xret),
 +                                   make_number (yret)),
                              Fcons (make_number (time),
                                     extra_info))));
  }
     in order to build drag events when the button is released.  */
  
  static Lisp_Object
 -make_lispy_event (event)
 -     struct input_event *event;
 +make_lispy_event (struct input_event *event)
  {
    int i;
  
      case MULTIBYTE_CHAR_KEYSTROKE_EVENT:
        {
        Lisp_Object lispy_c;
 -      int c = event->code;
 +      EMACS_INT c = event->code;
        if (event->kind == ASCII_KEYSTROKE_EVENT)
          {
            c &= 0377;
                int hpos;
                int i;
  
 -#if 0
 -              /* Activate the menu bar on the down event.  If the
 -                 up event comes in before the menu code can deal with it,
 -                 just ignore it.  */
 -              if (! (event->modifiers & down_modifier))
 -                return Qnil;
 -#endif
 -
                /* Find the menu bar item under `column'.  */
                item = Qnil;
                items = FRAME_MENU_BAR_ITEMS (f);
              }
  #endif /* not USE_X_TOOLKIT && not USE_GTK && not HAVE_NS */
  
 -          position = make_lispy_position (f, &event->x, &event->y,
 +          position = make_lispy_position (f, event->x, event->y,
                                            event->timestamp);
          }
  #ifndef USE_TOOLKIT_SCROLL_BARS
              return Qnil;
  
            event->modifiers &= ~up_modifier;
 -#if 0 /* Formerly we treated an up with no down as a click event.  */
 -          if (!CONSP (start_pos))
 -            event->modifiers |= click_modifier;
 -          else
 -#endif
 +
              {
 -              Lisp_Object down;
 +              Lisp_Object new_down, down;
                EMACS_INT xdiff = double_click_fuzz, ydiff = double_click_fuzz;
  
                /* The third element of every position
                   should be the (x,y) pair.  */
                down = Fcar (Fcdr (Fcdr (start_pos)));
 +              new_down = Fcar (Fcdr (Fcdr (position)));
 +
                if (CONSP (down)
                    && INTEGERP (XCAR (down)) && INTEGERP (XCDR (down)))
                  {
 -                  xdiff = XINT (event->x) - XINT (XCAR (down));
 -                  ydiff = XINT (event->y) - XINT (XCDR (down));
 +                  xdiff = XINT (XCAR (new_down)) - XINT (XCAR (down));
 +                  ydiff = XINT (XCDR (new_down)) - XINT (XCDR (down));
                  }
  
                if (ignore_mouse_drag_p)
        if (! FRAME_LIVE_P (f))
          return Qnil;
  
 -      position = make_lispy_position (f, &event->x, &event->y,
 +      position = make_lispy_position (f, event->x, event->y,
                                        event->timestamp);
  
        /* Set double or triple modifiers to indicate the wheel speed.  */
          else
            abort ();
  
 -        if (FRAME_WINDOW_P (f))
 -          fuzz = double_click_fuzz;
 -        else
 -          fuzz = double_click_fuzz / 8;
 +        fuzz = FRAME_WINDOW_P (f)
 +          ? double_click_fuzz : double_click_fuzz / 8;
  
          if (event->modifiers & up_modifier)
            {
        if (! FRAME_LIVE_P (f))
          return Qnil;
  
 -      position = make_lispy_position (f, &event->x, &event->y,
 +      position = make_lispy_position (f, event->x, event->y,
                                        event->timestamp);
  
        head = modify_event_symbol (0, event->modifiers,
        start_pos_ptr = &AREF (button_down_location, button);
        start_pos = *start_pos_ptr;
  
 -      position = make_lispy_position (f, &event->x, &event->y,
 -                                          event->timestamp);
 +      position = make_lispy_position (f, event->x, event->y,
 +                                      event->timestamp);
  
        if (event->modifiers & down_modifier)
          *start_pos_ptr = Fcopy_alist (position);
  #if defined(HAVE_MOUSE) || defined(HAVE_GPM)
  
  static Lisp_Object
 -make_lispy_movement (frame, bar_window, part, x, y, time)
 -     FRAME_PTR frame;
 -     Lisp_Object bar_window;
 -     enum scroll_bar_part part;
 -     Lisp_Object x, y;
 -     unsigned long time;
 +make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part,
 +                   Lisp_Object x, Lisp_Object y, unsigned long time)
  {
    /* Is it a scroll bar movement?  */
    if (frame && ! NILP (bar_window))
  
        part_sym = *scroll_bar_parts[(int) part];
        return Fcons (Qscroll_bar_movement,
 -                  (Fcons (Fcons (bar_window,
 -                                 Fcons (Qvertical_scroll_bar,
 -                                        Fcons (Fcons (x, y),
 -                                               Fcons (make_number (time),
 -                                                      Fcons (part_sym,
 -                                                             Qnil))))),
 -                          Qnil)));
 +                  Fcons (list5 (bar_window,
 +                                Qvertical_scroll_bar,
 +                                Fcons (x, y),
 +                                make_number (time),
 +                                part_sym),
 +                         Qnil));
      }
 -
    /* Or is it an ordinary mouse movement?  */
    else
      {
        Lisp_Object position;
 -
 -      position = make_lispy_position (frame, &x, &y, time);
 -
 -      return Fcons (Qmouse_movement,
 -                  Fcons (position,
 -                         Qnil));
 +      position = make_lispy_position (frame, x, y, time);
 +      return list2 (Qmouse_movement, position);
      }
  }
  
  
  /* Construct a switch frame event.  */
  static Lisp_Object
 -make_lispy_switch_frame (frame)
 -     Lisp_Object frame;
 +make_lispy_switch_frame (Lisp_Object frame)
  {
    return Fcons (Qswitch_frame, Fcons (frame, Qnil));
  }
     This doesn't use any caches.  */
  
  static int
 -parse_modifiers_uncached (symbol, modifier_end)
 -     Lisp_Object symbol;
 -     int *modifier_end;
 +parse_modifiers_uncached (Lisp_Object symbol, int *modifier_end)
  {
    Lisp_Object name;
    int i;
     prepended to the string BASE[0..BASE_LEN-1].
     This doesn't use any caches.  */
  static Lisp_Object
 -apply_modifiers_uncached (modifiers, base, base_len, base_len_byte)
 -     int modifiers;
 -     char *base;
 -     int base_len, base_len_byte;
 +apply_modifiers_uncached (int modifiers, char *base, int base_len, int base_len_byte)
  {
    /* Since BASE could contain nulls, we can't use intern here; we have
       to use Fintern, which expects a genuine Lisp_String, and keeps a
  
      new_name = make_uninit_multibyte_string (mod_len + base_len,
                                             mod_len + base_len_byte);
 -    bcopy (new_mods, SDATA (new_name),               mod_len);
 -    bcopy (base,     SDATA (new_name) + mod_len, base_len_byte);
 +    memcpy (SDATA (new_name), new_mods, mod_len);
 +    memcpy (SDATA (new_name) + mod_len, base, base_len_byte);
  
      return Fintern (new_name, Qnil);
    }
  }
  
  
 -static const char *modifier_names[] =
 +static const char *const modifier_names[] =
  {
    "up", "down", "drag", "click", "double", "triple", 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@@ -6354,7 -6582,8 +6354,7 @@@ static Lisp_Object modifier_symbols
  
  /* Return the list of modifier symbols corresponding to the mask MODIFIERS.  */
  static Lisp_Object
 -lispy_modifier_list (modifiers)
 -     int modifiers;
 +lispy_modifier_list (int modifiers)
  {
    Lisp_Object modifier_list;
    int i;
  #define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1))
  
  Lisp_Object
 -parse_modifiers (symbol)
 -     Lisp_Object symbol;
 +parse_modifiers (Lisp_Object symbol)
  {
    Lisp_Object elements;
  
  DEFUN ("internal-event-symbol-parse-modifiers", Fevent_symbol_parse_modifiers,
         Sevent_symbol_parse_modifiers, 1, 1, 0,
         doc: /* Parse the event symbol.  For internal use.  */)
 -     (symbol)
 -     Lisp_Object symbol;
 +  (Lisp_Object symbol)
  {
    /* Fill the cache if needed.  */
    parse_modifiers (symbol);
     apply_modifiers copies the value of BASE's Qevent_kind property to
     the modified symbol.  */
  static Lisp_Object
 -apply_modifiers (modifiers, base)
 -     int modifiers;
 -     Lisp_Object base;
 +apply_modifiers (int modifiers, Lisp_Object base)
  {
    Lisp_Object cache, index, entry, new_symbol;
  
     and M-C-foo end up being equivalent in the keymap.  */
  
  Lisp_Object
 -reorder_modifiers (symbol)
 -     Lisp_Object symbol;
 +reorder_modifiers (Lisp_Object symbol)
  {
    /* It's hopefully okay to write the code this way, since everything
       will soon be in caches, and no consing will be done at all.  */
     in the symbol's name.  */
  
  static Lisp_Object
 -modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist_or_stem,
 -                     name_table, symbol_table, table_size)
 -     int symbol_num;
 -     unsigned modifiers;
 -     Lisp_Object symbol_kind;
 -     Lisp_Object name_alist_or_stem;
 -     char **name_table;
 -     Lisp_Object *symbol_table;
 -     unsigned int table_size;
 +modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object symbol_kind,
 +                   Lisp_Object name_alist_or_stem, const char *const *name_table,
 +                   Lisp_Object *symbol_table, unsigned int table_size)
  {
    Lisp_Object value;
    Lisp_Object symbol_int;
        if (NILP (value))
        {
          char buf[20];
 -        sprintf (buf, "key-%d", symbol_num);
 +        sprintf (buf, "key-%ld", (long)symbol_num);
          value = intern (buf);
        }
  
@@@ -6656,7 -6896,8 +6656,7 @@@ and zero or more modifier names (contro
  drag, down, double or triple).  The base must be last.
  The return value is an event type (a character or symbol) which
  has the same base event type and all the specified modifiers.  */)
 -     (event_desc)
 -     Lisp_Object event_desc;
 +  (Lisp_Object event_desc)
  {
    Lisp_Object base;
    int modifiers = 0;
@@@ -6799,7 -7040,8 +6799,7 @@@ parse_solitary_modifier (Lisp_Object sy
     but it can be a Lucid-style event type list.  */
  
  int
 -lucid_event_type_list_p (object)
 -     Lisp_Object object;
 +lucid_event_type_list_p (Lisp_Object object)
  {
    Lisp_Object tail;
  
     movements and toolkit scroll bar thumb drags. */
  
  static void
 -get_input_pending (addr, flags)
 -     int *addr;
 -     int flags;
 +get_input_pending (int *addr, int flags)
  {
    /* First of all, have we already counted some input?  */
    *addr = (!NILP (Vquit_flag) || readable_events (flags));
  /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary.  */
  
  void
 -gobble_input (expected)
 -     int expected;
 +gobble_input (int expected)
  {
  #ifdef SIGIO
    if (interrupt_input)
     so that read_key_sequence will notice the new current buffer.  */
  
  void
 -record_asynch_buffer_change ()
 +record_asynch_buffer_change (void)
  {
    struct input_event event;
    Lisp_Object tem;
    event.frame_or_window = Qnil;
    event.arg = Qnil;
  
 -#ifdef subprocesses
    /* We don't need a buffer-switch event unless Emacs is waiting for input.
       The purpose of the event is to make read_key_sequence look up the
       keymaps again.  If we aren't in read_key_sequence, we don't need one,
 -     and the event could cause trouble by messing up (input-pending-p).  */
 +     and the event could cause trouble by messing up (input-pending-p).
 +     Note: Fwaiting_for_user_input_p always returns nil when async
 +     subprocesses aren't supported.  */
    tem = Fwaiting_for_user_input_p ();
    if (NILP (tem))
      return;
 -#else
 -  /* We never need these events if we have no asynchronous subprocesses.  */
 -  return;
 -#endif
  
    /* Make sure no interrupt happens while storing the event.  */
  #ifdef SIGIO
     this is a bad time to try to read input.  */
  
  static int
 -read_avail_input (expected)
 -     int expected;
 +read_avail_input (int expected)
  {
    int nread = 0;
    int err = 0;
@@@ -7270,7 -7519,7 +7270,7 @@@ tty_read_avail_input (struct terminal *
  }
  \f
  void
 -handle_async_input ()
 +handle_async_input (void)
  {
    interrupt_input_pending = 0;
  #ifdef SYNC_INPUT
  }
  
  void
 -process_pending_signals ()
 +process_pending_signals (void)
  {
    if (interrupt_input_pending)
      handle_async_input ();
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  
  static SIGTYPE
 -input_available_signal (signo)
 -     int signo;
 +input_available_signal (int signo)
  {
    /* Must preserve main program's value of errno.  */
    int old_errno = errno;
 -#if defined (USG) && !defined (POSIX_SIGNALS)
 -  /* USG systems forget handlers when they are used;
 -     must reestablish each time */
 -  signal (signo, input_available_signal);
 -#endif /* USG */
 -
    SIGNAL_THREAD_CHECK (signo);
  
  #ifdef SYNC_INPUT
     dealing with, without assuming that every file which uses
     UNBLOCK_INPUT also has #included the files necessary to get SIGIO. */
  void
 -reinvoke_input_signal ()
 +reinvoke_input_signal (void)
  {
  #ifdef SIGIO
    handle_async_input ();
@@@ -7366,7 -7622,9 +7366,7 @@@ struct user_signal_inf
  static struct user_signal_info *user_signals = NULL;
  
  void
 -add_user_signal (sig, name)
 -     int sig;
 -     const char *name;
 +add_user_signal (int sig, const char *name)
  {
    struct user_signal_info *p;
  
  }
  
  static SIGTYPE
 -handle_user_signal (sig)
 -     int sig;
 +handle_user_signal (int sig)
  {
    int old_errno = errno;
    struct user_signal_info *p;
  
 -#if defined (USG) && !defined (POSIX_SIGNALS)
 -  /* USG systems forget handlers when they are used;
 -     must reestablish each time */
 -  signal (sig, handle_user_signal);
 -#endif
 -
    SIGNAL_THREAD_CHECK (sig);
  
    for (p = user_signals; p; p = p->next)
  }
  
  static char *
 -find_user_signal_name (sig)
 -     int sig;
 +find_user_signal_name (int sig)
  {
    struct user_signal_info *p;
  
  }
  
  static int
 -store_user_signal_events ()
 +store_user_signal_events (void)
  {
    struct user_signal_info *p;
    struct input_event buf;
  
        if (nstored == 0)
          {
 -          bzero (&buf, sizeof buf);
 +          memset (&buf, 0, sizeof buf);
            buf.kind = USER_SIGNAL_EVENT;
            buf.frame_or_window = selected_frame;
          }
  }
  
  \f
 -static void menu_bar_item P_ ((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
  static Lisp_Object menu_bar_items_vector;
  static int menu_bar_items_index;
  
 +
 +static const char* separator_names[] = {
 +  "space",
 +  "no-line",
 +  "single-line",
 +  "double-line",
 +  "single-dashed-line",
 +  "double-dashed-line",
 +  "shadow-etched-in",
 +  "shadow-etched-out",
 +  "shadow-etched-in-dash",
 +  "shadow-etched-out-dash",
 +  "shadow-double-etched-in",
 +  "shadow-double-etched-out",
 +  "shadow-double-etched-in-dash",
 +  "shadow-double-etched-out-dash",
 +  0,
 +};
 +
 +/* Return non-zero if LABEL specifies a separator.  */
 +
 +int
 +menu_separator_name_p (const char *label)
 +{
 +  if (!label)
 +    return 0;
 +  else if (strlen (label) > 3
 +         && strncmp (label, "--", 2) == 0
 +         && label[2] != '-')
 +    {
 +      int i;
 +      label += 2;
 +      for (i = 0; separator_names[i]; ++i)
 +      if (strcmp (label, separator_names[i]) == 0)
 +          return 1;
 +    }
 +  else
 +    {
 +      /* It's a separator if it contains only dashes.  */
 +      while (*label == '-')
 +      ++label;
 +      return (*label == 0);
 +    }
 +
 +  return 0;
 +}
 +
 +
  /* Return a vector of menu items for a menu bar, appropriate
     to the current buffer.  Each item has three elements in the vector:
     KEY STRING MAPLIST.
     OLD is an old vector we can optionally reuse, or nil.  */
  
  Lisp_Object
 -menu_bar_items (old)
 -     Lisp_Object old;
 +menu_bar_items (Lisp_Object old)
  {
    /* The number of keymaps we're scanning right now, and the number of
       keymaps we have allocated space for.  */
        nmaps = 0;
        if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
          maps[nmaps++] = tem;
 -      bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
 +      memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
        nmaps += nminor;
        maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
        }
            tem2 = XVECTOR (menu_bar_items_vector)->contents[i + 2];
            tem3 = XVECTOR (menu_bar_items_vector)->contents[i + 3];
            if (end > i + 4)
 -            bcopy (&XVECTOR (menu_bar_items_vector)->contents[i + 4],
 -                   &XVECTOR (menu_bar_items_vector)->contents[i],
 -                   (end - i - 4) * sizeof (Lisp_Object));
 +            memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
 +                     &XVECTOR (menu_bar_items_vector)->contents[i + 4],
 +                     (end - i - 4) * sizeof (Lisp_Object));
            XVECTOR (menu_bar_items_vector)->contents[end - 4] = tem0;
            XVECTOR (menu_bar_items_vector)->contents[end - 3] = tem1;
            XVECTOR (menu_bar_items_vector)->contents[end - 2] = tem2;
  Lisp_Object item_properties;
  
  static void
 -menu_bar_item (key, item, dummy1, dummy2)
 -     Lisp_Object key, item, dummy1;
 -     void *dummy2;
 +menu_bar_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy1, void *dummy2)
  {
    struct gcpro gcpro1;
    int i;
        if (EQ (key, XVECTOR (menu_bar_items_vector)->contents[i]))
          {
            if (menu_bar_items_index > i + 4)
 -            bcopy (&XVECTOR (menu_bar_items_vector)->contents[i + 4],
 -                   &XVECTOR (menu_bar_items_vector)->contents[i],
 -                   (menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
 +            memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
 +                     &XVECTOR (menu_bar_items_vector)->contents[i + 4],
 +                     (menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
            menu_bar_items_index -= 4;
          }
      }
  \f
   /* This is used as the handler when calling menu_item_eval_property.  */
  static Lisp_Object
 -menu_item_eval_property_1 (arg)
 -     Lisp_Object arg;
 +menu_item_eval_property_1 (Lisp_Object arg)
  {
    /* If we got a quit from within the menu computation,
       quit all the way out of it.  This takes care of C-] in the debugger.  */
  /* Evaluate an expression and return the result (or nil if something
     went wrong).  Used to evaluate dynamic parts of menu items.  */
  Lisp_Object
 -menu_item_eval_property (sexpr)
 -     Lisp_Object sexpr;
 +menu_item_eval_property (Lisp_Object sexpr)
  {
    int count = SPECPDL_INDEX ();
    Lisp_Object val;
     otherwise.  */
  
  int
 -parse_menu_item (item, inmenubar)
 -     Lisp_Object item;
 -     int inmenubar;
 +parse_menu_item (Lisp_Object item, int inmenubar)
  {
    Lisp_Object def, tem, item_string, start;
    Lisp_Object filter;
      /* The previous code preferred :key-sequence to :keys, so we
         preserve this behavior.  */
      if (STRINGP (keyeq) && !CONSP (keyhint))
-       keyeq = Fsubstitute_command_keys (keyeq);
+       keyeq = concat2 (build_string ("  "), Fsubstitute_command_keys (keyeq));
      else
        {
        Lisp_Object prefix = keyeq;
@@@ -8062,17 -8287,18 +8062,17 @@@ static Lisp_Object tool_bar_item_proper
  
  static int ntool_bar_items;
  
 -/* The symbols `tool-bar', `:image' and `:rtl'.  */
 +/* The symbols `:image' and `:rtl'.  */
  
 -extern Lisp_Object Qtool_bar;
  Lisp_Object QCimage;
  Lisp_Object Qrtl;
  
  /* Function prototypes.  */
  
 -static void init_tool_bar_items P_ ((Lisp_Object));
 -static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*));
 -static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
 -static void append_tool_bar_item P_ ((void));
 +static void init_tool_bar_items (Lisp_Object);
 +static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*);
 +static int parse_tool_bar_item (Lisp_Object, Lisp_Object);
 +static void append_tool_bar_item (void);
  
  
  /* Return a vector of tool bar items for keymaps currently in effect.
     tool bar items found.  */
  
  Lisp_Object
 -tool_bar_items (reuse, nitems)
 -     Lisp_Object reuse;
 -     int *nitems;
 +tool_bar_items (Lisp_Object reuse, int *nitems)
  {
    Lisp_Object *maps;
    int nmaps, i;
        nmaps = 0;
        if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
        maps[nmaps++] = tem;
 -      bcopy (tmaps, (void *) (maps + nmaps), nminor * sizeof (maps[0]));
 +      memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
        nmaps += nminor;
        maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
      }
  /* Process the definition of KEY which is DEF.  */
  
  static void
 -process_tool_bar_item (key, def, data, args)
 -     Lisp_Object key, def, data;
 -     void *args;
 +process_tool_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void *args)
  {
    int i;
 -  extern Lisp_Object Qundefined;
    struct gcpro gcpro1, gcpro2;
  
    /* Protect KEY and DEF from GC because parse_tool_bar_item may call
          if (EQ (key, v[TOOL_BAR_ITEM_KEY]))
            {
              if (ntool_bar_items > i + TOOL_BAR_ITEM_NSLOTS)
 -              bcopy (v + TOOL_BAR_ITEM_NSLOTS, v,
 -                     ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
 -                      * sizeof (Lisp_Object)));
 +              memmove (v, v + TOOL_BAR_ITEM_NSLOTS,
 +                       ((ntool_bar_items - i - TOOL_BAR_ITEM_NSLOTS)
 +                        * sizeof (Lisp_Object)));
              ntool_bar_items -= TOOL_BAR_ITEM_NSLOTS;
              break;
            }
  
     - `:help HELP-STRING'.
  
 -   Gives a help string to display for the tool bar item.  */
 +   Gives a help string to display for the tool bar item.
 +
 +   - `:label LABEL-STRING'.
 +
 +   A text label to show with the tool bar button if labels are enabled.  */
  
  static int
 -parse_tool_bar_item (key, item)
 -     Lisp_Object key, item;
 +parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
  {
    /* Access slot with index IDX of vector tool_bar_item_properties.  */
  #define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX]
  
    Lisp_Object filter = Qnil;
    Lisp_Object caption;
 -  int i;
 +  int i, have_label = 0;
  
    /* Defininition looks like `(menu-item CAPTION BINDING PROPS...)'.
       Rule out items that aren't lists, don't start with
       `menu-item' or whose rest following `tool-bar-item' is not a
       list.  */
 -  if (!CONSP (item)
 -      || !EQ (XCAR (item), Qmenu_item)
 -      || (item = XCDR (item),
 -        !CONSP (item)))
 +  if (!CONSP (item))
 +    return 0;
 +
 +  /* As an exception, allow old-style menu separators.  */
 +  if (STRINGP (XCAR (item)))
 +    item = Fcons (XCAR (item), Qnil);
 +  else if (!EQ (XCAR (item), Qmenu_item)
 +         || (item = XCDR (item), !CONSP (item)))
      return 0;
  
    /* Create tool_bar_item_properties vector if necessary.  Reset it to
      }
    PROP (TOOL_BAR_ITEM_CAPTION) = caption;
  
 -  /* Give up if rest following the caption is not a list.  */
 +  /* If the rest following the caption is not a list, the menu item is
 +     either a separator, or invalid.  */
    item = XCDR (item);
    if (!CONSP (item))
 -    return 0;
 +    {
 +      if (menu_separator_name_p (SDATA (caption)))
 +      {
 +        PROP (TOOL_BAR_ITEM_TYPE) = Qt;
 +#if !defined (USE_GTK) && !defined (HAVE_NS)
 +        /* If we use build_desired_tool_bar_string to render the
 +           tool bar, the separator is rendered as an image.  */
 +        PROP (TOOL_BAR_ITEM_IMAGES)
 +          = menu_item_eval_property (Vtool_bar_separator_image_expression);
 +        PROP (TOOL_BAR_ITEM_ENABLED_P) = Qnil;
 +        PROP (TOOL_BAR_ITEM_SELECTED_P) = Qnil;
 +        PROP (TOOL_BAR_ITEM_CAPTION) = Qnil;
 +#endif
 +        return 1;
 +      }
 +      return 0;
 +    }
  
    /* Store the binding.  */
    PROP (TOOL_BAR_ITEM_BINDING) = XCAR (item);
            return 0;
        }
        else if (EQ (key, QChelp))
 -      /* `:help HELP-STRING'.  */
 -      PROP (TOOL_BAR_ITEM_HELP) = value;
 +        /* `:help HELP-STRING'.  */
 +        PROP (TOOL_BAR_ITEM_HELP) = value;
 +      else if (EQ (key, QCvert_only))
 +        /* `:vert-only t/nil'.  */
 +        PROP (TOOL_BAR_ITEM_VERT_ONLY) = value;
 +      else if (EQ (key, QClabel))
 +        {
 +          const char *bad_label = "!!?GARBLED ITEM?!!";
 +          /* `:label LABEL-STRING'.  */
 +          PROP (TOOL_BAR_ITEM_LABEL) = STRINGP (value)
 +            ? value
 +            : make_string (bad_label, strlen (bad_label));
 +          have_label = 1;
 +        }
        else if (EQ (key, QCfilter))
        /* ':filter FORM'.  */
        filter = value;
        PROP (TOOL_BAR_ITEM_RTL_IMAGE) = value;
      }
  
 +
 +  if (!have_label)
 +    {
 +      /* Try to make one from caption and key.  */
 +      Lisp_Object key = PROP (TOOL_BAR_ITEM_KEY);
 +      Lisp_Object capt = PROP (TOOL_BAR_ITEM_CAPTION);
 +      const char *label = SYMBOLP (key) ? (char *) SDATA (SYMBOL_NAME (key)) : "";
 +      const char *caption = STRINGP (capt) ? (char *) SDATA (capt) : "";
 +      EMACS_INT max_lbl = 2 * tool_bar_max_label_size;
 +      char *buf = (char *) xmalloc (max_lbl + 1);
 +      Lisp_Object new_lbl;
 +      size_t caption_len = strlen (caption);
 +
 +      if (caption_len <= max_lbl && caption[0] != '\0')
 +        {
 +          strcpy (buf, caption);
 +          while (caption_len > 0 && buf[caption_len - 1] == '.')
 +            caption_len--;
 +        buf[caption_len] = '\0';
 +        label = caption = buf;
 +        }
 +
 +      if (strlen (label) <= max_lbl && label[0] != '\0')
 +        {
 +          int i;
 +          if (label != buf)
 +          strcpy (buf, label);
 +
 +          for (i = 0; buf[i] != '\0'; ++i)
 +          if (buf[i] == '-')
 +            buf[i] = ' ';
 +          label = buf;
 +
 +        }
 +      else
 +      label = "";
 +
 +      new_lbl = Fupcase_initials (make_string (label, strlen (label)));
 +      if (SCHARS (new_lbl) <= tool_bar_max_label_size)
 +        PROP (TOOL_BAR_ITEM_LABEL) = new_lbl;
 +      else
 +        PROP (TOOL_BAR_ITEM_LABEL) = make_string ("", 0);
 +      free (buf);
 +    }
 +
    /* If got a filter apply it on binding.  */
    if (!NILP (filter))
      PROP (TOOL_BAR_ITEM_BINDING)
     that can be reused.  */
  
  static void
 -init_tool_bar_items (reuse)
 -     Lisp_Object reuse;
 +init_tool_bar_items (Lisp_Object reuse)
  {
    if (VECTORP (reuse))
      tool_bar_items_vector = reuse;
     tool_bar_item_properties */
  
  static void
 -append_tool_bar_item ()
 +append_tool_bar_item (void)
  {
    Lisp_Object *to, *from;
  
       tool_bar_items_vector.  */
    to = XVECTOR (tool_bar_items_vector)->contents + ntool_bar_items;
    from = XVECTOR (tool_bar_item_properties)->contents;
 -  bcopy (from, to, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
 +  memcpy (to, from, TOOL_BAR_ITEM_NSLOTS * sizeof *to);
    ntool_bar_items += TOOL_BAR_ITEM_NSLOTS;
  }
  
     and do auto-saving in the inner call of read_char. */
  
  static Lisp_Object
 -read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
 -     int nmaps;
 -     Lisp_Object *maps;
 -     Lisp_Object prev_event;
 -     int *used_mouse_menu;
 +read_char_x_menu_prompt (int nmaps, Lisp_Object *maps, Lisp_Object prev_event,
 +                       int *used_mouse_menu)
  {
    int mapno;
  
@@@ -8606,7 -8760,10 +8606,7 @@@ static char *read_char_minibuf_menu_tex
  static int read_char_minibuf_menu_width;
  
  static Lisp_Object
 -read_char_minibuf_menu_prompt (commandflag, nmaps, maps)
 -     int commandflag ;
 -     int nmaps;
 -     Lisp_Object *maps;
 +read_char_minibuf_menu_prompt (int commandflag, int nmaps, Lisp_Object *maps)
  {
    int mapno;
    register Lisp_Object name;
                          thiswidth = SCHARS (desc);
                          if (thiswidth + i > width)
                            thiswidth = width - i;
 -                        bcopy (SDATA (desc), menu + i, thiswidth);
 +                        memcpy (menu + i, SDATA (desc), thiswidth);
                          i += thiswidth;
                          strcpy (menu + i, " = ");
                          i += 3;
                      thiswidth = SCHARS (s);
                      if (thiswidth + i > width)
                        thiswidth = width - i;
 -                    bcopy (SDATA (s), menu + i, thiswidth);
 +                    memcpy (menu + i, SDATA (s), thiswidth);
                      i += thiswidth;
                      menu[i] = 0;
                    }
     NEXT may be the same array as CURRENT.  */
  
  static int
 -follow_key (key, nmaps, current, defs, next)
 -     Lisp_Object key;
 -     Lisp_Object *current, *defs, *next;
 -     int nmaps;
 +follow_key (Lisp_Object key, int nmaps, Lisp_Object *current, Lisp_Object *defs,
 +          Lisp_Object *next)
  {
    int i, first_binding;
  
@@@ -8921,8 -9080,9 +8921,8 @@@ typedef struct keyrema
     that it is indeed a vector).  */
  
  static Lisp_Object
 -access_keymap_keyremap (map, key, prompt, do_funcall)
 -     Lisp_Object map, key, prompt;
 -     int do_funcall;
 +access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt,
 +                      int do_funcall)
  {
    Lisp_Object next;
  
     The return value is non-zero if the remapping actually took place.  */
  
  static int
 -keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt)
 -     Lisp_Object *keybuf, prompt;
 -     keyremap *fkey;
 -     int input, doit, *diff, bufsize;
 +keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
 +             int input, int doit, int *diff, Lisp_Object prompt)
  {
    Lisp_Object next, key;
  
     from the selected window's buffer.  */
  
  static int
 -read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
 -                 can_return_switch_frame, fix_current_buffer)
 -     Lisp_Object *keybuf;
 -     int bufsize;
 -     Lisp_Object prompt;
 -     int dont_downcase_last;
 -     int can_return_switch_frame;
 -     int fix_current_buffer;
 +read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
 +                 int dont_downcase_last, int can_return_switch_frame,
 +                 int fix_current_buffer)
  {
    Lisp_Object from_string;
    int count = SPECPDL_INDEX ();
    if (INTERACTIVE)
      {
        if (!NILP (prompt))
 -      echo_prompt (prompt);
 +      {
 +        /* Install the string STR as the beginning of the string of
 +           echoing, so that it serves as a prompt for the next
 +           character.  */
 +        current_kboard->echo_string = prompt;
 +        current_kboard->echo_after_prompt = SCHARS (prompt);
 +        echo_now ();
 +      }
        else if (cursor_in_echo_area
               && (FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
               && NILP (Fzerop (Vecho_keystrokes)))
        if (!NILP (orig_keymap))
        submaps[nmaps++] = orig_keymap;
  
 -      bcopy (maps, (void *) (submaps + nmaps),
 -           nminor * sizeof (submaps[0]));
 +      memcpy (submaps + nmaps, maps, nminor * sizeof (submaps[0]));
  
        nmaps += nminor;
  
@@@ -10201,7 -10362,10 +10201,7 @@@ The optional fifth argument COMMAND-LOO
  that this key sequence is being read by something that will
  read commands one after another.  It should be nil if the caller
  will read just one key sequence.  */)
 -  (prompt, continue_echo, dont_downcase_last, can_return_switch_frame,
 -   command_loop)
 -     Lisp_Object prompt, continue_echo, dont_downcase_last;
 -     Lisp_Object can_return_switch_frame, command_loop;
 +  (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object command_loop)
  {
    Lisp_Object keybuf[30];
    register int i;
    specbind (Qinput_method_use_echo_area,
            (NILP (command_loop) ? Qt : Qnil));
  
 -  bzero (keybuf, sizeof keybuf);
 +  memset (keybuf, 0, sizeof keybuf);
    GCPRO1 (keybuf[0]);
    gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
  
  DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
         Sread_key_sequence_vector, 1, 5, 0,
         doc: /* Like `read-key-sequence' but always return a vector.  */)
 -     (prompt, continue_echo, dont_downcase_last, can_return_switch_frame,
 -      command_loop)
 -     Lisp_Object prompt, continue_echo, dont_downcase_last;
 -     Lisp_Object can_return_switch_frame, command_loop;
 +  (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object command_loop)
  {
    Lisp_Object keybuf[30];
    register int i;
    specbind (Qinput_method_use_echo_area,
            (NILP (command_loop) ? Qt : Qnil));
  
 -  bzero (keybuf, sizeof keybuf);
 +  memset (keybuf, 0, sizeof keybuf);
    GCPRO1 (keybuf[0]);
    gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
  
@@@ -10318,11 -10485,13 +10318,11 @@@ The argument KEYS specifies the value t
  when reading the arguments; if it is nil, (this-command-keys) is used.
  The argument SPECIAL, if non-nil, means that this command is executing
  a special event, so ignore the prefix argument and don't clear it.  */)
 -     (cmd, record_flag, keys, special)
 -     Lisp_Object cmd, record_flag, keys, special;
 +  (Lisp_Object cmd, Lisp_Object record_flag, Lisp_Object keys, Lisp_Object special)
  {
    register Lisp_Object final;
    register Lisp_Object tem;
    Lisp_Object prefixarg;
 -  extern int debug_on_next_call;
  
    debug_on_next_call = 0;
  
@@@ -10406,15 -10575,17 +10406,15 @@@ the numeric argument to this command
  
  Noninteractively, the argument PREFIXARG is the prefix argument to
  give to the command you invoke, if it asks for an argument.  */)
 -     (prefixarg)
 -     Lisp_Object prefixarg;
 +  (Lisp_Object prefixarg)
  {
    Lisp_Object function;
 -  char buf[40];
 -  int saved_last_point_position;
 +  EMACS_INT saved_last_point_position;
    Lisp_Object saved_keys, saved_last_point_position_buffer;
    Lisp_Object bindings, value;
    struct gcpro gcpro1, gcpro2, gcpro3;
  #ifdef HAVE_WINDOW_SYSTEM
 -  /* The call to Fcompleting_read wil start and cancel the hourglass,
 +  /* The call to Fcompleting_read will start and cancel the hourglass,
       but if the hourglass was already scheduled, this means that no
       hourglass will be shown for the actual M-x command itself.
       So we restart it if it is already scheduled.  Note that checking
                        XVECTOR (this_command_keys)->contents);
    saved_last_point_position_buffer = last_point_position_buffer;
    saved_last_point_position = last_point_position;
 -  buf[0] = 0;
    GCPRO3 (saved_keys, prefixarg, saved_last_point_position_buffer);
  
 -  if (EQ (prefixarg, Qminus))
 -    strcpy (buf, "- ");
 -  else if (CONSP (prefixarg) && XINT (XCAR (prefixarg)) == 4)
 -    strcpy (buf, "C-u ");
 -  else if (CONSP (prefixarg) && INTEGERP (XCAR (prefixarg)))
 -    sprintf (buf, "%ld ", (long) XINT (XCAR (prefixarg)));
 -  else if (INTEGERP (prefixarg))
 -    sprintf (buf, "%ld ", (long) XINT (prefixarg));
 -
 -  /* This isn't strictly correct if execute-extended-command
 -     is bound to anything else.  Perhaps it should use
 -     this_command_keys?  */
 -  strcat (buf, "M-x ");
 -
 -  /* Prompt with buf, and then read a string, completing from and
 -     restricting to the set of all defined commands.  Don't provide
 -     any initial input.  Save the command read on the extended-command
 -     history list. */
 -  function = Fcompleting_read (build_string (buf),
 -                             Vobarray, Qcommandp,
 -                             Qt, Qnil, Qextended_command_history, Qnil,
 -                             Qnil);
 +  function = call0 (intern ("read-extended-command"));
  
  #ifdef HAVE_WINDOW_SYSTEM
    if (hstarted) start_hourglass ();
  /* Return nonzero if input events are pending.  */
  
  int
 -detect_input_pending ()
 +detect_input_pending (void)
  {
    if (!input_pending)
      get_input_pending (&input_pending, 0);
     pending.  */
  
  int
 -detect_input_pending_ignore_squeezables ()
 +detect_input_pending_ignore_squeezables (void)
  {
    if (!input_pending)
      get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES);
  /* Return nonzero if input events are pending, and run any pending timers.  */
  
  int
 -detect_input_pending_run_timers (do_display)
 -     int do_display;
 +detect_input_pending_run_timers (int do_display)
  {
    int old_timers_run = timers_run;
  
     So calling this function unnecessarily can't do any harm.  */
  
  void
 -clear_input_pending ()
 +clear_input_pending (void)
  {
    input_pending = 0;
  }
     to do in that case.  It isn't trivial.  */
  
  int
 -requeued_events_pending_p ()
 +requeued_events_pending_p (void)
  {
    return (!NILP (Vunread_command_events) || unread_command_char != -1);
  }
@@@ -10613,7 -10807,7 +10613,7 @@@ DEFUN ("input-pending-p", Finput_pendin
         doc: /* Return t if command input is currently available with no wait.
  Actually, the value is nil only if we can be sure that no input is available;
  if there is a doubt, the value is t.  */)
 -     ()
 +  (void)
  {
    if (!NILP (Vunread_command_events) || unread_command_char != -1
        || !NILP (Vunread_post_input_method_events)
  
  DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0,
         doc: /* Return vector of last 300 events, not counting those from keyboard macros.  */)
 -     ()
 +  (void)
  {
    Lisp_Object *keys = XVECTOR (recent_keys)->contents;
    Lisp_Object val;
    else
      {
        val = Fvector (NUM_RECENT_KEYS, keys);
 -      bcopy (keys + recent_keys_index,
 -           XVECTOR (val)->contents,
 -           (NUM_RECENT_KEYS - recent_keys_index) * sizeof (Lisp_Object));
 -      bcopy (keys,
 -           XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index,
 -           recent_keys_index * sizeof (Lisp_Object));
 +      memcpy (XVECTOR (val)->contents, keys + recent_keys_index,
 +            (NUM_RECENT_KEYS - recent_keys_index) * sizeof (Lisp_Object));
 +      memcpy (XVECTOR (val)->contents + NUM_RECENT_KEYS - recent_keys_index,
 +            keys, recent_keys_index * sizeof (Lisp_Object));
        return val;
      }
  }
@@@ -10653,7 -10849,7 +10653,7 @@@ the last key sequence that has been rea
  The value is a string or a vector.
  
  See also `this-command-keys-vector'.  */)
 -     ()
 +  (void)
  {
    return make_event_array (this_command_key_count,
                           XVECTOR (this_command_keys)->contents);
@@@ -10665,7 -10861,7 +10665,7 @@@ However, if the command has called `rea
  the last key sequence that has been read.
  
  See also `this-command-keys'.  */)
 -     ()
 +  (void)
  {
    return Fvector (this_command_key_count,
                  XVECTOR (this_command_keys)->contents);
@@@ -10679,7 -10875,7 +10679,7 @@@ the command loop or by `read-key-sequen
  Unlike `this-command-keys', this function's value
  does not include prefix arguments.
  The value is always a vector.  */)
 -     ()
 +  (void)
  {
    return Fvector (this_command_key_count
                  - this_single_command_key_start,
@@@ -10695,7 -10891,7 +10695,7 @@@ the command loop or by `read-key-sequen
  Unlike `this-single-command-keys', this function's value
  shows the events before all translations (except for input methods).
  The value is always a vector.  */)
 -     ()
 +  (void)
  {
    return Fvector (raw_keybuf_count,
                  (XVECTOR (raw_keybuf)->contents));
@@@ -10713,7 -10909,7 +10713,7 @@@ both in the value of (this-command-keys
  To achieve this, `universal-argument-other-key' calls
  `reset-this-command-lengths', which discards the record of reading
  these events the first time.  */)
 -     ()
 +  (void)
  {
    this_command_key_count = before_command_key_count;
    if (this_command_key_count < this_single_command_key_start)
@@@ -10733,7 -10929,8 +10733,7 @@@ DEFUN ("clear-this-command-keys", Fclea
         doc: /* Clear out the vector that `this-command-keys' returns.
  Also clear the record of the last 100 events, unless optional arg
  KEEP-RECORD is non-nil.  */)
 -     (keep_record)
 -     Lisp_Object keep_record;
 +  (Lisp_Object keep_record)
  {
    int i;
  
  
  DEFUN ("recursion-depth", Frecursion_depth, Srecursion_depth, 0, 0, 0,
         doc: /* Return the current depth in recursive edits.  */)
 -     ()
 +  (void)
  {
    Lisp_Object temp;
    XSETFASTINT (temp, command_loop_level + minibuf_level);
@@@ -10763,7 -10960,8 +10763,7 @@@ DEFUN ("open-dribble-file", Fopen_dribb
         "FOpen dribble file: ",
         doc: /* Start writing all keyboard characters to a dribble file called FILE.
  If FILE is nil, close any open dribble file.  */)
 -     (file)
 -     Lisp_Object file;
 +  (Lisp_Object file)
  {
    if (dribble)
      {
  DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0,
         doc: /* Discard the contents of the terminal input buffer.
  Also end any kbd macro being defined.  */)
 -     ()
 +  (void)
  {
    if (!NILP (current_kboard->defining_kbd_macro))
      {
@@@ -10820,7 -11018,8 +10820,7 @@@ After resumption run the normal hook `s
  
  Some operating systems cannot stop the Emacs process and resume it later.
  On such systems, Emacs starts a subshell instead of suspending.  */)
 -     (stuffstring)
 -     Lisp_Object stuffstring;
 +  (Lisp_Object stuffstring)
  {
    int count = SPECPDL_INDEX ();
    int old_height, old_width;
    reset_all_sys_modes ();
    /* sys_suspend can get an error if it tries to fork a subshell
       and the system resources aren't available for that.  */
 -  record_unwind_protect ((Lisp_Object (*) P_ ((Lisp_Object))) init_all_sys_modes,
 +  record_unwind_protect ((Lisp_Object (*) (Lisp_Object)) init_all_sys_modes,
                         Qnil);
    stuff_buffered_input (stuffstring);
    if (cannot_suspend)
     Then in any case stuff anything Emacs has read ahead and not used.  */
  
  void
 -stuff_buffered_input (stuffstring)
 -     Lisp_Object stuffstring;
 +stuff_buffered_input (Lisp_Object stuffstring)
  {
  #ifdef SIGTSTP  /* stuff_char is defined if SIGTSTP.  */
    register unsigned char *p;
  
    if (STRINGP (stuffstring))
      {
 -      register int count;
 +      register EMACS_INT count;
  
        p = SDATA (stuffstring);
        count = SBYTES (stuffstring);
  }
  \f
  void
 -set_waiting_for_input (time_to_clear)
 -     EMACS_TIME *time_to_clear;
 +set_waiting_for_input (struct timeval *time_to_clear)
  {
    input_available_clear_time = time_to_clear;
  
  }
  
  void
 -clear_waiting_for_input ()
 +clear_waiting_for_input (void)
  {
    /* Tell handle_interrupt not to throw back to read_char,  */
    waiting_for_input = 0;
     Otherwise, the handler kills Emacs.  */
  
  static SIGTYPE
 -interrupt_signal (signalnum)  /* If we don't have an argument, */
 -     int signalnum;           /* some compilers complain in signal calls. */
 +interrupt_signal (int signalnum)      /* If we don't have an argument, some */
 +                                      /* compilers complain in signal calls. */
  {
    /* Must preserve main program's value of errno.  */
    int old_errno = errno;
    struct terminal *terminal;
  
 -#if defined (USG) && !defined (POSIX_SIGNALS)
 -  /* USG systems forget handlers when they are used;
 -     must reestablish each time */
 -  signal (SIGINT, interrupt_signal);
 -  signal (SIGQUIT, interrupt_signal);
 -#endif /* USG */
 -
    SIGNAL_THREAD_CHECK (signalnum);
  
    /* See if we have an active terminal on our controlling tty. */
     non-nil, it stops the job right away. */
  
  static void
 -handle_interrupt ()
 +handle_interrupt (void)
  {
    char c;
  
          GCPRO4 (saved.object, saved.global_code,
                  saved.current_syntax_table, saved.old_prop);
          Fsignal (Qquit, Qnil);
 +        /* FIXME: AFAIK, `quit' can never return, so this code is dead!  */
          gl_state = saved;
          UNGCPRO;
        }
  /* Handle a C-g by making read_char return C-g.  */
  
  void
 -quit_throw_to_read_char ()
 +quit_throw_to_read_char (void)
  {
    sigfree ();
    /* Prevent another signal from doing this before we finish.  */
@@@ -11140,7 -11347,8 +11140,7 @@@ If INTERRUPT is non-nil, Emacs will us
  otherwise Emacs uses CBREAK mode.
  
  See also `current-input-mode'.  */)
 -     (interrupt)
 -     Lisp_Object interrupt;
 +  (Lisp_Object interrupt)
  {
    int new_interrupt_input;
  #ifdef SIGIO
      {
        /* When using X, don't give the user a real choice,
         because we haven't implemented the mechanisms to support it.  */
 -#ifdef NO_SOCK_SIGIO
 -      new_interrupt_input = 0;
 -#else /* not NO_SOCK_SIGIO */
        new_interrupt_input = 1;
 -#endif /* NO_SOCK_SIGIO */
      }
    else
  #endif /* HAVE_X_WINDOWS */
  #ifndef DOS_NT
        /* this causes startup screen to be restored and messes with the mouse */
        reset_all_sys_modes ();
 -#endif
        interrupt_input = new_interrupt_input;
 -#ifndef DOS_NT
        init_all_sys_modes ();
 +#else
 +      interrupt_input = new_interrupt_input;
  #endif
  
  #ifdef POLL_FOR_INPUT
@@@ -11190,7 -11402,8 +11190,7 @@@ This setting only has an effect on tty 
  Emacs reads input in CBREAK mode; see `set-input-interrupt-mode'.
  
  See also `current-input-mode'.  */)
 -       (flow, terminal)
 -       Lisp_Object flow, terminal;
 +  (Lisp_Object flow, Lisp_Object terminal)
  {
    struct terminal *t = get_terminal (terminal, 1);
    struct tty_display_info *tty;
@@@ -11232,7 -11445,8 +11232,7 @@@ It may be a terminal object, a frame, o
  the currently selected frame.
  
  See also `current-input-mode'.  */)
 -       (meta, terminal)
 -       Lisp_Object meta, terminal;
 +  (Lisp_Object meta, Lisp_Object terminal)
  {
    struct terminal *t = get_terminal (terminal, 1);
    struct tty_display_info *tty;
@@@ -11273,7 -11487,8 +11273,7 @@@ This function only has an effect on th
  process.
  
  See also `current-input-mode'.  */)
 -       (quit)
 -       Lisp_Object quit;
 +  (Lisp_Object quit)
  {
    struct terminal *t = get_named_tty ("/dev/tty");
    struct tty_display_info *tty;
@@@ -11310,7 -11525,8 +11310,7 @@@ Third arg META t means accept 8-bit inp
   Otherwise, accept 8-bit input and don't use the top bit for Meta.
  Optional fourth arg QUIT if non-nil specifies character to use for quitting.
  See also `current-input-mode'.  */)
 -     (interrupt, flow, meta, quit)
 -     Lisp_Object interrupt, flow, meta, quit;
 +  (Lisp_Object interrupt, Lisp_Object flow, Lisp_Object meta, Lisp_Object quit)
  {
    Fset_input_interrupt_mode (interrupt);
    Fset_output_flow_control (flow, Qnil);
@@@ -11334,7 -11550,7 +11334,7 @@@ The value is a list of the form (INTERR
    QUIT is the character Emacs currently uses to quit.
  The elements of this list correspond to the arguments of
  `set-input-mode'.  */)
 -     ()
 +  (void)
  {
    Lisp_Object val[4];
    struct frame *sf = XFRAME (selected_frame);
@@@ -11368,7 -11584,8 +11368,7 @@@ The return value is similar to a mouse 
     (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
      IMAGE (DX . DY) (WIDTH . HEIGHT))
  The `posn-' functions access elements of such lists.  */)
 -  (x, y, frame_or_window, whole)
 -     Lisp_Object x, y, frame_or_window, whole;
 +  (Lisp_Object x, Lisp_Object y, Lisp_Object frame_or_window, Lisp_Object whole)
  {
    CHECK_NATNUM (x);
    CHECK_NATNUM (y);
  
    CHECK_LIVE_FRAME (frame_or_window);
  
 -  return make_lispy_position (XFRAME (frame_or_window), &x, &y, 0);
 +  return make_lispy_position (XFRAME (frame_or_window), x, y, 0);
  }
  
  DEFUN ("posn-at-point", Fposn_at_point, Sposn_at_point, 0, 2, 0,
@@@ -11408,7 -11625,8 +11408,7 @@@ to the given buffer position
     (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
      IMAGE (DX . DY) (WIDTH . HEIGHT))
  The `posn-' functions access elements of such lists.  */)
 -  (pos, window)
 -     Lisp_Object pos, window;
 +  (Lisp_Object pos, Lisp_Object window)
  {
    Lisp_Object tem;
  
   * Set up a new kboard object with reasonable initial values.
   */
  void
 -init_kboard (kb)
 -     KBOARD *kb;
 +init_kboard (KBOARD *kb)
  {
    kb->Voverriding_terminal_local_map = Qnil;
    kb->Vlast_command = Qnil;
   * it a second time.
   */
  static void
 -wipe_kboard (kb)
 -     KBOARD *kb;
 +wipe_kboard (KBOARD *kb)
  {
    xfree (kb->kbd_macro_buffer);
  }
  /* Free KB and memory referenced from it.  */
  
  void
 -delete_kboard (kb)
 -     KBOARD *kb;
 +delete_kboard (KBOARD *kb)
  {
    KBOARD **kbp;
  
  }
  
  void
 -init_keyboard ()
 +init_keyboard (void)
  {
    /* This is correct before outermost invocation of the editor loop */
    command_loop_level = -1;
           Emacs on SIGINT when there are no termcap frames on the
           controlling terminal. */
        signal (SIGINT, interrupt_signal);
 -#if defined (HAVE_TERMIO) || defined (HAVE_TERMIOS)
 +#ifndef DOS_NT
        /* For systems with SysV TERMIO, C-g is set up for both SIGINT and
         SIGQUIT and we can't tell which one it will give us.  */
        signal (SIGQUIT, interrupt_signal);
 -#endif /* HAVE_TERMIO */
 +#endif /* not DOS_NT */
      }
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  #ifdef SIGIO
     event header symbols and put properties on them.  */
  struct event_head {
    Lisp_Object *var;
 -  char *name;
 +  const char *name;
    Lisp_Object *kind;
  };
  
 -struct event_head head_table[] = {
 +static const struct event_head head_table[] = {
    {&Qmouse_movement,      "mouse-movement",      &Qmouse_movement},
    {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement},
    {&Qswitch_frame,        "switch-frame",        &Qswitch_frame},
  };
  
  void
 -syms_of_keyboard ()
 +syms_of_keyboard (void)
  {
    pending_funcalls = Qnil;
    staticpro (&pending_funcalls);
    staticpro (&QCtoggle);
    QCradio = intern_c_string (":radio");
    staticpro (&QCradio);
 +  QClabel = intern_c_string (":label");
 +  staticpro (&QClabel);
 +  QCvert_only = intern_c_string (":vert-only");
 +  staticpro (&QCvert_only);
  
    Qmode_line = intern_c_string ("mode-line");
    staticpro (&Qmode_line);
    Qinput_method_function = intern_c_string ("input-method-function");
    staticpro (&Qinput_method_function);
  
 +  Qx_set_selection = intern_c_string ("x-set-selection");
 +  staticpro (&Qx_set_selection);
 +  QPRIMARY = intern_c_string ("PRIMARY");
 +  staticpro (&QPRIMARY);
 +  Qhandle_switch_frame = intern_c_string ("handle-switch-frame");
 +  staticpro (&Qhandle_switch_frame);
 +
    Qinput_method_exit_on_first_char = intern_c_string ("input-method-exit-on-first-char");
    staticpro (&Qinput_method_exit_on_first_char);
    Qinput_method_use_echo_area = intern_c_string ("input-method-use-echo-area");
    last_point_position_window = Qnil;
  
    {
 -    struct event_head *p;
 +    const struct event_head *p;
  
      for (p = head_table;
         p < head_table + (sizeof (head_table) / sizeof (head_table[0]));
@@@ -12166,12 -12376,6 +12166,12 @@@ might happen repeatedly and make Emacs 
  The elements of the list are event types that may have menu bar bindings.  */);
    Vmenu_bar_final_items = Qnil;
  
 +  DEFVAR_LISP ("tool-bar-separator-image-expression", &Vtool_bar_separator_image_expression,
 +    doc: /* Expression evaluating to the image spec for a tool-bar separator.
 +This is used internally by graphical displays that do not render
 +tool-bar separators natively.  Otherwise it is unused (e.g. on GTK).  */);
 +  Vtool_bar_separator_image_expression = Qnil;
 +
    DEFVAR_KBOARD ("overriding-terminal-local-map",
                 Voverriding_terminal_local_map,
                 doc: /* Per-terminal keymap that overrides all other local keymaps.
@@@ -12384,23 -12588,6 +12384,23 @@@ Help functions bind this to allow help 
  and tool-bar buttons.  */);
    Venable_disabled_menus_and_buttons = Qnil;
  
-              doc: /* If non-nil, an active region automatically becomes the window selection.
 +  DEFVAR_LISP ("select-active-regions",
 +             &Vselect_active_regions,
++             doc: /* If non-nil, an active region automatically sets the primary selection.
 +If the value is `only', only temporarily active regions (usually made
 +by mouse-dragging or shift-selection) set the window selection.
 +
 +This takes effect only when Transient Mark mode is enabled.  */);
 +  Vselect_active_regions = Qt;
 +
 +  DEFVAR_LISP ("saved-region-selection",
 +             &Vsaved_region_selection,
 +             doc: /* Contents of active region prior to buffer modification.
 +If `select-active-regions' is non-nil, Emacs sets this to the
 +text in the region before modifying the buffer.  The next
 +`deactivate-mark' call uses this to set the window selection.  */);
 +  Vsaved_region_selection = Qnil;
 +
    /* Create the initial keyboard. */
    initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
    init_kboard (initial_kboard);
  }
  
  void
 -keys_of_keyboard ()
 +keys_of_keyboard (void)
  {
    initial_define_key (global_map, Ctl ('Z'), "suspend-emacs");
    initial_define_key (control_x_map, Ctl ('Z'), "suspend-emacs");
  /* Mark the pointers in the kboard objects.
     Called by the Fgarbage_collector.  */
  void
 -mark_kboards ()
 +mark_kboards (void)
  {
    KBOARD *kb;
    Lisp_Object *p;
    }
  }
  
 -/* arch-tag: 774e34d7-6d31-42f3-8397-e079a4e4c9ca
 -   (do not change this comment) */
diff --combined src/window.c
index 920a528a03e0226a554128fedcc4198449f3a8b7,1c50e9976849696fe4c21a0450233b8708b227ea..b01714360886ff9c99adba401bdfd16b0fc60e32
@@@ -51,40 -51,40 +51,40 @@@ along with GNU Emacs.  If not, see <htt
  #include "nsterm.h"
  #endif
  
 -
  Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;
  Lisp_Object Qdisplay_buffer;
 -Lisp_Object Qscroll_up, Qscroll_down;
 +Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
  Lisp_Object Qwindow_size_fixed;
  
 -extern Lisp_Object Qleft_margin, Qright_margin;
 -
 -static int displayed_window_lines P_ ((struct window *));
 -static struct window *decode_window P_ ((Lisp_Object));
 -static int count_windows P_ ((struct window *));
 -static int get_leaf_windows P_ ((struct window *, struct window **, int));
 -static void window_scroll P_ ((Lisp_Object, int, int, int));
 -static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int));
 -static void window_scroll_line_based P_ ((Lisp_Object, int, int, int));
 -static int window_min_size_1 P_ ((struct window *, int, int));
 -static int window_min_size_2 P_ ((struct window *, int, int));
 -static int window_min_size P_ ((struct window *, int, int, int, int *));
 -static void size_window P_ ((Lisp_Object, int, int, int, int, int));
 -static int freeze_window_start P_ ((struct window *, void *));
 -static int window_fixed_size_p P_ ((struct window *, int, int));
 -static void enlarge_window P_ ((Lisp_Object, int, int));
 -static Lisp_Object window_list P_ ((void));
 -static int add_window_to_list P_ ((struct window *, void *));
 -static int candidate_window_p P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
 -                                 Lisp_Object));
 -static Lisp_Object next_window P_ ((Lisp_Object, Lisp_Object,
 -                                  Lisp_Object, int));
 -static void decode_next_window_args P_ ((Lisp_Object *, Lisp_Object *,
 -                                       Lisp_Object *));
 -static int foreach_window_1 P_ ((struct window *,
 -                               int (* fn) (struct window *, void *),
 -                               void *));
 -static Lisp_Object window_list_1 P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
 +static int displayed_window_lines (struct window *);
 +static struct window *decode_window (Lisp_Object);
 +static int count_windows (struct window *);
 +static int get_leaf_windows (struct window *, struct window **, int);
 +static void window_scroll (Lisp_Object, int, int, int);
 +static void window_scroll_pixel_based (Lisp_Object, int, int, int);
 +static void window_scroll_line_based (Lisp_Object, int, int, int);
 +static int window_min_size_1 (struct window *, int, int);
 +static int window_min_size_2 (struct window *, int, int);
 +static int window_min_size (struct window *, int, int, int, int *);
 +static void size_window (Lisp_Object, int, int, int, int, int);
 +static int freeze_window_start (struct window *, void *);
 +static int window_fixed_size_p (struct window *, int, int);
 +static void enlarge_window (Lisp_Object, int, int);
 +static Lisp_Object window_list (void);
 +static int add_window_to_list (struct window *, void *);
 +static int candidate_window_p (Lisp_Object, Lisp_Object, Lisp_Object,
 +                               Lisp_Object);
 +static Lisp_Object next_window (Lisp_Object, Lisp_Object,
 +                                Lisp_Object, int);
 +static void decode_next_window_args (Lisp_Object *, Lisp_Object *,
 +                                     Lisp_Object *);
 +static void foreach_window (struct frame *,
 +                            int (* fn) (struct window *, void *),
 +                            void *);
 +static int foreach_window_1 (struct window *,
 +                             int (* fn) (struct window *, void *),
 +                             void *);
 +static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object);
  
  /* This is the window in which the terminal's cursor should
     be left when nothing is being done with it.  This must
@@@ -191,29 -191,36 +191,29 @@@ static int window_scroll_preserve_vpos
  static int inhibit_frame_unsplittable;
  #endif /* 0 */
  
 -extern EMACS_INT scroll_margin;
 -
 -extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
 -
  /* If non-nil, then the `recenter' command with a nil argument
     the entire frame to be redrawn; the special value `tty' causes the
     frame to be redrawn only if it is a tty frame.  */
  
  static Lisp_Object Vrecenter_redisplay;
 -extern Lisp_Object Qtty;
  
  \f
  DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
         doc: /* Return t if OBJECT is a window.  */)
 -     (object)
 -     Lisp_Object object;
 +  (Lisp_Object object)
  {
    return WINDOWP (object) ? Qt : Qnil;
  }
  
  DEFUN ("window-live-p", Fwindow_live_p, Swindow_live_p, 1, 1, 0,
         doc: /* Return t if OBJECT is a window which is currently visible.  */)
 -     (object)
 -     Lisp_Object object;
 +  (Lisp_Object object)
  {
    return WINDOW_LIVE_P (object) ? Qt : Qnil;
  }
  
  Lisp_Object
 -make_window ()
 +make_window (void)
  {
    Lisp_Object val;
    register struct window *p;
    p->dedicated = Qnil;
    p->window_parameters = Qnil;
    p->pseudo_window_p = 0;
 -  bzero (&p->cursor, sizeof (p->cursor));
 -  bzero (&p->last_cursor, sizeof (p->last_cursor));
 -  bzero (&p->phys_cursor, sizeof (p->phys_cursor));
 +  memset (&p->cursor, 0, sizeof (p->cursor));
 +  memset (&p->last_cursor, 0, sizeof (p->last_cursor));
 +  memset (&p->phys_cursor, 0, sizeof (p->phys_cursor));
    p->desired_matrix = p->current_matrix = 0;
    p->nrows_scale_factor = p->ncols_scale_factor = 1;
    p->phys_cursor_type = -1;
  
  DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0,
         doc: /* Return the window that the cursor now appears in and commands apply to.  */)
 -     ()
 +  (void)
  {
    return selected_window;
  }
@@@ -276,7 -283,8 +276,7 @@@ DEFUN ("minibuffer-window", Fminibuffer
         doc: /* Return the window used now for minibuffers.
  If the optional argument FRAME is specified, return the minibuffer window
  used by that frame.  */)
 -     (frame)
 -    Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    if (NILP (frame))
      frame = selected_frame;
  DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0,
         doc: /* Return non-nil if WINDOW is a minibuffer window.
  WINDOW defaults to the selected window.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    struct window *w = decode_window (window);
    return MINI_WINDOW_P (w) ? Qt : Qnil;
@@@ -311,10 -320,11 +311,10 @@@ of the window.  The remaining elements 
  POS is fully visible; otherwise, RTOP and RBOT are the number of pixels
  off-window at the top and bottom of the row, ROWH is the height of the
  display row, and VPOS is the row number (0-based) containing POS.  */)
 -     (pos, window, partially)
 -     Lisp_Object pos, window, partially;
 +  (Lisp_Object pos, Lisp_Object window, Lisp_Object partially)
  {
    register struct window *w;
 -  register int posint;
 +  register EMACS_INT posint;
    register struct buffer *buf;
    struct text_pos top;
    Lisp_Object in_window = Qnil;
@@@ -379,7 -389,8 +379,7 @@@ of the (first) text line, YPOS is negat
  
  Return nil if window display is not up-to-date.  In that case, use
  `pos-visible-in-window-p' to obtain the information.  */)
 -     (line, window)
 -     Lisp_Object line, window;
 +  (Lisp_Object line, Lisp_Object window)
  {
    register struct window *w;
    register struct buffer *b;
  
  \f
  static struct window *
 -decode_window (window)
 -     register Lisp_Object window;
 +decode_window (register Lisp_Object window)
  {
    if (NILP (window))
      return XWINDOW (selected_window);
  }
  
  static struct window *
 -decode_any_window (window)
 -     register Lisp_Object window;
 +decode_any_window (register Lisp_Object window)
  {
    if (NILP (window))
      return XWINDOW (selected_window);
  DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0,
         doc: /* Return the buffer that WINDOW is displaying.
  WINDOW defaults to the selected window.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return decode_window (window)->buffer;
  }
@@@ -507,7 -521,8 +507,7 @@@ The return value includes WINDOW's mod
  
  Note: The function does not take into account the value of `line-spacing'
  when calculating the number of lines in WINDOW.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return decode_any_window (window)->total_lines;
  }
@@@ -519,7 -534,8 +519,7 @@@ WINDOW defaults to the selected window
  Note: The return value is the number of columns available for text in
  WINDOW.  If you want to find out how many columns WINDOW takes up, use
  (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))).  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return make_number (window_box_text_cols (decode_any_window (window)));
  }
  DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0,
         doc: /* Return t if WINDOW is as wide as its frame.
  WINDOW defaults to the selected window.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil;
  }
  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 defaults to the selected window.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return decode_window (window)->hscroll;
  }
@@@ -546,7 -564,8 +546,7 @@@ Return NCOL.  NCOL should be zero or po
  
  Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
  window so that the location of point moves off-window.  */)
 -     (window, ncol)
 -     Lisp_Object window, ncol;
 +  (Lisp_Object window, Lisp_Object ncol)
  {
    struct window *w = decode_window (window);
    int hscroll;
@@@ -567,7 -586,8 +567,7 @@@ DEFUN ("window-redisplay-end-trigger", 
         doc: /* Return WINDOW's redisplay end trigger value.
  WINDOW defaults to the selected window.
  See `set-window-redisplay-end-trigger' for more information.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return decode_window (window)->redisplay_end_trigger;
  }
@@@ -580,7 -600,8 +580,7 @@@ If it is a buffer position, then if red
  beyond VALUE, the functions in `redisplay-end-trigger-functions' are called
  with two arguments: WINDOW, and the end trigger value.
  Afterwards the end-trigger value is reset to nil.  */)
 -     (window, value)
 -     register Lisp_Object window, value;
 +  (register Lisp_Object window, Lisp_Object value)
  {
    register struct window *w;
  
@@@ -600,7 -621,8 +600,7 @@@ BOTTOM is one more than the bottommost 
  The edges include the space used by WINDOW's scroll bar, display
  margins, fringes, header line, and/or mode line.  For the edges of
  just the text area, use `window-inside-edges'.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    register struct window *w = decode_any_window (window);
  
@@@ -621,7 -643,8 +621,7 @@@ BOTTOM is one more than the bottommost 
  The pixel edges include the space used by WINDOW's scroll bar, display
  margins, fringes, header line, and/or mode line.  For the pixel edges
  of just the text area, use `window-inside-pixel-edges'.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    register struct window *w = decode_any_window (window);
  
                Qnil))));
  }
  
 +static void
 +calc_absolute_offset(struct window *w, int *add_x, int *add_y)
 +{
 +  struct frame *f = XFRAME (w->frame);
 +  *add_y = f->top_pos;
 +#ifdef FRAME_MENUBAR_HEIGHT
 +  *add_y += FRAME_MENUBAR_HEIGHT (f);
 +#endif
 +#ifdef FRAME_TOOLBAR_TOP_HEIGHT
 +  *add_y += FRAME_TOOLBAR_TOP_HEIGHT (f);
 +#elif FRAME_TOOLBAR_HEIGHT
 +  *add_y += FRAME_TOOLBAR_HEIGHT (f);
 +#endif
 +#ifdef FRAME_NS_TITLEBAR_HEIGHT
 +  *add_y += FRAME_NS_TITLEBAR_HEIGHT (f);
 +#endif
 +  *add_x = f->left_pos;
 +#ifdef FRAME_TOOLBAR_LEFT_WIDTH
 +  *add_x += FRAME_TOOLBAR_LEFT_WIDTH (f);
 +#endif
 +}
 +
 +DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges,
 +       Swindow_absolute_pixel_edges, 0, 1, 0,
 +       doc: /* Return a list of the edge pixel coordinates of WINDOW.
 +The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at
 +the top left corner of the display.
 +
 +RIGHT is one more than the rightmost x position occupied by WINDOW.
 +BOTTOM is one more than the bottommost y position occupied by WINDOW.
 +The pixel edges include the space used by WINDOW's scroll bar, display
 +margins, fringes, header line, and/or mode line.  For the pixel edges
 +of just the text area, use `window-inside-absolute-pixel-edges'.  */)
 +  (Lisp_Object window)
 +{
 +  register struct window *w = decode_any_window (window);
 +  int add_x, add_y;
 +  calc_absolute_offset (w, &add_x, &add_y);
 +
 +  return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x),
 +         Fcons (make_number (WINDOW_TOP_EDGE_Y (w) + add_y),
 +       Fcons (make_number (WINDOW_RIGHT_EDGE_X (w) + add_x),
 +       Fcons (make_number (WINDOW_BOTTOM_EDGE_Y (w) + add_y),
 +              Qnil))));
 +}
 +
  DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0,
         doc: /* Return a list of the edge coordinates of WINDOW.
  The list has the form (LEFT TOP RIGHT BOTTOM).
@@@ -688,7 -665,8 +688,7 @@@ RIGHT is one more than the rightmost co
  BOTTOM is one more than the bottommost row of WINDOW's text area.
  The inside edges do not include the space used by the WINDOW's scroll
  bar, display margins, fringes, header line, and/or mode line.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    register struct window *w = decode_any_window (window);
  
@@@ -713,7 -691,8 +713,7 @@@ RIGHT is one more than the rightmost x 
  BOTTOM is one more than the bottommost y position of WINDOW's text area.
  The inside edges do not include the space used by WINDOW's scroll bar,
  display margins, fringes, header line, and/or mode line.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    register struct window *w = decode_any_window (window);
  
                             - WINDOW_MODE_LINE_HEIGHT (w)));
  }
  
 -/* Test if the character at column *X, row *Y is within window W.
 +DEFUN ("window-inside-absolute-pixel-edges",
 +       Fwindow_inside_absolute_pixel_edges,
 +       Swindow_inside_absolute_pixel_edges, 0, 1, 0,
 +       doc: /* Return a list of the edge pixel coordinates of WINDOW.
 +The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at
 +the top left corner of the display.
 +
 +RIGHT is one more than the rightmost x position of WINDOW's text area.
 +BOTTOM is one more than the bottommost y position of WINDOW's text area.
 +The inside edges do not include the space used by WINDOW's scroll bar,
 +display margins, fringes, header line, and/or mode line.  */)
 +  (Lisp_Object window)
 +{
 +  register struct window *w = decode_any_window (window);
 +  int add_x, add_y;
 +  calc_absolute_offset (w, &add_x, &add_y);
 +
 +  return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w)
 +                           + WINDOW_LEFT_MARGIN_WIDTH (w)
 +                           + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x),
 +              make_number (WINDOW_TOP_EDGE_Y (w)
 +                           + WINDOW_HEADER_LINE_HEIGHT (w) + add_y),
 +              make_number (WINDOW_BOX_RIGHT_EDGE_X (w)
 +                           - WINDOW_RIGHT_MARGIN_WIDTH (w)
 +                           - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x),
 +              make_number (WINDOW_BOTTOM_EDGE_Y (w)
 +                           - WINDOW_MODE_LINE_HEIGHT (w) + add_y));
 +}
 +
 +/* Test if the character at column X, row Y is within window W.
     If it is not, return ON_NOTHING;
 -   if it is in the window's text area,
 -      set *x and *y to its location relative to the upper left corner
 -         of the window, and
 -      return ON_TEXT;
 +   if it is in the window's text area, return ON_TEXT;
     if it is on the window's modeline, return ON_MODE_LINE;
     if it is on the border between the window and its right sibling,
        return ON_VERTICAL_BORDER.
 -   if it is on a scroll bar,
 -      return ON_SCROLL_BAR.
 +   if it is on a scroll bar, return ON_SCROLL_BAR.
     if it is on the window's top line, return ON_HEADER_LINE;
     if it is in left or right fringe of the window,
 -      return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y
 -      to window-relative coordinates;
 +      return ON_LEFT_FRINGE or ON_RIGHT_FRINGE;
     if it is in the marginal area to the left/right of the window,
 -      return ON_LEFT_MARGIN or ON_RIGHT_MARGIN, and convert *X and *Y
 -      to window-relative coordinates.
 +      return ON_LEFT_MARGIN or ON_RIGHT_MARGIN.
  
     X and Y are frame relative pixel coordinates.  */
  
  static enum window_part
 -coordinates_in_window (w, x, y)
 -     register struct window *w;
 -     register int *x, *y;
 +coordinates_in_window (register struct window *w, int x, int y)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
 -  int left_x, right_x, top_y, bottom_y;
 +  int left_x, right_x;
    enum window_part part;
    int ux = FRAME_COLUMN_WIDTH (f);
    int x0 = WINDOW_LEFT_EDGE_X (w);
       (Between mode lines for instance.  */
    int grabbable_width = ux;
    int lmargin_width, rmargin_width, text_left, text_right;
 +  int top_y = WINDOW_TOP_EDGE_Y (w);
 +  int bottom_y = WINDOW_BOTTOM_EDGE_Y (w);
 +
 +  /* Outside any interesting row?  */
 +  if (y < top_y || y >= bottom_y)
 +    return ON_NOTHING;
  
    /* In what's below, we subtract 1 when computing right_x because we
       want the rightmost pixel, which is given by left_pixel+width-1.  */
      {
        left_x = 0;
        right_x = WINDOW_TOTAL_WIDTH (w) - 1;
 -      top_y = WINDOW_TOP_EDGE_Y (w);
 -      bottom_y = WINDOW_BOTTOM_EDGE_Y (w);
      }
    else
      {
        left_x = WINDOW_BOX_LEFT_EDGE_X (w);
        right_x = WINDOW_BOX_RIGHT_EDGE_X (w) - 1;
 -      top_y = WINDOW_TOP_EDGE_Y (w);
 -      bottom_y = WINDOW_BOTTOM_EDGE_Y (w);
      }
  
 -  /* Outside any interesting row?  */
 -  if (*y < top_y || *y >= bottom_y)
 -    return ON_NOTHING;
 -
    /* On the mode line or header line?  If it's near the start of
       the mode or header line of window that's has a horizontal
       sibling, say it's on the vertical line.  That's to be able
       scroll bars.  */
  
    if (WINDOW_WANTS_MODELINE_P (w)
 -      && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
 +      && y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
      {
        part = ON_MODE_LINE;
  
         between mode lines of horizontally adjacent mode lines
         as the vertical border.  If scroll bars on the left,
         return the right window.  */
 -      if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
 -        || WINDOW_RIGHTMOST_P (w))
 -      {
 -        if (!WINDOW_LEFTMOST_P (w) && eabs (*x - x0) < grabbable_width)
 -          {
 -            /* Convert X and Y to window relative coordinates.
 -               Vertical border is at the left edge of window.  */
 -            *x = max (0, *x - x0);
 -            *y -= top_y;
 -            return ON_VERTICAL_BORDER;
 -          }
 -      }
 -      else
 -      {
 -        /* Make sure we're not at the rightmost position of a
 -           mode-/header-line and there's yet another window on
 -           the right.  (Bug#1372)  */
 -        if ((WINDOW_RIGHTMOST_P (w) || *x < x1)
 -            && eabs (*x - x1) < grabbable_width)
 -          {
 -            /* Convert X and Y to window relative coordinates.
 -               Vertical border is at the right edge of window.  */
 -            *x = min (x1, *x) - x0;
 -            *y -= top_y;
 -            return ON_VERTICAL_BORDER;
 -          }
 -      }
 -
 -      if (*x < x0 || *x >= x1)
 +      if ((WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
 +         || WINDOW_RIGHTMOST_P (w))
 +        && !WINDOW_LEFTMOST_P (w)
 +        && eabs (x - x0) < grabbable_width)
 +      return ON_VERTICAL_BORDER;
 +
 +      /* Make sure we're not at the rightmost position of a
 +       mode-/header-line and there's yet another window on the
 +       right.  (Bug#1372)  */
 +      else if ((WINDOW_RIGHTMOST_P (w) || x < x1)
 +             && eabs (x - x1) < grabbable_width)
 +      return ON_VERTICAL_BORDER;
 +
 +      if (x < x0 || x >= x1)
        return ON_NOTHING;
  
 -      /* Convert X and Y to window relative coordinates.
 -       Mode line starts at left edge of window.  */
 -      *x -= x0;
 -      *y -= top_y;
        return part;
      }
  
    if (WINDOW_WANTS_HEADER_LINE_P (w)
 -      && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
 +      && y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
      {
        part = ON_HEADER_LINE;
        goto header_vertical_border_check;
      }
  
 -  if (*x < x0 || *x >= x1)
 -    return ON_NOTHING;
 +  if (x < x0 || x >= x1) return ON_NOTHING;
  
    /* Outside any interesting column?  */
 -  if (*x < left_x || *x > right_x)
 -    {
 -      *y -= top_y;
 -      return ON_SCROLL_BAR;
 -    }
 +  if (x < left_x || x > right_x)
 +    return ON_SCROLL_BAR;
  
    lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
    rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
        if (!w->pseudo_window_p
          && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
          && !WINDOW_RIGHTMOST_P (w)
 -        && (eabs (*x - right_x) < grabbable_width))
 -      {
 -        /* Convert X and Y to window relative coordinates.
 -           Vertical border is at the right edge of window.  */
 -        *x = min (right_x, *x) - left_x;
 -        *y -= top_y;
 -        return ON_VERTICAL_BORDER;
 -      }
 -    }
 -  else
 -    {
 -      /* Need to say "*x > right_x" rather than >=, since on character
 -       terminals, the vertical line's x coordinate is right_x.  */
 -      if (!w->pseudo_window_p
 -        && !WINDOW_RIGHTMOST_P (w)
 -        && *x > right_x - ux)
 -      {
 -        /* On the border on the right side of the window?  Assume that
 -           this area begins at RIGHT_X minus a canonical char width.  */
 -        *x = min (right_x, *x) - left_x;
 -        *y -= top_y;
 -        return ON_VERTICAL_BORDER;
 -      }
 +        && (eabs (x - right_x) < grabbable_width))
 +      return ON_VERTICAL_BORDER;
      }
 +  /* Need to say "x > right_x" rather than >=, since on character
 +     terminals, the vertical line's x coordinate is right_x.  */
 +  else if (!w->pseudo_window_p
 +         && !WINDOW_RIGHTMOST_P (w)
 +         && x > right_x - ux)
 +    return ON_VERTICAL_BORDER;
  
 -  if (*x < text_left)
 +  if (x < text_left)
      {
        if (lmargin_width > 0
          && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
 -            ? (*x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w))
 -            : (*x < left_x + lmargin_width)))
 -      {
 -        *x -= left_x;
 -        if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
 -          *x -= WINDOW_LEFT_FRINGE_WIDTH (w);
 -        *y -= top_y;
 -        return ON_LEFT_MARGIN;
 -      }
 +            ? (x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w))
 +            : (x < left_x + lmargin_width)))
 +      return ON_LEFT_MARGIN;
  
 -      /* Convert X and Y to window-relative pixel coordinates.  */
 -      *x -= left_x;
 -      *y -= top_y;
        return ON_LEFT_FRINGE;
      }
  
 -  if (*x >= text_right)
 +  if (x >= text_right)
      {
        if (rmargin_width > 0
          && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
 -            ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
 -            : (*x >= right_x - rmargin_width)))
 -      {
 -        *x -= right_x - rmargin_width;
 -        if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
 -          *x += WINDOW_RIGHT_FRINGE_WIDTH (w);
 -        *y -= top_y;
 -        return ON_RIGHT_MARGIN;
 -      }
 +            ? (x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
 +            : (x >= right_x - rmargin_width)))
 +      return ON_RIGHT_MARGIN;
  
 -      /* Convert X and Y to window-relative pixel coordinates.  */
 -      *x -= left_x + WINDOW_LEFT_FRINGE_WIDTH (w);
 -      *y -= top_y;
        return ON_RIGHT_FRINGE;
      }
  
    /* Everything special ruled out - must be on text area */
 -  *x -= text_left;
 -  *y -= top_y;
    return ON_TEXT;
  }
  
 +/* Take X is the frame-relative pixel x-coordinate, and return the
 +   x-coordinate relative to part PART of window W. */
 +int
 +window_relative_x_coord (struct window *w, enum window_part part, int x)
 +{
 +  int left_x = (w->pseudo_window_p) ? 0 : WINDOW_BOX_LEFT_EDGE_X (w);
 +
 +  switch (part)
 +    {
 +    case ON_TEXT:
 +      return x - window_box_left (w, TEXT_AREA);
 +
 +    case ON_LEFT_FRINGE:
 +      return x - left_x;
 +
 +    case ON_RIGHT_FRINGE:
 +      return x - left_x - WINDOW_LEFT_FRINGE_WIDTH (w);
 +
 +    case ON_LEFT_MARGIN:
 +      return (x - left_x
 +            - ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
 +               ? WINDOW_LEFT_FRINGE_WIDTH (w) : 0));
 +
 +    case ON_RIGHT_MARGIN:
 +      return (x + 1
 +            - ((w->pseudo_window_p)
 +               ? WINDOW_TOTAL_WIDTH (w)
 +               : WINDOW_BOX_RIGHT_EDGE_X (w))
 +            + window_box_width (w, RIGHT_MARGIN_AREA)
 +            + ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
 +               ? WINDOW_RIGHT_FRINGE_WIDTH (w) : 0));
 +    }
 +
 +  /* ON_SCROLL_BAR, ON_NOTHING, and ON_VERTICAL_BORDER:  */
 +  return 0;
 +}
 +
  
  DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p,
         Scoordinates_in_window_p, 2, 2, 0,
@@@ -956,7 -937,8 +956,7 @@@ If they are on the border between WINDO
    `vertical-line' is returned.
  If they are in the windows's left or right marginal areas, `left-margin'\n\
    or `right-margin' is returned.  */)
 -     (coordinates, window)
 -     register Lisp_Object coordinates, window;
 +  (register Lisp_Object coordinates, Lisp_Object window)
  {
    struct window *w;
    struct frame *f;
    x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f);
    y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f);
  
 -  switch (coordinates_in_window (w, &x, &y))
 +  switch (coordinates_in_window (w, x, y))
      {
      case ON_NOTHING:
        return Qnil;
  
      case ON_TEXT:
 -      /* X and Y are now window relative pixel coordinates.  Convert
 -       them to canonical char units before returning them.  */
 +      /* Convert X and Y to window relative pixel coordinates, and
 +       return the canonical char units.  */
 +      x -= window_box_left (w, TEXT_AREA);
 +      y -= WINDOW_TOP_EDGE_Y (w);
        return Fcons (FRAME_CANON_X_FROM_PIXEL_X (f, x),
                    FRAME_CANON_Y_FROM_PIXEL_Y (f, y));
  
  struct check_window_data
  {
    Lisp_Object *window;
 -  int *x, *y;
 +  int x, y;
    enum window_part *part;
  };
  
  static int
 -check_window_containing (w, user_data)
 -     struct window *w;
 -     void *user_data;
 +check_window_containing (struct window *w, void *user_data)
  {
    struct check_window_data *cw = (struct check_window_data *) user_data;
    enum window_part found;
     return it as a Lisp_Object.
  
     If X, Y is on one of the window's special `window_part' elements,
 -   set *PART to the id of that element, and return X and Y converted
 -   to window relative coordinates in WX and WY.
 +   set *PART to the id of that element.
  
     If there is no window under X, Y return nil and leave *PART
     unmodified.  TOOL_BAR_P non-zero means detect tool-bar windows.
     case.  */
  
  Lisp_Object
 -window_from_coordinates (f, x, y, part, wx, wy, tool_bar_p)
 -     struct frame *f;
 -     int x, y;
 -     enum window_part *part;
 -     int *wx, *wy;
 -     int tool_bar_p;
 +window_from_coordinates (struct frame *f, int x, int y,
 +                       enum window_part *part, int tool_bar_p)
  {
    Lisp_Object window;
    struct check_window_data cw;
      part = &dummy;
  
    window = Qnil;
 -  cw.window = &window, cw.x = &x, cw.y = &y; cw.part = part;
 +  cw.window = &window, cw.x = x, cw.y = y; cw.part = part;
    foreach_window (f, check_window_containing, &cw);
  
    /* If not found above, see if it's in the tool bar window, if a tool
        && tool_bar_p
        && WINDOWP (f->tool_bar_window)
        && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)) > 0
 -      && (coordinates_in_window (XWINDOW (f->tool_bar_window), &x, &y)
 +      && (coordinates_in_window (XWINDOW (f->tool_bar_window), x, y)
          != ON_NOTHING))
      {
        *part = ON_TEXT;
        window = f->tool_bar_window;
      }
  
 -  if (wx) *wx = x;
 -  if (wy) *wy = y;
 -
    return window;
  }
  
@@@ -1107,7 -1097,8 +1107,7 @@@ DEFUN ("window-at", Fwindow_at, Swindow
  If omitted, FRAME defaults to the currently selected frame.
  The top left corner of the frame is considered to be row 0,
  column 0.  */)
 -     (x, y, frame)
 -     Lisp_Object x, y, frame;
 +  (Lisp_Object x, Lisp_Object y, Lisp_Object frame)
  {
    struct frame *f;
  
                                   + FRAME_INTERNAL_BORDER_WIDTH (f)),
                                  (FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
                                   + FRAME_INTERNAL_BORDER_WIDTH (f)),
 -                                0, 0, 0, 0);
 +                                0, 0);
  }
  
  DEFUN ("window-point", Fwindow_point, Swindow_point, 0, 1, 0,
@@@ -1140,7 -1131,8 +1140,7 @@@ is also currently selected, the value r
  It would be more strictly correct to return the `top-level' value
  of point, outside of any save-excursion forms.
  But that is hard to define.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    register struct window *w = decode_window (window);
  
@@@ -1154,7 -1146,8 +1154,7 @@@ DEFUN ("window-start", Fwindow_start, S
         doc: /* Return position at which display currently starts in WINDOW.
  WINDOW defaults to the selected window.
  This is updated by redisplay or by calling `set-window-start'.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return Fmarker_position (decode_window (window)->start);
  }
@@@ -1180,7 -1173,8 +1180,7 @@@ Return nil if there is no recorded valu
  last redisplay of WINDOW was preempted, and did not finish.)
  If UPDATE is non-nil, compute the up-to-date position
  if it isn't already recorded.  */)
 -     (window, update)
 -     Lisp_Object window, update;
 +  (Lisp_Object window, Lisp_Object update)
  {
    Lisp_Object value;
    struct window *w = decode_window (window);
  DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0,
         doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer.
  Return POS.  */)
 -     (window, pos)
 -     Lisp_Object window, pos;
 +  (Lisp_Object window, Lisp_Object pos)
  {
    register struct window *w = decode_window (window);
  
@@@ -1272,7 -1267,8 +1272,7 @@@ DEFUN ("set-window-start", Fset_window_
  WINDOW defaults to the selected window.  Return POS.
  Optional third arg NOFORCE non-nil inhibits next redisplay from
  overriding motion of point in order to display at this exact start.  */)
 -     (window, pos, noforce)
 -     Lisp_Object window, pos, noforce;
 +  (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce)
  {
    register struct window *w = decode_window (window);
  
@@@ -1310,7 -1306,8 +1310,7 @@@ from displaying another buffer in it.  
  Functions like `set-window-buffer' may change the buffer displayed by a
  window, unless that window is "strongly" dedicated to its buffer, that
  is the value returned by `window-dedicated-p' is t.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return decode_window (window)->dedicated;
  }
@@@ -1334,7 -1331,8 +1334,7 @@@ its buffer.  Functions like `set-window
  displayed by a window, unless that window is strongly dedicated to its
  buffer.  If and when `set-window-buffer' displays another buffer in a
  window, it also makes sure that the window is not marked as dedicated.  */)
 -     (window, flag)
 -     Lisp_Object window, flag;
 +  (Lisp_Object window, Lisp_Object flag)
  {
    register struct window *w = decode_window (window);
  
@@@ -1348,7 -1346,8 +1348,7 @@@ DEFUN ("window-parameters", Fwindow_par
         doc: /* Return the parameters of WINDOW and their values.
  WINDOW defaults to the selected window.  The return value is a list of
  elements of the form (PARAMETER . VALUE). */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return Fcopy_alist (decode_window (window)->window_parameters);
  }
@@@ -1357,7 -1356,8 +1357,7 @@@ DEFUN ("window-parameter", Fwindow_para
         2, 2, 0,
         doc:  /* Return WINDOW's value for PARAMETER.
  WINDOW defaults to the selected window.  */)
 -     (window, parameter)
 -     Lisp_Object window, parameter;
 +  (Lisp_Object window, Lisp_Object parameter)
  {
    Lisp_Object result;
  
@@@ -1369,7 -1369,8 +1369,7 @@@ DEFUN ("set-window-parameter", Fset_win
         Sset_window_parameter, 3, 3, 0,
         doc: /* Set WINDOW's value of PARAMETER to VALUE.
  WINDOW defaults to the selected window.  Return VALUE.  */)
 -     (window, parameter, value)
 -     Lisp_Object window, parameter, value;
 +  (Lisp_Object window, Lisp_Object parameter, Lisp_Object value)
  {
    register struct window *w = decode_window (window);
    Lisp_Object old_alist_elt;
@@@ -1387,7 -1388,8 +1387,7 @@@ DEFUN ("window-display-table", Fwindow_
         0, 1, 0,
         doc: /* Return the display-table that WINDOW is using.
  WINDOW defaults to the selected window.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    return decode_window (window)->display_table;
  }
     return 0.  */
  
  struct Lisp_Char_Table *
 -window_display_table (w)
 -     struct window *w;
 +window_display_table (struct window *w)
  {
    struct Lisp_Char_Table *dp = NULL;
  
  
  DEFUN ("set-window-display-table", Fset_window_display_table, Sset_window_display_table, 2, 2, 0,
         doc: /* Set WINDOW's display-table to TABLE.  */)
 -     (window, table)
 -     register Lisp_Object window, table;
 +  (register Lisp_Object window, Lisp_Object table)
  {
    register struct window *w;
  
    return table;
  }
  \f
 +static void delete_window (Lisp_Object);
 +
  /* Record info on buffer window w is displaying
     when it is about to cease to display that buffer.  */
  static void
 -unshow_buffer (w)
 -     register struct window *w;
 +unshow_buffer (register struct window *w)
  {
    Lisp_Object buf;
    struct buffer *b;
  
  /* Put replacement into the window structure in place of old. */
  static void
 -replace_window (old, replacement)
 -     Lisp_Object old, replacement;
 +replace_window (Lisp_Object old, Lisp_Object replacement)
  {
    register Lisp_Object tem;
    register struct window *o = XWINDOW (old), *p = XWINDOW (replacement);
    p->total_lines = o->total_lines;
    p->desired_matrix = p->current_matrix = 0;
    p->vscroll = 0;
 -  bzero (&p->cursor, sizeof (p->cursor));
 -  bzero (&p->last_cursor, sizeof (p->last_cursor));
 -  bzero (&p->phys_cursor, sizeof (p->phys_cursor));
 +  memset (&p->cursor, 0, sizeof (p->cursor));
 +  memset (&p->last_cursor, 0, sizeof (p->last_cursor));
 +  memset (&p->phys_cursor, 0, sizeof (p->phys_cursor));
    p->phys_cursor_type = -1;
    p->phys_cursor_width = -1;
    p->must_be_updated_p = 0;
@@@ -1537,7 -1541,8 +1537,7 @@@ DEFUN ("delete-window", Fdelete_window
         doc: /* Remove WINDOW from its frame.
  WINDOW defaults to the selected window.  Return nil.
  Signal an error when WINDOW is the only window on its frame.  */)
 -     (window)
 -     register Lisp_Object window;
 +  (register Lisp_Object window)
  {
    struct frame *f;
    if (NILP (window))
    return Qnil;
  }
  
 -void
 -delete_window (window)
 -     register Lisp_Object window;
 +static void
 +delete_window (register Lisp_Object window)
  {
    register Lisp_Object tem, parent, sib;
    register struct window *p;
     function window_list.  */
  
  static int
 -add_window_to_list (w, user_data)
 -     struct window *w;
 -     void *user_data;
 +add_window_to_list (struct window *w, void *user_data)
  {
    Lisp_Object *list = (Lisp_Object *) user_data;
    Lisp_Object window;
     list, cache it in Vwindow_list, and return that.  */
  
  static Lisp_Object
 -window_list ()
 +window_list (void)
  {
    if (!CONSP (Vwindow_list))
      {
                a frame means consider windows on that frame, only.  */
  
  static int
 -candidate_window_p (window, owindow, minibuf, all_frames)
 -     Lisp_Object window, owindow, minibuf, all_frames;
 +candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames)
  {
    struct window *w = XWINDOW (window);
    struct frame *f = XFRAME (w->frame);
     ALL_FRAMES.  */
  
  static void
 -decode_next_window_args (window, minibuf, all_frames)
 -     Lisp_Object *window, *minibuf, *all_frames;
 +decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object *all_frames)
  {
    if (NILP (*window))
      *window = selected_window;
     ALL_FRAMES.  */
  
  static Lisp_Object
 -next_window (window, minibuf, all_frames, next_p)
 -     Lisp_Object window, minibuf, all_frames;
 -     int next_p;
 +next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, int next_p)
  {
    decode_next_window_args (&window, &minibuf, &all_frames);
  
@@@ -2034,7 -2046,8 +2034,7 @@@ If you use consistent values for MINIBU
  `next-window' to iterate through the entire cycle of acceptable
  windows, eventually ending up back at the window you started with.
  `previous-window' traverses the same cycle, in the reverse order.  */)
 -     (window, minibuf, all_frames)
 -     Lisp_Object window, minibuf, all_frames;
 +  (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames)
  {
    return next_window (window, minibuf, all_frames, 1);
  }
@@@ -2051,7 -2064,8 +2051,7 @@@ use `previous-window' to iterate throug
  acceptable windows, eventually ending up back at the window you
  started with.  `next-window' traverses the same cycle, in the
  reverse order.  */)
 -     (window, minibuf, all_frames)
 -     Lisp_Object window, minibuf, all_frames;
 +  (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames)
  {
    return next_window (window, minibuf, all_frames, 0);
  }
@@@ -2070,7 -2084,8 +2070,7 @@@ This function uses `next-window' for fi
  The argument ALL-FRAMES has the same meaning as in `next-window',
  but the MINIBUF argument of `next-window' is always effectively
  nil.  */)
 -     (count, all_frames)
 -     Lisp_Object count, all_frames;
 +  (Lisp_Object count, Lisp_Object all_frames)
  {
    Lisp_Object window;
    int i;
@@@ -2096,7 -2111,8 +2096,7 @@@ MINIBUF t means include the minibuffer 
  MINIBUF nil or omitted means include the minibuffer window only
  if it's active.
  MINIBUF neither nil nor t means never include the minibuffer window.  */)
 -     (frame, minibuf, window)
 -     Lisp_Object frame, minibuf, window;
 +  (Lisp_Object frame, Lisp_Object minibuf, Lisp_Object window)
  {
    if (NILP (window))
      window = FRAMEP (frame) ? XFRAME (frame)->selected_window : selected_window;
     for `next-window'.  */
  
  static Lisp_Object
 -window_list_1 (window, minibuf, all_frames)
 -     Lisp_Object window, minibuf, all_frames;
 +window_list_1 (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames)
  {
    Lisp_Object tail, list, rest;
  
@@@ -2163,7 -2180,10 +2163,7 @@@ enum window_loo
  };
  
  static Lisp_Object
 -window_loop (type, obj, mini, frames)
 -     enum window_loop type;
 -     Lisp_Object obj, frames;
 -     int mini;
 +window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frames)
  {
    Lisp_Object window, windows, best_window, frame_arg;
    struct frame *f;
  /* Used for debugging.  Abort if any window has a dead buffer.  */
  
  void
 -check_all_windows ()
 +check_all_windows (void)
  {
    window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt);
  }
  
 +DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0,
 +       doc: /* Return WINDOW's use time.
 +WINDOW defaults to the selected window.  The window with the highest use
 +time is the most recently selected one.  The window with the lowest use
 +time is the least recently selected one.  */)
 +  (Lisp_Object window)
 +{
 +  return decode_window (window)->use_time;
 +}
 +
  DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 2, 0,
         doc: /* Return the window least recently selected or used for display.
  \(LRU means Least Recently Used.)
@@@ -2418,7 -2428,8 +2418,7 @@@ If FRAME is 0, search all visible and i
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
 -  (frame, dedicated)
 -     Lisp_Object frame, dedicated;
 +  (Lisp_Object frame, Lisp_Object dedicated)
  {
    register Lisp_Object w;
    /* First try for a window that is full-width */
@@@ -2443,7 -2454,8 +2443,7 @@@ If FRAME is 0, search all visible and i
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
 -    (frame, dedicated)
 -     Lisp_Object frame, dedicated;
 +  (Lisp_Object frame, Lisp_Object dedicated)
  {
    return window_loop (GET_LARGEST_WINDOW, dedicated, 0,
                      frame);
@@@ -2458,7 -2470,8 +2458,7 @@@ If optional argument FRAME is 0, searc
  If FRAME is t, search all frames.
  If FRAME is nil, search only the selected frame.
  If FRAME is a frame, search only that frame.  */)
 -     (buffer_or_name, frame)
 -     Lisp_Object buffer_or_name, frame;
 +  (Lisp_Object buffer_or_name, Lisp_Object frame)
  {
    Lisp_Object buffer;
  
@@@ -2482,10 -2495,11 +2482,10 @@@ previously visible in WINDOW in the sam
  depends on the value of (window-start WINDOW), so if calling this
  function in a program gives strange scrolling, make sure the
  window-start value is reasonable when this function is called.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    struct window *w;
 -  int startpos;
 +  EMACS_INT startpos;
    int top, new_top;
  
    if (NILP (window))
@@@ -2549,7 -2563,8 +2549,7 @@@ If FRAME is t, search only the selecte
  If FRAME is a frame, search only that frame.
  When a window showing BUFFER-OR-NAME is dedicated and the only window of
  its frame, that frame is deleted when there are other frames left.  */)
 -     (buffer_or_name, frame)
 -     Lisp_Object buffer_or_name, frame;
 +  (Lisp_Object buffer_or_name, Lisp_Object frame)
  {
    Lisp_Object buffer;
  
@@@ -2584,7 -2599,8 +2584,7 @@@ When a window showing BUFFER-OR-NAME i
  deleted.  If that window is the only window on its frame, that frame is
  deleted too when there are other frames left.  If there are no other
  frames left, some other buffer is displayed in that window.  */)
 -     (buffer_or_name)
 -     Lisp_Object buffer_or_name;
 +  (Lisp_Object buffer_or_name)
  {
    Lisp_Object buffer;
  
     of all frames, even those on other keyboards.  */
  
  void
 -replace_buffer_in_all_windows (buffer)
 -     Lisp_Object buffer;
 +replace_buffer_in_all_windows (Lisp_Object buffer)
  {
    Lisp_Object tail, frame;
  
     minimum allowable size.  */
  
  void
 -check_frame_size (frame, rows, cols)
 -     FRAME_PTR frame;
 -     int *rows, *cols;
 +check_frame_size (FRAME_PTR frame, int *rows, int *cols)
  {
    /* For height, we have to see:
       how many windows the frame has at minimum (one or two),
     either.  */
  
  static int
 -window_fixed_size_p (w, width_p, check_siblings_p)
 -     struct window *w;
 -     int width_p, check_siblings_p;
 +window_fixed_size_p (struct window *w, int width_p, int check_siblings_p)
  {
    int fixed_p;
    struct window *c;
     minibuffer window, always return 1.  */
  
  static int
 -window_min_size_2 (w, width_p, safe_p)
 -     struct window *w;
 -     int width_p, safe_p;
 +window_min_size_2 (struct window *w, int width_p, int safe_p)
  {
    /* We should consider buffer-local values of window_min_height and
       window_min_width here.  */
     sizes of W's children.  */
  
  static int
 -window_min_size_1 (w, width_p, safe_p)
 -     struct window *w;
 -     int width_p, safe_p;
 +window_min_size_1 (struct window *w, int width_p, int safe_p)
  {
    struct window *c;
    int size;
     to 1 if W is fixed-size unless FIXED is null.  */
  
  static int
 -window_min_size (w, width_p, safe_p, ignore_fixed_p, fixed)
 -     struct window *w;
 -     int width_p, safe_p, ignore_fixed_p, *fixed;
 +window_min_size (struct window *w, int width_p, int safe_p, int ignore_fixed_p, int *fixed)
  {
    int size, fixed_p;
  
     is still too narrow.  */
  
  static int
 -adjust_window_margins (w)
 -     struct window *w;
 +adjust_window_margins (struct window *w)
  {
    int box_cols = (WINDOW_TOTAL_COLS (w)
                  - WINDOW_FRINGE_COLS (w)
     a specific window, it will attempt to strictly resize that window
     proportionally, even at the expense of deleting smaller windows.  */
  static int *
 -shrink_windows (total, size, nchildren, shrinkable, resize_fixed_p,
 -              forward, width_p, safe_p)
 -     int total, size, nchildren, shrinkable;
 -     int resize_fixed_p, width_p, safe_p;
 -     Lisp_Object forward;
 +shrink_windows (int total, int size, int nchildren, int shrinkable,
 +              int resize_fixed_p, Lisp_Object forward, int width_p, int safe_p)
  {
    int available_resize = 0;
    int *new_sizes, *min_sizes;
     This should give better behavior when resizing frames.  */
  
  static void
 -size_window (window, size, width_p, nodelete_p, first_only, last_only)
 -     Lisp_Object window;
 -     int size, width_p, nodelete_p;
 -     int first_only, last_only;
 +size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int first_only, int last_only)
  {
    struct window *w = XWINDOW (window);
    struct window *c;
     displayed correctly.  */
  
  void
 -set_window_height (window, height, nodelete)
 -     Lisp_Object window;
 -     int height;
 -     int nodelete;
 +set_window_height (Lisp_Object window, int height, int nodelete)
  {
    size_window (window, height, 0, nodelete, 0, 0);
  }
     displayed correctly.  */
  
  void
 -set_window_width (window, width, nodelete)
 -     Lisp_Object window;
 -     int width;
 -     int nodelete;
 +set_window_width (Lisp_Object window, int width, int nodelete)
  {
    size_window (window, width, 1, nodelete, 0, 0);
  }
  /* Change window heights in windows rooted in WINDOW by N lines.  */
  
  void
 -change_window_heights (window, n)
 -     Lisp_Object window;
 -     int n;
 +change_window_heights (Lisp_Object window, int n)
  {
    struct window *w = XWINDOW (window);
  
@@@ -3399,7 -3441,9 +3399,7 @@@ run_window_configuration_change_hook (s
     reset from the buffer's local settings.  */
  
  void
 -set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
 -     Lisp_Object window, buffer;
 -     int run_hooks_p, keep_margins_p;
 +set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int keep_margins_p)
  {
    struct window *w = XWINDOW (window);
    struct buffer *b = XBUFFER (buffer);
  
    XSETFASTINT (w->window_end_pos, 0);
    XSETFASTINT (w->window_end_vpos, 0);
 -  bzero (&w->last_cursor, sizeof w->last_cursor);
 +  memset (&w->last_cursor, 0, sizeof w->last_cursor);
    w->window_end_valid = Qnil;
    if (!(keep_margins_p && samebuf))
      { /* If we're not actually changing the buffer, don't reset hscroll and
@@@ -3510,7 -3554,8 +3510,7 @@@ already display BUFFER-OR-NAME
  
  This function runs `window-scroll-functions' before running
  `window-configuration-change-hook'.  */)
 -     (window, buffer_or_name, keep_margins)
 -     register Lisp_Object window, buffer_or_name, keep_margins;
 +  (register Lisp_Object window, Lisp_Object buffer_or_name, Lisp_Object keep_margins)
  {
    register Lisp_Object tem, buffer;
    register struct window *w = decode_window (window);
    else if (!EQ (tem, Qt))
      /* w->buffer is t when the window is first being set up.  */
      {
 -      if (!EQ (tem, buffer))
 -      if (EQ (w->dedicated, Qt))
 -        error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name));
 -      else
 -        w->dedicated = Qnil;
 +      if (EQ (tem, buffer))
 +      return Qnil;
 +      else if (EQ (w->dedicated, Qt))
 +      error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name));
 +      else
 +      w->dedicated = Qnil;
  
        unshow_buffer (w);
      }
@@@ -3554,7 -3598,8 +3554,7 @@@ make this window the most recently sele
  
  Note that the main editor command loop selects the buffer of the
  selected window before each command.  */)
 -     (window, norecord)
 -     register Lisp_Object window, norecord;
 +  (register Lisp_Object window, Lisp_Object norecord)
  {
    register struct window *w;
    register struct window *ow;
      {
        ++window_select_count;
        XSETFASTINT (w->use_time, window_select_count);
 +      record_buffer (w->buffer);
      }
  
    if (EQ (window, selected_window))
  
    selected_window = window;
  
 -  if (NILP (norecord))
 -    record_buffer (w->buffer);
    Fset_buffer (w->buffer);
  
    XBUFFER (w->buffer)->last_selected_window = window;
       redisplay_window has altered point after scrolling,
       because it makes the change only in the window.  */
    {
 -    register int new_point = marker_position (w->pointm);
 +    register EMACS_INT new_point = marker_position (w->pointm);
      if (new_point < BEGV)
        SET_PT (BEGV);
      else if (new_point > ZV)
  }
  
  static Lisp_Object
 -select_window_norecord (window)
 -     Lisp_Object window;
 +select_window_norecord (Lisp_Object window)
  {
    return WINDOW_LIVE_P (window)
      ? Fselect_window (window, Qt) : selected_window;
  }
  
  static Lisp_Object
 -select_frame_norecord (frame)
 -     Lisp_Object frame;
 +select_frame_norecord (Lisp_Object frame)
  {
    return FRAME_LIVE_P (XFRAME (frame))
      ? Fselect_frame (frame, Qt) : selected_frame;
  }
  \f
  Lisp_Object
 -display_buffer (buffer, not_this_window_p, override_frame)
 -     Lisp_Object buffer, not_this_window_p, override_frame;
 +display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame)
  {
    return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame);
  }
@@@ -3654,7 -3703,8 +3654,7 @@@ DEFUN ("force-window-update", Fforce_wi
  If optional arg OBJECT is a window, force redisplay of that window only.
  If OBJECT is a buffer or buffer name, force redisplay of all windows
  displaying that buffer.  */)
 -     (object)
 -     Lisp_Object object;
 +  (Lisp_Object object)
  {
    if (NILP (object))
      {
  
  
  void
 -temp_output_buffer_show (buf)
 -     register Lisp_Object buf;
 +temp_output_buffer_show (register Lisp_Object buf)
  {
    register struct buffer *old = current_buffer;
    register Lisp_Object window;
  }
  \f
  static void
 -make_dummy_parent (window)
 -     Lisp_Object window;
 +make_dummy_parent (Lisp_Object window)
  {
    Lisp_Object new;
    register struct window *o, *p;
@@@ -3795,7 -3847,8 +3795,7 @@@ The upper or leftmost window is the ori
  if it was selected before.
  
  See Info node `(elisp)Splitting Windows' for more details and examples.  */)
 -     (window, size, horizontal)
 -     Lisp_Object window, size, horizontal;
 +  (Lisp_Object window, Lisp_Object size, Lisp_Object horizontal)
  {
    register Lisp_Object new;
    register struct window *o, *p;
    p->parent = o->parent;
    p->buffer = Qt;
    p->window_end_valid = Qnil;
 -  bzero (&p->last_cursor, sizeof p->last_cursor);
 +  memset (&p->last_cursor, 0, sizeof p->last_cursor);
  
    /* Duplicate special geometry settings.  */
  
@@@ -3934,7 -3987,8 +3934,7 @@@ window wider by SIZE columns.  If SIZE 
  
  This function can delete windows if they get too small.  The size of
  fixed size windows is not altered by this function.  */)
 -     (size, horizontal)
 -     Lisp_Object size, horizontal;
 +  (Lisp_Object size, Lisp_Object horizontal)
  {
    CHECK_NUMBER (size);
    enlarge_window (selected_window, XINT (size), !NILP (horizontal));
@@@ -3953,7 -4007,8 +3953,7 @@@ window by -SIZE lines or columns.  Retu
  
  This function can delete windows if they get too small.  The size of
  fixed size windows is not altered by this function. */)
 -     (size, horizontal)
 -     Lisp_Object size, horizontal;
 +  (Lisp_Object size, Lisp_Object horizontal)
  {
    CHECK_NUMBER (size);
    enlarge_window (selected_window, -XINT (size), !NILP (horizontal));
    return Qnil;
  }
  
 -int
 -window_height (window)
 -     Lisp_Object window;
 +static int
 +window_height (Lisp_Object window)
  {
    register struct window *p = XWINDOW (window);
    return WINDOW_TOTAL_LINES (p);
  }
  
 -int
 -window_width (window)
 -     Lisp_Object window;
 +static int
 +window_width (Lisp_Object window)
  {
    register struct window *p = XWINDOW (window);
    return WINDOW_TOTAL_COLS (p);
     deleted.  */
  
  static void
 -enlarge_window (window, delta, horiz_flag)
 -     Lisp_Object window;
 -     int delta, horiz_flag;
 +enlarge_window (Lisp_Object window, int delta, int horiz_flag)
  {
    Lisp_Object parent, next, prev;
    struct window *p;
    Lisp_Object *sizep;
    int maximum;
 -  int (*sizefun) P_ ((Lisp_Object))
 +  int (*sizefun) (Lisp_Object)
      = horiz_flag ? window_width : window_height;
 -  void (*setsizefun) P_ ((Lisp_Object, int, int))
 +  void (*setsizefun) (Lisp_Object, int, int)
      = (horiz_flag ? set_window_width : set_window_height);
  
    /* Give up if this window cannot be resized.  */
     are not deleted; instead, we signal an error.  */
  
  static void
 -adjust_window_trailing_edge (window, delta, horiz_flag)
 -     Lisp_Object window;
 -     int delta, horiz_flag;
 +adjust_window_trailing_edge (Lisp_Object window, int delta, int horiz_flag)
  {
    Lisp_Object parent, child;
    struct window *p;
@@@ -4405,7 -4466,8 +4405,7 @@@ Otherwise, adjust the height, moving th
  Following siblings of the selected window are resized to fulfill
  the size request.  If they become too small in the process, they
  are not deleted; instead, we signal an error.  */)
 -  (window, delta, horizontal)
 -  Lisp_Object window, delta, horizontal;
 +  (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal)
  {
    CHECK_NUMBER (delta);
    if (NILP (window))
                        Resizing Mini-Windows
   ***********************************************************************/
  
 -static void shrink_window_lowest_first P_ ((struct window *, int));
 +static void shrink_window_lowest_first (struct window *, int);
  
  enum save_restore_action
  {
      RESTORE_ORIG_SIZES
  };
  
 -static int save_restore_orig_size P_ ((struct window *,
 -                                       enum save_restore_action));
 +static int save_restore_orig_size (struct window *,
 +                                   enum save_restore_action);
  
  /* Shrink windows rooted in window W to HEIGHT.  Take the space needed
     from lowest windows first.  */
  
  static void
 -shrink_window_lowest_first (w, height)
 -     struct window *w;
 -     int height;
 +shrink_window_lowest_first (struct window *w, int height)
  {
    struct window *c;
    Lisp_Object child;
     stored in orig_top_line and orig_total_lines for all windows.  */
  
  static int
 -save_restore_orig_size (w, action)
 -     struct window *w;
 -     enum save_restore_action action;
 +save_restore_orig_size (struct window *w, enum save_restore_action action)
  {
    int success_p = 1;
  
     without deleting other windows.  */
  
  void
 -grow_mini_window (w, delta)
 -     struct window *w;
 -     int delta;
 +grow_mini_window (struct window *w, int delta)
  {
    struct frame *f = XFRAME (w->frame);
    struct window *root;
     line.  */
  
  void
 -shrink_mini_window (w)
 -     struct window *w;
 +shrink_mini_window (struct window *w)
  {
    struct frame *f = XFRAME (w->frame);
    struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
     the frame are cleared.  */
  
  void
 -mark_window_cursors_off (w)
 -     struct window *w;
 +mark_window_cursors_off (struct window *w)
  {
    while (w)
      {
  /* Return number of lines of text (not counting mode lines) in W.  */
  
  int
 -window_internal_height (w)
 -     struct window *w;
 +window_internal_height (struct window *w)
  {
    int ht = XFASTINT (w->total_lines);
  
     separating W from the sibling to its right.  */
  
  int
 -window_box_text_cols (w)
 -     struct window *w;
 +window_box_text_cols (struct window *w)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    int width = XINT (w->total_cols);
     respectively.  */
  
  static void
 -window_scroll (window, n, whole, noerror)
 -     Lisp_Object window;
 -     int n;
 -     int whole;
 -     int noerror;
 +window_scroll (Lisp_Object window, int n, int whole, int noerror)
  {
    immediate_quit = 1;
  
     descriptions.  */
  
  static void
 -window_scroll_pixel_based (window, n, whole, noerror)
 -     Lisp_Object window;
 -     int n;
 -     int whole;
 -     int noerror;
 +window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
  {
    struct it it;
    struct window *w = XWINDOW (window);
              /* Maybe modify window start instead of scrolling.  */
              if (rbot > 0 || w->vscroll < 0)
                {
 -                int spos;
 +                EMACS_INT spos;
  
                  Fset_window_vscroll (window, make_number (0), Qt);
                  /* If there are other text lines above the current row,
    if (!NILP (Vscroll_preserve_screen_position))
      {
        /* We preserve the goal pixel coordinate across consecutive
 -       calls to scroll-up or scroll-down.  This avoids the
 +       calls to scroll-up, scroll-down and other commands that
 +       have the `scroll-command' property.  This avoids the
         possibility of point becoming "stuck" on a tall line when
         scrolling by one line.  */
        if (window_scroll_pixel_based_preserve_y < 0
 -        || (!EQ (current_kboard->Vlast_command, Qscroll_up)
 -            && !EQ (current_kboard->Vlast_command, Qscroll_down)))
 +        || !SYMBOLP (current_kboard->Vlast_command)
 +        || NILP (Fget (current_kboard->Vlast_command, Qscroll_command)))
        {
          start_display (&it, w, start);
          move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
    start_display (&it, w, start);
    if (whole)
      {
 -      int start_pos = IT_CHARPOS (it);
 +      EMACS_INT start_pos = IT_CHARPOS (it);
        int dy = WINDOW_FRAME_LINE_HEIGHT (w);
        dy = max ((window_box_height (w)
                 - next_screen_context_lines * dy),
  
    if (! vscrolled)
      {
 -      int pos = IT_CHARPOS (it);
 -      int bytepos;
 +      EMACS_INT pos = IT_CHARPOS (it);
 +      EMACS_INT bytepos;
  
        /* If in the middle of a multi-glyph character move forward to
         the next character.  */
      }
    else if (n < 0)
      {
 -      int charpos, bytepos;
 +      EMACS_INT charpos, bytepos;
        int partial_p;
  
        /* Save our position, for the
     See the comment of window_scroll for parameter descriptions.  */
  
  static void
 -window_scroll_line_based (window, n, whole, noerror)
 -     Lisp_Object window;
 -     int n;
 -     int whole;
 -     int noerror;
 +window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror)
  {
    register struct window *w = XWINDOW (window);
 -  register int opoint = PT, opoint_byte = PT_BYTE;
 -  register int pos, pos_byte;
 +  register EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
 +  register EMACS_INT pos, pos_byte;
    register int ht = window_internal_height (w);
    register Lisp_Object tem;
    int lose;
    Lisp_Object bolp;
 -  int startpos;
 +  EMACS_INT startpos;
    Lisp_Object original_pos = Qnil;
  
    /* If scrolling screen-fulls, compute the number of lines to
    if (!NILP (Vscroll_preserve_screen_position))
      {
        if (window_scroll_preserve_vpos <= 0
 -        || (!EQ (current_kboard->Vlast_command, Qscroll_up)
 -            && !EQ (current_kboard->Vlast_command, Qscroll_down)))
 +        || !SYMBOLP (current_kboard->Vlast_command)
 +        || NILP (Fget (current_kboard->Vlast_command, Qscroll_command)))
        {
          struct position posit
            = *compute_motion (startpos, 0, 0, 0,
     up.  This is the guts of Fscroll_up and Fscroll_down.  */
  
  static void
 -scroll_command (n, direction)
 -     Lisp_Object n;
 -     int direction;
 +scroll_command (Lisp_Object n, int direction)
  {
    int count = SPECPDL_INDEX ();
  
@@@ -5300,7 -5385,8 +5300,7 @@@ A near full screen is `next-screen-cont
  Negative ARG means scroll downward.
  If ARG is the atom `-', scroll downward by nearly full screen.
  When calling from a program, supply as argument a number, nil, or `-'.  */)
 -     (arg)
 -     Lisp_Object arg;
 +  (Lisp_Object arg)
  {
    scroll_command (arg, 1);
    return Qnil;
@@@ -5313,7 -5399,8 +5313,7 @@@ A near full screen is `next-screen-cont
  Negative ARG means scroll upward.
  If ARG is the atom `-', scroll upward by nearly full screen.
  When calling from a program, supply as argument a number, nil, or `-'.  */)
 -     (arg)
 -     Lisp_Object arg;
 +  (Lisp_Object arg)
  {
    scroll_command (arg, -1);
    return Qnil;
@@@ -5326,7 -5413,7 +5326,7 @@@ showing that buffer is used
  If in the minibuffer, `minibuffer-scroll-window' if non-nil
  specifies the window.  This takes precedence over
  `other-window-scroll-buffer'.  */)
 -     ()
 +  (void)
  {
    Lisp_Object window;
  
@@@ -5376,7 -5463,8 +5376,7 @@@ showing that buffer, popping the buffe
  If in the minibuffer, `minibuffer-scroll-window' if non-nil
  specifies the window to scroll.  This takes precedence over
  `other-window-scroll-buffer'.  */)
 -     (arg)
 -     Lisp_Object arg;
 +  (Lisp_Object arg)
  {
    Lisp_Object window;
    struct window *w;
@@@ -5419,7 -5507,8 +5419,7 @@@ If SET-MINIMUM is non-nil, the new scro
  lower bound for automatic scrolling, i.e. automatic scrolling
  will not scroll a window to a column less than the value returned
  by this function.  This happens in an interactive call.  */)
 -     (arg, set_minimum)
 -     register Lisp_Object arg, set_minimum;
 +  (register Lisp_Object arg, Lisp_Object set_minimum)
  {
    Lisp_Object result;
    int hscroll;
@@@ -5448,7 -5537,8 +5448,7 @@@ If SET-MINIMUM is non-nil, the new scro
  lower bound for automatic scrolling, i.e. automatic scrolling
  will not scroll a window to a column less than the value returned
  by this function.  This happens in an interactive call.  */)
 -     (arg, set_minimum)
 -     register Lisp_Object arg, set_minimum;
 +  (register Lisp_Object arg, Lisp_Object set_minimum)
  {
    Lisp_Object result;
    int hscroll;
  DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0,
         doc: /* Return the window which was selected when entering the minibuffer.
  Returns nil, if selected window is not a minibuffer window.  */)
 -     ()
 +  (void)
  {
    if (minibuf_level > 0
        && MINI_WINDOW_P (XWINDOW (selected_window))
     as opposed to its height.  */
  
  static int
 -displayed_window_lines (w)
 -     struct window *w;
 +displayed_window_lines (struct window *w)
  {
    struct it it;
    struct text_pos start;
@@@ -5553,13 -5644,14 +5553,13 @@@ then only tty frame are redrawn
  
  Just C-u as prefix means put point in the center of the window
  and redisplay normally--don't erase and redraw the frame.  */)
 -     (arg)
 -     register Lisp_Object arg;
 +  (register Lisp_Object arg)
  {
    struct window *w = XWINDOW (selected_window);
    struct buffer *buf = XBUFFER (w->buffer);
    struct buffer *obuf = current_buffer;
    int center_p = 0;
 -  int charpos, bytepos;
 +  EMACS_INT charpos, bytepos;
    int iarg;
    int this_scroll_margin;
  
@@@ -5737,7 -5829,8 +5737,7 @@@ WINDOW defaults to the selected window
  
  The return value does not include the mode line, any header line, nor
  any partial-height lines in the text display area.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    struct window *w = decode_window (window);
    int pixel_height = window_box_height (w);
@@@ -5753,7 -5846,8 +5753,7 @@@ DEFUN ("move-to-window-line", Fmove_to_
  With no argument, position point at center of window.
  An argument specifies vertical position within the window;
  zero means top of window, negative means relative to bottom of window.  */)
 -     (arg)
 -     Lisp_Object arg;
 +  (Lisp_Object arg)
  {
    struct window *w = XWINDOW (selected_window);
    int lines, start;
    int this_scroll_margin;
  #endif
  
+   if (!(BUFFERP (w->buffer)
+       && XBUFFER (w->buffer) == current_buffer))
+     /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer
+        when passed below to set_marker_both.  */
+     error ("move-to-window-line called from unrelated buffer");
+   
    window = selected_window;
    start = marker_position (w->start);
    if (start < BEGV || start > ZV)
@@@ -5866,14 -5966,16 +5872,14 @@@ struct saved_windo
  
  DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0,
         doc: /* Return t if OBJECT is a window-configuration object.  */)
 -     (object)
 -     Lisp_Object object;
 +  (Lisp_Object object)
  {
    return WINDOW_CONFIGURATIONP (object) ? Qt : Qnil;
  }
  
  DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_configuration_frame, 1, 1, 0,
         doc: /* Return the frame that CONFIG, a window-configuration object, is about.  */)
 -     (config)
 -     Lisp_Object config;
 +  (Lisp_Object config)
  {
    register struct save_window_data *data;
    struct Lisp_Vector *saved_windows;
@@@ -5893,14 -5995,15 +5899,14 @@@ by `current-window-configuration' (whic
  If CONFIGURATION was made from a frame that is now deleted,
  only frame-independent values can be restored.  In this case,
  the return value is nil.  Otherwise the value is t.  */)
 -     (configuration)
 -     Lisp_Object configuration;
 +  (Lisp_Object configuration)
  {
    register struct save_window_data *data;
    struct Lisp_Vector *saved_windows;
    Lisp_Object new_current_buffer;
    Lisp_Object frame;
    FRAME_PTR f;
 -  int old_point = -1;
 +  EMACS_INT old_point = -1;
  
    CHECK_WINDOW_CONFIGURATION (configuration);
  
     by setting their buffers to nil.  */
  
  void
 -delete_all_subwindows (w)
 -     register struct window *w;
 +delete_all_subwindows (register struct window *w)
  {
    if (!NILP (w->next))
      delete_all_subwindows (XWINDOW (w->next));
  }
  \f
  static int
 -count_windows (window)
 -     register struct window *window;
 +count_windows (register struct window *window)
  {
    register int count = 1;
    if (!NILP (window->next))
     Value is last index + 1.  */
  
  static int
 -get_leaf_windows (w, flat, i)
 -     struct window *w;
 -     struct window **flat;
 -     int i;
 +get_leaf_windows (struct window *w, struct window **flat, int i)
  {
    while (w)
      {
     can be returned.  */
  
  struct glyph *
 -get_phys_cursor_glyph (w)
 -     struct window *w;
 +get_phys_cursor_glyph (struct window *w)
  {
    struct glyph_row *row;
    struct glyph *glyph;
  
  
  static int
 -save_window_save (window, vector, i)
 -     Lisp_Object window;
 -     struct Lisp_Vector *vector;
 -     int i;
 +save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
  {
    register struct saved_window *p;
    register struct window *w;
@@@ -6399,7 -6511,8 +6405,7 @@@ point and mark.  An exception is made f
  its value is -not- saved.
  This also records the currently selected frame, and FRAME's focus
  redirection (see `redirect-frame-focus').  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    register Lisp_Object tem;
    register int n_windows;
@@@ -6447,7 -6560,8 +6453,7 @@@ Also restore the choice of selected win
  Also restore which buffer is current.
  Does not restore the value of point in current buffer.
  usage: (save-window-excursion BODY...)  */)
 -     (args)
 -     Lisp_Object args;
 +  (Lisp_Object args)
  {
    register Lisp_Object val;
    register int count = SPECPDL_INDEX ();
   ***********************************************************************/
  
  static Lisp_Object
 -window_tree (w)
 -     struct window *w;
 +window_tree (struct window *w)
  {
    Lisp_Object tail = Qnil;
    Lisp_Object result = Qnil;
@@@ -6518,7 -6633,8 +6524,7 @@@ EDGES is a list \(LEFT TOP RIGHT BOTTOM
  
  If FRAME is nil or omitted, return information on the currently
  selected frame.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    FRAME_PTR f;
  
@@@ -6547,7 -6663,8 +6553,7 @@@ Second arg LEFT-WIDTH specifies the num
  reserve for the left marginal area.  Optional third arg RIGHT-WIDTH
  does the same for the right marginal area.  A nil width parameter
  means no margin.  */)
 -     (window, left_width, right_width)
 -     Lisp_Object window, left_width, right_width;
 +  (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width)
  {
    struct window *w = decode_window (window);
  
@@@ -6591,7 -6708,8 +6597,7 @@@ If WINDOW is omitted or nil, use the cu
  Value is a cons of the form (LEFT-WIDTH . RIGHT-WIDTH).
  If a marginal area does not exist, its width will be returned
  as nil.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    struct window *w = decode_window (window);
    return Fcons (w->left_margin_cols, w->right_margin_cols);
@@@ -6616,7 -6734,8 +6622,7 @@@ the command `set-fringe-style'
  If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes
  outside of the display margins.  By default, fringes are drawn between
  display marginal areas and the text area.  */)
 -     (window, left_width, right_width, outside_margins)
 -     Lisp_Object window, left_width, right_width, outside_margins;
 +  (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins)
  {
    struct window *w = decode_window (window);
  
@@@ -6653,7 -6772,8 +6659,7 @@@ DEFUN ("window-fringes", Fwindow_fringe
         doc: /* Get width of fringes of window WINDOW.
  If WINDOW is omitted or nil, use the currently selected window.
  Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS).  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    struct window *w = decode_window (window);
  
@@@ -6680,7 -6800,8 +6686,7 @@@ 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.  */)
 -     (window, width, vertical_type, horizontal_type)
 -     Lisp_Object window, width, vertical_type, horizontal_type;
 +  (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, Lisp_Object horizontal_type)
  {
    struct window *w = decode_window (window);
  
@@@ -6724,7 -6845,8 +6730,7 @@@ If WINDOW is omitted or nil, use the cu
  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.  */)
 -     (window)
 -     Lisp_Object window;
 +  (Lisp_Object window)
  {
    struct window *w = decode_window (window);
    return Fcons (make_number ((WINDOW_CONFIG_SCROLL_BAR_WIDTH (w)
@@@ -6746,7 -6868,8 +6752,7 @@@ DEFUN ("window-vscroll", Fwindow_vscrol
  Use the selected window if WINDOW is nil or omitted.
  Normally, value is a multiple of the canonical character height of WINDOW;
  optional second arg PIXELS-P means value is measured in pixels.  */)
 -  (window, pixels_p)
 -     Lisp_Object window, pixels_p;
 +  (Lisp_Object window, Lisp_Object pixels_p)
  {
    Lisp_Object result;
    struct frame *f;
@@@ -6779,7 -6902,8 +6785,7 @@@ If PIXELS-P is nil, VSCROLL may have t
  corresponds to an integral number of pixels.  The return value is the
  result of this rounding.
  If PIXELS-P is non-nil, the return value is VSCROLL.  */)
 -  (window, vscroll, pixels_p)
 -     Lisp_Object window, vscroll, pixels_p;
 +  (Lisp_Object window, Lisp_Object vscroll, Lisp_Object pixels_p)
  {
    struct window *w;
    struct frame *f;
     first argument being a pointer to the leaf window, and with
     additional argument USER_DATA.  Stops when FN returns 0.  */
  
 -void
 -foreach_window (f, fn, user_data)
 -     struct frame *f;
 -     int (* fn) P_ ((struct window *, void *));
 -     void *user_data;
 +static void
 +foreach_window (struct frame *f, int (*fn) (struct window *, void *),
 +              void *user_data)
  {
    /* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil.  */
    if (WINDOWP (FRAME_ROOT_WINDOW (f)))
     Stop when FN returns 0.  Value is 0 if stopped by FN.  */
  
  static int
 -foreach_window_1 (w, fn, user_data)
 -     struct window *w;
 -     int (* fn) P_ ((struct window *, void *));
 -     void *user_data;
 +foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *user_data)
  {
    int cont;
  
     the window start.  */
  
  static int
 -freeze_window_start (w, freeze_p)
 -     struct window *w;
 -     void *freeze_p;
 +freeze_window_start (struct window *w, void *freeze_p)
  {
    if (MINI_WINDOW_P (w)
        || (WINDOWP (selected_window) /* Can be nil in corner cases.  */
     means freeze the window start.  */
  
  void
 -freeze_window_starts (f, freeze_p)
 -     struct frame *f;
 -     int freeze_p;
 +freeze_window_starts (struct frame *f, int freeze_p)
  {
    foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0));
  }
     describe the same state of affairs.  This is used by Fequal.  */
  
  int
 -compare_window_configurations (c1, c2, ignore_positions)
 -     Lisp_Object c1, c2;
 -     int ignore_positions;
 +compare_window_configurations (Lisp_Object c1, Lisp_Object c2, int ignore_positions)
  {
    register struct save_window_data *d1, *d2;
    struct Lisp_Vector *sw1, *sw2;
@@@ -7014,7 -7149,8 +7020,7 @@@ DEFUN ("compare-window-configurations"
         doc: /* Compare two window configurations as regards the structure of windows.
  This function ignores details such as the values of point and mark
  and scrolling positions.  */)
 -     (x, y)
 -     Lisp_Object x, y;
 +  (Lisp_Object x, Lisp_Object y)
  {
    if (compare_window_configurations (x, y, 1))
      return Qt;
  }
  \f
  void
 -init_window_once ()
 +init_window_once (void)
  {
    struct frame *f = make_initial_frame ();
    XSETFRAME (selected_frame, f);
  }
  
  void
 -init_window ()
 +init_window (void)
  {
    Vwindow_list = Qnil;
  }
  
  void
 -syms_of_window ()
 +syms_of_window (void)
  {
    Qscroll_up = intern_c_string ("scroll-up");
    staticpro (&Qscroll_up);
    Qscroll_down = intern_c_string ("scroll-down");
    staticpro (&Qscroll_down);
  
 +  Qscroll_command = intern_c_string ("scroll-command");
 +  staticpro (&Qscroll_command);
 +
 +  Fput (Qscroll_up, Qscroll_command, Qt);
 +  Fput (Qscroll_down, Qscroll_command, Qt);
 +
    Qwindow_size_fixed = intern_c_string ("window-size-fixed");
    staticpro (&Qwindow_size_fixed);
    Fset (Qwindow_size_fixed, Qnil);
@@@ -7144,9 -7274,7 +7150,9 @@@ at the scroll margin or window boundar
  A value of t means point keeps its screen position if the scroll
  command moved it vertically out of the window, e.g. when scrolling
  by full screens.
 -Any other value means point always keeps its screen position.  */);
 +Any other value means point always keeps its screen position.
 +Scroll commands should have the `scroll-command' property
 +on their symbols to be controlled by this variable.  */);
    Vscroll_preserve_screen_position = Qnil;
  
    DEFVAR_LISP ("window-point-insertion-type", &Vwindow_point_insertion_type,
@@@ -7163,7 -7291,7 +7169,7 @@@ with the relevant frame selected.  */)
  
    DEFVAR_LISP ("recenter-redisplay", &Vrecenter_redisplay,
               doc: /* If non-nil, then the `recenter' command with a nil argument
 -the entire frame to be redrawn; the special value `tty' causes the
 +will redraw the entire frame; the special value `tty' causes the
  frame to be redrawn only if it is a tty frame.  */);
    Vrecenter_redisplay = Qtty;
  
    defsubr (&Sset_window_redisplay_end_trigger);
    defsubr (&Swindow_edges);
    defsubr (&Swindow_pixel_edges);
 +  defsubr (&Swindow_absolute_pixel_edges);
    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 (&Sprevious_window);
    defsubr (&Sother_window);
    defsubr (&Sget_lru_window);
 +  defsubr (&Swindow_use_time);
    defsubr (&Sget_largest_window);
    defsubr (&Sget_buffer_window);
    defsubr (&Sdelete_other_windows);
  }
  
  void
 -keys_of_window ()
 +keys_of_window (void)
  {
    initial_define_key (control_x_map, '1', "delete-other-windows");
    initial_define_key (control_x_map, '2', "split-window");
    initial_define_key (control_x_map, '<', "scroll-left");
    initial_define_key (control_x_map, '>', "scroll-right");
  
 -  initial_define_key (global_map, Ctl ('V'), "scroll-up");
 +  initial_define_key (global_map, Ctl ('V'), "scroll-up-command");
    initial_define_key (meta_map, Ctl ('V'), "scroll-other-window");
 -  initial_define_key (meta_map, 'v', "scroll-down");
 -
 -  initial_define_key (global_map, Ctl('L'), "recenter");
 -  initial_define_key (meta_map, 'r', "move-to-window-line");
 +  initial_define_key (meta_map, 'v', "scroll-down-command");
  }
  
  /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f
diff --combined src/xdisp.c
index 7a2990551859fb111913dfa55e48af7d71e92389,69a0fcfe3d82f99eccba024623003a67bd3368b8..4e15e8a5f6d86d43a7e72b08a6e7034a5b342d03
@@@ -1,8 -1,8 +1,8 @@@
  /* Display generation from window structure and buffer text.
 -   Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995,
 -                 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 -                 2004, 2005, 2006, 2007, 2008, 2009, 2010
 -                 Free Software Foundation, Inc.
 +
 +Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998,
 +  1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
 +  2010  Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
@@@ -32,7 -32,9 +32,7 @@@ along with GNU Emacs.  If not, see <htt
     decides it's time to do it.  This is done either automatically for
     you as part of the interpreter's command loop or as the result of
     calling Lisp functions like `sit-for'.  The C function `redisplay'
 -   in xdisp.c is the only entry into the inner redisplay code.  (Or,
 -   let's say almost---see the description of direct update
 -   operations, below.)
 +   in xdisp.c is the only entry into the inner redisplay code.
  
     The following diagram shows how redisplay code is invoked.  As you
     can see, Lisp calls redisplay and vice versa.  Under window systems
     change the interpreter's state.  If you don't follow these rules,
     you will encounter bugs which are very hard to explain.
  
 -           (Direct functions, see below)
 -             direct_output_for_insert,
 -             direct_forward_char (dispnew.c)
 -        +---------------------------------+
 -          |                                 |
 -        |                                 V
     +--------------+   redisplay     +----------------+
     | Lisp machine |---------------->| Redisplay code |<--+
     +--------------+   (xdisp.c)     +----------------+   |
     then compared to find a cheap way to update the display, e.g. by
     reusing part of the display by scrolling lines.
  
 -
 -   Direct operations.
 -
     You will find a lot of redisplay optimizations when you start
     looking at the innards of redisplay.  The overall goal of all these
     optimizations is to make redisplay fast because it is done
 -   frequently.
 +   frequently.  Some of these optimizations are implemented by the
 +   following functions:
 +
 +    . try_cursor_movement
 +
 +      This function tries to update the display if the text in the
 +      window did not change and did not scroll, only point moved, and
 +      it did not move off the displayed portion of the text.
 +
 +    . try_window_reusing_current_matrix
 +
 +      This function reuses the current matrix of a window when text
 +      has not changed, but the window start changed (e.g., due to
 +      scrolling).
 +
 +    . try_window_id
  
 -   Two optimizations are not found in xdisp.c.  These are the direct
 -   operations mentioned above.  As the name suggests they follow a
 -   different principle than the rest of redisplay.  Instead of
 -   building a desired matrix and then comparing it with the current
 -   display, they perform their actions directly on the display and on
 -   the current matrix.
 +      This function attempts to redisplay a window by reusing parts of
 +      its existing display.  It finds and reuses the part that was not
 +      changed, and redraws the rest.
  
 -   One direct operation updates the display after one character has
 -   been entered.  The other one moves the cursor by one position
 -   forward or backward.  You find these functions under the names
 -   `direct_output_for_insert' and `direct_output_forward_char' in
 -   dispnew.c.
 +    . try_window
  
 +      This function performs the full redisplay of a single window
 +      assuming that its fonts were not changed and that the cursor
 +      will not end up in the scroll margins.  (Loading fonts requires
 +      re-adjustment of dimensions of glyph matrices, which makes this
 +      method impossible to use.)
 +
 +   These optimizations are tried in sequence (some can be skipped if
 +   it is known that they are not applicable).  If none of the
 +   optimizations were successful, redisplay calls redisplay_windows,
 +   which performs a full redisplay of all windows.
  
     Desired matrices.
  
     see in dispextern.h.
  
     Glyphs in a desired matrix are normally constructed in a loop
 -   calling get_next_display_element and then produce_glyphs.  The call
 -   to produce_glyphs will fill the iterator structure with pixel
 +   calling get_next_display_element and then PRODUCE_GLYPHS.  The call
 +   to PRODUCE_GLYPHS will fill the iterator structure with pixel
     information about the element being displayed and at the same time
     produce glyphs for it.  If the display element fits on the line
     being displayed, set_iterator_to_next is called next, otherwise the
 -   glyphs produced are discarded.
 -
 +   glyphs produced are discarded.  The function display_line is the
 +   workhorse of filling glyph rows in the desired matrix with glyphs.
 +   In addition to producing glyphs, it also handles line truncation
 +   and continuation, word wrap, and cursor positioning (for the
 +   latter, see also set_cursor_from_row).
  
     Frame matrices.
  
     wanted to have without having to move many bytes around.  To be
     honest, there is a little bit more done, but not much more.  If you
     plan to extend that code, take a look at dispnew.c.  The function
 -   build_frame_matrix is a good starting point.  */
 +   build_frame_matrix is a good starting point.
 +
 +   Bidirectional display.
 +
 +   Bidirectional display adds quite some hair to this already complex
 +   design.  The good news are that a large portion of that hairy stuff
 +   is hidden in bidi.c behind only 3 interfaces.  bidi.c implements a
 +   reordering engine which is called by set_iterator_to_next and
 +   returns the next character to display in the visual order.  See
 +   commentary on bidi.c for more details.  As far as redisplay is
 +   concerned, the effect of calling bidi_move_to_visually_next, the
 +   main interface of the reordering engine, is that the iterator gets
 +   magically placed on the buffer or string position that is to be
 +   displayed next.  In other words, a linear iteration through the
 +   buffer/string is replaced with a non-linear one.  All the rest of
 +   the redisplay is oblivious to the bidi reordering.
 +
 +   Well, almost oblivious---there are still complications, most of
 +   them due to the fact that buffer and string positions no longer
 +   change monotonously with glyph indices in a glyph row.  Moreover,
 +   for continued lines, the buffer positions may not even be
 +   monotonously changing with vertical positions.  Also, accounting
 +   for face changes, overlays, etc. becomes more complex because
 +   non-linear iteration could potentially skip many positions with
 +   changes, and then cross them again on the way back...
 +
 +   One other prominent effect of bidirectional display is that some
 +   paragraphs of text need to be displayed starting at the right
 +   margin of the window---the so-called right-to-left, or R2L
 +   paragraphs.  R2L paragraphs are displayed with R2L glyph rows,
 +   which have their reversed_p flag set.  The bidi reordering engine
 +   produces characters in such rows starting from the character which
 +   should be the rightmost on display.  PRODUCE_GLYPHS then reverses
 +   the order, when it fills up the glyph row whose reversed_p flag is
 +   set, by prepending each new glyph to what is already there, instead
 +   of appending it.  When the glyph row is complete, the function
 +   extend_face_to_end_of_line fills the empty space to the left of the
 +   leftmost character with special glyphs, which will display as,
 +   well, empty.  On text terminals, these special glyphs are simply
 +   blank characters.  On graphics terminals, there's a single stretch
 +   glyph of a suitably computed width.  Both the blanks and the
 +   stretch glyph are given the face of the background of the line.
 +   This way, the terminal-specific back-end can still draw the glyphs
 +   left to right, even for R2L lines.
 +
 +   Bidirectional display and character compositions
 +
 +   Some scripts cannot be displayed by drawing each character
 +   individually, because adjacent characters change each other's shape
 +   on display.  For example, Arabic and Indic scripts belong to this
 +   category.
 +
 +   Emacs display supports this by providing "character compositions",
 +   most of which is implemented in composite.c.  During the buffer
 +   scan that delivers characters to PRODUCE_GLYPHS, if the next
 +   character to be delivered is a composed character, the iteration
 +   calls composition_reseat_it and next_element_from_composition.  If
 +   they succeed to compose the character with one or more of the
 +   following characters, the whole sequence of characters that where
 +   composed is recorded in the `struct composition_it' object that is
 +   part of the buffer iterator.  The composed sequence could produce
 +   one or more font glyphs (called "grapheme clusters") on the screen.
 +   Each of these grapheme clusters is then delivered to PRODUCE_GLYPHS
 +   in the direction corresponding to the current bidi scan direction
 +   (recorded in the scan_dir member of the `struct bidi_it' object
 +   that is part of the buffer iterator).  In particular, if the bidi
 +   iterator currently scans the buffer backwards, the grapheme
 +   clusters are delivered back to front.  This reorders the grapheme
 +   clusters as appropriate for the current bidi context.  Note that
 +   this means that the grapheme clusters are always stored in the
 +   LGSTRING object (see composite.c) in the logical order.
 +
 +   Moving an iterator in bidirectional text
 +   without producing glyphs
 +
 +   Note one important detail mentioned above: that the bidi reordering
 +   engine, driven by the iterator, produces characters in R2L rows
 +   starting at the character that will be the rightmost on display.
 +   As far as the iterator is concerned, the geometry of such rows is
 +   still left to right, i.e. the iterator "thinks" the first character
 +   is at the leftmost pixel position.  The iterator does not know that
 +   PRODUCE_GLYPHS reverses the order of the glyphs that the iterator
 +   delivers.  This is important when functions from the the move_it_*
 +   family are used to get to certain screen position or to match
 +   screen coordinates with buffer coordinates: these functions use the
 +   iterator geometry, which is left to right even in R2L paragraphs.
 +   This works well with most callers of move_it_*, because they need
 +   to get to a specific column, and columns are still numbered in the
 +   reading order, i.e. the rightmost character in a R2L paragraph is
 +   still column zero.  But some callers do not get well with this; a
 +   notable example is mouse clicks that need to find the character
 +   that corresponds to certain pixel coordinates.  See
 +   buffer_posn_from_coords in dispnew.c for how this is handled.  */
  
  #include <config.h>
  #include <stdio.h>
  #include "macros.h"
  #include "disptab.h"
  #include "termhooks.h"
 +#include "termopts.h"
  #include "intervals.h"
  #include "coding.h"
  #include "process.h"
  
  #define INFINITY 10000000
  
 -#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
 -    || defined(HAVE_NS) || defined (USE_GTK)
 -extern void set_frame_menubar P_ ((struct frame *f, int, int));
 -extern int pending_menu_activation;
 -#endif
 -
 -extern int interrupt_input;
 -extern int command_loop_level;
 -
 -extern Lisp_Object do_mouse_tracking;
 -
 -extern int minibuffer_auto_raise;
 -extern Lisp_Object Vminibuffer_list;
 -
 -extern Lisp_Object Qface, Qdefault;
 -extern Lisp_Object Qmode_line, Qmode_line_inactive, Qheader_line;
 -
 -extern Lisp_Object Voverriding_local_map;
 -extern Lisp_Object Voverriding_local_map_menu_flag;
 -extern Lisp_Object Qmenu_item;
 -extern Lisp_Object Qwhen;
 -extern Lisp_Object Qhelp_echo;
 -extern Lisp_Object Qbefore_string, Qafter_string;
 -
  Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
  Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
  Lisp_Object Qwindow_text_change_functions, Vwindow_text_change_functions;
@@@ -328,7 -249,6 +328,7 @@@ Lisp_Object Qfontified
  Lisp_Object Qgrow_only;
  Lisp_Object Qinhibit_eval_during_redisplay;
  Lisp_Object Qbuffer_position, Qposition, Qobject;
 +Lisp_Object Qright_to_left, Qleft_to_right;
  
  /* Cursor shapes */
  Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
@@@ -383,14 -303,6 +383,14 @@@ EMACS_INT tool_bar_button_relief
  
  Lisp_Object Vauto_resize_tool_bars;
  
 +/* Type of tool bar.  Can be symbols image, text, both or both-hroiz.  */
 +
 +Lisp_Object Vtool_bar_style;
 +
 +/* Maximum number of characters a label can have to be shown.  */
 +
 +EMACS_INT tool_bar_max_label_size;
 +
  /* Non-zero means draw block and hollow cursor as wide as the glyph
     under it.  For example, if a block cursor is over a tab, it will be
     drawn as wide as that tab on the display.  */
@@@ -408,6 -320,7 +408,6 @@@ int inhibit_eval_during_redisplay
  /* Names of text properties relevant for redisplay.  */
  
  Lisp_Object Qdisplay;
 -extern Lisp_Object Qface, Qinvisible, Qwidth;
  
  /* Symbols used in text property values.  */
  
@@@ -418,6 -331,10 +418,6 @@@ Lisp_Object Qslice
  Lisp_Object Qcenter;
  Lisp_Object Qmargin, Qpointer;
  Lisp_Object Qline_height;
 -extern Lisp_Object Qheight;
 -extern Lisp_Object QCwidth, QCheight, QCascent;
 -extern Lisp_Object Qscroll_bar;
 -extern Lisp_Object Qcursor;
  
  /* Non-nil means highlight trailing whitespace.  */
  
@@@ -428,18 -345,17 +428,18 @@@ Lisp_Object Vshow_trailing_whitespace
  Lisp_Object Vnobreak_char_display;
  
  #ifdef HAVE_WINDOW_SYSTEM
 -extern Lisp_Object Voverflow_newline_into_fringe;
  
  /* Test if overflow newline into fringe.  Called with iterator IT
     at or past right window margin, and with IT->current_x set.  */
  
 -#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it)   \
 -  (!NILP (Voverflow_newline_into_fringe)      \
 -   && FRAME_WINDOW_P (it->f)                  \
 -   && WINDOW_RIGHT_FRINGE_WIDTH (it->w) > 0   \
 -   && it->current_x == it->last_visible_x     \
 -   && it->line_wrap != WORD_WRAP)
 +#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(IT)           \
 +  (!NILP (Voverflow_newline_into_fringe)              \
 +   && FRAME_WINDOW_P ((IT)->f)                                \
 +   && ((IT)->bidi_it.paragraph_dir == R2L             \
 +       ? (WINDOW_LEFT_FRINGE_WIDTH ((IT)->w) > 0)     \
 +       : (WINDOW_RIGHT_FRINGE_WIDTH ((IT)->w) > 0))   \
 +   && (IT)->current_x == (IT)->last_visible_x         \
 +   && (IT)->line_wrap != WORD_WRAP)
  
  #else /* !HAVE_WINDOW_SYSTEM */
  #define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) 0
@@@ -470,7 -386,7 +470,7 @@@ Lisp_Object Qescape_glyph
  Lisp_Object Qnobreak_space;
  
  /* The symbol `image' which is the car of the lists used to represent
 -   images in Lisp.  */
 +   images in Lisp.  Also a tool bar style.  */
  
  Lisp_Object Qimage;
  
  Lisp_Object QCmap, QCpointer;
  Lisp_Object Qrect, Qcircle, Qpoly;
  
 +/* Tool bar styles */
 +Lisp_Object Qboth, Qboth_horiz, Qtext_image_horiz;
 +
  /* Non-zero means print newline to stdout before next mini-buffer
     message.  */
  
@@@ -851,15 -764,15 +851,15 @@@ struct prop
  
    /* A handler function called to set up iterator IT from the property
       at IT's current position.  Value is used to steer handle_stop.  */
 -  enum prop_handled (*handler) P_ ((struct it *it));
 +  enum prop_handled (*handler) (struct it *it);
  };
  
 -static enum prop_handled handle_face_prop P_ ((struct it *));
 -static enum prop_handled handle_invisible_prop P_ ((struct it *));
 -static enum prop_handled handle_display_prop P_ ((struct it *));
 -static enum prop_handled handle_composition_prop P_ ((struct it *));
 -static enum prop_handled handle_overlay_change P_ ((struct it *));
 -static enum prop_handled handle_fontified_prop P_ ((struct it *));
 +static enum prop_handled handle_face_prop (struct it *);
 +static enum prop_handled handle_invisible_prop (struct it *);
 +static enum prop_handled handle_display_prop (struct it *);
 +static enum prop_handled handle_composition_prop (struct it *);
 +static enum prop_handled handle_overlay_change (struct it *);
 +static enum prop_handled handle_fontified_prop (struct it *);
  
  /* Properties handled by iterators.  */
  
@@@ -918,9 -831,6 +918,9 @@@ static int clear_face_cache_count
  #ifdef HAVE_WINDOW_SYSTEM
  #define CLEAR_IMAGE_CACHE_COUNT       101
  static int clear_image_cache_count;
 +
 +/* Null glyph slice */
 +static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 };
  #endif
  
  /* Non-zero while redisplay_internal is in progress.  */
@@@ -940,12 -850,16 +940,12 @@@ Lisp_Object Qinhibit_free_realized_face
  Lisp_Object help_echo_string;
  Lisp_Object help_echo_window;
  Lisp_Object help_echo_object;
 -int help_echo_pos;
 +EMACS_INT help_echo_pos;
  
  /* Temporary variable for XTread_socket.  */
  
  Lisp_Object previous_help_echo_string;
  
 -/* Null glyph slice */
 -
 -static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 };
 -
  /* Platform-independent portion of hourglass implementation. */
  
  /* Non-zero means we're allowed to display a hourglass pointer.  */
@@@ -961,21 -875,6 +961,21 @@@ struct atimer *hourglass_atimer
  /* Number of seconds to wait before displaying an hourglass cursor.  */
  Lisp_Object Vhourglass_delay;
  
 +/* Name of the face used to display glyphless characters.  */
 +Lisp_Object Qglyphless_char;
 +
 +/* Char-table to control the display of glyphless characters.  */
 +Lisp_Object Vglyphless_char_display;
 +
 +/* Symbol for the purpose of Vglyphless_char_display.  */
 +Lisp_Object Qglyphless_char_display;
 +
 +/* Method symbols for Vglyphless_char_display.  */
 +static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width;
 +
 +/* Default pixel width of `thin-space' display method.  */
 +#define THIN_SPACE_WIDTH 1
 +
  /* Default number of seconds to wait before displaying an hourglass
     cursor.  */
  #define DEFAULT_HOURGLASS_DELAY 1
  \f
  /* Function prototypes.  */
  
 -static void setup_for_ellipsis P_ ((struct it *, int));
 -static void mark_window_display_accurate_1 P_ ((struct window *, int));
 -static int single_display_spec_string_p P_ ((Lisp_Object, Lisp_Object));
 -static int display_prop_string_p P_ ((Lisp_Object, Lisp_Object));
 -static int cursor_row_p P_ ((struct window *, struct glyph_row *));
 -static int redisplay_mode_lines P_ ((Lisp_Object, int));
 -static char *decode_mode_spec_coding P_ ((Lisp_Object, char *, int));
 -
 -static Lisp_Object get_it_property P_ ((struct it *it, Lisp_Object prop));
 -
 -static void handle_line_prefix P_ ((struct it *));
 -
 -static void pint2str P_ ((char *, int, int));
 -static void pint2hrstr P_ ((char *, int, int));
 -static struct text_pos run_window_scroll_functions P_ ((Lisp_Object,
 -                                                      struct text_pos));
 -static void reconsider_clip_changes P_ ((struct window *, struct buffer *));
 -static int text_outside_line_unchanged_p P_ ((struct window *, int, int));
 -static void store_mode_line_noprop_char P_ ((char));
 -static int store_mode_line_noprop P_ ((const unsigned char *, int, int));
 -static void x_consider_frame_title P_ ((Lisp_Object));
 -static void handle_stop P_ ((struct it *));
 -static int tool_bar_lines_needed P_ ((struct frame *, int *));
 -static int single_display_spec_intangible_p P_ ((Lisp_Object));
 -static void ensure_echo_area_buffers P_ ((void));
 -static Lisp_Object unwind_with_echo_area_buffer P_ ((Lisp_Object));
 -static Lisp_Object with_echo_area_buffer_unwind_data P_ ((struct window *));
 -static int with_echo_area_buffer P_ ((struct window *, int,
 -                                    int (*) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
 -                                    EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -static void clear_garbaged_frames P_ ((void));
 -static int current_message_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -static int truncate_message_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -static int set_message_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -static int display_echo_area P_ ((struct window *));
 -static int display_echo_area_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -static int resize_mini_window_1 P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -static Lisp_Object unwind_redisplay P_ ((Lisp_Object));
 -static int string_char_and_length P_ ((const unsigned char *, int *));
 -static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object,
 -                                           struct text_pos));
 -static int compute_window_start_on_continuation_line P_ ((struct window *));
 -static Lisp_Object safe_eval_handler P_ ((Lisp_Object));
 -static void insert_left_trunc_glyphs P_ ((struct it *));
 -static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *,
 -                                                        Lisp_Object));
 -static void extend_face_to_end_of_line P_ ((struct it *));
 -static int append_space_for_newline P_ ((struct it *, int));
 -static int cursor_row_fully_visible_p P_ ((struct window *, int, int));
 -static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int));
 -static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *));
 -static int trailing_whitespace_p P_ ((int));
 -static int message_log_check_duplicate P_ ((int, int, int, int));
 -static void push_it P_ ((struct it *));
 -static void pop_it P_ ((struct it *));
 -static void sync_frame_with_window_matrix_rows P_ ((struct window *));
 -static void select_frame_for_redisplay P_ ((Lisp_Object));
 -static void redisplay_internal P_ ((int));
 -static int echo_area_display P_ ((int));
 -static void redisplay_windows P_ ((Lisp_Object));
 -static void redisplay_window P_ ((Lisp_Object, int));
 -static Lisp_Object redisplay_window_error ();
 -static Lisp_Object redisplay_window_0 P_ ((Lisp_Object));
 -static Lisp_Object redisplay_window_1 P_ ((Lisp_Object));
 -static int update_menu_bar P_ ((struct frame *, int, int));
 -static int try_window_reusing_current_matrix P_ ((struct window *));
 -static int try_window_id P_ ((struct window *));
 -static int display_line P_ ((struct it *));
 -static int display_mode_lines P_ ((struct window *));
 -static int display_mode_line P_ ((struct window *, enum face_id, Lisp_Object));
 -static int display_mode_element P_ ((struct it *, int, int, int, Lisp_Object, Lisp_Object, int));
 -static int store_mode_line_string P_ ((char *, Lisp_Object, int, int, int, Lisp_Object));
 -static char *decode_mode_spec P_ ((struct window *, int, int, int,
 -                                 Lisp_Object *));
 -static void display_menu_bar P_ ((struct window *));
 -static int display_count_lines P_ ((int, int, int, int, int *));
 -static int display_string P_ ((unsigned char *, Lisp_Object, Lisp_Object,
 -                             EMACS_INT, EMACS_INT, struct it *, int, int, int, int));
 -static void compute_line_metrics P_ ((struct it *));
 -static void run_redisplay_end_trigger_hook P_ ((struct it *));
 -static int get_overlay_strings P_ ((struct it *, int));
 -static int get_overlay_strings_1 P_ ((struct it *, int, int));
 -static void next_overlay_string P_ ((struct it *));
 -static void reseat P_ ((struct it *, struct text_pos, int));
 -static void reseat_1 P_ ((struct it *, struct text_pos, int));
 -static void back_to_previous_visible_line_start P_ ((struct it *));
 -void reseat_at_previous_visible_line_start P_ ((struct it *));
 -static void reseat_at_next_visible_line_start P_ ((struct it *, int));
 -static int next_element_from_ellipsis P_ ((struct it *));
 -static int next_element_from_display_vector P_ ((struct it *));
 -static int next_element_from_string P_ ((struct it *));
 -static int next_element_from_c_string P_ ((struct it *));
 -static int next_element_from_buffer P_ ((struct it *));
 -static int next_element_from_composition P_ ((struct it *));
 -static int next_element_from_image P_ ((struct it *));
 -static int next_element_from_stretch P_ ((struct it *));
 -static void load_overlay_strings P_ ((struct it *, int));
 -static int init_from_display_pos P_ ((struct it *, struct window *,
 -                                    struct display_pos *));
 -static void reseat_to_string P_ ((struct it *, unsigned char *,
 -                                Lisp_Object, int, int, int, int));
 +static void setup_for_ellipsis (struct it *, int);
 +static void mark_window_display_accurate_1 (struct window *, int);
 +static int single_display_spec_string_p (Lisp_Object, Lisp_Object);
 +static int display_prop_string_p (Lisp_Object, Lisp_Object);
 +static int cursor_row_p (struct window *, struct glyph_row *);
 +static int redisplay_mode_lines (Lisp_Object, int);
 +static char *decode_mode_spec_coding (Lisp_Object, char *, int);
 +
 +static Lisp_Object get_it_property (struct it *it, Lisp_Object prop);
 +
 +static void handle_line_prefix (struct it *);
 +
 +static void pint2str (char *, int, int);
 +static void pint2hrstr (char *, int, int);
 +static struct text_pos run_window_scroll_functions (Lisp_Object,
 +                                                    struct text_pos);
 +static void reconsider_clip_changes (struct window *, struct buffer *);
 +static int text_outside_line_unchanged_p (struct window *,
 +                                        EMACS_INT, EMACS_INT);
 +static void store_mode_line_noprop_char (char);
 +static int store_mode_line_noprop (const unsigned char *, int, int);
 +static void handle_stop (struct it *);
 +static void handle_stop_backwards (struct it *, EMACS_INT);
 +static int single_display_spec_intangible_p (Lisp_Object);
 +static void ensure_echo_area_buffers (void);
 +static Lisp_Object unwind_with_echo_area_buffer (Lisp_Object);
 +static Lisp_Object with_echo_area_buffer_unwind_data (struct window *);
 +static int with_echo_area_buffer (struct window *, int,
 +                                  int (*) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
 +                                  EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static void clear_garbaged_frames (void);
 +static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static int display_echo_area (struct window *);
 +static int display_echo_area_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static int resize_mini_window_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static Lisp_Object unwind_redisplay (Lisp_Object);
 +static int string_char_and_length (const unsigned char *, int *);
 +static struct text_pos display_prop_end (struct it *, Lisp_Object,
 +                                         struct text_pos);
 +static int compute_window_start_on_continuation_line (struct window *);
 +static Lisp_Object safe_eval_handler (Lisp_Object);
 +static void insert_left_trunc_glyphs (struct it *);
 +static struct glyph_row *get_overlay_arrow_glyph_row (struct window *,
 +                                                      Lisp_Object);
 +static void extend_face_to_end_of_line (struct it *);
 +static int append_space_for_newline (struct it *, int);
 +static int cursor_row_fully_visible_p (struct window *, int, int);
 +static int try_scrolling (Lisp_Object, int, EMACS_INT, EMACS_INT, int, int);
 +static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
 +static int trailing_whitespace_p (EMACS_INT);
 +static int message_log_check_duplicate (EMACS_INT, EMACS_INT,
 +                                      EMACS_INT, EMACS_INT);
 +static void push_it (struct it *);
 +static void pop_it (struct it *);
 +static void sync_frame_with_window_matrix_rows (struct window *);
 +static void select_frame_for_redisplay (Lisp_Object);
 +static void redisplay_internal (int);
 +static int echo_area_display (int);
 +static void redisplay_windows (Lisp_Object);
 +static void redisplay_window (Lisp_Object, int);
 +static Lisp_Object redisplay_window_error (Lisp_Object);
 +static Lisp_Object redisplay_window_0 (Lisp_Object);
 +static Lisp_Object redisplay_window_1 (Lisp_Object);
 +static int update_menu_bar (struct frame *, int, int);
 +static int try_window_reusing_current_matrix (struct window *);
 +static int try_window_id (struct window *);
 +static int display_line (struct it *);
 +static int display_mode_lines (struct window *);
 +static int display_mode_line (struct window *, enum face_id, Lisp_Object);
 +static int display_mode_element (struct it *, int, int, int, Lisp_Object, Lisp_Object, int);
 +static int store_mode_line_string (const char *, Lisp_Object, int, int, int, Lisp_Object);
 +static const char *decode_mode_spec (struct window *, int, int, int,
 +                                   Lisp_Object *);
 +static void display_menu_bar (struct window *);
 +static int display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT, int,
 +                              EMACS_INT *);
 +static int display_string (const unsigned char *, Lisp_Object, Lisp_Object,
 +                           EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
 +static void compute_line_metrics (struct it *);
 +static void run_redisplay_end_trigger_hook (struct it *);
 +static int get_overlay_strings (struct it *, EMACS_INT);
 +static int get_overlay_strings_1 (struct it *, EMACS_INT, int);
 +static void next_overlay_string (struct it *);
 +static void reseat (struct it *, struct text_pos, int);
 +static void reseat_1 (struct it *, struct text_pos, int);
 +static void back_to_previous_visible_line_start (struct it *);
 +void reseat_at_previous_visible_line_start (struct it *);
 +static void reseat_at_next_visible_line_start (struct it *, int);
 +static int next_element_from_ellipsis (struct it *);
 +static int next_element_from_display_vector (struct it *);
 +static int next_element_from_string (struct it *);
 +static int next_element_from_c_string (struct it *);
 +static int next_element_from_buffer (struct it *);
 +static int next_element_from_composition (struct it *);
 +static int next_element_from_image (struct it *);
 +static int next_element_from_stretch (struct it *);
 +static void load_overlay_strings (struct it *, EMACS_INT);
 +static int init_from_display_pos (struct it *, struct window *,
 +                                  struct display_pos *);
 +static void reseat_to_string (struct it *, const unsigned char *,
 +                              Lisp_Object, EMACS_INT, EMACS_INT, int, int);
  static enum move_it_result
         move_it_in_display_line_to (struct it *, EMACS_INT, int,
                                   enum move_operation_enum);
 -void move_it_vertically_backward P_ ((struct it *, int));
 -static void init_to_row_start P_ ((struct it *, struct window *,
 -                                 struct glyph_row *));
 -static int init_to_row_end P_ ((struct it *, struct window *,
 -                              struct glyph_row *));
 -static void back_to_previous_line_start P_ ((struct it *));
 -static int forward_to_next_line_start P_ ((struct it *, int *));
 -static struct text_pos string_pos_nchars_ahead P_ ((struct text_pos,
 -                                                  Lisp_Object, int));
 -static struct text_pos string_pos P_ ((int, Lisp_Object));
 -static struct text_pos c_string_pos P_ ((int, unsigned char *, int));
 -static int number_of_chars P_ ((unsigned char *, int));
 -static void compute_stop_pos P_ ((struct it *));
 -static void compute_string_pos P_ ((struct text_pos *, struct text_pos,
 -                                  Lisp_Object));
 -static int face_before_or_after_it_pos P_ ((struct it *, int));
 -static EMACS_INT next_overlay_change P_ ((EMACS_INT));
 -static int handle_single_display_spec P_ ((struct it *, Lisp_Object,
 -                                         Lisp_Object, Lisp_Object,
 -                                         struct text_pos *, int));
 -static int underlying_face_id P_ ((struct it *));
 -static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *,
 -                                               struct window *));
 +void move_it_vertically_backward (struct it *, int);
 +static void init_to_row_start (struct it *, struct window *,
 +                               struct glyph_row *);
 +static int init_to_row_end (struct it *, struct window *,
 +                            struct glyph_row *);
 +static void back_to_previous_line_start (struct it *);
 +static int forward_to_next_line_start (struct it *, int *);
 +static struct text_pos string_pos_nchars_ahead (struct text_pos,
 +                                                Lisp_Object, EMACS_INT);
 +static struct text_pos string_pos (EMACS_INT, Lisp_Object);
 +static struct text_pos c_string_pos (EMACS_INT, const unsigned char *, int);
 +static EMACS_INT number_of_chars (const unsigned char *, int);
 +static void compute_stop_pos (struct it *);
 +static void compute_string_pos (struct text_pos *, struct text_pos,
 +                                Lisp_Object);
 +static int face_before_or_after_it_pos (struct it *, int);
 +static EMACS_INT next_overlay_change (EMACS_INT);
 +static int handle_single_display_spec (struct it *, Lisp_Object,
 +                                       Lisp_Object, Lisp_Object,
 +                                       struct text_pos *, int);
 +static int underlying_face_id (struct it *);
 +static int in_ellipses_for_invisible_text_p (struct display_pos *,
 +                                             struct window *);
  
  #define face_before_it_pos(IT) face_before_or_after_it_pos ((IT), 1)
  #define face_after_it_pos(IT)  face_before_or_after_it_pos ((IT), 0)
  
  #ifdef HAVE_WINDOW_SYSTEM
  
 -static void update_tool_bar P_ ((struct frame *, int));
 -static void build_desired_tool_bar_string P_ ((struct frame *f));
 -static int redisplay_tool_bar P_ ((struct frame *));
 -static void display_tool_bar_line P_ ((struct it *, int));
 -static void notice_overwritten_cursor P_ ((struct window *,
 -                                         enum glyph_row_area,
 -                                         int, int, int, int));
 -
 +static void x_consider_frame_title (Lisp_Object);
 +static int tool_bar_lines_needed (struct frame *, int *);
 +static void update_tool_bar (struct frame *, int);
 +static void build_desired_tool_bar_string (struct frame *f);
 +static int redisplay_tool_bar (struct frame *);
 +static void display_tool_bar_line (struct it *, int);
 +static void notice_overwritten_cursor (struct window *,
 +                                       enum glyph_row_area,
 +                                       int, int, int, int);
 +static void append_stretch_glyph (struct it *, Lisp_Object,
 +                                  int, int, int);
  
  
  #endif /* HAVE_WINDOW_SYSTEM */
  
 +static int coords_in_mouse_face_p (struct window *, int, int);
 +
 +
  \f
  /***********************************************************************
                      Window display dimensions
     This is the height of W minus the height of a mode line, if any.  */
  
  INLINE int
 -window_text_bottom_y (w)
 -     struct window *w;
 +window_text_bottom_y (struct window *w)
  {
    int height = WINDOW_TOTAL_HEIGHT (w);
  
     the left and right of the window.  */
  
  INLINE int
 -window_box_width (w, area)
 -     struct window *w;
 -     int area;
 +window_box_width (struct window *w, int area)
  {
    int cols = XFASTINT (w->total_cols);
    int pixels = 0;
     including mode lines of W, if any.  */
  
  INLINE int
 -window_box_height (w)
 -     struct window *w;
 +window_box_height (struct window *w)
  {
    struct frame *f = XFRAME (w->frame);
    int height = WINDOW_TOTAL_HEIGHT (w);
     whole window, to the right of the left fringe of W.  */
  
  INLINE int
 -window_box_left_offset (w, area)
 -     struct window *w;
 -     int area;
 +window_box_left_offset (struct window *w, int area)
  {
    int x;
  
  
  
  /* Return the window-relative coordinate of the right edge of display
 -   area AREA of window W.  AREA < 0 means return the left edge of the
 +   area AREA of window W.  AREA < 0 means return the right edge of the
     whole window, to the left of the right fringe of W.  */
  
  INLINE int
 -window_box_right_offset (w, area)
 -     struct window *w;
 -     int area;
 +window_box_right_offset (struct window *w, int area)
  {
    return window_box_left_offset (w, area) + window_box_width (w, area);
  }
     whole window, to the right of the left fringe of W.  */
  
  INLINE int
 -window_box_left (w, area)
 -     struct window *w;
 -     int area;
 +window_box_left (struct window *w, int area)
  {
    struct frame *f = XFRAME (w->frame);
    int x;
  
  
  /* Return the frame-relative coordinate of the right edge of display
 -   area AREA of window W.  AREA < 0 means return the left edge of the
 +   area AREA of window W.  AREA < 0 means return the right edge of the
     whole window, to the left of the right fringe of W.  */
  
  INLINE int
 -window_box_right (w, area)
 -     struct window *w;
 -     int area;
 +window_box_right (struct window *w, int area)
  {
    return window_box_left (w, area) + window_box_width (w, area);
  }
     *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box.  */
  
  INLINE void
 -window_box (w, area, box_x, box_y, box_width, box_height)
 -     struct window *w;
 -     int area;
 -     int *box_x, *box_y, *box_width, *box_height;
 +window_box (struct window *w, int area, int *box_x, int *box_y,
 +          int *box_width, int *box_height)
  {
    if (box_width)
      *box_width = window_box_width (w, area);
     box.  */
  
  INLINE void
 -window_box_edges (w, area, top_left_x, top_left_y,
 -                bottom_right_x, bottom_right_y)
 -     struct window *w;
 -     int area;
 -     int *top_left_x, *top_left_y, *bottom_right_x, *bottom_right_y;
 +window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y,
 +                 int *bottom_right_x, int *bottom_right_y)
  {
    window_box (w, area, top_left_x, top_left_y, bottom_right_x,
              bottom_right_y);
     This can modify IT's settings.  */
  
  int
 -line_bottom_y (it)
 -     struct it *it;
 +line_bottom_y (struct it *it)
  {
    int line_height = it->max_ascent + it->max_descent;
    int line_top_y = it->current_y;
     Set *ROWH and *VPOS to row's visible height and VPOS (row number).  */
  
  int
 -pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
 -     struct window *w;
 -     int charpos, *x, *y, *rtop, *rbot, *rowh, *vpos;
 +pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
 +             int *rtop, int *rbot, int *rowh, int *vpos)
  {
    struct it it;
    struct text_pos top;
     with the length of the invalid character.  */
  
  static INLINE int
 -string_char_and_length (str, len)
 -     const unsigned char *str;
 -     int *len;
 +string_char_and_length (const unsigned char *str, int *len)
  {
    int c;
  
     in STRING, return the position NCHARS ahead (NCHARS >= 0).  */
  
  static struct text_pos
 -string_pos_nchars_ahead (pos, string, nchars)
 -     struct text_pos pos;
 -     Lisp_Object string;
 -     int nchars;
 +string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, EMACS_INT nchars)
  {
    xassert (STRINGP (string) && nchars >= 0);
  
     for character position CHARPOS in STRING.  */
  
  static INLINE struct text_pos
 -string_pos (charpos, string)
 -     int charpos;
 -     Lisp_Object string;
 +string_pos (EMACS_INT charpos, Lisp_Object string)
  {
    struct text_pos pos;
    xassert (STRINGP (string));
     means recognize multibyte characters.  */
  
  static struct text_pos
 -c_string_pos (charpos, s, multibyte_p)
 -     int charpos;
 -     unsigned char *s;
 -     int multibyte_p;
 +c_string_pos (EMACS_INT charpos, const unsigned char *s, int multibyte_p)
  {
    struct text_pos pos;
  
  /* Value is the number of characters in C string S.  MULTIBYTE_P
     non-zero means recognize multibyte characters.  */
  
 -static int
 -number_of_chars (s, multibyte_p)
 -     unsigned char *s;
 -     int multibyte_p;
 +static EMACS_INT
 +number_of_chars (const unsigned char *s, int multibyte_p)
  {
 -  int nchars;
 +  EMACS_INT nchars;
  
    if (multibyte_p)
      {
 -      int rest = strlen (s), len;
 +      EMACS_INT rest = strlen (s);
 +      int len;
        unsigned char *p = (unsigned char *) s;
  
        for (nchars = 0; rest > 0; ++nchars)
     NEWPOS->charpos must be >= POS.charpos.  */
  
  static void
 -compute_string_pos (newpos, pos, string)
 -     struct text_pos *newpos, pos;
 -     Lisp_Object string;
 +compute_string_pos (struct text_pos *newpos, struct text_pos pos, Lisp_Object string)
  {
    xassert (STRINGP (string));
    xassert (CHARPOS (*newpos) >= CHARPOS (pos));
     frame F.  FACE_ID specifies what line's height to estimate.  */
  
  int
 -estimate_mode_line_height (f, face_id)
 -     struct frame *f;
 -     enum face_id face_id;
 +estimate_mode_line_height (struct frame *f, enum face_id face_id)
  {
  #ifdef HAVE_WINDOW_SYSTEM
    if (FRAME_WINDOW_P (f))
     not force the value into range.  */
  
  void
 -pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
 -     FRAME_PTR f;
 -     register int pix_x, pix_y;
 -     int *x, *y;
 -     NativeRectangle *bounds;
 -     int noclip;
 +pixel_to_glyph_coords (FRAME_PTR f, register int pix_x, register int pix_y,
 +                     int *x, int *y, NativeRectangle *bounds, int noclip)
  {
  
  #ifdef HAVE_WINDOW_SYSTEM
     return 0.  */
  
  int
 -glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y)
 -     struct window *w;
 -     int hpos, vpos;
 -     int *frame_x, *frame_y;
 +glyph_to_pixel_coords (struct window *w, int hpos, int vpos,
 +                     int *frame_x, int *frame_y)
  {
  #ifdef HAVE_WINDOW_SYSTEM
    if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))))
  }
  
  
 -#ifdef HAVE_WINDOW_SYSTEM
 -
  /* Find the glyph under window-relative coordinates X/Y in window W.
     Consider only glyphs from buffer text, i.e. no glyphs from overlay
     strings.  Return in *HPOS and *VPOS the row and column number of
  
  static
  struct glyph *
 -x_y_to_hpos_vpos (w, x, y, hpos, vpos, dx, dy, area)
 -     struct window *w;
 -     int x, y;
 -     int *hpos, *vpos, *dx, *dy, *area;
 +x_y_to_hpos_vpos (struct window *w, int x, int y, int *hpos, int *vpos,
 +                int *dx, int *dy, int *area)
  {
    struct glyph *glyph, *end;
    struct glyph_row *row = NULL;
    return glyph;
  }
  
 -
  /* EXPORT:
     Convert frame-relative x/y to coordinates relative to window W.
     Takes pseudo-windows into account.  */
  
  void
 -frame_to_window_pixel_xy (w, x, y)
 -     struct window *w;
 -     int *x, *y;
 +frame_to_window_pixel_xy (struct window *w, int *x, int *y)
  {
    if (w->pseudo_window_p)
      {
      }
  }
  
 +#ifdef HAVE_WINDOW_SYSTEM
 +
  /* EXPORT:
     Return in RECTS[] at most N clipping rectangles for glyph string S.
     Return the number of stored rectangles.  */
  
  int
 -get_glyph_string_clip_rects (s, rects, n)
 -     struct glyph_string *s;
 -     NativeRectangle *rects;
 -     int n;
 +get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, int n)
  {
    XRectangle r;
  
     Return in *NR the clipping rectangle for glyph string S.  */
  
  void
 -get_glyph_string_clip_rect (s, nr)
 -     struct glyph_string *s;
 -     NativeRectangle *nr;
 +get_glyph_string_clip_rect (struct glyph_string *s, NativeRectangle *nr)
  {
    get_glyph_string_clip_rects (s, nr, 1);
  }
  */
  
  void
 -get_phys_cursor_geometry (w, row, glyph, xp, yp, heightp)
 -     struct window *w;
 -     struct glyph_row *row;
 -     struct glyph *glyph;
 -     int *xp, *yp, *heightp;
 +get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
 +                        struct glyph *glyph, int *xp, int *yp, int *heightp)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    int x, y, wd, h, h0, y0;
   */
  
  void
 -remember_mouse_glyph (f, gx, gy, rect)
 -     struct frame *f;
 -     int gx, gy;
 -     NativeRectangle *rect;
 +remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
  {
    Lisp_Object window;
    struct window *w;
       frame pixel coordinates X/Y on frame F.  */
  
    if (!f->glyphs_initialized_p
 -      || (window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0),
 +      || (window = window_from_coordinates (f, gx, gy, &part, 0),
          NILP (window)))
      {
        width = FRAME_SMALLEST_CHAR_WIDTH (f);
    width = WINDOW_FRAME_COLUMN_WIDTH (w);
    height = WINDOW_FRAME_LINE_HEIGHT (w);
  
 +  x = window_relative_x_coord (w, part, gx);
 +  y = gy - WINDOW_TOP_EDGE_Y (w);
 +
    r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
    end_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
  
  /* Error handler for safe_eval and safe_call.  */
  
  static Lisp_Object
 -safe_eval_handler (arg)
 -     Lisp_Object arg;
 +safe_eval_handler (Lisp_Object arg)
  {
    add_to_log ("Error during redisplay: %s", arg, Qnil);
    return Qnil;
     redisplay during the evaluation.  */
  
  Lisp_Object
 -safe_call (nargs, args)
 -     int nargs;
 -     Lisp_Object *args;
 +safe_call (int nargs, Lisp_Object *args)
  {
    Lisp_Object val;
  
        specbind (Qinhibit_redisplay, Qt);
        /* Use Qt to ensure debugger does not run,
         so there is no possibility of wanting to redisplay.  */
 -      val = internal_condition_case_2 (Ffuncall, nargs, args, Qt,
 +      val = internal_condition_case_n (Ffuncall, nargs, args, Qt,
                                       safe_eval_handler);
        UNGCPRO;
        val = unbind_to (count, val);
     Return the result, or nil if something went wrong.  */
  
  Lisp_Object
 -safe_call1 (fn, arg)
 -     Lisp_Object fn, arg;
 +safe_call1 (Lisp_Object fn, Lisp_Object arg)
  {
    Lisp_Object args[2];
    args[0] = fn;
@@@ -2573,9 -2521,12 +2573,9 @@@ check_window_end (w
     the desired matrix of W.  */
  
  void
 -init_iterator (it, w, charpos, bytepos, row, base_face_id)
 -     struct it *it;
 -     struct window *w;
 -     int charpos, bytepos;
 -     struct glyph_row *row;
 -     enum face_id base_face_id;
 +init_iterator (struct it *it, struct window *w,
 +             EMACS_INT charpos, EMACS_INT bytepos,
 +             struct glyph_row *row, enum face_id base_face_id)
  {
    int highlight_region_p;
    enum face_id remapped_base_face_id = base_face_id;
      }
  
    /* Clear IT.  */
 -  bzero (it, sizeof *it);
 +  memset (it, 0, sizeof *it);
    it->current.overlay_string_index = -1;
    it->current.dpvec_index = -1;
    it->base_face_id = remapped_base_face_id;
    /* Are multibyte characters enabled in current_buffer?  */
    it->multibyte_p = !NILP (current_buffer->enable_multibyte_characters);
  
 +  /* Do we need to reorder bidirectional text?  Not if this is a
 +     unibyte buffer: by definition, none of the single-byte characters
 +     are strong R2L, so no reordering is needed.  And bidi.c doesn't
 +     support unibyte buffers anyway.  */
 +  it->bidi_p
 +    = !NILP (current_buffer->bidi_display_reordering) && it->multibyte_p;
 +
    /* Non-zero if we should highlight the region.  */
    highlight_region_p
      = (!NILP (Vtransient_mark_mode)
              && WINDOWP (minibuf_selected_window)
              && w == XWINDOW (minibuf_selected_window))))
      {
 -      int charpos = marker_position (current_buffer->mark);
 +      EMACS_INT charpos = marker_position (current_buffer->mark);
        it->region_beg_charpos = min (PT, charpos);
        it->region_end_charpos = max (PT, charpos);
      }
    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
        it->start_of_box_run_p = 1;
      }
  
 +  /* If we are to reorder bidirectional text, init the bidi
 +     iterator.  */
 +  if (it->bidi_p)
 +    {
 +      /* Note the paragraph direction that this buffer wants to
 +       use.  */
 +      if (EQ (current_buffer->bidi_paragraph_direction, Qleft_to_right))
 +      it->paragraph_embedding = L2R;
 +      else if (EQ (current_buffer->bidi_paragraph_direction, Qright_to_left))
 +      it->paragraph_embedding = R2L;
 +      else
 +      it->paragraph_embedding = NEUTRAL_DIR;
 +      bidi_init_it (charpos, bytepos, &it->bidi_it);
 +    }
 +
    /* If a buffer position was specified, set the iterator there,
       getting overlays and face properties from that position.  */
    if (charpos >= BUF_BEG (current_buffer))
  /* Initialize IT for the display of window W with window start POS.  */
  
  void
 -start_display (it, w, pos)
 -     struct it *it;
 -     struct window *w;
 -     struct text_pos pos;
 +start_display (struct it *it, struct window *w, struct text_pos pos)
  {
    struct glyph_row *row;
    int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
     text.  W is the window we display, for text property lookup.  */
  
  static int
 -in_ellipses_for_invisible_text_p (pos, w)
 -     struct display_pos *pos;
 -     struct window *w;
 +in_ellipses_for_invisible_text_p (struct display_pos *pos, struct window *w)
  {
    Lisp_Object prop, window;
    int ellipses_p = 0;
 -  int charpos = CHARPOS (pos->pos);
 +  EMACS_INT charpos = CHARPOS (pos->pos);
  
    /* If POS specifies a position in a display vector, this might
       be for an ellipsis displayed for invisible text.  We won't
     is zero if there are overlay strings with newlines at POS.  */
  
  static int
 -init_from_display_pos (it, w, pos)
 -     struct it *it;
 -     struct window *w;
 -     struct display_pos *pos;
 +init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
  {
 -  int charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos);
 +  EMACS_INT charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos);
    int i, overlay_strings_with_newlines = 0;
  
    /* If POS specifies a position in a display vector, this might
     starting at ROW->start.  */
  
  static void
 -init_to_row_start (it, w, row)
 -     struct it *it;
 -     struct window *w;
 -     struct glyph_row *row;
 +init_to_row_start (struct it *it, struct window *w, struct glyph_row *row)
  {
    init_from_display_pos (it, w, &row->start);
    it->start = row->start;
     end position.  */
  
  static int
 -init_to_row_end (it, w, row)
 -     struct it *it;
 -     struct window *w;
 -     struct glyph_row *row;
 +init_to_row_end (struct it *it, struct window *w, struct glyph_row *row)
  {
    int success = 0;
  
     to stop.  */
  
  static void
 -handle_stop (it)
 -     struct it *it;
 +handle_stop (struct it *it)
  {
    enum prop_handled handled;
    int handle_overlay_change_p;
     information for IT's current position.  */
  
  static void
 -compute_stop_pos (it)
 -     struct it *it;
 +compute_stop_pos (struct it *it)
  {
    register INTERVAL iv, next_iv;
    Lisp_Object object, limit, position;
        }
      }
  
 -  composition_compute_stop_pos (&it->cmp_it, charpos, bytepos,
 -                              it->stop_charpos, it->string);
 +  if (it->cmp_it.id < 0)
 +    {
 +      EMACS_INT stoppos = it->end_charpos;
 +
 +      if (it->bidi_p && it->bidi_it.scan_dir < 0)
 +      stoppos = -1;
 +      composition_compute_stop_pos (&it->cmp_it, charpos, bytepos,
 +                                  stoppos, it->string);
 +    }
  
    xassert (STRINGP (it->string)
           || (it->stop_charpos >= BEGV
     xmalloc.  */
  
  static EMACS_INT
 -next_overlay_change (pos)
 -     EMACS_INT pos;
 +next_overlay_change (EMACS_INT pos)
  {
    int noverlays;
    EMACS_INT endpos;
     regions of text.  */
  
  static enum prop_handled
 -handle_fontified_prop (it)
 -     struct it *it;
 +handle_fontified_prop (struct it *it)
  {
    Lisp_Object prop, pos;
    enum prop_handled handled = HANDLED_NORMALLY;
     Called from handle_stop.  */
  
  static enum prop_handled
 -handle_face_prop (it)
 -     struct it *it;
 +handle_face_prop (struct it *it)
  {
    int new_face_id;
    EMACS_INT next_stop;
      }
    else
      {
 -      int base_face_id, bufpos;
 +      int base_face_id;
 +      EMACS_INT bufpos;
        int i;
        Lisp_Object from_overlay
        = (it->current.overlay_string_index >= 0
     Otherwise, use the iterator's base_face_id.  */
  
  static int
 -underlying_face_id (it)
 -     struct it *it;
 +underlying_face_id (struct it *it)
  {
    int face_id = it->base_face_id, i;
  
     position.  Value is the id of the face.  */
  
  static int
 -face_before_or_after_it_pos (it, before_p)
 -     struct it *it;
 -     int before_p;
 +face_before_or_after_it_pos (struct it *it, int before_p)
  {
    int face_id, limit;
    EMACS_INT next_check_charpos;
  
    if (STRINGP (it->string))
      {
 -      int bufpos, base_face_id;
 +      EMACS_INT bufpos;
 +      int base_face_id;
  
        /* No face change past the end of the string (for the case
         we are padding with spaces).  No face change before the
     position.  Called from handle_stop.  */
  
  static enum prop_handled
 -handle_invisible_prop (it)
 -     struct it *it;
 +handle_invisible_prop (struct it *it)
  {
    enum prop_handled handled = HANDLED_NORMALLY;
  
    if (STRINGP (it->string))
      {
 -      extern Lisp_Object Qinvisible;
        Lisp_Object prop, end_charpos, limit, charpos;
  
        /* Get the value of the invisible text property at the
    else
      {
        int invis_p;
 -      EMACS_INT newpos, next_stop, start_charpos;
 +      EMACS_INT newpos, next_stop, start_charpos, tem;
        Lisp_Object pos, prop, overlay;
  
        /* First of all, is there invisible text at this position?  */
 -      start_charpos = IT_CHARPOS (*it);
 -      pos = make_number (IT_CHARPOS (*it));
 +      tem = start_charpos = IT_CHARPOS (*it);
 +      pos = make_number (tem);
        prop = get_char_property_and_overlay (pos, Qinvisible, it->window,
                                            &overlay);
        invis_p = TEXT_PROP_MEANS_INVISIBLE (prop);
  
        /* If we are on invisible text, skip over it.  */
 -      if (invis_p && IT_CHARPOS (*it) < it->end_charpos)
 +      if (invis_p && start_charpos < it->end_charpos)
        {
          /* Record whether we have to display an ellipsis for the
             invisible text.  */
          do
            {
              /* Try to skip some invisible text.  Return value is the
 -               position reached which can be equal to IT's position
 -               if there is nothing invisible here.  This skips both
 +               position reached which can be equal to where we start
 +               if there is nothing invisible there.  This skips both
                 over invisible text properties and overlays with
                 invisible property.  */
 -            newpos = skip_invisible (IT_CHARPOS (*it),
 -                                     &next_stop, ZV, it->window);
 +            newpos = skip_invisible (tem, &next_stop, ZV, it->window);
  
              /* If we skipped nothing at all we weren't at invisible
                 text in the first place.  If everything to the end of
                 the buffer was skipped, end the loop.  */
 -            if (newpos == IT_CHARPOS (*it) || newpos >= ZV)
 +            if (newpos == tem || newpos >= ZV)
                invis_p = 0;
              else
                {
              /* If we ended up on invisible text, proceed to
                 skip starting with next_stop.  */
              if (invis_p)
 -              IT_CHARPOS (*it) = next_stop;
 +              tem = next_stop;
  
                /* If there are adjacent invisible texts, don't lose the
                   second one's ellipsis. */
          while (invis_p);
  
          /* The position newpos is now either ZV or on visible text.  */
 -        IT_CHARPOS (*it) = newpos;
 -        IT_BYTEPOS (*it) = CHAR_TO_BYTE (newpos);
 +        if (it->bidi_p && newpos < ZV)
 +          {
 +            /* With bidi iteration, the region of invisible text
 +               could start and/or end in the middle of a non-base
 +               embedding level.  Therefore, we need to skip
 +               invisible text using the bidi iterator, starting at
 +               IT's current position, until we find ourselves
 +               outside the invisible text.  Skipping invisible text
 +               _after_ bidi iteration avoids affecting the visual
 +               order of the displayed text when invisible properties
 +               are added or removed.  */
 +            if (it->bidi_it.first_elt)
 +              {
 +                /* If we were `reseat'ed to a new paragraph,
 +                   determine the paragraph base direction.  We need
 +                   to do it now because next_element_from_buffer may
 +                   not have a chance to do it, if we are going to
 +                   skip any text at the beginning, which resets the
 +                   FIRST_ELT flag.  */
 +                bidi_paragraph_init (it->paragraph_embedding,
 +                                     &it->bidi_it, 1);
 +              }
 +            do
 +              {
 +                bidi_move_to_visually_next (&it->bidi_it);
 +              }
 +            while (it->stop_charpos <= it->bidi_it.charpos
 +                   && it->bidi_it.charpos < newpos);
 +            IT_CHARPOS (*it) = it->bidi_it.charpos;
 +            IT_BYTEPOS (*it) = it->bidi_it.bytepos;
 +            /* If we overstepped NEWPOS, record its position in the
 +               iterator, so that we skip invisible text if later the
 +               bidi iteration lands us in the invisible region
 +               again. */
 +            if (IT_CHARPOS (*it) >= newpos)
 +              it->prev_stop = newpos;
 +          }
 +        else
 +          {
 +            IT_CHARPOS (*it) = newpos;
 +            IT_BYTEPOS (*it) = CHAR_TO_BYTE (newpos);
 +          }
  
          /* If there are before-strings at the start of invisible
             text, and the text is invisible because of a text
             overlay property instead of a text property, this is
             already handled in the overlay code.)  */
          if (NILP (overlay)
 -            && get_overlay_strings (it, start_charpos))
 +            && get_overlay_strings (it, it->stop_charpos))
            {
              handled = HANDLED_RECOMPUTE_PROPS;
              it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p;
                   first invisible character.  */
              if (!STRINGP (it->object))
                {
 -                it->position.charpos = IT_CHARPOS (*it) - 1;
 +                it->position.charpos = newpos - 1;
                  it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
                }
              it->ellipsis_p = 1;
     Replaces LEN characters from buffer.  */
  
  static void
 -setup_for_ellipsis (it, len)
 -     struct it *it;
 -     int len;
 +setup_for_ellipsis (struct it *it, int len)
  {
    /* Use the display table definition for `...'.  Invalid glyphs
       will be handled by the method returning elements from dpvec.  */
     Otherwise we return HANDLED_NORMALLY.  */
  
  static enum prop_handled
 -handle_display_prop (it)
 -     struct it *it;
 +handle_display_prop (struct it *it)
  {
    Lisp_Object prop, object, overlay;
    struct text_pos *position;
     at START_POS in OBJECT.  */
  
  static struct text_pos
 -display_prop_end (it, object, start_pos)
 -     struct it *it;
 -     Lisp_Object object;
 -     struct text_pos start_pos;
 +display_prop_end (struct it *it, Lisp_Object object, struct text_pos start_pos)
  {
    Lisp_Object end;
    struct text_pos end_pos;
     of buffer or string text.  */
  
  static int
 -handle_single_display_spec (it, spec, object, overlay, position,
 -                          display_replaced_before_p)
 -     struct it *it;
 -     Lisp_Object spec;
 -     Lisp_Object object;
 -     Lisp_Object overlay;
 -     struct text_pos *position;
 -     int display_replaced_before_p;
 +handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
 +                          Lisp_Object overlay, struct text_pos *position,
 +                          int display_replaced_before_p)
  {
    Lisp_Object form;
    Lisp_Object location, value;
     treated as intangible.  */
  
  static int
 -single_display_spec_intangible_p (prop)
 -     Lisp_Object prop;
 +single_display_spec_intangible_p (Lisp_Object prop)
  {
    /* Skip over `when FORM'.  */
    if (CONSP (prop) && EQ (XCAR (prop), Qwhen))
     treated as intangible.  */
  
  int
 -display_prop_intangible_p (prop)
 -     Lisp_Object prop;
 +display_prop_intangible_p (Lisp_Object prop)
  {
    if (CONSP (prop)
        && CONSP (XCAR (prop))
  /* Return 1 if PROP is a display sub-property value containing STRING.  */
  
  static int
 -single_display_spec_string_p (prop, string)
 -     Lisp_Object prop, string;
 +single_display_spec_string_p (Lisp_Object prop, Lisp_Object string)
  {
    if (EQ (string, prop))
      return 1;
  /* Return 1 if STRING appears in the `display' property PROP.  */
  
  static int
 -display_prop_string_p (prop, string)
 -     Lisp_Object prop, string;
 +display_prop_string_p (Lisp_Object prop, Lisp_Object string)
  {
    if (CONSP (prop)
        && CONSP (XCAR (prop))
    return 0;
  }
  
 -
 -/* Determine which buffer position in W's buffer STRING comes from.
 -   AROUND_CHARPOS is an approximate position where it could come from.
 -   Value is the buffer position or 0 if it couldn't be determined.
 +/* Look for STRING in overlays and text properties in W's buffer,
 +   between character positions FROM and TO (excluding TO).
 +   BACK_P non-zero means look back (in this case, TO is supposed to be
 +   less than FROM).
 +   Value is the first character position where STRING was found, or
 +   zero if it wasn't found before hitting TO.
  
     W's buffer must be current.
  
 -   This function is necessary because we don't record buffer positions
 -   in glyphs generated from strings (to keep struct glyph small).
     This function may only use code that doesn't eval because it is
     called asynchronously from note_mouse_highlight.  */
  
 -int
 -string_buffer_position (w, string, around_charpos)
 -     struct window *w;
 -     Lisp_Object string;
 -     int around_charpos;
 +static EMACS_INT
 +string_buffer_position_lim (struct window *w, Lisp_Object string,
 +                          EMACS_INT from, EMACS_INT to, int back_p)
  {
    Lisp_Object limit, prop, pos;
 -  const int MAX_DISTANCE = 1000;
    int found = 0;
  
 -  pos = make_number (around_charpos);
 -  limit = make_number (min (XINT (pos) + MAX_DISTANCE, ZV));
 -  while (!found && !EQ (pos, limit))
 +  pos = make_number (from);
 +
 +  if (!back_p)        /* looking forward */
      {
 -      prop = Fget_char_property (pos, Qdisplay, Qnil);
 -      if (!NILP (prop) && display_prop_string_p (prop, string))
 -      found = 1;
 -      else
 -      pos = Fnext_single_char_property_change (pos, Qdisplay, Qnil, limit);
 +      limit = make_number (min (to, ZV));
 +      while (!found && !EQ (pos, limit))
 +      {
 +        prop = Fget_char_property (pos, Qdisplay, Qnil);
 +        if (!NILP (prop) && display_prop_string_p (prop, string))
 +          found = 1;
 +        else
 +          pos = Fnext_single_char_property_change (pos, Qdisplay, Qnil,
 +                                                   limit);
 +      }
      }
 -
 -  if (!found)
 +  else                /* looking back */
      {
 -      pos = make_number (around_charpos);
 -      limit = make_number (max (XINT (pos) - MAX_DISTANCE, BEGV));
 +      limit = make_number (max (to, BEGV));
        while (!found && !EQ (pos, limit))
        {
          prop = Fget_char_property (pos, Qdisplay, Qnil);
    return found ? XINT (pos) : 0;
  }
  
 +/* Determine which buffer position in W's buffer STRING comes from.
 +   AROUND_CHARPOS is an approximate position where it could come from.
 +   Value is the buffer position or 0 if it couldn't be determined.
 +
 +   W's buffer must be current.
 +
 +   This function is necessary because we don't record buffer positions
 +   in glyphs generated from strings (to keep struct glyph small).
 +   This function may only use code that doesn't eval because it is
 +   called asynchronously from note_mouse_highlight.  */
 +
 +EMACS_INT
 +string_buffer_position (struct window *w, Lisp_Object string, EMACS_INT around_charpos)
 +{
 +  const int MAX_DISTANCE = 1000;
 +  EMACS_INT found = string_buffer_position_lim (w, string, around_charpos,
 +                                              around_charpos + MAX_DISTANCE,
 +                                              0);
 +
 +  if (!found)
 +    found = string_buffer_position_lim (w, string, around_charpos,
 +                                      around_charpos - MAX_DISTANCE, 1);
 +  return found;
 +}
 +
  
  \f
  /***********************************************************************
     position.  Called from handle_stop.  */
  
  static enum prop_handled
 -handle_composition_prop (it)
 -     struct it *it;
 +handle_composition_prop (struct it *it)
  {
    Lisp_Object prop, string;
    EMACS_INT pos, pos_byte, start, end;
@@@ -4783,7 -4675,8 +4783,7 @@@ struct overlay_entr
     Called from handle_stop.  */
  
  static enum prop_handled
 -handle_overlay_change (it)
 -     struct it *it;
 +handle_overlay_change (struct it *it)
  {
    if (!STRINGP (it->string) && get_overlay_strings (it, 0))
      return HANDLED_RECOMPUTE_PROPS;
     Otherwise IT->string is set to nil.  */
  
  static void
 -next_overlay_string (it)
 -     struct it *it;
 +next_overlay_string (struct it *it)
  {
    ++it->current.overlay_string_index;
    if (it->current.overlay_string_index == it->n_overlay_strings)
  
  
  static int
 -compare_overlay_entries (e1, e2)
 -     void *e1, *e2;
 +compare_overlay_entries (const void *e1, const void *e2)
  {
    struct overlay_entry *entry1 = (struct overlay_entry *) e1;
    struct overlay_entry *entry2 = (struct overlay_entry *) e2;
     compare_overlay_entries.  */
  
  static void
 -load_overlay_strings (it, charpos)
 -     struct it *it;
 -     int charpos;
 +load_overlay_strings (struct it *it, EMACS_INT charpos)
  {
 -  extern Lisp_Object Qwindow, Qpriority;
    Lisp_Object overlay, window, str, invisible;
    struct Lisp_Overlay *ov;
 -  int start, end;
 +  EMACS_INT start, end;
    int size = 20;
    int n = 0, i, j, invis_p;
    struct overlay_entry *entries
          entries =                                                     \
              (struct overlay_entry *) alloca (new_size                 \
                                             * sizeof *entries);        \
 -        bcopy (old, entries, size * sizeof *entries);                 \
 +        memcpy (entries, old, size * sizeof *entries);                \
          size = new_size;                                              \
        }                                                               \
                                                                        \
     least one overlay string was found.  */
  
  static int
 -get_overlay_strings_1 (it, charpos, compute_stop_p)
 -     struct it *it;
 -     int charpos;
 -     int compute_stop_p;
 +get_overlay_strings_1 (struct it *it, EMACS_INT charpos, int compute_stop_p)
  {
    /* Get the first OVERLAY_STRING_CHUNK_SIZE overlay strings to
       process.  This fills IT->overlay_strings with strings, and sets
  }
  
  static int
 -get_overlay_strings (it, charpos)
 -     struct it *it;
 -     int charpos;
 +get_overlay_strings (struct it *it, EMACS_INT charpos)
  {
    it->string = Qnil;
    it->method = GET_FROM_BUFFER;
     processed.  */
  
  static void
 -push_it (it)
 -     struct it *it;
 +push_it (struct it *it)
  {
    struct iterator_stack_entry *p;
  
    p = it->stack + it->sp;
  
    p->stop_charpos = it->stop_charpos;
 +  p->prev_stop = it->prev_stop;
 +  p->base_level_stop = it->base_level_stop;
    p->cmp_it = it->cmp_it;
    xassert (it->face_id >= 0);
    p->face_id = it->face_id;
    ++it->sp;
  }
  
 +static void
 +iterate_out_of_display_property (struct it *it)
 +{
 +  /* Maybe initialize paragraph direction.  If we are at the beginning
 +     of a new paragraph, next_element_from_buffer may not have a
 +     chance to do that.  */
 +  if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
 +    bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
 +  /* prev_stop can be zero, so check against BEGV as well.  */
 +  while (it->bidi_it.charpos >= BEGV
 +       && it->prev_stop <= it->bidi_it.charpos
 +       && it->bidi_it.charpos < CHARPOS (it->position))
 +    bidi_move_to_visually_next (&it->bidi_it);
 +  /* Record the stop_pos we just crossed, for when we cross it
 +     back, maybe.  */
 +  if (it->bidi_it.charpos > CHARPOS (it->position))
 +    it->prev_stop = CHARPOS (it->position);
 +  /* If we ended up not where pop_it put us, resync IT's
 +     positional members with the bidi iterator. */
 +  if (it->bidi_it.charpos != CHARPOS (it->position))
 +    {
 +      SET_TEXT_POS (it->position,
 +                  it->bidi_it.charpos, it->bidi_it.bytepos);
 +      it->current.pos = it->position;
 +    }
 +}
  
  /* Restore IT's settings from IT->stack.  Called, for example, when no
     more overlay strings must be processed, and we return to delivering
     elements from an overlay string, or from a buffer.  */
  
  static void
 -pop_it (it)
 -     struct it *it;
 +pop_it (struct it *it)
  {
    struct iterator_stack_entry *p;
  
    --it->sp;
    p = it->stack + it->sp;
    it->stop_charpos = p->stop_charpos;
 +  it->prev_stop = p->prev_stop;
 +  it->base_level_stop = p->base_level_stop;
    it->cmp_it = p->cmp_it;
    it->face_id = p->face_id;
    it->current = p->current;
        break;
      case GET_FROM_BUFFER:
        it->object = it->w->buffer;
 +      if (it->bidi_p)
 +      {
 +        /* Bidi-iterate until we get out of the portion of text, if
 +           any, covered by a `display' text property or an overlay
 +           with `display' property.  (We cannot just jump there,
 +           because the internal coherency of the bidi iterator state
 +           can not be preserved across such jumps.)  We also must
 +           determine the paragraph base direction if the overlay we
 +           just processed is at the beginning of a new
 +           paragraph.  */
 +        iterate_out_of_display_property (it);
 +      }
        break;
      case GET_FROM_STRING:
        it->object = it->string;
  /* Set IT's current position to the previous line start.  */
  
  static void
 -back_to_previous_line_start (it)
 -     struct it *it;
 +back_to_previous_line_start (struct it *it)
  {
    IT_CHARPOS (*it) = find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1);
    IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it));
     leads to wrong cursor motion.  */
  
  static int
 -forward_to_next_line_start (it, skipped_p)
 -     struct it *it;
 -     int *skipped_p;
 +forward_to_next_line_start (struct it *it, int *skipped_p)
  {
    int old_selective, newline_found_p, n;
    const int MAX_NEWLINE_DISTANCE = 500;
       short-cut.  */
    if (!newline_found_p)
      {
 -      int start = IT_CHARPOS (*it);
 -      int limit = find_next_newline_no_quit (start, 1);
 +      EMACS_INT start = IT_CHARPOS (*it);
 +      EMACS_INT limit = find_next_newline_no_quit (start, 1);
        Lisp_Object pos;
  
        xassert (!STRINGP (it->string));
     IT->hpos.  */
  
  static void
 -back_to_previous_visible_line_start (it)
 -     struct it *it;
 +back_to_previous_visible_line_start (struct it *it)
  {
    while (IT_CHARPOS (*it) > BEGV)
      {
        if (IT_CHARPOS (*it) <= BEGV)
        break;
  
 -      /* If selective > 0, then lines indented more than that values
 -       are invisible.  */
 +      /* If selective > 0, then lines indented more than its value are
 +       invisible.  */
        if (it->selective > 0
          && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
                                (double) it->selective)) /* iftc */
  
        {
        struct it it2;
 -      int pos;
 +      EMACS_INT pos;
        EMACS_INT beg, end;
        Lisp_Object val, overlay;
  
     face information etc.  */
  
  void
 -reseat_at_previous_visible_line_start (it)
 -     struct it *it;
 +reseat_at_previous_visible_line_start (struct it *it)
  {
    back_to_previous_visible_line_start (it);
    reseat (it, it->current.pos, 1);
     is invisible because of text properties.  */
  
  static void
 -reseat_at_next_visible_line_start (it, on_newline_p)
 -     struct it *it;
 -     int on_newline_p;
 +reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
  {
    int newline_found_p, skipped_p = 0;
  
     IT->check_charpos of a property.  */
  
  static void
 -reseat (it, pos, force_p)
 -     struct it *it;
 -     struct text_pos pos;
 -     int force_p;
 +reseat (struct it *it, struct text_pos pos, int force_p)
  {
 -  int original_pos = IT_CHARPOS (*it);
 +  EMACS_INT original_pos = IT_CHARPOS (*it);
  
    reseat_1 (it, pos, 0);
  
    if (force_p
        || CHARPOS (pos) > it->stop_charpos
        || CHARPOS (pos) < original_pos)
 -    handle_stop (it);
 +    {
 +      if (it->bidi_p)
 +      {
 +        /* For bidi iteration, we need to prime prev_stop and
 +           base_level_stop with our best estimations.  */
 +        if (CHARPOS (pos) < it->prev_stop)
 +          {
 +            handle_stop_backwards (it, BEGV);
 +            if (CHARPOS (pos) < it->base_level_stop)
 +              it->base_level_stop = 0;
 +          }
 +        else if (CHARPOS (pos) > it->stop_charpos
 +                 && it->stop_charpos >= BEGV)
 +          handle_stop_backwards (it, it->stop_charpos);
 +        else  /* force_p */
 +          handle_stop (it);
 +      }
 +      else
 +      {
 +        handle_stop (it);
 +        it->prev_stop = it->base_level_stop = 0;
 +      }
 +
 +    }
  
    CHECK_IT (it);
  }
     IT->stop_pos to POS, also.  */
  
  static void
 -reseat_1 (it, pos, set_stop_p)
 -     struct it *it;
 -     struct text_pos pos;
 -     int set_stop_p;
 +reseat_1 (struct it *it, struct text_pos pos, int set_stop_p)
  {
    /* Don't call this function when scanning a C string.  */
    xassert (it->s == NULL);
    it->sp = 0;
    it->string_from_display_prop_p = 0;
    it->face_before_selective_p = 0;
 +  if (it->bidi_p)
 +    {
 +      it->bidi_it.first_elt = 1;
 +      it->bidi_it.paragraph_dir = NEUTRAL_DIR;
 +    }
  
    if (set_stop_p)
 -    it->stop_charpos = CHARPOS (pos);
 +    {
 +      it->stop_charpos = CHARPOS (pos);
 +      it->base_level_stop = CHARPOS (pos);
 +    }
  }
  
  
     calling this function.  */
  
  static void
 -reseat_to_string (it, s, string, charpos, precision, field_width, multibyte)
 -     struct it *it;
 -     unsigned char *s;
 -     Lisp_Object string;
 -     int charpos;
 -     int precision, field_width, multibyte;
 +reseat_to_string (struct it *it, const unsigned char *s, Lisp_Object string,
 +                EMACS_INT charpos, EMACS_INT precision, int field_width,
 +                int multibyte)
  {
    /* No region in strings.  */
    it->region_beg_charpos = it->region_end_charpos = -1;
    it->stop_charpos = -1;
  
    /* Set iterator position and end position.  */
 -  bzero (&it->current, sizeof it->current);
 +  memset (&it->current, 0, sizeof it->current);
    it->current.overlay_string_index = -1;
    it->current.dpvec_index = -1;
    xassert (charpos >= 0);
  \f
  /***********************************************************************
                              Iteration
 - ***********************************************************************/
 +***********************************************************************/
  
  /* Map enum it_method value to corresponding next_element_from_* function.  */
  
 -static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) =
 +static int (* get_next_element[NUM_IT_METHODS]) (struct it *it) =
  {
    next_element_from_buffer,
    next_element_from_display_vector,
                                 (IT)->string)))
  
  
 +/* Lookup the char-table Vglyphless_char_display for character C (-1
 +   if we want information for no-font case), and return the display
 +   method symbol.  By side-effect, update it->what and
 +   it->glyphless_method.  This function is called from
 +   get_next_display_element for each character element, and from
 +   x_produce_glyphs when no suitable font was found.  */
 +
 +Lisp_Object
 +lookup_glyphless_char_display (int c, struct it *it)
 +{
 +  Lisp_Object glyphless_method = Qnil;
 +
 +  if (CHAR_TABLE_P (Vglyphless_char_display)
 +      && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (Vglyphless_char_display)) >= 1)
 +    glyphless_method = (c >= 0
 +                      ? CHAR_TABLE_REF (Vglyphless_char_display, c)
 +                      : XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
 + retry:
 +  if (NILP (glyphless_method))
 +    {
 +      if (c >= 0)
 +      /* The default is to display the character by a proper font.  */
 +      return Qnil;
 +      /* The default for the no-font case is to display an empty box.  */
 +      glyphless_method = Qempty_box;
 +    }
 +  if (EQ (glyphless_method, Qzero_width))
 +    {
 +      if (c >= 0)
 +      return glyphless_method;
 +      /* This method can't be used for the no-font case.  */
 +      glyphless_method = Qempty_box;
 +    }
 +  if (EQ (glyphless_method, Qthin_space))
 +    it->glyphless_method = GLYPHLESS_DISPLAY_THIN_SPACE;
 +  else if (EQ (glyphless_method, Qempty_box))
 +    it->glyphless_method = GLYPHLESS_DISPLAY_EMPTY_BOX;
 +  else if (EQ (glyphless_method, Qhex_code))
 +    it->glyphless_method = GLYPHLESS_DISPLAY_HEX_CODE;
 +  else if (STRINGP (glyphless_method))
 +    it->glyphless_method = GLYPHLESS_DISPLAY_ACRONYM;
 +  else
 +    {
 +      /* Invalid value.  We use the default method.  */
 +      glyphless_method = Qnil;
 +      goto retry;
 +    }
 +  it->what = IT_GLYPHLESS;
 +  return glyphless_method;
 +}
 +
  /* Load IT's display element fields with information about the next
     display element from the current position of IT.  Value is zero if
     end of buffer (or C string) is reached.  */
@@@ -5837,12 -5634,9 +5837,12 @@@ static struct frame *last_escape_glyph_
  static unsigned last_escape_glyph_face_id = (1 << FACE_ID_BITS);
  static int last_escape_glyph_merged_face_id = 0;
  
 +struct frame *last_glyphless_glyph_frame = NULL;
 +unsigned last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
 +int last_glyphless_glyph_merged_face_id = 0;
 +
  int
 -get_next_display_element (it)
 -     struct it *it;
 +get_next_display_element (struct it *it)
  {
    /* Non-zero means that we found a display element.  Zero means that
       we hit the end of what we iterate over.  Performance note: the
  
    if (it->what == IT_CHARACTER)
      {
 +      /* UAX#9, L4: "A character is depicted by a mirrored glyph if
 +       and only if (a) the resolved directionality of that character
 +       is R..."  */
 +      /* FIXME: Do we need an exception for characters from display
 +       tables?  */
 +      if (it->bidi_p && it->bidi_it.type == STRONG_R)
 +      it->c = bidi_mirror_char (it->c);
        /* Map via display table or translate control characters.
         IT->c, IT->len etc. have been set to the next character by
         the function call above.  If we have a display table, and it
              goto get_next;
            }
  
 +        if (! NILP (lookup_glyphless_char_display (c, it)))
 +          {
 +            if (it->what == IT_GLYPHLESS)
 +              goto done;
 +            /* Don't display this character.  */
 +            set_iterator_to_next (it, 0);
 +            goto get_next;
 +          }
 +
          if (! ASCII_CHAR_P (c) && ! NILP (Vnobreak_char_display))
            nbsp_or_shy = (c == 0xA0   ? char_is_nbsp
                           : c == 0xAD ? char_is_soft_hyphen
        }
        else
        {
 -        int pos = (it->s ? -1
 -                   : STRINGP (it->string) ? IT_STRING_CHARPOS (*it)
 -                   : IT_CHARPOS (*it));
 +        EMACS_INT pos = (it->s ? -1
 +                         : STRINGP (it->string) ? IT_STRING_CHARPOS (*it)
 +                         : IT_CHARPOS (*it));
  
          it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, pos,
                                       it->string);
      }
  #endif
  
 + done:
    /* Is this character the last one of a run of characters with
       box?  If yes, set IT->end_of_box_run_p to 1.  */
    if (it->face_box_p
     decrement position function which would not be easy to write.  */
  
  void
 -set_iterator_to_next (it, reseat_p)
 -     struct it *it;
 -     int reseat_p;
 +set_iterator_to_next (struct it *it, int reseat_p)
  {
    /* Reset flags indicating start and end of a sequence of characters
       with box.  Reset them at the start of this function because
        reseat_at_next_visible_line_start (it, 0);
        else if (it->cmp_it.id >= 0)
        {
 -        IT_CHARPOS (*it) += it->cmp_it.nchars;
 -        IT_BYTEPOS (*it) += it->cmp_it.nbytes;
 -        if (it->cmp_it.to < it->cmp_it.nglyphs)
 -          it->cmp_it.from = it->cmp_it.to;
 +        /* We are currently getting glyphs from a composition.  */
 +        int i;
 +
 +        if (! it->bidi_p)
 +          {
 +            IT_CHARPOS (*it) += it->cmp_it.nchars;
 +            IT_BYTEPOS (*it) += it->cmp_it.nbytes;
 +            if (it->cmp_it.to < it->cmp_it.nglyphs)
 +              {
 +                it->cmp_it.from = it->cmp_it.to;
 +              }
 +            else
 +              {
 +                it->cmp_it.id = -1;
 +                composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it),
 +                                              IT_BYTEPOS (*it),
 +                                              it->end_charpos, Qnil);
 +              }
 +          }
 +        else if (! it->cmp_it.reversed_p)
 +          {
 +            /* Composition created while scanning forward.  */
 +            /* Update IT's char/byte positions to point to the first
 +               character of the next grapheme cluster, or to the
 +               character visually after the current composition.  */
 +            for (i = 0; i < it->cmp_it.nchars; i++)
 +              bidi_move_to_visually_next (&it->bidi_it);
 +            IT_BYTEPOS (*it) = it->bidi_it.bytepos;
 +            IT_CHARPOS (*it) = it->bidi_it.charpos;
 +
 +            if (it->cmp_it.to < it->cmp_it.nglyphs)
 +              {
 +                /* Proceed to the next grapheme cluster.  */
 +                it->cmp_it.from = it->cmp_it.to;
 +              }
 +            else
 +              {
 +                /* No more grapheme clusters in this composition.
 +                   Find the next stop position.  */
 +                EMACS_INT stop = it->end_charpos;
 +                if (it->bidi_it.scan_dir < 0)
 +                  /* Now we are scanning backward and don't know
 +                     where to stop.  */
 +                  stop = -1;
 +                composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it),
 +                                              IT_BYTEPOS (*it), stop, Qnil);
 +              }
 +          }
          else
            {
 -            it->cmp_it.id = -1;
 -            composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it),
 -                                          IT_BYTEPOS (*it), it->stop_charpos,
 -                                          Qnil);
 +            /* Composition created while scanning backward.  */
 +            /* Update IT's char/byte positions to point to the last
 +               character of the previous grapheme cluster, or the
 +               character visually after the current composition.  */
 +            for (i = 0; i < it->cmp_it.nchars; i++)
 +              bidi_move_to_visually_next (&it->bidi_it);
 +            IT_BYTEPOS (*it) = it->bidi_it.bytepos;
 +            IT_CHARPOS (*it) = it->bidi_it.charpos;
 +            if (it->cmp_it.from > 0)
 +              {
 +                /* Proceed to the previous grapheme cluster.  */
 +                it->cmp_it.to = it->cmp_it.from;
 +              }
 +            else
 +              {
 +                /* No more grapheme clusters in this composition.
 +                   Find the next stop position.  */
 +                EMACS_INT stop = it->end_charpos;
 +                if (it->bidi_it.scan_dir < 0)
 +                  /* Now we are scanning backward and don't know
 +                     where to stop.  */
 +                  stop = -1;
 +                composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it),
 +                                              IT_BYTEPOS (*it), stop, Qnil);
 +              }
            }
        }
        else
        {
          xassert (it->len != 0);
 -        IT_BYTEPOS (*it) += it->len;
 -        IT_CHARPOS (*it) += 1;
 +
 +        if (!it->bidi_p)
 +          {
 +            IT_BYTEPOS (*it) += it->len;
 +            IT_CHARPOS (*it) += 1;
 +          }
 +        else
 +          {
 +            int prev_scan_dir = it->bidi_it.scan_dir;
 +            /* If this is a new paragraph, determine its base
 +               direction (a.k.a. its base embedding level).  */
 +            if (it->bidi_it.new_paragraph)
 +              bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 0);
 +            bidi_move_to_visually_next (&it->bidi_it);
 +            IT_BYTEPOS (*it) = it->bidi_it.bytepos;
 +            IT_CHARPOS (*it) = it->bidi_it.charpos;
 +            if (prev_scan_dir != it->bidi_it.scan_dir)
 +              {
 +                /* As the scan direction was changed, we must
 +                   re-compute the stop position for composition.  */
 +                EMACS_INT stop = it->end_charpos;
 +                if (it->bidi_it.scan_dir < 0)
 +                  stop = -1;
 +                composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it),
 +                                              IT_BYTEPOS (*it), stop, Qnil);
 +              }
 +          }
          xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it)));
        }
        break;
              composition_compute_stop_pos (&it->cmp_it,
                                            IT_STRING_CHARPOS (*it),
                                            IT_STRING_BYTEPOS (*it),
 -                                          it->stop_charpos, it->string);
 +                                          it->end_charpos, it->string);
            }
        }
        else
     is restored into IT->face_id in set_iterator_to_next.  */
  
  static int
 -next_element_from_display_vector (it)
 -     struct it *it;
 +next_element_from_display_vector (struct it *it)
  {
    Lisp_Object gc;
  
    it->face_id = it->saved_face_id;
  
    /* KFS: This code used to check ip->dpvec[0] instead of the current element.
 -          That seemed totally bogus - so I changed it...  */
 +     That seemed totally bogus - so I changed it...  */
    gc = it->dpvec[it->current.dpvec_index];
  
    if (GLYPH_CODE_P (gc) && GLYPH_CODE_CHAR_VALID_P (gc))
     overlay string.  */
  
  static int
 -next_element_from_string (it)
 -     struct it *it;
 +next_element_from_string (struct it *it)
  {
    struct text_pos position;
  
     reached, including padding spaces.  */
  
  static int
 -next_element_from_c_string (it)
 -     struct it *it;
 +next_element_from_c_string (struct it *it)
  {
    int success_p = 1;
  
     ellipsis if an ellipsis is to be displayed.  */
  
  static int
 -next_element_from_ellipsis (it)
 -     struct it *it;
 +next_element_from_ellipsis (struct it *it)
  {
    if (it->selective_display_ellipsis_p)
      setup_for_ellipsis (it, it->len);
  
  
  static int
 -next_element_from_image (it)
 -     struct it *it;
 +next_element_from_image (struct it *it)
  {
    it->what = IT_IMAGE;
    it->ignore_overlay_strings_at_pos_p = 0;
     always 1.  */
  
  static int
 -next_element_from_stretch (it)
 -     struct it *it;
 +next_element_from_stretch (struct it *it)
  {
    it->what = IT_STRETCH;
    return 1;
  }
  
 +/* Scan forward from CHARPOS in the current buffer, until we find a
 +   stop position > current IT's position.  Then handle the stop
 +   position before that.  This is called when we bump into a stop
 +   position while reordering bidirectional text.  CHARPOS should be
 +   the last previously processed stop_pos (or BEGV, if none were
 +   processed yet) whose position is less that IT's current
 +   position.  */
 +
 +static void
 +handle_stop_backwards (struct it *it, EMACS_INT charpos)
 +{
 +  EMACS_INT where_we_are = IT_CHARPOS (*it);
 +  struct display_pos save_current = it->current;
 +  struct text_pos save_position = it->position;
 +  struct text_pos pos1;
 +  EMACS_INT next_stop;
 +
 +  /* Scan in strict logical order.  */
 +  it->bidi_p = 0;
 +  do
 +    {
 +      it->prev_stop = charpos;
 +      SET_TEXT_POS (pos1, charpos, CHAR_TO_BYTE (charpos));
 +      reseat_1 (it, pos1, 0);
 +      compute_stop_pos (it);
 +      /* We must advance forward, right?  */
 +      if (it->stop_charpos <= it->prev_stop)
 +      abort ();
 +      charpos = it->stop_charpos;
 +    }
 +  while (charpos <= where_we_are);
 +
 +  next_stop = it->stop_charpos;
 +  it->stop_charpos = it->prev_stop;
 +  it->bidi_p = 1;
 +  it->current = save_current;
 +  it->position = save_position;
 +  handle_stop (it);
 +  it->stop_charpos = next_stop;
 +}
  
  /* Load IT with the next display element from current_buffer.  Value
     is zero if end of buffer reached.  IT->stop_charpos is the next
     end.  */
  
  static int
 -next_element_from_buffer (it)
 -     struct it *it;
 +next_element_from_buffer (struct it *it)
  {
    int success_p = 1;
  
    xassert (IT_CHARPOS (*it) >= BEGV);
  
 +  /* With bidi reordering, the character to display might not be the
 +     character at IT_CHARPOS.  BIDI_IT.FIRST_ELT non-zero means that
 +     we were reseat()ed to a new buffer position, which is potentially
 +     a different paragraph.  */
 +  if (it->bidi_p && it->bidi_it.first_elt)
 +    {
 +      it->bidi_it.charpos = IT_CHARPOS (*it);
 +      it->bidi_it.bytepos = IT_BYTEPOS (*it);
 +      if (it->bidi_it.bytepos == ZV_BYTE)
 +      {
 +        /* Nothing to do, but reset the FIRST_ELT flag, like
 +           bidi_paragraph_init does, because we are not going to
 +           call it.  */
 +        it->bidi_it.first_elt = 0;
 +      }
 +      else if (it->bidi_it.bytepos == BEGV_BYTE
 +        /* FIXME: Should support all Unicode line separators.  */
 +        || FETCH_CHAR (it->bidi_it.bytepos - 1) == '\n'
 +        || FETCH_CHAR (it->bidi_it.bytepos) == '\n')
 +      {
 +        /* If we are at the beginning of a line, we can produce the
 +           next element right away.  */
 +        bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
 +        bidi_move_to_visually_next (&it->bidi_it);
 +      }
 +      else
 +      {
 +        EMACS_INT orig_bytepos = IT_BYTEPOS (*it);
 +
 +        /* We need to prime the bidi iterator starting at the line's
 +           beginning, before we will be able to produce the next
 +           element.  */
 +        IT_CHARPOS (*it) = find_next_newline_no_quit (IT_CHARPOS (*it), -1);
 +        IT_BYTEPOS (*it) = CHAR_TO_BYTE (IT_CHARPOS (*it));
 +        it->bidi_it.charpos = IT_CHARPOS (*it);
 +        it->bidi_it.bytepos = IT_BYTEPOS (*it);
 +        bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 1);
 +        do
 +          {
 +            /* Now return to buffer position where we were asked to
 +               get the next display element, and produce that.  */
 +            bidi_move_to_visually_next (&it->bidi_it);
 +          }
 +        while (it->bidi_it.bytepos != orig_bytepos
 +               && it->bidi_it.bytepos < ZV_BYTE);
 +      }
 +
 +      it->bidi_it.first_elt = 0; /* paranoia: bidi.c does this */
 +      /*  Adjust IT's position information to where we ended up.  */
 +      IT_CHARPOS (*it) = it->bidi_it.charpos;
 +      IT_BYTEPOS (*it) = it->bidi_it.bytepos;
 +      SET_TEXT_POS (it->position, IT_CHARPOS (*it), IT_BYTEPOS (*it));
 +      {
 +      EMACS_INT stop = it->end_charpos;
 +      if (it->bidi_it.scan_dir < 0)
 +        stop = -1;
 +      composition_compute_stop_pos (&it->cmp_it, IT_CHARPOS (*it),
 +                                    IT_BYTEPOS (*it), stop, Qnil);
 +      }
 +    }
 +
    if (IT_CHARPOS (*it) >= it->stop_charpos)
      {
        if (IT_CHARPOS (*it) >= it->end_charpos)
              success_p = 0;
            }
        }
 +      else if (!(!it->bidi_p
 +               || BIDI_AT_BASE_LEVEL (it->bidi_it)
 +               || IT_CHARPOS (*it) == it->stop_charpos))
 +      {
 +        /* With bidi non-linear iteration, we could find ourselves
 +           far beyond the last computed stop_charpos, with several
 +           other stop positions in between that we missed.  Scan
 +           them all now, in buffer's logical order, until we find
 +           and handle the last stop_charpos that precedes our
 +           current position.  */
 +        handle_stop_backwards (it, it->stop_charpos);
 +        return GET_NEXT_DISPLAY_ELEMENT (it);
 +      }
        else
        {
 +        if (it->bidi_p)
 +          {
 +            /* Take note of the stop position we just moved across,
 +               for when we will move back across it.  */
 +            it->prev_stop = it->stop_charpos;
 +            /* If we are at base paragraph embedding level, take
 +               note of the last stop position seen at this
 +               level.  */
 +            if (BIDI_AT_BASE_LEVEL (it->bidi_it))
 +              it->base_level_stop = it->stop_charpos;
 +          }
          handle_stop (it);
          return GET_NEXT_DISPLAY_ELEMENT (it);
        }
      }
 +  else if (it->bidi_p
 +         /* We can sometimes back up for reasons that have nothing
 +            to do with bidi reordering.  E.g., compositions.  The
 +            code below is only needed when we are above the base
 +            embedding level, so test for that explicitly.  */
 +         && !BIDI_AT_BASE_LEVEL (it->bidi_it)
 +         && IT_CHARPOS (*it) < it->prev_stop)
 +    {
 +      if (it->base_level_stop <= 0)
 +      it->base_level_stop = BEGV;
 +      if (IT_CHARPOS (*it) < it->base_level_stop)
 +      abort ();
 +      handle_stop_backwards (it, it->base_level_stop);
 +      return GET_NEXT_DISPLAY_ELEMENT (it);
 +    }
    else
      {
        /* No face changes, overlays etc. in sight, so just return a
         character from current_buffer.  */
        unsigned char *p;
 +      EMACS_INT stop;
  
        /* Maybe run the redisplay end trigger hook.  Performance note:
         This doesn't seem to cost measurable time.  */
          && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos)
        run_redisplay_end_trigger_hook (it);
  
 +      stop = it->bidi_it.scan_dir < 0 ? -1 : it->end_charpos;
        if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it),
 -                         it->end_charpos)
 +                         stop)
          && next_element_from_composition (it))
        {
          return 1;
  /* Run the redisplay end trigger hook for IT.  */
  
  static void
 -run_redisplay_end_trigger_hook (it)
 -     struct it *it;
 +run_redisplay_end_trigger_hook (struct it *it)
  {
    Lisp_Object args[3];
  
     next_element_from_string when necessary.  */
  
  static int
 -next_element_from_composition (it)
 -     struct it *it;
 +next_element_from_composition (struct it *it)
  {
    it->what = IT_COMPOSITION;
    it->len = it->cmp_it.nbytes;
        {
          IT_CHARPOS (*it) += it->cmp_it.nchars;
          IT_BYTEPOS (*it) += it->cmp_it.nbytes;
 +        if (it->bidi_p)
 +          {
 +            if (it->bidi_it.new_paragraph)
 +              bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it, 0);
 +            /* Resync the bidi iterator with IT's new position.
 +               FIXME: this doesn't support bidirectional text.  */
 +            while (it->bidi_it.charpos < IT_CHARPOS (*it))
 +              bidi_move_to_visually_next (&it->bidi_it);
 +          }
          return 0;
        }
        it->position = it->current.pos;
     line on the display without producing glyphs.
  
     OP should be a bit mask including some or all of these bits:
 -    MOVE_TO_X: Stop on reaching x-position TO_X.
 -    MOVE_TO_POS: Stop on reaching buffer or string position TO_CHARPOS.
 -   Regardless of OP's value, stop in reaching the end of the display line.
 +    MOVE_TO_X: Stop upon reaching x-position TO_X.
 +    MOVE_TO_POS: Stop upon reaching buffer or string position TO_CHARPOS.
 +   Regardless of OP's value, stop upon reaching the end of the display line.
  
     TO_X is normally a value 0 <= TO_X <= IT->last_visible_x.
     This means, in particular, that TO_X includes window's horizontal
@@@ -7100,8 -6647,6 +7100,8 @@@ move_it_in_display_line_to (struct it *
    struct glyph_row *saved_glyph_row;
    struct it wrap_it, atpos_it, atx_it;
    int may_wrap = 0;
 +  enum it_method prev_method = it->method;
 +  EMACS_INT prev_pos = IT_CHARPOS (*it);
  
    /* Don't produce glyphs in produce_glyphs.  */
    saved_glyph_row = it->glyph_row;
  #define BUFFER_POS_REACHED_P()                                        \
    ((op & MOVE_TO_POS) != 0                                    \
     && BUFFERP (it->object)                                    \
 -   && IT_CHARPOS (*it) >= to_charpos                          \
 +   && (IT_CHARPOS (*it) == to_charpos                         \
 +       || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos))     \
     && (it->method == GET_FROM_BUFFER                          \
         || (it->method == GET_FROM_DISPLAY_VECTOR              \
           && it->dpvec + it->current.dpvec_index + 1 >= it->dpend)))
        if ((op & MOVE_TO_POS) != 0
          && BUFFERP (it->object)
          && it->method == GET_FROM_BUFFER
 -        && IT_CHARPOS (*it) > to_charpos)
 +        && ((!it->bidi_p && IT_CHARPOS (*it) > to_charpos)
 +            || (it->bidi_p
 +                && (prev_method == GET_FROM_IMAGE
 +                    || prev_method == GET_FROM_STRETCH)
 +                /* Passed TO_CHARPOS from left to right.  */
 +                && ((prev_pos < to_charpos
 +                     && IT_CHARPOS (*it) > to_charpos)
 +                    /* Passed TO_CHARPOS from right to left.  */
 +                    || (prev_pos > to_charpos
 +                        && IT_CHARPOS (*it) < to_charpos)))))
        {
          if (it->line_wrap != WORD_WRAP || wrap_it.sp < 0)
            {
            atpos_it = *it;
        }
  
 +      prev_method = it->method;
 +      if (it->method == GET_FROM_BUFFER)
 +      prev_pos = IT_CHARPOS (*it);
        /* Stop when ZV reached.
           We used to stop here when TO_CHARPOS reached as well, but that is
           too soon if this glyph does not fit on this line.  So we handle it
          break;
        }
  
 +      if (it->method == GET_FROM_BUFFER)
 +      prev_pos = IT_CHARPOS (*it);
        /* The current display element has been consumed.  Advance
         to the next.  */
        set_iterator_to_next (it, 1);
@@@ -7524,7 -7054,10 +7524,7 @@@ move_it_in_display_line (struct it *it
     TO_CHARPOS.  */
  
  void
 -move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
 -     struct it *it;
 -     int to_charpos, to_x, to_y, to_vpos;
 -     int op;
 +move_it_to (struct it *it, EMACS_INT to_charpos, int to_x, int to_y, int to_vpos, int op)
  {
    enum move_it_result skip, skip2 = MOVE_X_REACHED;
    int line_height, line_start_x = 0, reached = 0;
     set to the top of the line moved to.  */
  
  void
 -move_it_vertically_backward (it, dy)
 -     struct it *it;
 -     int dy;
 +move_it_vertically_backward (struct it *it, int dy)
  {
    int nlines, h;
    struct it it2, it3;
 -  int start_pos;
 +  EMACS_INT start_pos;
  
   move_further_back:
    xassert (dy >= 0);
     end, IT will be on the start of a screen line.  */
  
  void
 -move_it_vertically (it, dy)
 -    struct it *it;
 -    int dy;
 +move_it_vertically (struct it *it, int dy)
  {
    if (dy <= 0)
      move_it_vertically_backward (it, -dy);
  /* Move iterator IT past the end of the text line it is in.  */
  
  void
 -move_it_past_eol (it)
 -     struct it *it;
 +move_it_past_eol (struct it *it)
  {
    enum move_it_result rc;
  
     truncate-lines nil.  */
  
  void
 -move_it_by_lines (it, dvpos, need_y_p)
 -     struct it *it;
 -     int dvpos, need_y_p;
 +move_it_by_lines (struct it *it, int dvpos, int need_y_p)
  {
 -  struct position pos;
  
    /* The commented-out optimization uses vmotion on terminals.  This
       gives bad results, because elements like it->what, on which
       callers such as pos_visible_p rely, aren't updated. */
 -  /*  if (!FRAME_WINDOW_P (it->f))
 +  /* struct position pos;
 +    if (!FRAME_WINDOW_P (it->f))
      {
        struct text_pos textpos;
  
    else
      {
        struct it it2;
 -      int start_charpos, i;
 +      EMACS_INT start_charpos, i;
  
        /* Start at the beginning of the screen line containing IT's
         position.  This may actually move vertically backwards,
  /* Return 1 if IT points into the middle of a display vector.  */
  
  int
 -in_display_vector_p (it)
 -     struct it *it;
 +in_display_vector_p (struct it *it)
  {
    return (it->method == GET_FROM_DISPLAY_VECTOR
          && it->current.dpvec_index > 0
     to *Messages*.  */
  
  void
 -add_to_log (format, arg1, arg2)
 -     char *format;
 -     Lisp_Object arg1, arg2;
 +add_to_log (const char *format, Lisp_Object arg1, Lisp_Object arg2)
  {
    Lisp_Object args[3];
    Lisp_Object msg, fmt;
    char *buffer;
 -  int len;
 +  EMACS_INT len;
    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
    USE_SAFE_ALLOCA;
  
  
    len = SBYTES (msg) + 1;
    SAFE_ALLOCA (buffer, char *, len);
 -  bcopy (SDATA (msg), buffer, len);
 +  memcpy (buffer, SDATA (msg), len);
  
    message_dolog (buffer, len - 1, 1, 0);
    SAFE_FREE ();
  /* Output a newline in the *Messages* buffer if "needs" one.  */
  
  void
 -message_log_maybe_newline ()
 +message_log_maybe_newline (void)
  {
    if (message_log_need_newline)
      message_dolog ("", 0, 1, 0);
     so the buffer M must NOT point to a Lisp string.  */
  
  void
 -message_dolog (m, nbytes, nlflag, multibyte)
 -     const char *m;
 -     int nbytes, nlflag, multibyte;
 +message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte)
  {
    if (!NILP (Vmemory_full))
      return;
        struct buffer *oldbuf;
        Lisp_Object oldpoint, oldbegv, oldzv;
        int old_windows_or_buffers_changed = windows_or_buffers_changed;
 -      int point_at_end = 0;
 -      int zv_at_end = 0;
 +      EMACS_INT point_at_end = 0;
 +      EMACS_INT zv_at_end = 0;
        Lisp_Object old_deactivate_mark, tem;
        struct gcpro gcpro1;
  
        if (multibyte
          && NILP (current_buffer->enable_multibyte_characters))
        {
 -        int i, c, char_bytes;
 +        EMACS_INT i;
 +        int c, char_bytes;
          unsigned char work[1];
  
          /* Convert a multibyte string to single-byte
        else if (! multibyte
               && ! NILP (current_buffer->enable_multibyte_characters))
        {
 -        int i, c, char_bytes;
 +        EMACS_INT i;
 +        int c, char_bytes;
          unsigned char *msg = (unsigned char *) m;
          unsigned char str[MAX_MULTIBYTE_LENGTH];
          /* Convert a single-byte string to multibyte
  
        if (nlflag)
        {
 -        int this_bol, this_bol_byte, prev_bol, prev_bol_byte, dup;
 +        EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte;
 +        int dup;
          insert_1 ("\n", 1, 1, 0, 0);
  
          scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0);
     value N > 1 if we should also append " [N times]".  */
  
  static int
 -message_log_check_duplicate (prev_bol, prev_bol_byte, this_bol, this_bol_byte)
 -     int prev_bol, this_bol;
 -     int prev_bol_byte, this_bol_byte;
 +message_log_check_duplicate (EMACS_INT prev_bol, EMACS_INT prev_bol_byte,
 +                           EMACS_INT this_bol, EMACS_INT this_bol_byte)
  {
 -  int i;
 -  int len = Z_BYTE - 1 - this_bol_byte;
 +  EMACS_INT i;
 +  EMACS_INT len = Z_BYTE - 1 - this_bol_byte;
    int seen_dots = 0;
    unsigned char *p1 = BUF_BYTE_ADDRESS (current_buffer, prev_bol_byte);
    unsigned char *p2 = BUF_BYTE_ADDRESS (current_buffer, this_bol_byte);
     This may GC, so the buffer M must NOT point to a Lisp string.  */
  
  void
 -message2 (m, nbytes, multibyte)
 -     const char *m;
 -     int nbytes;
 -     int multibyte;
 +message2 (const char *m, EMACS_INT nbytes, int multibyte)
  {
    /* First flush out any partial line written with print.  */
    message_log_maybe_newline ();
  /* The non-logging counterpart of message2.  */
  
  void
 -message2_nolog (m, nbytes, multibyte)
 -     const char *m;
 -     int nbytes, multibyte;
 +message2_nolog (const char *m, EMACS_INT nbytes, int multibyte)
  {
    struct frame *sf = SELECTED_FRAME ();
    message_enable_multibyte = multibyte;
     This function cancels echoing.  */
  
  void
 -message3 (m, nbytes, multibyte)
 -     Lisp_Object m;
 -     int nbytes;
 -     int multibyte;
 +message3 (Lisp_Object m, EMACS_INT nbytes, int multibyte)
  {
    struct gcpro gcpro1;
  
        USE_SAFE_ALLOCA;
  
        SAFE_ALLOCA (buffer, char *, nbytes);
 -      bcopy (SDATA (m), buffer, nbytes);
 +      memcpy (buffer, SDATA (m), nbytes);
        message_dolog (buffer, nbytes, 1, multibyte);
        SAFE_FREE ();
      }
     and make this cancel echoing.  */
  
  void
 -message3_nolog (m, nbytes, multibyte)
 -     Lisp_Object m;
 -     int nbytes, multibyte;
 +message3_nolog (Lisp_Object m, EMACS_INT nbytes, int multibyte)
  {
    struct frame *sf = SELECTED_FRAME ();
    message_enable_multibyte = multibyte;
     that was alloca'd.  */
  
  void
 -message1 (m)
 -     char *m;
 +message1 (const char *m)
  {
    message2 (m, (m ? strlen (m) : 0), 0);
  }
  /* The non-logging counterpart of message1.  */
  
  void
 -message1_nolog (m)
 -     char *m;
 +message1_nolog (const char *m)
  {
    message2_nolog (m, (m ? strlen (m) : 0), 0);
  }
     which gets replaced with STRING.  */
  
  void
 -message_with_string (m, string, log)
 -     char *m;
 -     Lisp_Object string;
 -     int log;
 +message_with_string (const char *m, Lisp_Object string, int log)
  {
    CHECK_STRING (string);
  
  /* Dump an informative message to the minibuf.  If M is 0, clear out
     any existing message, and let the mini-buffer text show through.  */
  
 -/* VARARGS 1 */
 -void
 -message (m, a1, a2, a3)
 -     char *m;
 -     EMACS_INT a1, a2, a3;
 +static void
 +vmessage (const char *m, va_list ap)
  {
    if (noninteractive)
      {
          if (noninteractive_need_newline)
            putc ('\n', stderr);
          noninteractive_need_newline = 0;
 -        fprintf (stderr, m, a1, a2, a3);
 +        vfprintf (stderr, m, ap);
          if (cursor_in_echo_area == 0)
            fprintf (stderr, "\n");
          fflush (stderr);
        {
          if (m)
            {
 -            int len;
 -#ifdef NO_ARG_ARRAY
 -            char *a[3];
 -            a[0] = (char *) a1;
 -            a[1] = (char *) a2;
 -            a[2] = (char *) a3;
 +            EMACS_INT len;
  
              len = doprnt (FRAME_MESSAGE_BUF (f),
 -                          FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, 3, a);
 -#else
 -            len = doprnt (FRAME_MESSAGE_BUF (f),
 -                          FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, 3,
 -                          (char **) &a1);
 -#endif /* NO_ARG_ARRAY */
 +                          FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, ap);
  
              message2 (FRAME_MESSAGE_BUF (f), len, 0);
            }
      }
  }
  
 +void
 +message (const char *m, ...)
 +{
 +  va_list ap;
 +  va_start (ap, m);
 +  vmessage (m, ap);
 +  va_end (ap);
 +}
 +
  
  /* The non-logging version of message.  */
  
  void
 -message_nolog (m, a1, a2, a3)
 -     char *m;
 -     EMACS_INT a1, a2, a3;
 +message_nolog (const char *m, ...)
  {
    Lisp_Object old_log_max;
 +  va_list ap;
 +  va_start (ap, m);
    old_log_max = Vmessage_log_max;
    Vmessage_log_max = Qnil;
 -  message (m, a1, a2, a3);
 +  vmessage (m, ap);
    Vmessage_log_max = old_log_max;
 +  va_end (ap);
  }
  
  
     critical.  */
  
  void
 -update_echo_area ()
 +update_echo_area (void)
  {
    if (!NILP (echo_area_buffer[0]))
      {
     If they aren't, make new ones.  */
  
  static void
 -ensure_echo_area_buffers ()
 +ensure_echo_area_buffers (void)
  {
    int i;
  
     Value is what FN returns.  */
  
  static int
 -with_echo_area_buffer (w, which, fn, a1, a2, a3, a4)
 -     struct window *w;
 -     int which;
 -     int (*fn) P_ ((EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT));
 -     EMACS_INT a1;
 -     Lisp_Object a2;
 -     EMACS_INT a3, a4;
 +with_echo_area_buffer (struct window *w, int which,
 +                     int (*fn) (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT),
 +                     EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
  {
    Lisp_Object buffer;
    int this_one, the_other, clear_buffer_p, rc;
     FN called in with_echo_area_buffer.  */
  
  static Lisp_Object
 -with_echo_area_buffer_unwind_data (w)
 -     struct window *w;
 +with_echo_area_buffer_unwind_data (struct window *w)
  {
    int i = 0;
    Lisp_Object vector, tmp;
     with_echo_area_buffer_unwind_data.  */
  
  static Lisp_Object
 -unwind_with_echo_area_buffer (vector)
 -     Lisp_Object vector;
 +unwind_with_echo_area_buffer (Lisp_Object vector)
  {
    set_buffer_internal_1 (XBUFFER (AREF (vector, 0)));
    Vdeactivate_mark = AREF (vector, 1);
     non-zero means we will print multibyte.  */
  
  void
 -setup_echo_area_for_printing (multibyte_p)
 -     int multibyte_p;
 +setup_echo_area_for_printing (int multibyte_p)
  {
    /* If we can't find an echo area any more, exit.  */
    if (! FRAME_LIVE_P (XFRAME (selected_frame)))
     display the current message.  */
  
  static int
 -display_echo_area (w)
 -     struct window *w;
 +display_echo_area (struct window *w)
  {
    int i, no_message_p, window_height_changed_p, count;
  
     Value is non-zero if height of W was changed.  */
  
  static int
 -display_echo_area_1 (a1, a2, a3, a4)
 -     EMACS_INT a1;
 -     Lisp_Object a2;
 -     EMACS_INT a3, a4;
 +display_echo_area_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
  {
    struct window *w = (struct window *) a1;
    Lisp_Object window;
     is active, don't shrink it.  */
  
  void
 -resize_echo_area_exactly ()
 +resize_echo_area_exactly (void)
  {
    if (BUFFERP (echo_area_buffer[0])
        && WINDOWP (echo_area_window))
     resize_mini_window returns.  */
  
  static int
 -resize_mini_window_1 (a1, exactly, a3, a4)
 -     EMACS_INT a1;
 -     Lisp_Object exactly;
 -     EMACS_INT a3, a4;
 +resize_mini_window_1 (EMACS_INT a1, Lisp_Object exactly, EMACS_INT a3, EMACS_INT a4)
  {
    return resize_mini_window ((struct window *) a1, !NILP (exactly));
  }
     Value is non-zero if the window height has been changed.  */
  
  int
 -resize_mini_window (w, exact_p)
 -     struct window *w;
 -     int exact_p;
 +resize_mini_window (struct window *w, int exact_p)
  {
    struct frame *f = XFRAME (w->frame);
    int window_height_changed_p = 0;
     current message.  */
  
  Lisp_Object
 -current_message ()
 +current_message (void)
  {
    Lisp_Object msg;
  
  
  
  static int
 -current_message_1 (a1, a2, a3, a4)
 -     EMACS_INT a1;
 -     Lisp_Object a2;
 -     EMACS_INT a3, a4;
 +current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
  {
    Lisp_Object *msg = (Lisp_Object *) a1;
  
     worth optimizing.  */
  
  int
 -push_message ()
 +push_message (void)
  {
    Lisp_Object msg;
    msg = current_message ();
  /* Restore message display from the top of Vmessage_stack.  */
  
  void
 -restore_message ()
 +restore_message (void)
  {
    Lisp_Object msg;
  
  /* Handler for record_unwind_protect calling pop_message.  */
  
  Lisp_Object
 -pop_message_unwind (dummy)
 -     Lisp_Object dummy;
 +pop_message_unwind (Lisp_Object dummy)
  {
    pop_message ();
    return Qnil;
  /* Pop the top-most entry off Vmessage_stack.  */
  
  void
 -pop_message ()
 +pop_message (void)
  {
    xassert (CONSP (Vmessage_stack));
    Vmessage_stack = XCDR (Vmessage_stack);
     somewhere.  */
  
  void
 -check_message_stack ()
 +check_message_stack (void)
  {
    if (!NILP (Vmessage_stack))
      abort ();
     time we display it---but don't redisplay it now.  */
  
  void
 -truncate_echo_area (nchars)
 -     int nchars;
 +truncate_echo_area (EMACS_INT nchars)
  {
    if (nchars == 0)
      echo_area_buffer[0] = Qnil;
     message to at most NCHARS characters.  */
  
  static int
 -truncate_message_1 (nchars, a2, a3, a4)
 -     EMACS_INT nchars;
 -     Lisp_Object a2;
 -     EMACS_INT a3, a4;
 +truncate_message_1 (EMACS_INT nchars, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
  {
    if (BEG + nchars < Z)
      del_range (BEG + nchars, Z);
    */
  
  void
 -set_message (s, string, nbytes, multibyte_p)
 -     const char *s;
 -     Lisp_Object string;
 -     int nbytes, multibyte_p;
 +set_message (const char *s, Lisp_Object string,
 +           EMACS_INT nbytes, int multibyte_p)
  {
    message_enable_multibyte
      = ((s && multibyte_p)
     current.  */
  
  static int
 -set_message_1 (a1, a2, nbytes, multibyte_p)
 -     EMACS_INT a1;
 -     Lisp_Object a2;
 -     EMACS_INT nbytes, multibyte_p;
 +set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multibyte_p)
  {
    const char *s = (const char *) a1;
    Lisp_Object string = a2;
      Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil);
  
    current_buffer->truncate_lines = message_truncate_lines ? Qt : Qnil;
 +  if (!NILP (current_buffer->bidi_display_reordering))
 +    current_buffer->bidi_paragraph_direction = Qleft_to_right;
  
    /* Insert new message at BEG.  */
    TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
  
    if (STRINGP (string))
      {
 -      int nchars;
 +      EMACS_INT nchars;
  
        if (nbytes == 0)
        nbytes = SBYTES (string);
        if (multibyte_p && NILP (current_buffer->enable_multibyte_characters))
        {
          /* Convert from multi-byte to single-byte.  */
 -        int i, c, n;
 +        EMACS_INT i;
 +        int c, n;
          unsigned char work[1];
  
          /* Convert a multibyte string to single-byte.  */
               && !NILP (current_buffer->enable_multibyte_characters))
        {
          /* Convert from single-byte to multi-byte.  */
 -        int i, c, n;
 +        EMACS_INT i;
 +        int c, n;
          const unsigned char *msg = (const unsigned char *) s;
          unsigned char str[MAX_MULTIBYTE_LENGTH];
  
     last displayed.  */
  
  void
 -clear_message (current_p, last_displayed_p)
 -     int current_p, last_displayed_p;
 +clear_message (int current_p, int last_displayed_p)
  {
    if (current_p)
      {
     and ensure a complete redisplay of all windows.  */
  
  static void
 -clear_garbaged_frames ()
 +clear_garbaged_frames (void)
  {
    if (frame_garbaged)
      {
     mini-windows height has been changed.  */
  
  static int
 -echo_area_display (update_frame_p)
 -     int update_frame_p;
 +echo_area_display (int update_frame_p)
  {
    Lisp_Object mini_window;
    struct window *w;
@@@ -9691,7 -9279,8 +9691,7 @@@ format_mode_line_unwind_data (struct bu
  }
  
  static Lisp_Object
 -unwind_format_mode_line (vector)
 -     Lisp_Object vector;
 +unwind_format_mode_line (Lisp_Object vector)
  {
    mode_line_target = XINT (AREF (vector, 0));
    mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1));
     Re-allocate mode_line_noprop_buf if necessary.  */
  
  static void
 -#ifdef PROTOTYPES
  store_mode_line_noprop_char (char c)
 -#else
 -store_mode_line_noprop_char (c)
 -    char c;
 -#endif
  {
    /* If output position has reached the end of the allocated buffer,
       double the buffer's size.  */
     frame title.  */
  
  static int
 -store_mode_line_noprop (str, field_width, precision)
 -     const unsigned char *str;
 -     int field_width, precision;
 +store_mode_line_noprop (const unsigned char *str, int field_width, int precision)
  {
    int n = 0;
 -  int dummy, nbytes;
 +  EMACS_INT dummy, nbytes;
  
    /* Copy at most PRECISION chars from STR.  */
    nbytes = strlen (str);
     frame_title_format.  */
  
  static void
 -x_consider_frame_title (frame)
 -     Lisp_Object frame;
 +x_consider_frame_title (Lisp_Object frame)
  {
    struct frame *f = XFRAME (frame);
  
         higher level than this.)  */
        if (! STRINGP (f->name)
          || SBYTES (f->name) != len
 -        || bcmp (title, SDATA (f->name), len) != 0)
 +        || memcmp (title, SDATA (f->name), len) != 0)
        x_implicitly_set_name (f, make_string (title, len), Qnil);
      }
  }
     appropriate.  This can call eval.  */
  
  void
 -prepare_menu_bars ()
 +prepare_menu_bars (void)
  {
    int all_windows;
    struct gcpro gcpro1, gcpro2;
        update_tool_bar (sf, 1);
  #endif
      }
 -
 -  /* Motif needs this.  See comment in xmenu.c.  Turn it off when
 -     pending_menu_activation is not defined.  */
 -#ifdef USE_X_TOOLKIT
 -  pending_menu_activation = 0;
 -#endif
  }
  
  
     updated value of this flag, to pass to the next call.  */
  
  static int
 -update_menu_bar (f, save_match_data, hooks_run)
 -     struct frame *f;
 -     int save_match_data;
 -     int hooks_run;
 +update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
  {
    Lisp_Object window;
    register struct window *w;
@@@ -10096,7 -9702,8 +10096,7 @@@ struct cursor_pos output_cursor
     positions are relative to updated_window.  */
  
  void
 -set_output_cursor (cursor)
 -    struct cursor_pos *cursor;
 +set_output_cursor (struct cursor_pos *cursor)
  {
    output_cursor.hpos = cursor->hpos;
    output_cursor.vpos = cursor->vpos;
     selected_window and display the cursor at the given position.  */
  
  void
 -x_cursor_to (vpos, hpos, y, x)
 -     int vpos, hpos, y, x;
 +x_cursor_to (int vpos, int hpos, int y, int x)
  {
    struct window *w;
  
@@@ -10165,7 -9773,8 +10165,7 @@@ int last_tool_bar_item
  
  
  static Lisp_Object
 -update_tool_bar_unwind (frame)
 -     Lisp_Object frame;
 +update_tool_bar_unwind (Lisp_Object frame)
  {
    selected_frame = frame;
    return Qnil;
     and restore it here.  */
  
  static void
 -update_tool_bar (f, save_match_data)
 -     struct frame *f;
 -     int save_match_data;
 +update_tool_bar (struct frame *f, int save_match_data)
  {
  #if defined (USE_GTK) || defined (HAVE_NS)
    int do_update = FRAME_EXTERNAL_TOOL_BAR (f);
     been set up previously by calling prepare_menu_bars.  */
  
  static void
 -build_desired_tool_bar_string (f)
 -     struct frame *f;
 +build_desired_tool_bar_string (struct frame *f)
  {
    int i, size, size_needed;
    struct gcpro gcpro1, gcpro2, gcpro3;
        int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P));
        int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P));
        int hmargin, vmargin, relief, idx, end;
 -      extern Lisp_Object QCrelief, QCmargin, QCconversion;
  
        /* If image is a vector, choose the image according to the
         button state.  */
  */
  
  static void
 -display_tool_bar_line (it, height)
 -     struct it *it;
 -     int height;
 +display_tool_bar_line (struct it *it, int height)
  {
    struct glyph_row *row = it->glyph_row;
    int max_x = it->last_visible_x;
              row->used[TEXT_AREA] = n_glyphs_before;
              *it = it_before;
              /* If this is the only glyph on this line, it will never fit on the
 -               toolbar, so skip it.  But ensure there is at least one glyph,
 +               tool-bar, so skip it.  But ensure there is at least one glyph,
                 so we don't accidentally disable the tool-bar.  */
              if (n_glyphs_before == 0
                  && (it->vpos > 0 || IT_STRING_CHARPOS (*it) < it->end_charpos-1))
     returned in *N_ROWS if non-NULL.  */
  
  static int
 -tool_bar_lines_needed (f, n_rows)
 -     struct frame *f;
 -     int *n_rows;
 +tool_bar_lines_needed (struct frame *f, int *n_rows)
  {
    struct window *w = XWINDOW (f->tool_bar_window);
    struct it it;
  DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed,
         0, 1, 0,
         doc: /* Return the number of lines occupied by the tool bar of FRAME.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    struct frame *f;
    struct window *w;
     height should be changed.  */
  
  static int
 -redisplay_tool_bar (f)
 -     struct frame *f;
 +redisplay_tool_bar (struct frame *f)
  {
    struct window *w;
    struct it it;
        if ((nlines = tool_bar_lines_needed (f, &f->n_tool_bar_rows),
           nlines != WINDOW_TOTAL_LINES (w)))
        {
 -        extern Lisp_Object Qtool_bar_lines;
          Lisp_Object frame;
          int old_height = WINDOW_TOTAL_LINES (w);
  
         frame parameter.  */
        if (change_height_p)
        {
 -        extern Lisp_Object Qtool_bar_lines;
          Lisp_Object frame;
          int old_height = WINDOW_TOTAL_LINES (w);
          int nrows;
     GLYPH doesn't display a tool-bar item.  */
  
  static int
 -tool_bar_item_info (f, glyph, prop_idx)
 -     struct frame *f;
 -     struct glyph *glyph;
 -     int *prop_idx;
 +tool_bar_item_info (struct frame *f, struct glyph *glyph, int *prop_idx)
  {
    Lisp_Object prop;
    int success_p;
     1  otherwise.  */
  
  static int
 -get_tool_bar_item (f, x, y, glyph, hpos, vpos, prop_idx)
 -     struct frame *f;
 -     int x, y;
 -     struct glyph **glyph;
 -     int *hpos, *vpos, *prop_idx;
 +get_tool_bar_item (struct frame *f, int x, int y, struct glyph **glyph,
 +                 int *hpos, int *vpos, int *prop_idx)
  {
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
    struct window *w = XWINDOW (f->tool_bar_window);
    int area;
  
      return -1;
  
    /* Is mouse on the highlighted item?  */
 -  if (EQ (f->tool_bar_window, dpyinfo->mouse_face_window)
 -      && *vpos >= dpyinfo->mouse_face_beg_row
 -      && *vpos <= dpyinfo->mouse_face_end_row
 -      && (*vpos > dpyinfo->mouse_face_beg_row
 -        || *hpos >= dpyinfo->mouse_face_beg_col)
 -      && (*vpos < dpyinfo->mouse_face_end_row
 -        || *hpos < dpyinfo->mouse_face_end_col
 -        || dpyinfo->mouse_face_past_end))
 +  if (EQ (f->tool_bar_window, hlinfo->mouse_face_window)
 +      && *vpos >= hlinfo->mouse_face_beg_row
 +      && *vpos <= hlinfo->mouse_face_end_row
 +      && (*vpos > hlinfo->mouse_face_beg_row
 +        || *hpos >= hlinfo->mouse_face_beg_col)
 +      && (*vpos < hlinfo->mouse_face_end_row
 +        || *hpos < hlinfo->mouse_face_end_col
 +        || hlinfo->mouse_face_past_end))
      return 0;
  
    return 1;
     release.  */
  
  void
 -handle_tool_bar_click (f, x, y, down_p, modifiers)
 -     struct frame *f;
 -     int x, y, down_p;
 -     unsigned int modifiers;
 +handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
 +                     unsigned int modifiers)
  {
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
    struct window *w = XWINDOW (f->tool_bar_window);
    int hpos, vpos, prop_idx;
    struct glyph *glyph;
    if (down_p)
      {
        /* Show item in pressed state.  */
 -      show_mouse_face (dpyinfo, DRAW_IMAGE_SUNKEN);
 -      dpyinfo->mouse_face_image_state = DRAW_IMAGE_SUNKEN;
 +      show_mouse_face (hlinfo, DRAW_IMAGE_SUNKEN);
 +      hlinfo->mouse_face_image_state = DRAW_IMAGE_SUNKEN;
        last_tool_bar_item = prop_idx;
      }
    else
        EVENT_INIT (event);
  
        /* Show item in released state.  */
 -      show_mouse_face (dpyinfo, DRAW_IMAGE_RAISED);
 -      dpyinfo->mouse_face_image_state = DRAW_IMAGE_RAISED;
 +      show_mouse_face (hlinfo, DRAW_IMAGE_RAISED);
 +      hlinfo->mouse_face_image_state = DRAW_IMAGE_RAISED;
  
        key = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_KEY);
  
     note_mouse_highlight.  */
  
  static void
 -note_tool_bar_highlight (f, x, y)
 -     struct frame *f;
 -     int x, y;
 +note_tool_bar_highlight (struct frame *f, int x, int y)
  {
    Lisp_Object window = f->tool_bar_window;
    struct window *w = XWINDOW (window);
    Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
    int hpos, vpos;
    struct glyph *glyph;
    struct glyph_row *row;
    enum draw_glyphs_face draw = DRAW_IMAGE_RAISED;
    int mouse_down_p, rc;
  
 -  /* Function note_mouse_highlight is called with negative x(y
 +  /* Function note_mouse_highlight is called with negative X/Y
       values when mouse moves outside of the frame.  */
    if (x <= 0 || y <= 0)
      {
 -      clear_mouse_face (dpyinfo);
 +      clear_mouse_face (hlinfo);
        return;
      }
  
    if (rc < 0)
      {
        /* Not on tool-bar item.  */
 -      clear_mouse_face (dpyinfo);
 +      clear_mouse_face (hlinfo);
        return;
      }
    else if (rc == 0)
      /* On same tool-bar item as before.  */
      goto set_help_echo;
  
 -  clear_mouse_face (dpyinfo);
 +  clear_mouse_face (hlinfo);
  
    /* Mouse is down, but on different tool-bar item?  */
    mouse_down_p = (dpyinfo->grabbed
        && last_tool_bar_item != prop_idx)
      return;
  
 -  dpyinfo->mouse_face_image_state = DRAW_NORMAL_TEXT;
 +  hlinfo->mouse_face_image_state = DRAW_NORMAL_TEXT;
    draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
  
    /* If tool-bar item is not enabled, don't highlight it.  */
        x += row->glyphs[TEXT_AREA][i].pixel_width;
  
        /* Record this as the current active region.  */
 -      dpyinfo->mouse_face_beg_col = hpos;
 -      dpyinfo->mouse_face_beg_row = vpos;
 -      dpyinfo->mouse_face_beg_x = x;
 -      dpyinfo->mouse_face_beg_y = row->y;
 -      dpyinfo->mouse_face_past_end = 0;
 -
 -      dpyinfo->mouse_face_end_col = hpos + 1;
 -      dpyinfo->mouse_face_end_row = vpos;
 -      dpyinfo->mouse_face_end_x = x + glyph->pixel_width;
 -      dpyinfo->mouse_face_end_y = row->y;
 -      dpyinfo->mouse_face_window = window;
 -      dpyinfo->mouse_face_face_id = TOOL_BAR_FACE_ID;
 +      hlinfo->mouse_face_beg_col = hpos;
 +      hlinfo->mouse_face_beg_row = vpos;
 +      hlinfo->mouse_face_beg_x = x;
 +      hlinfo->mouse_face_beg_y = row->y;
 +      hlinfo->mouse_face_past_end = 0;
 +
 +      hlinfo->mouse_face_end_col = hpos + 1;
 +      hlinfo->mouse_face_end_row = vpos;
 +      hlinfo->mouse_face_end_x = x + glyph->pixel_width;
 +      hlinfo->mouse_face_end_y = row->y;
 +      hlinfo->mouse_face_window = window;
 +      hlinfo->mouse_face_face_id = TOOL_BAR_FACE_ID;
  
        /* Display it as active.  */
 -      show_mouse_face (dpyinfo, draw);
 -      dpyinfo->mouse_face_image_state = draw;
 +      show_mouse_face (hlinfo, draw);
 +      hlinfo->mouse_face_image_state = draw;
      }
  
   set_help_echo:
                         Horizontal scrolling
   ************************************************************************/
  
 -static int hscroll_window_tree P_ ((Lisp_Object));
 -static int hscroll_windows P_ ((Lisp_Object));
 +static int hscroll_window_tree (Lisp_Object);
 +static int hscroll_windows (Lisp_Object);
  
  /* For all leaf windows in the window tree rooted at WINDOW, set their
     hscroll value so that PT is (i) visible in the window, and (ii) so
     changed.  */
  
  static int
 -hscroll_window_tree (window)
 -     Lisp_Object window;
 +hscroll_window_tree (Lisp_Object window)
  {
    int hscrolled_p = 0;
    int hscroll_relative_p = FLOATP (Vhscroll_step);
              struct it it;
              int hscroll;
              struct buffer *saved_current_buffer;
 -            int pt;
 +            EMACS_INT pt;
              int wanted_x;
  
              /* Find point in a display of infinite width.  */
     of WINDOW are cleared.  */
  
  static int
 -hscroll_windows (window)
 -     Lisp_Object window;
 +hscroll_windows (Lisp_Object window)
  {
    int hscrolled_p = hscroll_window_tree (window);
    if (hscrolled_p)
@@@ -11225,7 -10857,7 +11225,7 @@@ int debug_dvpos, debug_dy
  
  /* Delta in characters and bytes for try_window_id.  */
  
 -int debug_delta, debug_delta_bytes;
 +EMACS_INT debug_delta, debug_delta_bytes;
  
  /* Values of window_end_pos and window_end_vpos at the end of
     try_window_id.  */
@@@ -11277,8 -10909,9 +11277,8 @@@ debug_method_add (w, fmt, a1, a2, a3, a
     redisplay_internal for display optimization.  */
  
  static INLINE int
 -text_outside_line_unchanged_p (w, start, end)
 -     struct window *w;
 -     int start, end;
 +text_outside_line_unchanged_p (struct window *w,
 +                             EMACS_INT start, EMACS_INT end)
  {
    int unchanged_p = 1;
  
              && overlay_touches_p (Z - end))
            unchanged_p = 0;
        }
 +
 +      /* Under bidi reordering, adding or deleting a character in the
 +       beginning of a paragraph, before the first strong directional
 +       character, can change the base direction of the paragraph (unless
 +       the buffer specifies a fixed paragraph direction), which will
 +       require to redisplay the whole paragraph.  It might be worthwhile
 +       to find the paragraph limits and widen the range of redisplayed
 +       lines to that, but for now just give up this optimization.  */
 +      if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering)
 +        && NILP (XBUFFER (w->buffer)->bidi_paragraph_direction))
 +      unchanged_p = 0;
      }
  
    return unchanged_p;
     mini-buffer if that is in use.  */
  
  void
 -redisplay ()
 +redisplay (void)
  {
    redisplay_internal (0);
  }
  
  
  static Lisp_Object
 -overlay_arrow_string_or_property (var)
 -     Lisp_Object var;
 +overlay_arrow_string_or_property (Lisp_Object var)
  {
    Lisp_Object val;
  
  
  /* Return 1 if there are any overlay-arrows in current_buffer.  */
  static int
 -overlay_arrow_in_current_buffer_p ()
 +overlay_arrow_in_current_buffer_p (void)
  {
    Lisp_Object vlist;
  
     has changed.  */
  
  static int
 -overlay_arrows_changed_p ()
 +overlay_arrows_changed_p (void)
  {
    Lisp_Object vlist;
  
  /* Mark overlay arrows to be updated on next redisplay.  */
  
  static void
 -update_overlay_arrows (up_to_date)
 -     int up_to_date;
 +update_overlay_arrows (int up_to_date)
  {
    Lisp_Object vlist;
  
     Return nil if no overlay arrow.  */
  
  static Lisp_Object
 -overlay_arrow_at_row (it, row)
 -     struct it *it;
 -     struct glyph_row *row;
 +overlay_arrow_at_row (struct it *it, struct glyph_row *row)
  {
    Lisp_Object vlist;
  
          && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
        {
          if (FRAME_WINDOW_P (it->f)
 +            /* FIXME: if ROW->reversed_p is set, this should test
 +               the right fringe, not the left one.  */
              && WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
            {
  #ifdef HAVE_WINDOW_SYSTEM
     position.  BUF and PT are the current point buffer and position.  */
  
  int
 -check_point_in_composition (prev_buf, prev_pt, buf, pt)
 -     struct buffer *prev_buf, *buf;
 -     int prev_pt, pt;
 +check_point_in_composition (struct buffer *prev_buf, EMACS_INT prev_pt,
 +                          struct buffer *buf, EMACS_INT pt)
  {
    EMACS_INT start, end;
    Lisp_Object prop;
     in window W.  */
  
  static INLINE void
 -reconsider_clip_changes (w, b)
 -     struct window *w;
 -     struct buffer *b;
 +reconsider_clip_changes (struct window *w, struct buffer *b)
  {
    if (b->clip_changed
           && !NILP (w->window_end_valid)
    if (!b->clip_changed
        && BUFFERP (w->buffer) && !NILP (w->window_end_valid))
      {
 -      int pt;
 +      EMACS_INT pt;
  
        if (w == XWINDOW (selected_window))
        pt = BUF_PT (current_buffer);
     directly.  */
  
  static void
 -select_frame_for_redisplay (frame)
 -     Lisp_Object frame;
 +select_frame_for_redisplay (Lisp_Object frame)
  {
 -  Lisp_Object tail, symbol, val;
 +  Lisp_Object tail, tem;
    Lisp_Object old = selected_frame;
    struct Lisp_Symbol *sym;
  
  
    selected_frame = frame;
  
 -  do
 -    {
 -      for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail))
 -      if (CONSP (XCAR (tail))
 -          && (symbol = XCAR (XCAR (tail)),
 -              SYMBOLP (symbol))
 -          && (sym = indirect_variable (XSYMBOL (symbol)),
 -              val = sym->value,
 -              (BUFFER_LOCAL_VALUEP (val)))
 -          && XBUFFER_LOCAL_VALUE (val)->check_frame)
 -        /* Use find_symbol_value rather than Fsymbol_value
 -           to avoid an error if it is void.  */
 -        find_symbol_value (symbol);
 -    } while (!EQ (frame, old) && (frame = old, 1));
 +  do {
 +    for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail))
 +      if (CONSP (XCAR (tail))
 +        && (tem = XCAR (XCAR (tail)),
 +            SYMBOLP (tem))
 +        && (sym = indirect_variable (XSYMBOL (tem)),
 +            sym->redirect == SYMBOL_LOCALIZED)
 +        && sym->val.blv->frame_local)
 +      /* Use find_symbol_value rather than Fsymbol_value
 +         to avoid an error if it is void.  */
 +      find_symbol_value (tem);
 +  } while (!EQ (frame, old) && (frame = old, 1));
  }
  
  
@@@ -11618,7 -11248,8 +11618,7 @@@ do { if (polling_stopped_here) start_po
     causes some problems.  */
  
  static void
 -redisplay_internal (preserve_echo_area)
 -     int preserve_echo_area;
 +redisplay_internal (int preserve_echo_area)
  {
    struct window *w = XWINDOW (selected_window);
    struct frame *f;
    if (!f->glyphs_initialized_p)
      return;
  
 -  /* The flag redisplay_performed_directly_p is set by
 -     direct_output_for_insert when it already did the whole screen
 -     update necessary.  */
 -  if (redisplay_performed_directly_p)
 -    {
 -      redisplay_performed_directly_p = 0;
 -      if (!hscroll_windows (selected_window))
 -      return;
 -    }
 -
  #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
    if (popup_activated ())
      return;
    reconsider_clip_changes (w, current_buffer);
    last_escape_glyph_frame = NULL;
    last_escape_glyph_face_id = (1 << FACE_ID_BITS);
 +  last_glyphless_glyph_frame = NULL;
 +  last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
  
    /* If new fonts have been loaded that make a glyph matrix adjustment
       necessary, do it.  */
                {
                  struct glyph_row *row
                    = MATRIX_ROW (w->current_matrix, this_line_vpos + 1);
 -                int delta, delta_bytes;
 +                EMACS_INT delta, delta_bytes;
  
                  /* We used to distinguish between two cases here,
                     conditioned by Z - CHARPOS (tlendpos) == ZV, for
    if (windows_or_buffers_changed && !pause)
      goto retry;
  
 -  /* Clear the face cache eventually.  */
 -  if (consider_all_windows_p)
 +  /* Clear the face and image caches.
 +
 +     We used to do this only if consider_all_windows_p.  But the cache
 +     needs to be cleared if a timer creates images in the current
 +     buffer (e.g. the test case in Bug#6230).  */
 +
 +  if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
      {
 -      if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
 -      {
 -        clear_face_cache (0);
 -        clear_face_cache_count = 0;
 -      }
 +      clear_face_cache (0);
 +      clear_face_cache_count = 0;
 +    }
 +
  #ifdef HAVE_WINDOW_SYSTEM
 -      if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT)
 -      {
 -        clear_image_caches (Qnil);
 -        clear_image_cache_count = 0;
 -      }
 -#endif /* HAVE_WINDOW_SYSTEM */
 +  if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT)
 +    {
 +      clear_image_caches (Qnil);
 +      clear_image_cache_count = 0;
      }
 +#endif /* HAVE_WINDOW_SYSTEM */
  
   end_of_redisplay:
    unbind_to (count, Qnil);
     called.  This is useful for debugging.  */
  
  void
 -redisplay_preserve_echo_area (from_where)
 -     int from_where;
 +redisplay_preserve_echo_area (int from_where)
  {
    TRACE ((stderr, "redisplay_preserve_echo_area (%d)\n", from_where));
  
     failure during redisplay, for example).  */
  
  static Lisp_Object
 -unwind_redisplay (val)
 -     Lisp_Object val;
 +unwind_redisplay (Lisp_Object val)
  {
    Lisp_Object old_redisplaying_p, old_frame;
  
     redisplay_internal is called.  */
  
  static void
 -mark_window_display_accurate_1 (w, accurate_p)
 -     struct window *w;
 -     int accurate_p;
 +mark_window_display_accurate_1 (struct window *w, int accurate_p)
  {
    if (BUFFERP (w->buffer))
      {
     be redisplayed the next time redisplay_internal is called.  */
  
  void
 -mark_window_display_accurate (window, accurate_p)
 -     Lisp_Object window;
 -     int accurate_p;
 +mark_window_display_accurate (Lisp_Object window, int accurate_p)
  {
    struct window *w;
  
     macro DISP_CHAR_VECTOR.  */
  
  Lisp_Object
 -disp_char_vector (dp, c)
 -     struct Lisp_Char_Table *dp;
 -     int c;
 +disp_char_vector (struct Lisp_Char_Table *dp, int c)
  {
    Lisp_Object val;
  
  /* Redisplay all leaf windows in the window tree rooted at WINDOW.  */
  
  static void
 -redisplay_windows (window)
 -     Lisp_Object window;
 +redisplay_windows (Lisp_Object window)
  {
    while (!NILP (window))
      {
  }
  
  static Lisp_Object
 -redisplay_window_error ()
 +redisplay_window_error (Lisp_Object ignore)
  {
    displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer);
    return Qnil;
  }
  
  static Lisp_Object
 -redisplay_window_0 (window)
 -     Lisp_Object window;
 +redisplay_window_0 (Lisp_Object window)
  {
    if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
      redisplay_window (window, 0);
  }
  
  static Lisp_Object
 -redisplay_window_1 (window)
 -     Lisp_Object window;
 +redisplay_window_1 (Lisp_Object window)
  {
    if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer))
      redisplay_window (window, 1);
     Return 0 if cursor is not on this row, 1 otherwise.  */
  
  int
 -set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
 -     struct window *w;
 -     struct glyph_row *row;
 -     struct glyph_matrix *matrix;
 -     int delta, delta_bytes, dy, dvpos;
 +set_cursor_from_row (struct window *w, struct glyph_row *row,
 +                   struct glyph_matrix *matrix,
 +                   EMACS_INT delta, EMACS_INT delta_bytes,
 +                   int dy, int dvpos)
  {
    struct glyph *glyph = row->glyphs[TEXT_AREA];
    struct glyph *end = glyph + row->used[TEXT_AREA];
    struct glyph *cursor = NULL;
 -  /* The first glyph that starts a sequence of glyphs from a string
 -     that is a value of a display property.  */
 -  struct glyph *string_start;
 -  /* The X coordinate of string_start.  */
 -  int string_start_x;
    /* The last known character position in row.  */
 -  int last_pos = MATRIX_ROW_START_CHARPOS (row) + delta;
 -  /* The last known character position before string_start.  */
 -  int string_before_pos;
 +  EMACS_INT last_pos = MATRIX_ROW_START_CHARPOS (row) + delta;
    int x = row->x;
 -  int cursor_x = x;
 -  /* Last buffer position covered by an overlay.  */
 -  int cursor_from_overlay_pos = 0;
 -  int pt_old = PT - delta;
 -
 -  /* Skip over glyphs not having an object at the start of the row.
 -     These are special glyphs like truncation marks on terminal
 -     frames.  */
 +  EMACS_INT pt_old = PT - delta;
 +  EMACS_INT pos_before = MATRIX_ROW_START_CHARPOS (row) + delta;
 +  EMACS_INT pos_after = MATRIX_ROW_END_CHARPOS (row) + delta;
 +  struct glyph *glyph_before = glyph - 1, *glyph_after = end;
 +  /* A glyph beyond the edge of TEXT_AREA which we should never
 +     touch.  */
 +  struct glyph *glyphs_end = end;
 +  /* Non-zero means we've found a match for cursor position, but that
 +     glyph has the avoid_cursor_p flag set.  */
 +  int match_with_avoid_cursor = 0;
 +  /* Non-zero means we've seen at least one glyph that came from a
 +     display string.  */
 +  int string_seen = 0;
 +  /* Largest and smalles buffer positions seen so far during scan of
 +     glyph row.  */
 +  EMACS_INT bpos_max = pos_before;
 +  EMACS_INT bpos_min = pos_after;
 +  /* Last buffer position covered by an overlay string with an integer
 +     `cursor' property.  */
 +  EMACS_INT bpos_covered = 0;
 +
 +  /* Skip over glyphs not having an object at the start and the end of
 +     the row.  These are special glyphs like truncation marks on
 +     terminal frames.  */
    if (row->displays_text_p)
 -    while (glyph < end
 -         && INTEGERP (glyph->object)
 -         && glyph->charpos < 0)
 +    {
 +      if (!row->reversed_p)
 +      {
 +        while (glyph < end
 +               && INTEGERP (glyph->object)
 +               && glyph->charpos < 0)
 +          {
 +            x += glyph->pixel_width;
 +            ++glyph;
 +          }
 +        while (end > glyph
 +               && INTEGERP ((end - 1)->object)
 +               /* CHARPOS is zero for blanks and stretch glyphs
 +                  inserted by extend_face_to_end_of_line.  */
 +               && (end - 1)->charpos <= 0)
 +          --end;
 +        glyph_before = glyph - 1;
 +        glyph_after = end;
 +      }
 +      else
 +      {
 +        struct glyph *g;
 +
 +        /* If the glyph row is reversed, we need to process it from back
 +           to front, so swap the edge pointers.  */
 +        glyphs_end = end = glyph - 1;
 +        glyph += row->used[TEXT_AREA] - 1;
 +
 +        while (glyph > end + 1
 +               && INTEGERP (glyph->object)
 +               && glyph->charpos < 0)
 +          {
 +            --glyph;
 +            x -= glyph->pixel_width;
 +          }
 +        if (INTEGERP (glyph->object) && glyph->charpos < 0)
 +          --glyph;
 +        /* By default, in reversed rows we put the cursor on the
 +           rightmost (first in the reading order) glyph.  */
 +        for (g = end + 1; g < glyph; g++)
 +          x += g->pixel_width;
 +        while (end < glyph
 +               && INTEGERP ((end + 1)->object)
 +               && (end + 1)->charpos <= 0)
 +          ++end;
 +        glyph_before = glyph + 1;
 +        glyph_after = end;
 +      }
 +    }
 +  else if (row->reversed_p)
 +    {
 +      /* In R2L rows that don't display text, put the cursor on the
 +       rightmost glyph.  Case in point: an empty last line that is
 +       part of an R2L paragraph.  */
 +      cursor = end - 1;
 +      /* Avoid placing the cursor on the last glyph of the row, where
 +       on terminal frames we hold the vertical border between
 +       adjacent windows.  */
 +      if (!FRAME_WINDOW_P (WINDOW_XFRAME (w))
 +        && !WINDOW_RIGHTMOST_P (w)
 +        && cursor == row->glyphs[LAST_AREA] - 1)
 +      cursor--;
 +      x = -1; /* will be computed below, at label compute_x */
 +    }
 +
 +  /* Step 1: Try to find the glyph whose character position
 +     corresponds to point.  If that's not possible, find 2 glyphs
 +     whose character positions are the closest to point, one before
 +     point, the other after it.  */
 +  if (!row->reversed_p)
 +    while (/* not marched to end of glyph row */
 +         glyph < end
 +         /* glyph was not inserted by redisplay for internal purposes */
 +         && !INTEGERP (glyph->object))
        {
 +      if (BUFFERP (glyph->object))
 +        {
 +          EMACS_INT dpos = glyph->charpos - pt_old;
 +
 +          if (glyph->charpos > bpos_max)
 +            bpos_max = glyph->charpos;
 +          if (glyph->charpos < bpos_min)
 +            bpos_min = glyph->charpos;
 +          if (!glyph->avoid_cursor_p)
 +            {
 +              /* If we hit point, we've found the glyph on which to
 +                 display the cursor.  */
 +              if (dpos == 0)
 +                {
 +                  match_with_avoid_cursor = 0;
 +                  break;
 +                }
 +              /* See if we've found a better approximation to
 +                 POS_BEFORE or to POS_AFTER.  Note that we want the
 +                 first (leftmost) glyph of all those that are the
 +                 closest from below, and the last (rightmost) of all
 +                 those from above.  */
 +              if (0 > dpos && dpos > pos_before - pt_old)
 +                {
 +                  pos_before = glyph->charpos;
 +                  glyph_before = glyph;
 +                }
 +              else if (0 < dpos && dpos <= pos_after - pt_old)
 +                {
 +                  pos_after = glyph->charpos;
 +                  glyph_after = glyph;
 +                }
 +            }
 +          else if (dpos == 0)
 +            match_with_avoid_cursor = 1;
 +        }
 +      else if (STRINGP (glyph->object))
 +        {
 +          Lisp_Object chprop;
 +          EMACS_INT glyph_pos = glyph->charpos;
 +
 +          chprop = Fget_char_property (make_number (glyph_pos), Qcursor,
 +                                       glyph->object);
 +          if (INTEGERP (chprop))
 +            {
 +              bpos_covered = bpos_max + XINT (chprop);
 +              /* If the `cursor' property covers buffer positions up
 +                 to and including point, we should display cursor on
 +                 this glyph.  Note that overlays and text properties
 +                 with string values stop bidi reordering, so every
 +                 buffer position to the left of the string is always
 +                 smaller than any position to the right of the
 +                 string.  Therefore, if a `cursor' property on one
 +                 of the string's characters has an integer value, we
 +                 will break out of the loop below _before_ we get to
 +                 the position match above.  IOW, integer values of
 +                 the `cursor' property override the "exact match for
 +                 point" strategy of positioning the cursor.  */
 +              /* Implementation note: bpos_max == pt_old when, e.g.,
 +                 we are in an empty line, where bpos_max is set to
 +                 MATRIX_ROW_START_CHARPOS, see above.  */
 +              if (bpos_max <= pt_old && bpos_covered >= pt_old)
 +                {
 +                  cursor = glyph;
 +                  break;
 +                }
 +            }
 +
 +          string_seen = 1;
 +        }
        x += glyph->pixel_width;
        ++glyph;
        }
 +  else if (glyph > end)       /* row is reversed */
 +    while (!INTEGERP (glyph->object))
 +      {
 +      if (BUFFERP (glyph->object))
 +        {
 +          EMACS_INT dpos = glyph->charpos - pt_old;
 +
 +          if (glyph->charpos > bpos_max)
 +            bpos_max = glyph->charpos;
 +          if (glyph->charpos < bpos_min)
 +            bpos_min = glyph->charpos;
 +          if (!glyph->avoid_cursor_p)
 +            {
 +              if (dpos == 0)
 +                {
 +                  match_with_avoid_cursor = 0;
 +                  break;
 +                }
 +              if (0 > dpos && dpos > pos_before - pt_old)
 +                {
 +                  pos_before = glyph->charpos;
 +                  glyph_before = glyph;
 +                }
 +              else if (0 < dpos && dpos <= pos_after - pt_old)
 +                {
 +                  pos_after = glyph->charpos;
 +                  glyph_after = glyph;
 +                }
 +            }
 +          else if (dpos == 0)
 +            match_with_avoid_cursor = 1;
 +        }
 +      else if (STRINGP (glyph->object))
 +        {
 +          Lisp_Object chprop;
 +          EMACS_INT glyph_pos = glyph->charpos;
 +
 +          chprop = Fget_char_property (make_number (glyph_pos), Qcursor,
 +                                       glyph->object);
 +          if (INTEGERP (chprop))
 +            {
 +              bpos_covered = bpos_max + XINT (chprop);
 +              /* If the `cursor' property covers buffer positions up
 +                 to and including point, we should display cursor on
 +                 this glyph.  */
 +              if (bpos_max <= pt_old && bpos_covered >= pt_old)
 +                {
 +                  cursor = glyph;
 +                  break;
 +                }
 +            }
 +          string_seen = 1;
 +        }
 +      --glyph;
 +      if (glyph == glyphs_end) /* don't dereference outside TEXT_AREA */
 +        {
 +          x--;                /* can't use any pixel_width */
 +          break;
 +        }
 +      x -= glyph->pixel_width;
 +    }
  
 -  string_start = NULL;
 -  while (glyph < end
 -       && !INTEGERP (glyph->object)
 -       && (!BUFFERP (glyph->object)
 -           || (last_pos = glyph->charpos) < pt_old
 -           || glyph->avoid_cursor_p))
 +  /* Step 2: If we didn't find an exact match for point, we need to
 +     look for a proper place to put the cursor among glyphs between
 +     GLYPH_BEFORE and GLYPH_AFTER.  */
 +  if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
 +      && BUFFERP (glyph->object) && glyph->charpos == pt_old)
 +      && bpos_covered < pt_old)
      {
 -      if (! STRINGP (glyph->object))
 +      /* An empty line has a single glyph whose OBJECT is zero and
 +       whose CHARPOS is the position of a newline on that line.
 +       Note that on a TTY, there are more glyphs after that, which
 +       were produced by extend_face_to_end_of_line, but their
 +       CHARPOS is zero or negative.  */
 +      int empty_line_p =
 +      (row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
 +      && INTEGERP (glyph->object) && glyph->charpos > 0;
 +
 +      if (row->ends_in_ellipsis_p && pos_after == last_pos)
        {
 -        string_start = NULL;
 -        x += glyph->pixel_width;
 -        ++glyph;
 -        /* If we are beyond the cursor position computed from the
 -           last overlay seen, that overlay is not in effect for
 -           current cursor position.  Reset the cursor information
 -           computed from that overlay.  */
 -        if (cursor_from_overlay_pos
 -            && last_pos >= cursor_from_overlay_pos)
 +        EMACS_INT ellipsis_pos;
 +
 +        /* Scan back over the ellipsis glyphs.  */
 +        if (!row->reversed_p)
            {
 -            cursor_from_overlay_pos = 0;
 -            cursor = NULL;
 +            ellipsis_pos = (glyph - 1)->charpos;
 +            while (glyph > row->glyphs[TEXT_AREA]
 +                   && (glyph - 1)->charpos == ellipsis_pos)
 +              glyph--, x -= glyph->pixel_width;
 +            /* That loop always goes one position too far, including
 +               the glyph before the ellipsis.  So scan forward over
 +               that one.  */
 +            x += glyph->pixel_width;
 +            glyph++;
            }
 -      }
 -      else
 -      {
 -        if (string_start == NULL)
 +        else  /* row is reversed */
            {
 -            string_before_pos = last_pos;
 -            string_start = glyph;
 -            string_start_x = x;
 +            ellipsis_pos = (glyph + 1)->charpos;
 +            while (glyph < row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1
 +                   && (glyph + 1)->charpos == ellipsis_pos)
 +              glyph++, x += glyph->pixel_width;
 +            x -= glyph->pixel_width;
 +            glyph--;
            }
 -        /* Skip all glyphs from a string.  */
 -        do
 +      }
 +      else if (match_with_avoid_cursor
 +             /* A truncated row may not include PT among its
 +                character positions.  Setting the cursor inside the
 +                scroll margin will trigger recalculation of hscroll
 +                in hscroll_window_tree.  */
 +             || (row->truncated_on_left_p && pt_old < bpos_min)
 +             || (row->truncated_on_right_p && pt_old > bpos_max)
 +             /* Zero-width characters produce no glyphs.  */
 +             || (!string_seen
 +                 && !empty_line_p
 +                 && (row->reversed_p
 +                     ? glyph_after > glyphs_end
 +                     : glyph_after < glyphs_end)))
 +      {
 +        cursor = glyph_after;
 +        x = -1;
 +      }
 +      else if (string_seen)
 +      {
 +        int incr = row->reversed_p ? -1 : +1;
 +
 +        /* Need to find the glyph that came out of a string which is
 +           present at point.  That glyph is somewhere between
 +           GLYPH_BEFORE and GLYPH_AFTER, and it came from a string
 +           positioned between POS_BEFORE and POS_AFTER in the
 +           buffer.  */
 +        struct glyph *stop = glyph_after;
 +        EMACS_INT pos = pos_before;
 +
 +        x = -1;
 +        for (glyph = glyph_before + incr;
 +             row->reversed_p ? glyph > stop : glyph < stop; )
            {
 -            Lisp_Object cprop;
 -            int pos;
 -            if ((cursor == NULL || glyph > cursor)
 -                && (cprop = Fget_char_property (make_number ((glyph)->charpos),
 -                                                Qcursor, (glyph)->object),
 -                    !NILP (cprop))
 -                && (pos = string_buffer_position (w, glyph->object,
 -                                                  string_before_pos),
 -                    (pos == 0   /* from overlay */
 -                     || pos == pt_old)))
 +
 +            /* Any glyphs that come from the buffer are here because
 +               of bidi reordering.  Skip them, and only pay
 +               attention to glyphs that came from some string.  */
 +            if (STRINGP (glyph->object))
                {
 -                /* Compute the first buffer position after the overlay.
 -                   If the `cursor' property tells us how  many positions
 -                   are associated with the overlay, use that.  Otherwise,
 -                   estimate from the buffer positions of the glyphs
 -                   before and after the overlay.  */
 -                cursor_from_overlay_pos = (pos ? 0 : last_pos
 -                                           + (INTEGERP (cprop) ? XINT (cprop) : 0));
 -                cursor = glyph;
 -                cursor_x = x;
 +                Lisp_Object str;
 +                EMACS_INT tem;
 +
 +                str = glyph->object;
 +                tem = string_buffer_position_lim (w, str, pos, pos_after, 0);
 +                if (tem == 0  /* from overlay */
 +                    || pos <= tem)
 +                  {
 +                    /* If the string from which this glyph came is
 +                       found in the buffer at point, then we've
 +                       found the glyph we've been looking for.  If
 +                       it comes from an overlay (tem == 0), and it
 +                       has the `cursor' property on one of its
 +                       glyphs, record that glyph as a candidate for
 +                       displaying the cursor.  (As in the
 +                       unidirectional version, we will display the
 +                       cursor on the last candidate we find.)  */
 +                    if (tem == 0 || tem == pt_old)
 +                      {
 +                        /* The glyphs from this string could have
 +                           been reordered.  Find the one with the
 +                           smallest string position.  Or there could
 +                           be a character in the string with the
 +                           `cursor' property, which means display
 +                           cursor on that character's glyph.  */
 +                        EMACS_INT strpos = glyph->charpos;
 +
 +                        if (tem)
 +                          cursor = glyph;
 +                        for ( ;
 +                             (row->reversed_p ? glyph > stop : glyph < stop)
 +                               && EQ (glyph->object, str);
 +                             glyph += incr)
 +                          {
 +                            Lisp_Object cprop;
 +                            EMACS_INT gpos = glyph->charpos;
 +
 +                            cprop = Fget_char_property (make_number (gpos),
 +                                                        Qcursor,
 +                                                        glyph->object);
 +                            if (!NILP (cprop))
 +                              {
 +                                cursor = glyph;
 +                                break;
 +                              }
 +                            if (tem && glyph->charpos < strpos)
 +                              {
 +                                strpos = glyph->charpos;
 +                                cursor = glyph;
 +                              }
 +                          }
 +
 +                        if (tem == pt_old)
 +                          goto compute_x;
 +                      }
 +                    if (tem)
 +                      pos = tem + 1; /* don't find previous instances */
 +                  }
 +                /* This string is not what we want; skip all of the
 +                   glyphs that came from it.  */
 +                while ((row->reversed_p ? glyph > stop : glyph < stop)
 +                       && EQ (glyph->object, str))
 +                  glyph += incr;
                }
 -            x += glyph->pixel_width;
 -            ++glyph;
 +            else
 +              glyph += incr;
            }
 -        while (glyph < end && EQ (glyph->object, string_start->object));
 +
 +        /* If we reached the end of the line, and END was from a string,
 +           the cursor is not on this line.  */
 +        if (cursor == NULL
 +            && (row->reversed_p ? glyph <= end : glyph >= end)
 +            && STRINGP (end->object)
 +            && row->continued_p)
 +          return 0;
        }
      }
  
 + compute_x:
    if (cursor != NULL)
 +    glyph = cursor;
 +  if (x < 0)
      {
 -      glyph = cursor;
 -      x = cursor_x;
 -    }
 -  else if (row->ends_in_ellipsis_p && glyph == end)
 -    {
 -      /* Scan back over the ellipsis glyphs, decrementing positions.  */
 -      while (glyph > row->glyphs[TEXT_AREA]
 -           && (glyph - 1)->charpos == last_pos)
 -      glyph--, x -= glyph->pixel_width;
 -      /* That loop always goes one position too far, including the
 -       glyph before the ellipsis.  So scan forward over that one.  */
 -      x += glyph->pixel_width;
 -      glyph++;
 -    }
 -  else if (string_start
 -         && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
 -    {
 -      /* We may have skipped over point because the previous glyphs
 -       are from string.  As there's no easy way to know the
 -       character position of the current glyph, find the correct
 -       glyph on point by scanning from string_start again.  */
 -      Lisp_Object limit;
 -      Lisp_Object string;
 -      struct glyph *stop = glyph;
 -      int pos;
 +      struct glyph *g;
  
 -      limit = make_number (pt_old + 1);
 -      glyph = string_start;
 -      x = string_start_x;
 -      string = glyph->object;
 -      pos = string_buffer_position (w, string, string_before_pos);
 -      /* If POS == 0, STRING is from overlay.  We skip such glyphs
 -       because we always put the cursor after overlay strings.  */
 -      while (pos == 0 && glyph < stop)
 +      /* Need to compute x that corresponds to GLYPH.  */
 +      for (g = row->glyphs[TEXT_AREA], x = row->x; g < glyph; g++)
        {
 -        string = glyph->object;
 -        SKIP_GLYPHS (glyph, stop, x, EQ (glyph->object, string));
 -        if (glyph < stop)
 -          pos = string_buffer_position (w, glyph->object, string_before_pos);
 -      }
 -
 -      while (glyph < stop)
 -      {
 -        pos = XINT (Fnext_single_char_property_change
 -                    (make_number (pos), Qdisplay, Qnil, limit));
 -        if (pos > pt_old)
 -          break;
 -        /* Skip glyphs from the same string.  */
 -        string = glyph->object;
 -        SKIP_GLYPHS (glyph, stop, x, EQ (glyph->object, string));
 -        /* Skip glyphs from an overlay.  */
 -        while (glyph < stop
 -               && ! string_buffer_position (w, glyph->object, pos))
 -          {
 -            string = glyph->object;
 -            SKIP_GLYPHS (glyph, stop, x, EQ (glyph->object, string));
 -          }
 -      }
 -
 -      /* If we reached the end of the line, and END was from a string,
 -       the cursor is not on this line.  */
 -      if (glyph == end && row->continued_p)
 +        if (g >= row->glyphs[TEXT_AREA] + row->used[TEXT_AREA])
 +          abort ();
 +        x += g->pixel_width;
 +      }
 +    }
 +
 +  /* ROW could be part of a continued line, which, under bidi
 +     reordering, might have other rows whose start and end charpos
 +     occlude point.  Only set w->cursor if we found a better
 +     approximation to the cursor position than we have from previously
 +     examined candidate rows belonging to the same continued line.  */
 +  if (/* we already have a candidate row */
 +      w->cursor.vpos >= 0
 +      /* that candidate is not the row we are processing */
 +      && MATRIX_ROW (matrix, w->cursor.vpos) != row
 +      /* the row we are processing is part of a continued line */
 +      && (row->continued_p || MATRIX_ROW_CONTINUATION_LINE_P (row))
 +      /* Make sure cursor.vpos specifies a row whose start and end
 +       charpos occlude point.  This is because some callers of this
 +       function leave cursor.vpos at the row where the cursor was
 +       displayed during the last redisplay cycle.  */
 +      && MATRIX_ROW_START_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos)) <= pt_old
 +      && pt_old < MATRIX_ROW_END_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos)))
 +    {
 +      struct glyph *g1 =
 +      MATRIX_ROW_GLYPH_START (matrix, w->cursor.vpos) + w->cursor.hpos;
 +
 +      /* Don't consider glyphs that are outside TEXT_AREA.  */
 +      if (!(row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end))
 +      return 0;
 +      /* Keep the candidate whose buffer position is the closest to
 +       point.  */
 +      if (/* previous candidate is a glyph in TEXT_AREA of that row */
 +        w->cursor.hpos >= 0
 +        && w->cursor.hpos < MATRIX_ROW_USED (matrix, w->cursor.vpos)
 +        && BUFFERP (g1->object)
 +        && (g1->charpos == pt_old /* an exact match always wins */
 +            || (BUFFERP (glyph->object)
 +                && eabs (g1->charpos - pt_old)
 +                 < eabs (glyph->charpos - pt_old))))
 +      return 0;
 +      /* If this candidate gives an exact match, use that.  */
 +      if (!(BUFFERP (glyph->object) && glyph->charpos == pt_old)
 +        /* Otherwise, keep the candidate that comes from a row
 +           spanning less buffer positions.  This may win when one or
 +           both candidate positions are on glyphs that came from
 +           display strings, for which we cannot compare buffer
 +           positions.  */
 +        && MATRIX_ROW_END_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos))
 +           - MATRIX_ROW_START_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos))
 +           < MATRIX_ROW_END_CHARPOS (row) - MATRIX_ROW_START_CHARPOS (row))
        return 0;
      }
 -
    w->cursor.hpos = glyph - row->glyphs[TEXT_AREA];
    w->cursor.x = x;
    w->cursor.vpos = MATRIX_ROW_VPOS (row, matrix) + dvpos;
     We assume that the window's buffer is really current.  */
  
  static INLINE struct text_pos
 -run_window_scroll_functions (window, startp)
 -     Lisp_Object window;
 -     struct text_pos startp;
 +run_window_scroll_functions (Lisp_Object window, struct text_pos startp)
  {
    struct window *w = XWINDOW (window);
    SET_MARKER_FROM_TEXT_POS (w->start, startp);
     as if point had gone off the screen.  */
  
  static int
 -cursor_row_fully_visible_p (w, force_p, current_matrix_p)
 -     struct window *w;
 -     int force_p;
 -     int current_matrix_p;
 +cursor_row_fully_visible_p (struct window *w, int force_p, int current_matrix_p)
  {
    struct glyph_matrix *matrix;
    struct glyph_row *row;
  };
  
  static int
 -try_scrolling (window, just_this_one_p, scroll_conservatively,
 -             scroll_step, temp_scroll_step, last_line_misfit)
 -     Lisp_Object window;
 -     int just_this_one_p;
 -     EMACS_INT scroll_conservatively, scroll_step;
 -     int temp_scroll_step;
 -     int last_line_misfit;
 +try_scrolling (Lisp_Object window, int just_this_one_p,
 +             EMACS_INT scroll_conservatively, EMACS_INT scroll_step,
 +             int temp_scroll_step, int last_line_misfit)
  {
    struct window *w = XWINDOW (window);
    struct frame *f = XFRAME (w->frame);
        if (PT > CHARPOS (it.current.pos))
        {
          int y0 = line_bottom_y (&it);
 -
 -        /* Compute the distance from the scroll margin to PT
 -           (including the height of the cursor line).  Moving the
 -           iterator unconditionally to PT can be slow if PT is far
 -           away, so stop 10 lines past the window bottom (is there a
 -           way to do the right thing quickly?).  */
 -        move_it_to (&it, PT, -1,
 -                    it.last_visible_y + 10 * FRAME_LINE_HEIGHT (f),
 +        /* Compute how many pixels below window bottom to stop searching
 +           for PT.  This avoids costly search for PT that is far away if
 +           the user limited scrolling by a small number of lines, but
 +           always finds PT if scroll_conservatively is set to a large
 +           number, such as most-positive-fixnum.  */
 +        int slack = max (scroll_max, 10 * FRAME_LINE_HEIGHT (f));
 +        int y_to_move =
 +          slack >= INT_MAX - it.last_visible_y
 +          ? INT_MAX
 +          : it.last_visible_y + slack;
 +
 +        /* Compute the distance from the scroll margin to PT or to
 +           the scroll limit, whichever comes first.  This should
 +           include the height of the cursor line, to make that line
 +           fully visible.  */
 +        move_it_to (&it, PT, -1, y_to_move,
                      -1, MOVE_TO_POS | MOVE_TO_Y);
          dy = line_bottom_y (&it) - y0;
  
        return SCROLLING_FAILED;
  
        start_display (&it, w, startp);
 -      move_it_vertically (&it, amount_to_scroll);
 +      if (scroll_max < INT_MAX)
 +      move_it_vertically (&it, amount_to_scroll);
 +      else
 +      {
 +        /* Extra precision for users who set scroll-conservatively
 +           to most-positive-fixnum: make sure the amount we scroll
 +           the window start is never less than amount_to_scroll,
 +           which was computed as distance from window bottom to
 +           point.  This matters when lines at window top and lines
 +           below window bottom have different height.  */
 +        struct it it1 = it;
 +        /* We use a temporary it1 because line_bottom_y can modify
 +           its argument, if it moves one line down; see there.  */
 +        int start_y = line_bottom_y (&it1);
 +
 +        do {
 +          move_it_by_lines (&it, 1, 1);
 +          it1 = it;
 +        } while (line_bottom_y (&it1) - start_y < amount_to_scroll);
 +      }
  
        /* If STARTP is unchanged, move it down another screen line.  */
        if (CHARPOS (it.current.pos) == CHARPOS (startp))
     screen line with the minimum distance from the old start W->start.  */
  
  static int
 -compute_window_start_on_continuation_line (w)
 -     struct window *w;
 +compute_window_start_on_continuation_line (struct window *w)
  {
    struct text_pos pos, start_pos;
    int window_start_changed_p = 0;
  };
  
  static int
 -try_cursor_movement (window, startp, scroll_step)
 -     Lisp_Object window;
 -     struct text_pos startp;
 -     int *scroll_step;
 +try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_step)
  {
    struct window *w = XWINDOW (window);
    struct frame *f = XFRAME (w->frame);
  
        if (rc == CURSOR_MOVEMENT_CANNOT_BE_USED)
        {
 -        int scroll_p = 0;
 +        int scroll_p = 0, must_scroll = 0;
          int last_y = window_text_bottom_y (w) - this_scroll_margin;
  
          if (PT > XFASTINT (w->last_point))
                  ++row;
                }
  
 -            /* The end position of a row equals the start position
 -               of the next row.  If PT is there, we would rather
 -               display it in the next line.  */
 +            /* If the end position of a row equals the start
 +               position of the next row, and PT is at that position,
 +               we would rather display cursor in the next line.  */
              while (MATRIX_ROW_BOTTOM_Y (row) < last_y
                     && MATRIX_ROW_END_CHARPOS (row) == PT
 +                   && row < w->current_matrix->rows
 +                              + w->current_matrix->nrows - 1
 +                   && MATRIX_ROW_START_CHARPOS (row+1) == PT
                     && !cursor_row_p (w, row))
                ++row;
  
            {
              /* if PT is not in the glyph row, give up.  */
              rc = CURSOR_MOVEMENT_MUST_SCROLL;
 +            must_scroll = 1;
 +          }
 +        else if (rc != CURSOR_MOVEMENT_SUCCESS
 +                 && !NILP (XBUFFER (w->buffer)->bidi_display_reordering))
 +          {
 +            /* If rows are bidi-reordered and point moved, back up
 +               until we find a row that does not belong to a
 +               continuation line.  This is because we must consider
 +               all rows of a continued line as candidates for the
 +               new cursor positioning, since row start and end
 +               positions change non-linearly with vertical position
 +               in such rows.  */
 +            /* FIXME: Revisit this when glyph ``spilling'' in
 +               continuation lines' rows is implemented for
 +               bidi-reordered rows.  */
 +            while (MATRIX_ROW_CONTINUATION_LINE_P (row))
 +              {
 +                xassert (row->enabled_p);
 +                --row;
 +                /* If we hit the beginning of the displayed portion
 +                   without finding the first row of a continued
 +                   line, give up.  */
 +                if (row <= w->current_matrix->rows)
 +                  {
 +                    rc = CURSOR_MOVEMENT_MUST_SCROLL;
 +                    break;
 +                  }
 +
 +              }
            }
 +        if (must_scroll)
 +          ;
          else if (rc != CURSOR_MOVEMENT_SUCCESS
 -                 && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
 -                 && make_cursor_line_fully_visible_p)
 +            && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
 +            && make_cursor_line_fully_visible_p)
            {
              if (PT == MATRIX_ROW_END_CHARPOS (row)
                  && !row->ends_at_zv_p
            }
          else if (scroll_p)
            rc = CURSOR_MOVEMENT_MUST_SCROLL;
 +        else if (rc != CURSOR_MOVEMENT_SUCCESS
 +                 && !NILP (XBUFFER (w->buffer)->bidi_display_reordering))
 +          {
 +            /* With bidi-reordered rows, there could be more than
 +               one candidate row whose start and end positions
 +               occlude point.  We need to let set_cursor_from_row
 +               find the best candidate.  */
 +            /* FIXME: Revisit this when glyph ``spilling'' in
 +               continuation lines' rows is implemented for
 +               bidi-reordered rows.  */
 +            int rv = 0;
 +
 +            do
 +              {
 +                if (MATRIX_ROW_START_CHARPOS (row) <= PT
 +                    && PT <= MATRIX_ROW_END_CHARPOS (row)
 +                    && cursor_row_p (w, row))
 +                  rv |= set_cursor_from_row (w, row, w->current_matrix,
 +                                             0, 0, 0, 0);
 +                /* As soon as we've found the first suitable row
 +                   whose ends_at_zv_p flag is set, we are done.  */
 +                if (rv
 +                    && MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p)
 +                  {
 +                    rc = CURSOR_MOVEMENT_SUCCESS;
 +                    break;
 +                  }
 +                ++row;
 +              }
 +            while ((MATRIX_ROW_CONTINUATION_LINE_P (row)
 +                    && MATRIX_ROW_BOTTOM_Y (row) <= last_y)
 +                   || (MATRIX_ROW_START_CHARPOS (row) == PT
 +                       && MATRIX_ROW_BOTTOM_Y (row) < last_y));
 +            /* If we didn't find any candidate rows, or exited the
 +               loop before all the candidates were examined, signal
 +               to the caller that this method failed.  */
 +            if (rc != CURSOR_MOVEMENT_SUCCESS
 +                && (!rv || MATRIX_ROW_CONTINUATION_LINE_P (row)))
 +              rc = CURSOR_MOVEMENT_MUST_SCROLL;
 +            else if (rv)
 +              rc = CURSOR_MOVEMENT_SUCCESS;
 +          }
          else
            {
              do
  }
  
  void
 -set_vertical_scroll_bar (w)
 -     struct window *w;
 +set_vertical_scroll_bar (struct window *w)
  {
 -  int start, end, whole;
 +  EMACS_INT start, end, whole;
  
    /* Calculate the start and end positions for the current window.
       At some point, it would be nice to choose between scrollbars
     retry.  */
  
  static void
 -redisplay_window (window, just_this_one_p)
 -     Lisp_Object window;
 -     int just_this_one_p;
 +redisplay_window (Lisp_Object window, int just_this_one_p)
  {
    struct window *w = XWINDOW (window);
    struct frame *f = XFRAME (w->frame);
    int rc;
    int centering_position = -1;
    int last_line_misfit = 0;
 -  int beg_unchanged, end_unchanged;
 +  EMACS_INT beg_unchanged, end_unchanged;
  
    SET_TEXT_POS (lpoint, PT, PT_BYTE);
    opoint = lpoint;
       window, set up appropriate value.  */
    if (!EQ (window, selected_window))
      {
 -      int new_pt = XMARKER (w->pointm)->charpos;
 -      int new_pt_byte = marker_byte_position (w->pointm);
 +      EMACS_INT new_pt = XMARKER (w->pointm)->charpos;
 +      EMACS_INT new_pt_byte = marker_byte_position (w->pointm);
        if (new_pt < BEGV)
        {
          new_pt = BEGV;
  
            if (redisplay_tool_bar_p && redisplay_tool_bar (f))
            {
 -            extern int ignore_mouse_drag_p;
              ignore_mouse_drag_p = 1;
            }
          }
     set in FLAGS.)  */
  
  int
 -try_window (window, pos, flags)
 -     Lisp_Object window;
 -     struct text_pos pos;
 -     int flags;
 +try_window (Lisp_Object window, struct text_pos pos, int flags)
  {
    struct window *w = XWINDOW (window);
    struct it it;
     W->start is the new window start.  */
  
  static int
 -try_window_reusing_current_matrix (w)
 -     struct window *w;
 +try_window_reusing_current_matrix (struct window *w)
  {
    struct frame *f = XFRAME (w->frame);
    struct glyph_row *row, *bottom_row;
    /* The variable new_start now holds the new window start.  The old
       start `start' can be determined from the current matrix.  */
    SET_TEXT_POS_FROM_MARKER (new_start, w->start);
 -  start = start_row->start.pos;
 +  start = start_row->minpos;
    start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix);
  
    /* Clear the desired matrix for the display below.  */
            {
              /* Advance to the next row as the "start".  */
              start_row++;
 -            start = start_row->start.pos;
 +            start = start_row->minpos;
              /* If there are no more rows to try, or just one, give up.  */
              if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1
                  || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row)
              struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
              struct glyph *end = glyph + row->used[TEXT_AREA];
  
 -            for (; glyph < end
 -                   && (!BUFFERP (glyph->object)
 -                       || glyph->charpos < PT);
 -                 glyph++)
 +            /* Can't use this optimization with bidi-reordered glyph
 +               rows, unless cursor is already at point. */
 +            if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering))
                {
 -                w->cursor.hpos++;
 -                w->cursor.x += glyph->pixel_width;
 +                if (!(w->cursor.hpos >= 0
 +                      && w->cursor.hpos < row->used[TEXT_AREA]
 +                      && BUFFERP (glyph->object)
 +                      && glyph->charpos == PT))
 +                  return 0;
                }
 +            else
 +              for (; glyph < end
 +                     && (!BUFFERP (glyph->object)
 +                         || glyph->charpos < PT);
 +                   glyph++)
 +                {
 +                  w->cursor.hpos++;
 +                  w->cursor.x += glyph->pixel_width;
 +                }
            }
        }
  
     Window redisplay reusing current matrix when buffer has changed
   ************************************************************************/
  
 -static struct glyph_row *find_last_unchanged_at_beg_row P_ ((struct window *));
 -static struct glyph_row *find_first_unchanged_at_end_row P_ ((struct window *,
 -                                                           int *, int *));
 +static struct glyph_row *find_last_unchanged_at_beg_row (struct window *);
 +static struct glyph_row *find_first_unchanged_at_end_row (struct window *,
 +                                                          EMACS_INT *, EMACS_INT *);
  static struct glyph_row *
 -find_last_row_displaying_text P_ ((struct glyph_matrix *, struct it *,
 -                                 struct glyph_row *));
 +find_last_row_displaying_text (struct glyph_matrix *, struct it *,
 +                               struct glyph_row *);
  
  
  /* Return the last row in MATRIX displaying text.  If row START is
     a pointer to the row found.  */
  
  static struct glyph_row *
 -find_last_row_displaying_text (matrix, it, start)
 -     struct glyph_matrix *matrix;
 -     struct it *it;
 -     struct glyph_row *start;
 +find_last_row_displaying_text (struct glyph_matrix *matrix, struct it *it,
 +                             struct glyph_row *start)
  {
    struct glyph_row *row, *row_found;
  
     when the current matrix was built.  */
  
  static struct glyph_row *
 -find_last_unchanged_at_beg_row (w)
 -     struct window *w;
 +find_last_unchanged_at_beg_row (struct window *w)
  {
 -  int first_changed_pos = BEG + BEG_UNCHANGED;
 +  EMACS_INT first_changed_pos = BEG + BEG_UNCHANGED;
    struct glyph_row *row;
    struct glyph_row *row_found = NULL;
    int yb = window_text_bottom_y (w);
     changes.  */
  
  static struct glyph_row *
 -find_first_unchanged_at_end_row (w, delta, delta_bytes)
 -     struct window *w;
 -     int *delta, *delta_bytes;
 +find_first_unchanged_at_end_row (struct window *w,
 +                               EMACS_INT *delta, EMACS_INT *delta_bytes)
  {
    struct glyph_row *row;
    struct glyph_row *row_found = NULL;
         corresponds to window_end_pos.  This allows us to translate
         buffer positions in the current matrix to current buffer
         positions for characters not in changed text.  */
 -      int Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
 -      int Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
 -      int last_unchanged_pos, last_unchanged_pos_old;
 +      EMACS_INT Z_old =
 +      MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
 +      EMACS_INT Z_BYTE_old =
 +      MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
 +      EMACS_INT last_unchanged_pos, last_unchanged_pos_old;
        struct glyph_row *first_text_row
        = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
  
     try_window_reusing_current_matrix.  */
  
  static void
 -sync_frame_with_window_matrix_rows (w)
 -     struct window *w;
 +sync_frame_with_window_matrix_rows (struct window *w)
  {
    struct frame *f = XFRAME (w->frame);
    struct glyph_row *window_row, *window_row_end, *frame_row;
     containing CHARPOS or null.  */
  
  struct glyph_row *
 -row_containing_pos (w, charpos, start, end, dy)
 -     struct window *w;
 -     int charpos;
 -     struct glyph_row *start, *end;
 -     int dy;
 +row_containing_pos (struct window *w, EMACS_INT charpos,
 +                  struct glyph_row *start, struct glyph_row *end, int dy)
  {
    struct glyph_row *row = start;
 +  struct glyph_row *best_row = NULL;
 +  EMACS_INT mindif = BUF_ZV (XBUFFER (w->buffer)) + 1;
    int last_y;
  
    /* If we happen to start on a header-line, skip that.  */
                 && !row->ends_at_zv_p
                 && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)))
          && charpos >= MATRIX_ROW_START_CHARPOS (row))
 -      return row;
 -      ++row;
 -    }
 -}
 -
 +      {
 +        struct glyph *g;
 +
 +        if (NILP (XBUFFER (w->buffer)->bidi_display_reordering)
 +            || (!best_row && !row->continued_p))
 +          return row;
 +        /* In bidi-reordered rows, there could be several rows
 +           occluding point, all of them belonging to the same
 +           continued line.  We need to find the row which fits
 +           CHARPOS the best.  */
 +        for (g = row->glyphs[TEXT_AREA];
 +             g < row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
 +             g++)
 +          {
 +            if (!STRINGP (g->object))
 +              {
 +                if (g->charpos > 0 && eabs (g->charpos - charpos) < mindif)
 +                  {
 +                    mindif = eabs (g->charpos - charpos);
 +                    best_row = row;
 +                    /* Exact match always wins.  */
 +                    if (mindif == 0)
 +                      return best_row;
 +                  }
 +              }
 +          }
 +      }
 +      else if (best_row && !row->continued_p)
 +      return best_row;
 +      ++row;
 +    }
 +}
 +
  
  /* Try to redisplay window W by reusing its existing display.  W's
     current matrix must be up to date when this function is called,
     7. Update W's window end information.  */
  
  static int
 -try_window_id (w)
 -     struct window *w;
 +try_window_id (struct window *w)
  {
    struct frame *f = XFRAME (w->frame);
    struct glyph_matrix *current_matrix = w->current_matrix;
    struct glyph_row *bottom_row;
    int bottom_vpos;
    struct it it;
 -  int delta = 0, delta_bytes = 0, stop_pos, dvpos, dy;
 +  EMACS_INT delta = 0, delta_bytes = 0, stop_pos;
 +  int dvpos, dy;
    struct text_pos start_pos;
    struct run run;
    int first_unchanged_at_end_vpos = 0;
    struct glyph_row *last_text_row, *last_text_row_at_end;
    struct text_pos start;
 -  int first_changed_charpos, last_changed_charpos;
 +  EMACS_INT first_changed_charpos, last_changed_charpos;
  
  #if GLYPH_DEBUG
    if (inhibit_try_window_id)
    if (!NILP (XBUFFER (w->buffer)->word_wrap))
      GIVE_UP (21);
  
 +  /* Under bidi reordering, adding or deleting a character in the
 +     beginning of a paragraph, before the first strong directional
 +     character, can change the base direction of the paragraph (unless
 +     the buffer specifies a fixed paragraph direction), which will
 +     require to redisplay the whole paragraph.  It might be worthwhile
 +     to find the paragraph limits and widen the range of redisplayed
 +     lines to that, but for now just give up this optimization and
 +     redisplay from scratch.  */
 +  if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering)
 +      && NILP (XBUFFER (w->buffer)->bidi_paragraph_direction))
 +    GIVE_UP (22);
 +
    /* Make sure beg_unchanged and end_unchanged are up to date.  Do it
       only if buffer has really changed.  The reason is that the gap is
       initially at Z for freshly visited files.  The code below would
          || (last_changed_charpos < CHARPOS (start) - 1
              && FETCH_BYTE (BYTEPOS (start) - 1) == '\n')))
      {
 -      int Z_old, delta, Z_BYTE_old, delta_bytes;
 +      EMACS_INT Z_old, delta, Z_BYTE_old, delta_bytes;
        struct glyph_row *r0;
  
        /* Compute how many chars/bytes have been added to or removed
         as is, without changing glyph positions since no text has
         been added/removed in front of the window end.  */
        r0 = MATRIX_FIRST_TEXT_ROW (current_matrix);
 -      if (TEXT_POS_EQUAL_P (start, r0->start.pos)
 +      if (TEXT_POS_EQUAL_P (start, r0->minpos)
          /* PT must not be in a partially visible line.  */
          && !(PT >= MATRIX_ROW_START_CHARPOS (row)
               && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w)))
        {
          /* We have to compute the window end anew since text
 -           can have been added/removed after it.  */
 +           could have been added/removed after it.  */
          w->window_end_pos
            = make_number (Z - MATRIX_ROW_END_CHARPOS (row));
          w->window_end_bytepos
       start is not in changed text, otherwise positions would not be
       comparable.  */
    row = MATRIX_FIRST_TEXT_ROW (current_matrix);
 -  if (!TEXT_POS_EQUAL_P (start, row->start.pos))
 +  if (!TEXT_POS_EQUAL_P (start, row->minpos))
      GIVE_UP (16);
  
    /* Give up if the window ends in strings.  Overlay strings
                     + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0)
                     + window_internal_height (w));
  
 +#if defined (HAVE_GPM) || defined (MSDOS)
 +        x_clear_window_mouse_face (w);
 +#endif
          /* Perform the operation on the screen.  */
          if (dvpos > 0)
            {
  
  #if GLYPH_DEBUG
  
 -void dump_glyph_row P_ ((struct glyph_row *, int, int));
 -void dump_glyph_matrix P_ ((struct glyph_matrix *, int));
 -void dump_glyph P_ ((struct glyph_row *, struct glyph *, int));
 +void dump_glyph_row (struct glyph_row *, int, int);
 +void dump_glyph_matrix (struct glyph_matrix *, int);
 +void dump_glyph (struct glyph_row *, struct glyph *, int);
  
  
  /* Dump the contents of glyph matrix MATRIX on stderr.
@@@ -16378,7 -15589,7 +16378,7 @@@ dump_glyph (row, glyph, area
        if (glyph->u.cmp.automatic)
        fprintf (stderr,
                 "[%d-%d]",
 -               glyph->u.cmp.from, glyph->u.cmp.to);
 +               glyph->slice.cmp.from, glyph->slice.cmp.to);
        fprintf (stderr, " . %4d %1.1d%1.1d\n",
               glyph->face_id,
               glyph->left_box_line_p,
@@@ -16490,7 -15701,8 +16490,7 @@@ DEFUN ("dump-glyph-matrix", Fdump_glyph
  Shows contents of glyph row structures.  With non-nil
  parameter GLYPHS, dump glyphs as well.  If GLYPHS is 1 show
  glyphs in short form, otherwise show glyphs in long form.  */)
 -     (glyphs)
 -     Lisp_Object glyphs;
 +  (Lisp_Object glyphs)
  {
    struct window *w = XWINDOW (selected_window);
    struct buffer *buffer = XBUFFER (w->buffer);
  
  DEFUN ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix,
         Sdump_frame_glyph_matrix, 0, 0, "", doc: /* */)
 -     ()
 +  (void)
  {
    struct frame *f = XFRAME (selected_frame);
    dump_glyph_matrix (f->current_matrix, 1);
@@@ -16521,7 -15733,8 +16521,7 @@@ DEFUN ("dump-glyph-row", Fdump_glyph_ro
  GLYPH 0 means don't dump glyphs.
  GLYPH 1 means dump glyphs in short form.
  GLYPH > 1 or omitted means dump glyphs in long form.  */)
 -     (row, glyphs)
 -     Lisp_Object row, glyphs;
 +  (Lisp_Object row, Lisp_Object glyphs)
  {
    struct glyph_matrix *matrix;
    int vpos;
@@@ -16542,7 -15755,8 +16542,7 @@@ DEFUN ("dump-tool-bar-row", Fdump_tool_
  GLYPH 0 means don't dump glyphs.
  GLYPH 1 means dump glyphs in short form.
  GLYPH > 1 or omitted means dump glyphs in long form.  */)
 -     (row, glyphs)
 -     Lisp_Object row, glyphs;
 +  (Lisp_Object row, Lisp_Object glyphs)
  {
    struct frame *sf = SELECTED_FRAME ();
    struct glyph_matrix *m = XWINDOW (sf->tool_bar_window)->current_matrix;
  DEFUN ("trace-redisplay", Ftrace_redisplay, Strace_redisplay, 0, 1, "P",
         doc: /* Toggle tracing of redisplay.
  With ARG, turn tracing on if and only if ARG is positive.  */)
 -     (arg)
 -     Lisp_Object arg;
 +  (Lisp_Object arg)
  {
    if (NILP (arg))
      trace_redisplay_p = !trace_redisplay_p;
  DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "",
         doc: /* Like `format', but print result to stderr.
  usage: (trace-to-stderr STRING &rest OBJECTS)  */)
 -     (nargs, args)
 -     int nargs;
 -     Lisp_Object *args;
 +  (int nargs, Lisp_Object *args)
  {
    Lisp_Object s = Fformat (nargs, args);
    fprintf (stderr, "%s", SDATA (s));
     Used for non-window-redisplay windows, and for windows w/o left fringe.  */
  
  static struct glyph_row *
 -get_overlay_arrow_glyph_row (w, overlay_arrow_string)
 -     struct window *w;
 -     Lisp_Object overlay_arrow_string;
 +get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct buffer *buffer = XBUFFER (w->buffer);
     produce_special_glyphs.  */
  
  static void
 -insert_left_trunc_glyphs (it)
 -     struct it *it;
 +insert_left_trunc_glyphs (struct it *it)
  {
    struct it truncate_it;
    struct glyph *from, *end, *to, *toend;
    produce_special_glyphs (&truncate_it, IT_TRUNCATION);
  
    /* Overwrite glyphs from IT with truncation glyphs.  */
 -  from = truncate_it.glyph_row->glyphs[TEXT_AREA];
 -  end = from + truncate_it.glyph_row->used[TEXT_AREA];
 -  to = it->glyph_row->glyphs[TEXT_AREA];
 -  toend = to + it->glyph_row->used[TEXT_AREA];
 -
 -  while (from < end)
 -    *to++ = *from++;
 -
 -  /* There may be padding glyphs left over.  Overwrite them too.  */
 -  while (to < toend && CHAR_GLYPH_PADDING_P (*to))
 +  if (!it->glyph_row->reversed_p)
      {
        from = truncate_it.glyph_row->glyphs[TEXT_AREA];
 +      end = from + truncate_it.glyph_row->used[TEXT_AREA];
 +      to = it->glyph_row->glyphs[TEXT_AREA];
 +      toend = to + it->glyph_row->used[TEXT_AREA];
 +
        while (from < end)
        *to++ = *from++;
 +
 +      /* There may be padding glyphs left over.  Overwrite them too.  */
 +      while (to < toend && CHAR_GLYPH_PADDING_P (*to))
 +      {
 +        from = truncate_it.glyph_row->glyphs[TEXT_AREA];
 +        while (from < end)
 +          *to++ = *from++;
 +      }
 +
 +      if (to > toend)
 +      it->glyph_row->used[TEXT_AREA] = to - it->glyph_row->glyphs[TEXT_AREA];
      }
 +  else
 +    {
 +      /* In R2L rows, overwrite the last (rightmost) glyphs, and do
 +       that back to front.  */
 +      end = truncate_it.glyph_row->glyphs[TEXT_AREA];
 +      from = end + truncate_it.glyph_row->used[TEXT_AREA] - 1;
 +      toend = it->glyph_row->glyphs[TEXT_AREA];
 +      to = toend + it->glyph_row->used[TEXT_AREA] - 1;
 +
 +      while (from >= end && to >= toend)
 +      *to-- = *from--;
 +      while (to >= toend && CHAR_GLYPH_PADDING_P (*to))
 +      {
 +        from =
 +          truncate_it.glyph_row->glyphs[TEXT_AREA]
 +          + truncate_it.glyph_row->used[TEXT_AREA] - 1;
 +        while (from >= end && to >= toend)
 +          *to-- = *from--;
 +      }
 +      if (from >= end)
 +      {
 +        /* Need to free some room before prepending additional
 +           glyphs.  */
 +        int move_by = from - end + 1;
 +        struct glyph *g0 = it->glyph_row->glyphs[TEXT_AREA];
 +        struct glyph *g = g0 + it->glyph_row->used[TEXT_AREA] - 1;
  
 -  if (to > toend)
 -    it->glyph_row->used[TEXT_AREA] = to - it->glyph_row->glyphs[TEXT_AREA];
 +        for ( ; g >= g0; g--)
 +          g[move_by] = *g;
 +        while (from >= end)
 +          *to-- = *from--;
 +        it->glyph_row->used[TEXT_AREA] += move_by;
 +      }
 +    }
  }
  
  
     must not be zero.  */
  
  static void
 -compute_line_metrics (it)
 -     struct it *it;
 +compute_line_metrics (struct it *it)
  {
    struct glyph_row *row = it->glyph_row;
    int area, i;
     end of the line if the row ends in italic text.  */
  
  static int
 -append_space_for_newline (it, default_face_p)
 -     struct it *it;
 -     int default_face_p;
 +append_space_for_newline (struct it *it, int default_face_p)
  {
    if (FRAME_WINDOW_P (it->f))
      {
          saved_pos = it->position;
  
          it->what = IT_CHARACTER;
 -        bzero (&it->position, sizeof it->position);
 +        memset (&it->position, 0, sizeof it->position);
          it->object = make_number (0);
          it->c = it->char_to_display = ' ';
          it->len = 1;
  
  
  /* Extend the face of the last glyph in the text area of IT->glyph_row
 -   to the end of the display line.  Called from display_line.
 -   If the glyph row is empty, add a space glyph to it so that we
 -   know the face to draw.  Set the glyph row flag fill_line_p.  */
 +   to the end of the display line.  Called from display_line.  If the
 +   glyph row is empty, add a space glyph to it so that we know the
 +   face to draw.  Set the glyph row flag fill_line_p.  If the glyph
 +   row is R2L, prepend a stretch glyph to cover the empty space to the
 +   left of the leftmost glyph.  */
  
  static void
 -extend_face_to_end_of_line (it)
 -     struct it *it;
 +extend_face_to_end_of_line (struct it *it)
  {
    struct face *face;
    struct frame *f = it->f;
  
 -  /* If line is already filled, do nothing.  */
 -  if (it->current_x >= it->last_visible_x)
 +  /* If line is already filled, do nothing.  Non window-system frames
 +     get a grace of one more ``pixel'' because their characters are
 +     1-``pixel'' wide, so they hit the equality too early.  This grace
 +     is needed only for R2L rows that are not continued, to produce
 +     one extra blank where we could display the cursor.  */
 +  if (it->current_x >= it->last_visible_x
 +      + (!FRAME_WINDOW_P (f)
 +       && it->glyph_row->reversed_p
 +       && !it->glyph_row->continued_p))
      return;
  
    /* Face extension extends the background and box of IT->face_id
       to the end of the line.  If the background equals the background
       of the frame, we don't have to do anything.  */
    if (it->face_before_selective_p)
 -    face = FACE_FROM_ID (it->f, it->saved_face_id);
 +    face = FACE_FROM_ID (f, it->saved_face_id);
    else
      face = FACE_FROM_ID (f, it->face_id);
  
        && it->glyph_row->displays_text_p
        && face->box == FACE_NO_BOX
        && face->background == FRAME_BACKGROUND_PIXEL (f)
 -      && !face->stipple)
 +      && !face->stipple
 +      && !it->glyph_row->reversed_p)
      return;
  
    /* Set the glyph row flag indicating that the face of the last glyph
          it->glyph_row->glyphs[TEXT_AREA][0].face_id = it->face_id;
          it->glyph_row->used[TEXT_AREA] = 1;
        }
 +#ifdef HAVE_WINDOW_SYSTEM
 +      if (it->glyph_row->reversed_p)
 +      {
 +        /* Prepend a stretch glyph to the row, such that the
 +           rightmost glyph will be drawn flushed all the way to the
 +           right margin of the window.  The stretch glyph that will
 +           occupy the empty space, if any, to the left of the
 +           glyphs.  */
 +        struct font *font = face->font ? face->font : FRAME_FONT (f);
 +        struct glyph *row_start = it->glyph_row->glyphs[TEXT_AREA];
 +        struct glyph *row_end = row_start + it->glyph_row->used[TEXT_AREA];
 +        struct glyph *g;
 +        int row_width, stretch_ascent, stretch_width;
 +        struct text_pos saved_pos;
 +        int saved_face_id, saved_avoid_cursor;
 +
 +        for (row_width = 0, g = row_start; g < row_end; g++)
 +          row_width += g->pixel_width;
 +        stretch_width = window_box_width (it->w, TEXT_AREA) - row_width;
 +        if (stretch_width > 0)
 +          {
 +            stretch_ascent =
 +              (((it->ascent + it->descent)
 +                * FONT_BASE (font)) / FONT_HEIGHT (font));
 +            saved_pos = it->position;
 +            memset (&it->position, 0, sizeof it->position);
 +            saved_avoid_cursor = it->avoid_cursor_p;
 +            it->avoid_cursor_p = 1;
 +            saved_face_id = it->face_id;
 +            /* The last row's stretch glyph should get the default
 +               face, to avoid painting the rest of the window with
 +               the region face, if the region ends at ZV.  */
 +            if (it->glyph_row->ends_at_zv_p)
 +              it->face_id = DEFAULT_FACE_ID;
 +            else
 +              it->face_id = face->id;
 +            append_stretch_glyph (it, make_number (0), stretch_width,
 +                                  it->ascent + it->descent, stretch_ascent);
 +            it->position = saved_pos;
 +            it->avoid_cursor_p = saved_avoid_cursor;
 +            it->face_id = saved_face_id;
 +          }
 +      }
 +#endif        /* HAVE_WINDOW_SYSTEM */
      }
    else
      {
        saved_pos = it->position;
  
        it->what = IT_CHARACTER;
 -      bzero (&it->position, sizeof it->position);
 +      memset (&it->position, 0, sizeof it->position);
        it->object = make_number (0);
        it->c = it->char_to_display = ' ';
        it->len = 1;
 -      it->face_id = face->id;
 +      /* The last row's blank glyphs should get the default face, to
 +       avoid painting the rest of the window with the region face,
 +       if the region ends at ZV.  */
 +      if (it->glyph_row->ends_at_zv_p)
 +      it->face_id = DEFAULT_FACE_ID;
 +      else
 +      it->face_id = face->id;
  
        PRODUCE_GLYPHS (it);
  
     trailing whitespace.  */
  
  static int
 -trailing_whitespace_p (charpos)
 -     int charpos;
 +trailing_whitespace_p (EMACS_INT charpos)
  {
 -  int bytepos = CHAR_TO_BYTE (charpos);
 +  EMACS_INT bytepos = CHAR_TO_BYTE (charpos);
    int c = 0;
  
    while (bytepos < ZV_BYTE
  /* Highlight trailing whitespace, if any, in ROW.  */
  
  void
 -highlight_trailing_whitespace (f, row)
 -     struct frame *f;
 -     struct glyph_row *row;
 +highlight_trailing_whitespace (struct frame *f, struct glyph_row *row)
  {
    int used = row->used[TEXT_AREA];
  
        struct glyph *start = row->glyphs[TEXT_AREA];
        struct glyph *glyph = start + used - 1;
  
 +      if (row->reversed_p)
 +      {
 +        /* Right-to-left rows need to be processed in the opposite
 +           direction, so swap the edge pointers. */
 +        glyph = start;
 +        start = row->glyphs[TEXT_AREA] + used - 1;
 +      }
 +
        /* Skip over glyphs inserted to display the cursor at the
         end of a line, for extending the face of the last glyph
         to the end of the line on terminals, and for truncation
         and continuation glyphs.  */
 -      while (glyph >= start
 -           && glyph->type == CHAR_GLYPH
 -           && INTEGERP (glyph->object))
 -      --glyph;
 +      if (!row->reversed_p)
 +      {
 +        while (glyph >= start
 +               && glyph->type == CHAR_GLYPH
 +               && INTEGERP (glyph->object))
 +          --glyph;
 +      }
 +      else
 +      {
 +        while (glyph <= start
 +               && glyph->type == CHAR_GLYPH
 +               && INTEGERP (glyph->object))
 +          ++glyph;
 +      }
  
        /* If last glyph is a space or stretch, and it's trailing
         whitespace, set the face of all trailing whitespace glyphs in
         IT->glyph_row to `trailing-whitespace'.  */
 -      if (glyph >= start
 +      if ((row->reversed_p ? glyph <= start : glyph >= start)
          && BUFFERP (glyph->object)
          && (glyph->type == STRETCH_GLYPH
              || (glyph->type == CHAR_GLYPH
          if (face_id < 0)
            return;
  
 -        while (glyph >= start
 -               && BUFFERP (glyph->object)
 -               && (glyph->type == STRETCH_GLYPH
 -                   || (glyph->type == CHAR_GLYPH
 -                       && glyph->u.ch == ' ')))
 -          (glyph--)->face_id = face_id;
 +        if (!row->reversed_p)
 +          {
 +            while (glyph >= start
 +                   && BUFFERP (glyph->object)
 +                   && (glyph->type == STRETCH_GLYPH
 +                       || (glyph->type == CHAR_GLYPH
 +                           && glyph->u.ch == ' ')))
 +              (glyph--)->face_id = face_id;
 +          }
 +        else
 +          {
 +            while (glyph <= start
 +                   && BUFFERP (glyph->object)
 +                   && (glyph->type == STRETCH_GLYPH
 +                       || (glyph->type == CHAR_GLYPH
 +                           && glyph->u.ch == ' ')))
 +              (glyph++)->face_id = face_id;
 +          }
        }
      }
  }
     used to hold the cursor.  */
  
  static int
 -cursor_row_p (w, row)
 -     struct window *w;
 -     struct glyph_row *row;
 +cursor_row_p (struct window *w, struct glyph_row *row)
  {
    int cursor_row_p = 1;
  
 -  if (PT == MATRIX_ROW_END_CHARPOS (row))
 +  if (PT == CHARPOS (row->end.pos))
      {
        /* Suppose the row ends on a string.
         Unless the row is continued, that means it ends on a newline
        {
          /* If the row ends in middle of a real character,
             and the line is continued, we want the cursor here.
 -           That's because MATRIX_ROW_END_CHARPOS would equal
 +           That's because CHARPOS (ROW->end.pos) would equal
             PT if PT is before the character.  */
          if (!row->ends_in_ellipsis_p)
            cursor_row_p = row->continued_p;
          else
          /* If the row ends in an ellipsis, then
 -           MATRIX_ROW_END_CHARPOS will equal point after the invisible text.
 -           We want that position to be displayed after the ellipsis.  */
 +           CHARPOS (ROW->end.pos) will equal point after the
 +           invisible text.  We want that position to be displayed
 +           after the ellipsis.  */
            cursor_row_p = 0;
        }
        /* If the row ends at ZV, display the cursor at the end of that
@@@ -17277,7 -16378,9 +17277,7 @@@ push_display_prop (struct it *it, Lisp_
  /* Return the character-property PROP at the current position in IT.  */
  
  static Lisp_Object
 -get_it_property (it, prop)
 -     struct it *it;
 -     Lisp_Object prop;
 +get_it_property (struct it *it, Lisp_Object prop)
  {
    Lisp_Object position;
  
@@@ -17321,110 -16424,6 +17321,110 @@@ handle_line_prefix (struct it *it
  
  \f
  
 +/* Remove N glyphs at the start of a reversed IT->glyph_row.  Called
 +   only for R2L lines from display_line, when it decides that too many
 +   glyphs were produced by PRODUCE_GLYPHS, and the line needs to be
 +   continued.  */
 +static void
 +unproduce_glyphs (struct it *it, int n)
 +{
 +  struct glyph *glyph, *end;
 +
 +  xassert (it->glyph_row);
 +  xassert (it->glyph_row->reversed_p);
 +  xassert (it->area == TEXT_AREA);
 +  xassert (n <= it->glyph_row->used[TEXT_AREA]);
 +
 +  if (n > it->glyph_row->used[TEXT_AREA])
 +    n = it->glyph_row->used[TEXT_AREA];
 +  glyph = it->glyph_row->glyphs[TEXT_AREA] + n;
 +  end = it->glyph_row->glyphs[TEXT_AREA] + it->glyph_row->used[TEXT_AREA];
 +  for ( ; glyph < end; glyph++)
 +    glyph[-n] = *glyph;
 +}
 +
 +/* Find the positions in a bidi-reordered ROW to serve as ROW->minpos
 +   and ROW->maxpos.  */
 +static void
 +find_row_edges (struct it *it, struct glyph_row *row,
 +              EMACS_INT min_pos, EMACS_INT min_bpos,
 +              EMACS_INT max_pos, EMACS_INT max_bpos)
 +{
 +  /* FIXME: Revisit this when glyph ``spilling'' in continuation
 +     lines' rows is implemented for bidi-reordered rows.  */
 +
 +  /* ROW->minpos is the value of min_pos, the minimal buffer position
 +     we have in ROW.  */
 +  if (min_pos <= ZV)
 +    SET_TEXT_POS (row->minpos, min_pos, min_bpos);
 +  else
 +    {
 +      /* We didn't find _any_ valid buffer positions in any of the
 +       glyphs, so we must trust the iterator's computed
 +       positions.  */
 +      row->minpos = row->start.pos;
 +      max_pos = CHARPOS (it->current.pos);
 +      max_bpos = BYTEPOS (it->current.pos);
 +    }
 +
 +  if (!max_pos)
 +    abort ();
 +
 +  /* Here are the various use-cases for ending the row, and the
 +     corresponding values for ROW->maxpos:
 +
 +     Line ends in a newline from buffer       eol_pos + 1
 +     Line is continued from buffer            max_pos + 1
 +     Line is truncated on right               it->current.pos
 +     Line ends in a newline from string       max_pos
 +     Line is continued from string            max_pos
 +     Line is continued from display vector    max_pos
 +     Line is entirely from a string           min_pos == max_pos
 +     Line is entirely from a display vector   min_pos == max_pos
 +     Line that ends at ZV                     ZV
 +
 +     If you discover other use-cases, please add them here as
 +     appropriate.  */
 +  if (row->ends_at_zv_p)
 +    row->maxpos = it->current.pos;
 +  else if (row->used[TEXT_AREA])
 +    {
 +      if (row->ends_in_newline_from_string_p)
 +      SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
 +      else if (CHARPOS (it->eol_pos) > 0)
 +      SET_TEXT_POS (row->maxpos,
 +                    CHARPOS (it->eol_pos) + 1, BYTEPOS (it->eol_pos) + 1);
 +      else if (row->continued_p)
 +      {
 +        /* If max_pos is different from IT's current position, it
 +           means IT->method does not belong to the display element
 +           at max_pos.  However, it also means that the display
 +           element at max_pos was displayed in its entirety on this
 +           line, which is equivalent to saying that the next line
 +           starts at the next buffer position.  */
 +        if (IT_CHARPOS (*it) == max_pos && it->method != GET_FROM_BUFFER)
 +          SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
 +        else
 +          {
 +            INC_BOTH (max_pos, max_bpos);
 +            SET_TEXT_POS (row->maxpos, max_pos, max_bpos);
 +          }
 +      }
 +      else if (row->truncated_on_right_p)
 +      /* display_line already called reseat_at_next_visible_line_start,
 +         which puts the iterator at the beginning of the next line, in
 +         the logical order. */
 +      row->maxpos = it->current.pos;
 +      else if (max_pos == min_pos && it->method != GET_FROM_BUFFER)
 +      /* A line that is entirely from a string/image/stretch...  */
 +      row->maxpos = row->minpos;
 +      else
 +      abort ();
 +    }
 +  else
 +    row->maxpos = it->current.pos;
 +}
 +
  /* Construct the glyph row IT->glyph_row in the desired matrix of
     IT->w from text at the current position of IT.  See dispextern.h
     for an overview of struct it.  Value is non-zero if
     only.  */
  
  static int
 -display_line (it)
 -     struct it *it;
 +display_line (struct it *it)
  {
    struct glyph_row *row = it->glyph_row;
    Lisp_Object overlay_arrow_string;
    int wrap_row_used = -1, wrap_row_ascent, wrap_row_height;
    int wrap_row_phys_ascent, wrap_row_phys_height;
    int wrap_row_extra_line_spacing;
 +  EMACS_INT wrap_row_min_pos, wrap_row_min_bpos;
 +  EMACS_INT wrap_row_max_pos, wrap_row_max_bpos;
 +  int cvpos;
 +  EMACS_INT min_pos = ZV + 1, min_bpos, max_pos = 0, max_bpos;
  
    /* We always start displaying at hpos zero even if hscrolled.  */
    xassert (it->hpos == 0 && it->current_x == 0);
    row->phys_height = it->max_phys_ascent + it->max_phys_descent;
    row->extra_line_spacing = it->max_extra_line_spacing;
  
 +/* Utility macro to record max and min buffer positions seen until now.  */
 +#define RECORD_MAX_MIN_POS(IT)                                        \
 +  do                                                          \
 +    {                                                         \
 +      if (IT_CHARPOS (*(IT)) < min_pos)                               \
 +      {                                                       \
 +        min_pos = IT_CHARPOS (*(IT));                         \
 +        min_bpos = IT_BYTEPOS (*(IT));                        \
 +      }                                                       \
 +      if (IT_CHARPOS (*(IT)) > max_pos)                               \
 +      {                                                       \
 +        max_pos = IT_CHARPOS (*(IT));                         \
 +        max_bpos = IT_BYTEPOS (*(IT));                        \
 +      }                                                       \
 +    }                                                         \
 +  while (0)
 +
    /* Loop generating characters.  The loop is left with IT on the next
       character to display.  */
    while (1)
  
          it->continuation_lines_width = 0;
          row->ends_at_zv_p = 1;
 +        /* A row that displays right-to-left text must always have
 +           its last face extended all the way to the end of line,
 +           even if this row ends in ZV, because we still write to
 +           the screen left to right.  */
 +        if (row->reversed_p)
 +          extend_face_to_end_of_line (it);
          break;
        }
  
                  wrap_row_phys_ascent = row->phys_ascent;
                  wrap_row_phys_height = row->phys_height;
                  wrap_row_extra_line_spacing = row->extra_line_spacing;
 +                wrap_row_min_pos = min_pos;
 +                wrap_row_min_bpos = min_bpos;
 +                wrap_row_max_pos = max_pos;
 +                wrap_row_max_bpos = max_bpos;
                  may_wrap = 0;
                }
            }
                                         it->max_extra_line_spacing);
          if (it->current_x - it->pixel_width < it->first_visible_x)
            row->x = x - it->first_visible_x;
 +        /* Record the maximum and minimum buffer positions seen so
 +           far in glyphs that will be displayed by this row.  */
 +        if (it->bidi_p)
 +          RECORD_MAX_MIN_POS (it);
        }
        else
        {
                      it->current_x = new_x;
                      it->continuation_lines_width += new_x;
                      ++it->hpos;
 +                    /* Record the maximum and minimum buffer
 +                       positions seen so far in glyphs that will be
 +                       displayed by this row.  */
 +                    if (it->bidi_p)
 +                      RECORD_MAX_MIN_POS (it);
                      if (i == nglyphs - 1)
                        {
                          /* If line-wrap is on, check if a previous
                      /* A padding glyph that doesn't fit on this line.
                         This means the whole character doesn't fit
                         on the line.  */
 +                    if (row->reversed_p)
 +                      unproduce_glyphs (it, row->used[TEXT_AREA]
 +                                             - n_glyphs_before);
                      row->used[TEXT_AREA] = n_glyphs_before;
  
                      /* Fill the rest of the row with continuation
                  else if (wrap_row_used > 0)
                    {
                    back_to_wrap:
 +                    if (row->reversed_p)
 +                      unproduce_glyphs (it,
 +                                        row->used[TEXT_AREA] - wrap_row_used);
                      *it = wrap_it;
                      it->continuation_lines_width += wrap_x;
                      row->used[TEXT_AREA] = wrap_row_used;
                      row->phys_ascent = wrap_row_phys_ascent;
                      row->phys_height = wrap_row_phys_height;
                      row->extra_line_spacing = wrap_row_extra_line_spacing;
 +                    min_pos = wrap_row_min_pos;
 +                    min_bpos = wrap_row_min_bpos;
 +                    max_pos = wrap_row_max_pos;
 +                    max_bpos = wrap_row_max_bpos;
                      row->continued_p = 1;
                      row->ends_at_zv_p = 0;
                      row->exact_window_width_line_p = 0;
                      /* Something other than a TAB that draws past
                         the right edge of the window.  Restore
                         positions to values before the element.  */
 +                    if (row->reversed_p)
 +                      unproduce_glyphs (it, row->used[TEXT_AREA]
 +                                             - (n_glyphs_before + i));
                      row->used[TEXT_AREA] = n_glyphs_before + i;
  
                      /* Display continuation glyphs.  */
                  /* Increment number of glyphs actually displayed.  */
                  ++it->hpos;
  
 +                /* Record the maximum and minimum buffer positions
 +                   seen so far in glyphs that will be displayed by
 +                   this row.  */
 +                if (it->bidi_p)
 +                  RECORD_MAX_MIN_POS (it);
 +
                  if (x < it->first_visible_x)
                    /* Glyph is partially visible, i.e. row starts at
                       negative X position.  */
          if (used_before == 0)
            row->glyphs[TEXT_AREA]->charpos = CHARPOS (it->position);
  
 +        /* Record the position of the newline, for use in
 +           find_row_edges.  */
 +        it->eol_pos = it->current.pos;
 +
          /* Consume the line end.  This skips over invisible lines.  */
          set_iterator_to_next (it, 1);
          it->continuation_lines_width = 0;
            {
              int i, n;
  
 -            for (i = row->used[TEXT_AREA] - 1; i > 0; --i)
 -              if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][i]))
 -                break;
 +            if (!row->reversed_p)
 +              {
 +                for (i = row->used[TEXT_AREA] - 1; i > 0; --i)
 +                  if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][i]))
 +                    break;
 +              }
 +            else
 +              {
 +                for (i = 0; i < row->used[TEXT_AREA]; i++)
 +                  if (!CHAR_GLYPH_PADDING_P (row->glyphs[TEXT_AREA][i]))
 +                    break;
 +                /* Remove any padding glyphs at the front of ROW, to
 +                   make room for the truncation glyphs we will be
 +                   adding below.  The loop below always inserts at
 +                   least one truncation glyph, so also remove the
 +                   last glyph added to ROW.  */
 +                unproduce_glyphs (it, i + 1);
 +                /* Adjust i for the loop below.  */
 +                i = row->used[TEXT_AREA] - (i + 1);
 +              }
  
              for (n = row->used[TEXT_AREA]; i < n; ++i)
                {
    /* If line is not empty and hscrolled, maybe insert truncation glyphs
       at the left window margin.  */
    if (it->first_visible_x
 -      && IT_CHARPOS (*it) != MATRIX_ROW_START_CHARPOS (row))
 +      && IT_CHARPOS (*it) != CHARPOS (row->start.pos))
      {
        if (!FRAME_WINDOW_P (it->f))
        insert_left_trunc_glyphs (it);
        row->truncated_on_left_p = 1;
      }
  
 +  /* Remember the position at which this line ends.
 +
 +     BIDI Note: any code that needs MATRIX_ROW_START/END_CHARPOS
 +     cannot be before the call to find_row_edges below, since that is
 +     where these positions are determined. */
 +  row->end = it->current;
 +  if (!it->bidi_p)
 +    {
 +      row->minpos = row->start.pos;
 +      row->maxpos = row->end.pos;
 +    }
 +  else
 +    {
 +      /* ROW->minpos and ROW->maxpos must be the smallest and
 +       `1 + the largest' buffer positions in ROW.  But if ROW was
 +       bidi-reordered, these two positions can be anywhere in the
 +       row, so we must determine them now.  */
 +      find_row_edges (it, row, min_pos, min_bpos, max_pos, max_bpos);
 +    }
 +
    /* If the start of this line is the overlay arrow-position, then
       mark this glyph row as the one containing the overlay arrow.
       This is clearly a mess with variable size fonts.  It would be
    /* Compute pixel dimensions of this line.  */
    compute_line_metrics (it);
  
 -  /* Remember the position at which this line ends.  */
 -  row->end = it->current;
 -
    /* Record whether this row ends inside an ellipsis.  */
    row->ends_in_ellipsis_p
      = (it->method == GET_FROM_DISPLAY_VECTOR
    it->right_user_fringe_face_id = 0;
  
    /* Maybe set the cursor.  */
 -  if (it->w->cursor.vpos < 0
 +  cvpos = it->w->cursor.vpos;
 +  if ((cvpos < 0
 +       /* In bidi-reordered rows, keep checking for proper cursor
 +        position even if one has been found already, because buffer
 +        positions in such rows change non-linearly with ROW->VPOS,
 +        when a line is continued.  One exception: when we are at ZV,
 +        display cursor on the first suitable glyph row, since all
 +        the empty rows after that also have their position set to ZV.  */
 +       /* FIXME: Revisit this when glyph ``spilling'' in continuation
 +        lines' rows is implemented for bidi-reordered rows.  */
 +       || (it->bidi_p
 +         && !MATRIX_ROW (it->w->desired_matrix, cvpos)->ends_at_zv_p))
        && PT >= MATRIX_ROW_START_CHARPOS (row)
        && PT <= MATRIX_ROW_END_CHARPOS (row)
        && cursor_row_p (it->w, row))
       row to be used.  */
    it->current_x = it->hpos = 0;
    it->current_y += row->height;
 +  SET_TEXT_POS (it->eol_pos, 0, 0);
    ++it->vpos;
    ++it->glyph_row;
 -  it->start = it->current;
 +  /* The next row should by default use the same value of the
 +     reversed_p flag as this one.  set_iterator_to_next decides when
 +     it's a new paragraph, and PRODUCE_GLYPHS recomputes the value of
 +     the flag accordingly.  */
 +  if (it->glyph_row < MATRIX_BOTTOM_TEXT_ROW (it->w->desired_matrix, it->w))
 +    it->glyph_row->reversed_p = row->reversed_p;
 +  it->start = row->end;
    return row->displays_text_p;
 +
 +#undef RECORD_MAX_MIN_POS
 +}
 +
 +DEFUN ("current-bidi-paragraph-direction", Fcurrent_bidi_paragraph_direction,
 +       Scurrent_bidi_paragraph_direction, 0, 1, 0,
 +       doc: /* Return paragraph direction at point in BUFFER.
 +Value is either `left-to-right' or `right-to-left'.
 +If BUFFER is omitted or nil, it defaults to the current buffer.
 +
 +Paragraph direction determines how the text in the paragraph is displayed.
 +In left-to-right paragraphs, text begins at the left margin of the window
 +and the reading direction is generally left to right.  In right-to-left
 +paragraphs, text begins at the right margin and is read from right to left.
 +
 +See also `bidi-paragraph-direction'.  */)
 +  (Lisp_Object buffer)
 +{
 +  struct buffer *buf;
 +  struct buffer *old;
 +
 +  if (NILP (buffer))
 +    buf = current_buffer;
 +  else
 +    {
 +      CHECK_BUFFER (buffer);
 +      buf = XBUFFER (buffer);
 +      old = current_buffer;
 +    }
 +
 +  if (NILP (buf->bidi_display_reordering))
 +    return Qleft_to_right;
 +  else if (!NILP (buf->bidi_paragraph_direction))
 +    return buf->bidi_paragraph_direction;
 +  else
 +    {
 +      /* Determine the direction from buffer text.  We could try to
 +       use current_matrix if it is up to date, but this seems fast
 +       enough as it is.  */
 +      struct bidi_it itb;
 +      EMACS_INT pos = BUF_PT (buf);
 +      EMACS_INT bytepos = BUF_PT_BYTE (buf);
 +      int c;
 +
 +      if (buf != current_buffer)
 +      set_buffer_temp (buf);
 +      /* bidi_paragraph_init finds the base direction of the paragraph
 +       by searching forward from paragraph start.  We need the base
 +       direction of the current or _previous_ paragraph, so we need
 +       to make sure we are within that paragraph.  To that end, find
 +       the previous non-empty line.  */
 +      if (pos >= ZV && pos > BEGV)
 +      {
 +        pos--;
 +        bytepos = CHAR_TO_BYTE (pos);
 +      }
 +      while ((c = FETCH_BYTE (bytepos)) == '\n'
 +           || c == ' ' || c == '\t' || c == '\f')
 +      {
 +        if (bytepos <= BEGV_BYTE)
 +          break;
 +        bytepos--;
 +        pos--;
 +      }
 +      while (!CHAR_HEAD_P (FETCH_BYTE (bytepos)))
 +      bytepos--;
 +      itb.charpos = pos;
 +      itb.bytepos = bytepos;
 +      itb.first_elt = 1;
 +      itb.separator_limit = -1;
 +      itb.paragraph_dir = NEUTRAL_DIR;
 +
 +      bidi_paragraph_init (NEUTRAL_DIR, &itb, 1);
 +      if (buf != current_buffer)
 +      set_buffer_temp (old);
 +      switch (itb.paragraph_dir)
 +      {
 +      case L2R:
 +        return Qleft_to_right;
 +        break;
 +      case R2L:
 +        return Qright_to_left;
 +        break;
 +      default:
 +        abort ();
 +      }
 +    }
  }
  
  
     for the menu bar.  */
  
  static void
 -display_menu_bar (w)
 -     struct window *w;
 +display_menu_bar (struct window *w)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct it it;
     the number of windows whose mode lines were redisplayed.  */
  
  static int
 -redisplay_mode_lines (window, force)
 -     Lisp_Object window;
 -     int force;
 +redisplay_mode_lines (Lisp_Object window, int force)
  {
    int nwindows = 0;
  
     sum number of mode lines and header lines displayed.  */
  
  static int
 -display_mode_lines (w)
 -     struct window *w;
 +display_mode_lines (struct window *w)
  {
    Lisp_Object old_selected_window, old_selected_frame;
    int n = 0;
     displayed.  */
  
  static int
 -display_mode_line (w, face_id, format)
 -     struct window *w;
 -     enum face_id face_id;
 -     Lisp_Object format;
 +display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format)
  {
    struct it it;
    struct face *face;
     Return the updated list.  */
  
  static Lisp_Object
 -move_elt_to_front (elt, list)
 -     Lisp_Object elt, list;
 +move_elt_to_front (Lisp_Object elt, Lisp_Object list)
  {
    register Lisp_Object tail, prev;
    register Lisp_Object tem;
     `store_mode_line_string', or `display_string'.  */
  
  static int
 -display_mode_element (it, depth, field_width, precision, elt, props, risky)
 -     struct it *it;
 -     int depth;
 -     int field_width, precision;
 -     Lisp_Object elt, props;
 -     int risky;
 +display_mode_element (struct it *it, int depth, int field_width, int precision,
 +                    Lisp_Object elt, Lisp_Object props, int risky)
  {
    int n = 0, field, prec;
    int literal = 0;
        {
        /* A string: output it and check for %-constructs within it.  */
        unsigned char c;
 -      int offset = 0;
 +      EMACS_INT offset = 0;
  
        if (SCHARS (elt) > 0
            && (!NILP (props) || risky))
               && (mode_line_target != MODE_LINE_DISPLAY
                   || it->current_x < it->last_visible_x))
          {
 -          int last_offset = offset;
 +          EMACS_INT last_offset = offset;
  
            /* Advance to end of string or next format specifier.  */
            while ((c = SREF (elt, offset++)) != '\0' && c != '%')
  
            if (offset - 1 != last_offset)
              {
 -              int nchars, nbytes;
 +              EMACS_INT nchars, nbytes;
  
                /* Output to end of string or up to '%'.  Field width
                   is length of string.  Don't output more than
                    break;
                  case MODE_LINE_STRING:
                    {
 -                    int bytepos = last_offset;
 -                    int charpos = string_byte_to_char (elt, bytepos);
 -                    int endpos = (precision <= 0
 -                                  ? string_byte_to_char (elt, offset)
 -                                  : charpos + nchars);
 +                    EMACS_INT bytepos = last_offset;
 +                    EMACS_INT charpos = string_byte_to_char (elt, bytepos);
 +                    EMACS_INT endpos = (precision <= 0
 +                                        ? string_byte_to_char (elt, offset)
 +                                        : charpos + nchars);
  
                      n += store_mode_line_string (NULL,
                                                   Fsubstring (elt, make_number (charpos),
                    break;
                  case MODE_LINE_DISPLAY:
                    {
 -                    int bytepos = last_offset;
 -                    int charpos = string_byte_to_char (elt, bytepos);
 +                    EMACS_INT bytepos = last_offset;
 +                    EMACS_INT charpos = string_byte_to_char (elt, bytepos);
  
                      if (precision <= 0)
                        nchars = string_byte_to_char (elt, offset) - charpos;
              }
            else /* c == '%' */
              {
 -              int percent_position = offset;
 +              EMACS_INT percent_position = offset;
  
                /* Get the specified minimum width.  Zero means
                   don't pad.  */
                else if (c != 0)
                  {
                    int multibyte;
 -                  int bytepos, charpos;
 -                  unsigned char *spec;
 +                  EMACS_INT bytepos, charpos;
 +                  const unsigned char *spec;
                    Lisp_Object string;
  
                    bytepos = percent_position;
   */
  
  static int
 -store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props)
 -     char *string;
 -     Lisp_Object lisp_string;
 -     int copy_string;
 -     int field_width;
 -     int precision;
 -     Lisp_Object props;
 +store_mode_line_string (const char *string, Lisp_Object lisp_string, int copy_string,
 +                      int field_width, int precision, Lisp_Object props)
  {
 -  int len;
 +  EMACS_INT len;
    int n = 0;
  
    if (string != NULL)
@@@ -19068,23 -17883,27 +19068,27 @@@ DEFUN ("format-mode-line", Fformat_mode
  First arg FORMAT specifies the mode line format (see `mode-line-format'
  for details) to use.
  
- Optional second arg FACE specifies the face property to put
- on all characters for which no face is specified.
- The value t means whatever face the window's mode line currently uses
- \(either `mode-line' or `mode-line-inactive', depending).
- A value of nil means the default is no face property.
- If FACE is an integer, the value string has no text properties.
+ By default, the format is evaluated for the currently selected window.
+ Optional second arg FACE specifies the face property to put on all
+ characters for which no face is specified.  The value nil means the
+ default face.  The value t means whatever face the window's mode line
+ currently uses (either `mode-line' or `mode-line-inactive',
+ depending on whether the window is the selected window or not).
+ An integer value means the value string has no text
+ properties.
  
  Optional third and fourth args WINDOW and BUFFER specify the window
  and buffer to use as the context for the formatting (defaults
- are the selected window and the window's buffer).  */)
-   (Lisp_Object format, Lisp_Object face, Lisp_Object window, Lisp_Object buffer)
+ are the selected window and the WINDOW's buffer).  */)
 -     (format, face, window, buffer)
 -     Lisp_Object format, face, window, buffer;
++     (Lisp_Object format, Lisp_Object face,
++      Lisp_Object window, Lisp_Object buffer)
  {
    struct it it;
    int len;
    struct window *w;
    struct buffer *old_buffer = NULL;
-   int face_id = -1;
+   int face_id;
    int no_props = INTEGERP (face);
    int count = SPECPDL_INDEX ();
    Lisp_Object str;
    if (no_props)
      face = Qnil;
  
-   if (!NILP (face))
-     {
-       if (EQ (face, Qt))
-       face = (EQ (window, selected_window) ? Qmode_line : Qmode_line_inactive);
-       face_id = lookup_named_face (XFRAME (WINDOW_FRAME (w)), face, 0);
-     }
-   if (face_id < 0)
-     face_id = DEFAULT_FACE_ID;
+   face_id = (NILP (face) || EQ (face, Qdefault)) ? DEFAULT_FACE_ID
+     : EQ (face, Qt) ? (EQ (window, selected_window)
+                      ? MODE_LINE_FACE_ID : MODE_LINE_INACTIVE_FACE_ID)
+     : EQ (face, Qmode_line) ? MODE_LINE_FACE_ID
+     : EQ (face, Qmode_line_inactive) ? MODE_LINE_INACTIVE_FACE_ID
+     : EQ (face, Qheader_line) ? HEADER_LINE_FACE_ID
+     : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
+     : DEFAULT_FACE_ID;
  
    if (XBUFFER (buffer) != current_buffer)
      old_buffer = current_buffer;
     the positive integer D to BUF using a minimal field width WIDTH.  */
  
  static void
 -pint2str (buf, width, d)
 -     register char *buf;
 -     register int width;
 -     register int d;
 +pint2str (register char *buf, register int width, register int d)
  {
    register char *p = buf;
  
@@@ -19217,7 -18038,10 +19220,7 @@@ static const char power_letter[] 
    };
  
  static void
 -pint2hrstr (buf, width, d)
 -     char *buf;
 -     int width;
 -     int d;
 +pint2hrstr (char *buf, int width, int d)
  {
    /* We aim to represent the nonnegative integer D as
       QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
  static unsigned char invalid_eol_type[] = "(*invalid*)";
  
  static char *
 -decode_mode_spec_coding (coding_system, buf, eol_flag)
 -     Lisp_Object coding_system;
 -     register char *buf;
 -     int eol_flag;
 +decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_flag)
  {
    Lisp_Object val;
    int multibyte = !NILP (current_buffer->enable_multibyte_characters);
          eol_str = invalid_eol_type;
          eol_str_len = sizeof (invalid_eol_type) - 1;
        }
 -      bcopy (eol_str, buf, eol_str_len);
 +      memcpy (buf, eol_str, eol_str_len);
        buf += eol_str_len;
      }
  
  
  static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------";
  
 -static char *
 -decode_mode_spec (w, c, field_width, precision, string)
 -     struct window *w;
 -     register int c;
 -     int field_width, precision;
 -     Lisp_Object *string;
 +static const char *
 +decode_mode_spec (struct window *w, register int c, int field_width,
 +                int precision, Lisp_Object *string)
  {
    Lisp_Object obj;
    struct frame *f = XFRAME (WINDOW_FRAME (w));
  
      case 'i':
        {
 -      int size = ZV - BEGV;
 +      EMACS_INT size = ZV - BEGV;
        pint2str (decode_mode_spec_buf, field_width, size);
        return decode_mode_spec_buf;
        }
  
      case 'I':
        {
 -      int size = ZV - BEGV;
 +      EMACS_INT size = ZV - BEGV;
        pint2hrstr (decode_mode_spec_buf, field_width, size);
        return decode_mode_spec_buf;
        }
  
      case 'l':
        {
 -      int startpos, startpos_byte, line, linepos, linepos_byte;
 -      int topline, nlines, junk, height;
 +      EMACS_INT startpos, startpos_byte, line, linepos, linepos_byte;
 +      int topline, nlines, height;
 +      EMACS_INT junk;
  
        /* %c and %l are ignored in `frame-title-format'.  */
        if (mode_line_target == MODE_LINE_TITLE)
        else if (nlines < height + 25 || nlines > height * 3 + 50
                 || linepos == BUF_BEGV (b))
          {
 -          int limit = BUF_BEGV (b);
 -          int limit_byte = BUF_BEGV_BYTE (b);
 -          int position;
 +          EMACS_INT limit = BUF_BEGV (b);
 +          EMACS_INT limit_byte = BUF_BEGV_BYTE (b);
 +          EMACS_INT position;
            int distance = (height * 2 + 30) * line_number_display_limit_width;
  
            if (startpos - distance > limit)
  
      case 'p':
        {
 -      int pos = marker_position (w->start);
 -      int total = BUF_ZV (b) - BUF_BEGV (b);
 +      EMACS_INT pos = marker_position (w->start);
 +      EMACS_INT total = BUF_ZV (b) - BUF_BEGV (b);
  
        if (XFASTINT (w->window_end_pos) <= BUF_Z (b) - BUF_ZV (b))
          {
               so get us a 2-digit number that is close.  */
            if (total == 100)
              total = 99;
 -          sprintf (decode_mode_spec_buf, "%2d%%", total);
 +          sprintf (decode_mode_spec_buf, "%2ld%%", (long)total);
            return decode_mode_spec_buf;
          }
        }
        /* Display percentage of size above the bottom of the screen.  */
      case 'P':
        {
 -      int toppos = marker_position (w->start);
 -      int botpos = BUF_Z (b) - XFASTINT (w->window_end_pos);
 -      int total = BUF_ZV (b) - BUF_BEGV (b);
 +      EMACS_INT toppos = marker_position (w->start);
 +      EMACS_INT botpos = BUF_Z (b) - XFASTINT (w->window_end_pos);
 +      EMACS_INT total = BUF_ZV (b) - BUF_BEGV (b);
  
        if (botpos >= BUF_ZV (b))
          {
            if (total == 100)
              total = 99;
            if (toppos <= BUF_BEGV (b))
 -            sprintf (decode_mode_spec_buf, "Top%2d%%", total);
 +            sprintf (decode_mode_spec_buf, "Top%2ld%%", (long)total);
            else
 -            sprintf (decode_mode_spec_buf, "%2d%%", total);
 +            sprintf (decode_mode_spec_buf, "%2ld%%", (long)total);
            return decode_mode_spec_buf;
          }
        }
        obj = Fget_buffer_process (Fcurrent_buffer ());
        if (NILP (obj))
        return "no process";
 -#ifdef subprocesses
 +#ifndef MSDOS
        obj = Fsymbol_name (Fprocess_status (obj));
  #endif
        break;
     Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT.  */
  
  static int
 -display_count_lines (start, start_byte, limit_byte, count, byte_pos_ptr)
 -     int start, start_byte, limit_byte, count;
 -     int *byte_pos_ptr;
 +display_count_lines (EMACS_INT start, EMACS_INT start_byte,
 +                   EMACS_INT limit_byte, int count,
 +                   EMACS_INT *byte_pos_ptr)
  {
    register unsigned char *cursor;
    unsigned char *base;
     Value is the number of columns displayed.  */
  
  static int
 -display_string (string, lisp_string, face_string, face_string_pos,
 -              start, it, field_width, precision, max_x, multibyte)
 -     unsigned char *string;
 -     Lisp_Object lisp_string;
 -     Lisp_Object face_string;
 -     EMACS_INT face_string_pos;
 -     EMACS_INT start;
 -     struct it *it;
 -     int field_width, precision, max_x;
 -     int multibyte;
 +display_string (const unsigned char *string, Lisp_Object lisp_string, Lisp_Object face_string,
 +              EMACS_INT face_string_pos, EMACS_INT start, struct it *it,
 +              int field_width, int precision, int max_x, int multibyte)
  {
    int hpos_at_start = it->hpos;
    int saved_face_id = it->face_id;
       with index START.  */
    reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, start,
                    precision, field_width, multibyte);
 -  if (string && STRINGP (lisp_string)) 
 +  if (string && STRINGP (lisp_string))
      /* LISP_STRING is the one returned by decode_mode_spec.  We should
         ignore its text properties.  */
      it->stop_charpos = -1;
     and 1 if it's invisible and without an ellipsis.  */
  
  int
 -invisible_p (propval, list)
 -     register Lisp_Object propval;
 -     Lisp_Object list;
 +invisible_p (register Lisp_Object propval, Lisp_Object list)
  {
    register Lisp_Object tail, proptail;
  
@@@ -20193,7 -19031,8 +20196,7 @@@ is checked; or it can be some other val
  value of the `invisible' property of the text of interest.
  The non-nil value returned can be t for truly invisible text or something
  else if the text is replaced by an ellipsis.  */)
 -     (pos_or_prop)
 -     Lisp_Object pos_or_prop;
 +  (Lisp_Object pos_or_prop)
  {
    Lisp_Object prop
      = (NATNUMP (pos_or_prop) || MARKERP (pos_or_prop)
        : - 1)
  
  int
 -calc_pixel_width_or_height (res, it, prop, font, width_p, align_to)
 -     double *res;
 -     struct it *it;
 -     Lisp_Object prop;
 -     struct font *font;
 -     int width_p, *align_to;
 +calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
 +                          struct font *font, int width_p, int *align_to)
  {
    double pixels;
  
@@@ -20497,7 -19340,7 +20500,7 @@@ dump_glyph_string (s
     face-override for drawing S.  */
  
  #ifdef HAVE_NTGUI
 -#define OPTIONAL_HDC(hdc)  hdc,
 +#define OPTIONAL_HDC(hdc)  HDC hdc,
  #define DECLARE_HDC(hdc)   HDC hdc;
  #define ALLOCATE_HDC(hdc, f) hdc = get_frame_dc ((f))
  #define RELEASE_HDC(hdc, f)  release_frame_dc ((f), (hdc))
  #endif
  
  static void
 -init_glyph_string (s, OPTIONAL_HDC (hdc) char2b, w, row, area, start, hl)
 -     struct glyph_string *s;
 -     DECLARE_HDC (hdc)
 -     XChar2b *char2b;
 -     struct window *w;
 -     struct glyph_row *row;
 -     enum glyph_row_area area;
 -     int start;
 -     enum draw_glyphs_face hl;
 +init_glyph_string (struct glyph_string *s,
 +                 OPTIONAL_HDC (hdc)
 +                 XChar2b *char2b, struct window *w, struct glyph_row *row,
 +                 enum glyph_row_area area, int start, enum draw_glyphs_face hl)
  {
 -  bzero (s, sizeof *s);
 +  memset (s, 0, sizeof *s);
    s->w = w;
    s->f = XFRAME (w->frame);
  #ifdef HAVE_NTGUI
     with head *HEAD and tail *TAIL.  Set *HEAD and *TAIL to the result.  */
  
  static INLINE void
 -append_glyph_string_lists (head, tail, h, t)
 -     struct glyph_string **head, **tail;
 -     struct glyph_string *h, *t;
 +append_glyph_string_lists (struct glyph_string **head, struct glyph_string **tail,
 +                         struct glyph_string *h, struct glyph_string *t)
  {
    if (h)
      {
     result.  */
  
  static INLINE void
 -prepend_glyph_string_lists (head, tail, h, t)
 -     struct glyph_string **head, **tail;
 -     struct glyph_string *h, *t;
 +prepend_glyph_string_lists (struct glyph_string **head, struct glyph_string **tail,
 +                          struct glyph_string *h, struct glyph_string *t)
  {
    if (h)
      {
     Set *HEAD and *TAIL to the resulting list.  */
  
  static INLINE void
 -append_glyph_string (head, tail, s)
 -     struct glyph_string **head, **tail;
 -     struct glyph_string *s;
 +append_glyph_string (struct glyph_string **head, struct glyph_string **tail,
 +                   struct glyph_string *s)
  {
    s->next = s->prev = NULL;
    append_glyph_string_lists (head, tail, s, s);
     DISPLAY_P is non-zero.  */
  
  static INLINE struct face *
 -get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p)
 -     struct frame *f;
 -     int c, face_id;
 -     XChar2b *char2b;
 -     int multibyte_p, display_p;
 +get_char_face_and_encoding (struct frame *f, int c, int face_id,
 +                          XChar2b *char2b, int multibyte_p, int display_p)
  {
    struct face *face = FACE_FROM_ID (f, face_id);
  
     a pointer to a realized face that is ready for display.  */
  
  static INLINE struct face *
 -get_glyph_face_and_encoding (f, glyph, char2b, two_byte_p)
 -     struct frame *f;
 -     struct glyph *glyph;
 -     XChar2b *char2b;
 -     int *two_byte_p;
 +get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
 +                           XChar2b *char2b, int *two_byte_p)
  {
    struct face *face;
  
@@@ -20691,8 -19548,10 +20694,8 @@@ get_char_glyph_code (int c, struct fon
     Value is the index of a component not in S.  */
  
  static int
 -fill_composite_glyph_string (s, base_face, overlaps)
 -     struct glyph_string *s;
 -     struct face *base_face;
 -     int overlaps;
 +fill_composite_glyph_string (struct glyph_string *s, struct face *base_face,
 +                           int overlaps)
  {
    int i;
    /* For all glyphs of this composition, starting at the offset
  }
  
  static int
 -fill_gstring_glyph_string (s, face_id, start, end, overlaps)
 -     struct glyph_string *s;
 -     int face_id;
 -     int start, end, overlaps;
 +fill_gstring_glyph_string (struct glyph_string *s, int face_id,
 +                         int start, int end, int overlaps)
  {
    struct glyph *glyph, *last;
    Lisp_Object lgstring;
    glyph = s->row->glyphs[s->area] + start;
    last = s->row->glyphs[s->area] + end;
    s->cmp_id = glyph->u.cmp.id;
 -  s->cmp_from = glyph->u.cmp.from;
 -  s->cmp_to = glyph->u.cmp.to + 1;
 +  s->cmp_from = glyph->slice.cmp.from;
 +  s->cmp_to = glyph->slice.cmp.to + 1;
    s->face = FACE_FROM_ID (s->f, face_id);
    lgstring = composition_gstring_from_id (s->cmp_id);
    s->font = XFONT_OBJECT (LGSTRING_FONT (lgstring));
    while (glyph < last
         && glyph->u.cmp.automatic
         && glyph->u.cmp.id == s->cmp_id
 -       && s->cmp_to == glyph->u.cmp.from)
 -    s->cmp_to = (glyph++)->u.cmp.to + 1;
 +       && s->cmp_to == glyph->slice.cmp.from)
 +    s->cmp_to = (glyph++)->slice.cmp.to + 1;
  
    for (i = s->cmp_from; i < s->cmp_to; i++)
      {
  }
  
  
 +/* Fill glyph string S from a sequence glyphs for glyphless characters.
 +   See the comment of fill_glyph_string for arguments.
 +   Value is the index of the first glyph not in S.  */
 +
 +
 +static int
 +fill_glyphless_glyph_string (struct glyph_string *s, int face_id,
 +                           int start, int end, int overlaps)
 +{
 +  struct glyph *glyph, *last;
 +  int voffset;
 +
 +  xassert (s->first_glyph->type == GLYPHLESS_GLYPH);
 +  s->for_overlaps = overlaps;
 +  glyph = s->row->glyphs[s->area] + start;
 +  last = s->row->glyphs[s->area] + end;
 +  voffset = glyph->voffset;
 +  s->face = FACE_FROM_ID (s->f, face_id);
 +  s->font = s->face->font;
 +  s->nchars = 1;
 +  s->width = glyph->pixel_width;
 +  glyph++;
 +  while (glyph < last
 +       && glyph->type == GLYPHLESS_GLYPH
 +       && glyph->voffset == voffset
 +       && glyph->face_id == face_id)
 +    {
 +      s->nchars++;
 +      s->width += glyph->pixel_width;
 +      glyph++;
 +    }
 +  s->ybase += voffset;
 +  return glyph - s->row->glyphs[s->area];
 +}
 +
 +
  /* Fill glyph string S from a sequence of character glyphs.
  
     FACE_ID is the face id of the string.  START is the index of the
     Value is the index of the first glyph not in S.  */
  
  static int
 -fill_glyph_string (s, face_id, start, end, overlaps)
 -     struct glyph_string *s;
 -     int face_id;
 -     int start, end, overlaps;
 +fill_glyph_string (struct glyph_string *s, int face_id,
 +                 int start, int end, int overlaps)
  {
    struct glyph *glyph, *last;
    int voffset;
  /* Fill glyph string S from image glyph S->first_glyph.  */
  
  static void
 -fill_image_glyph_string (s)
 -     struct glyph_string *s;
 +fill_image_glyph_string (struct glyph_string *s)
  {
    xassert (s->first_glyph->type == IMAGE_GLYPH);
    s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id);
    xassert (s->img);
 -  s->slice = s->first_glyph->slice;
 +  s->slice = s->first_glyph->slice.img;
    s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
    s->font = s->face->font;
    s->width = s->first_glyph->pixel_width;
     Value is the index of the first glyph not in S.  */
  
  static int
 -fill_stretch_glyph_string (s, row, area, start, end)
 -     struct glyph_string *s;
 -     struct glyph_row *row;
 -     enum glyph_row_area area;
 -     int start, end;
 +fill_stretch_glyph_string (struct glyph_string *s, struct glyph_row *row,
 +                         enum glyph_row_area area, int start, int end)
  {
    struct glyph *glyph, *last;
    int voffset, face_id;
  }
  
  static struct font_metrics *
 -get_per_char_metric (f, font, char2b)
 -     struct frame *f;
 -     struct font *font;
 -     XChar2b *char2b;
 +get_per_char_metric (struct frame *f, struct font *font, XChar2b *char2b)
  {
    static struct font_metrics metrics;
    unsigned code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b);
     assumed to be zero.  */
  
  void
 -x_get_glyph_overhangs (glyph, f, left, right)
 -     struct glyph *glyph;
 -     struct frame *f;
 -     int *left, *right;
 +x_get_glyph_overhangs (struct glyph *glyph, struct frame *f, int *left, int *right)
  {
    *left = *right = 0;
  
          Lisp_Object gstring = composition_gstring_from_id (glyph->u.cmp.id);
          struct font_metrics metrics;
  
 -        composition_gstring_width (gstring, glyph->u.cmp.from,
 -                                   glyph->u.cmp.to + 1, &metrics);
 +        composition_gstring_width (gstring, glyph->slice.cmp.from,
 +                                   glyph->slice.cmp.to + 1, &metrics);
          if (metrics.rbearing > metrics.width)
            *right = metrics.rbearing - metrics.width;
          if (metrics.lbearing < 0)
     if no glyphs are overwritten.  */
  
  static int
 -left_overwritten (s)
 -     struct glyph_string *s;
 +left_overwritten (struct glyph_string *s)
  {
    int k;
  
     glyph in front of S overwrites S.  */
  
  static int
 -left_overwriting (s)
 -     struct glyph_string *s;
 +left_overwriting (struct glyph_string *s)
  {
    int i, k, x;
    struct glyph *glyphs = s->row->glyphs[s->area];
     no such glyph is found.  */
  
  static int
 -right_overwritten (s)
 -     struct glyph_string *s;
 +right_overwritten (struct glyph_string *s)
  {
    int k = -1;
  
     if no such glyph is found.  */
  
  static int
 -right_overwriting (s)
 -     struct glyph_string *s;
 +right_overwriting (struct glyph_string *s)
  {
    int i, k, x;
    int end = s->row->used[s->area];
     in the drawing area.  */
  
  static INLINE void
 -set_glyph_string_background_width (s, start, last_x)
 -     struct glyph_string *s;
 -     int start;
 -     int last_x;
 +set_glyph_string_background_width (struct glyph_string *s, int start, int last_x)
  {
    /* If the face of this glyph string has to be drawn to the end of
       the drawing area, set S->extends_to_end_of_line_p.  */
     BACKWARD_P non-zero means process predecessors.  */
  
  static void
 -compute_overhangs_and_x (s, x, backward_p)
 -     struct glyph_string *s;
 -     int x;
 -     int backward_p;
 +compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
  {
    if (backward_p)
      {
    } while (0)
  
  
 +/* Add a glyph string for a sequence of glyphless character's glyphs
 +   to the list of strings between HEAD and TAIL.  The meanings of
 +   arguments are the same as those of BUILD_CHAR_GLYPH_STRINGS.  */
 +
 +#define BUILD_GLYPHLESS_GLYPH_STRING(START, END, HEAD, TAIL, HL, X, LAST_X) \
 +  do                                                                      \
 +    {                                                                     \
 +      int face_id;                                                        \
 +      XChar2b *char2b;                                                            \
 +                                                                          \
 +      face_id = (row)->glyphs[area][START].face_id;                       \
 +                                                                          \
 +      s = (struct glyph_string *) alloca (sizeof *s);                     \
 +      INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL);               \
 +      append_glyph_string (&HEAD, &TAIL, s);                              \
 +      s->x = (X);                                                         \
 +      START = fill_glyphless_glyph_string (s, face_id, START, END,        \
 +                                         overlaps);                       \
 +    }                                                                     \
 +  while (0)
 +
 +
  /* Build a list of glyph strings between HEAD and TAIL for the glyphs
     of AREA of glyph row ROW on window W between indices START and END.
     HL overrides the face for drawing glyph strings, e.g. it is
              BUILD_CHAR_GLYPH_STRINGS (START, END, HEAD, TAIL,         \
                                        HL, X, LAST_X);                 \
              break;                                                    \
 -                                                                      \
 +                                                                      \
            case COMPOSITE_GLYPH:                                       \
              if (first_glyph->u.cmp.automatic)                         \
                BUILD_GSTRING_GLYPH_STRING (START, END, HEAD, TAIL,     \
                BUILD_COMPOSITE_GLYPH_STRING (START, END, HEAD, TAIL,   \
                                              HL, X, LAST_X);           \
              break;                                                    \
 -                                                                      \
 +                                                                      \
            case STRETCH_GLYPH:                                         \
              BUILD_STRETCH_GLYPH_STRING (START, END, HEAD, TAIL,       \
                                          HL, X, LAST_X);               \
              break;                                                    \
 -                                                                      \
 +                                                                      \
            case IMAGE_GLYPH:                                           \
              BUILD_IMAGE_GLYPH_STRING (START, END, HEAD, TAIL,         \
                                        HL, X, LAST_X);                 \
              break;                                                    \
 -                                                                      \
 +                                                                      \
 +          case GLYPHLESS_GLYPH:                                       \
 +            BUILD_GLYPHLESS_GLYPH_STRING (START, END, HEAD, TAIL,     \
 +                                          HL, X, LAST_X);             \
 +            break;                                                    \
 +                                                                      \
            default:                                                    \
              abort ();                                                 \
            }                                                           \
 -                                                                      \
 +                                                                      \
          if (s)                                                        \
            {                                                           \
              set_glyph_string_background_width (s, START, LAST_X);     \
     Value is the x-position reached, relative to AREA of W.  */
  
  static int
 -draw_glyphs (w, x, row, area, start, end, hl, overlaps)
 -     struct window *w;
 -     int x;
 -     struct glyph_row *row;
 -     enum glyph_row_area area;
 -     EMACS_INT start, end;
 -     enum draw_glyphs_face hl;
 -     int overlaps;
 +draw_glyphs (struct window *w, int x, struct glyph_row *row,
 +           enum glyph_row_area area, EMACS_INT start, EMACS_INT end,
 +           enum draw_glyphs_face hl, int overlaps)
  {
    struct glyph_string *head, *tail;
    struct glyph_string *s;
    if (head && !overlaps && row->contains_overlapping_glyphs_p)
      {
        struct glyph_string *h, *t;
 -      Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +      Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
        int mouse_beg_col, mouse_end_col, check_mouse_face = 0;
        int dummy_x = 0;
  
        {
          struct glyph_row *mouse_beg_row, *mouse_end_row;
  
 -        mouse_beg_row = MATRIX_ROW (w->current_matrix, dpyinfo->mouse_face_beg_row);
 -        mouse_end_row = MATRIX_ROW (w->current_matrix, dpyinfo->mouse_face_end_row);
 +        mouse_beg_row = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_beg_row);
 +        mouse_end_row = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_end_row);
  
          if (row >= mouse_beg_row && row <= mouse_end_row)
            {
              check_mouse_face = 1;
              mouse_beg_col = (row == mouse_beg_row)
 -              ? dpyinfo->mouse_face_beg_col : 0;
 +              ? hlinfo->mouse_face_beg_col : 0;
              mouse_end_col = (row == mouse_end_row)
 -              ? dpyinfo->mouse_face_end_col
 +              ? hlinfo->mouse_face_end_col
                : row->used[TEXT_AREA];
            }
        }
     Called from x_produce_glyphs when IT->glyph_row is non-null.  */
  
  static INLINE void
 -append_glyph (it)
 -     struct it *it;
 +append_glyph (struct it *it)
  {
    struct glyph *glyph;
    enum glyph_row_area area = it->area;
    glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
    if (glyph < it->glyph_row->glyphs[area + 1])
      {
 +      /* If the glyph row is reversed, we need to prepend the glyph
 +       rather than append it.  */
 +      if (it->glyph_row->reversed_p && area == TEXT_AREA)
 +      {
 +        struct glyph *g;
 +
 +        /* Make room for the additional glyph.  */
 +        for (g = glyph - 1; g >= it->glyph_row->glyphs[area]; g--)
 +          g[1] = *g;
 +        glyph = it->glyph_row->glyphs[area];
 +      }
        glyph->charpos = CHARPOS (it->position);
        glyph->object = it->object;
        if (it->pixel_width > 0)
        glyph->glyph_not_available_p = it->glyph_not_available_p;
        glyph->face_id = it->face_id;
        glyph->u.ch = it->char_to_display;
 -      glyph->slice = null_glyph_slice;
 +      glyph->slice.img = null_glyph_slice;
        glyph->font_type = FONT_TYPE_UNKNOWN;
 +      if (it->bidi_p)
 +      {
 +        glyph->resolved_level = it->bidi_it.resolved_level;
 +        if ((it->bidi_it.type & 7) != it->bidi_it.type)
 +          abort ();
 +        glyph->bidi_type = it->bidi_it.type;
 +      }
 +      else
 +      {
 +        glyph->resolved_level = 0;
 +        glyph->bidi_type = UNKNOWN_BT;
 +      }
        ++it->glyph_row->used[area];
      }
    else
     non-null.  */
  
  static INLINE void
 -append_composite_glyph (it)
 -     struct it *it;
 +append_composite_glyph (struct it *it)
  {
    struct glyph *glyph;
    enum glyph_row_area area = it->area;
    glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
    if (glyph < it->glyph_row->glyphs[area + 1])
      {
 -      glyph->charpos = CHARPOS (it->position);
 +      /* If the glyph row is reversed, we need to prepend the glyph
 +       rather than append it.  */
 +      if (it->glyph_row->reversed_p && it->area == TEXT_AREA)
 +      {
 +        struct glyph *g;
 +
 +        /* Make room for the new glyph.  */
 +        for (g = glyph - 1; g >= it->glyph_row->glyphs[it->area]; g--)
 +          g[1] = *g;
 +        glyph = it->glyph_row->glyphs[it->area];
 +      }
 +      glyph->charpos = it->cmp_it.charpos;
        glyph->object = it->object;
        glyph->pixel_width = it->pixel_width;
        glyph->ascent = it->ascent;
        {
          glyph->u.cmp.automatic = 0;
          glyph->u.cmp.id = it->cmp_it.id;
 +        glyph->slice.cmp.from = glyph->slice.cmp.to = 0;
        }
        else
        {
          glyph->u.cmp.automatic = 1;
          glyph->u.cmp.id = it->cmp_it.id;
 -        glyph->u.cmp.from = it->cmp_it.from;
 -        glyph->u.cmp.to = it->cmp_it.to - 1;
 +        glyph->slice.cmp.from = it->cmp_it.from;
 +        glyph->slice.cmp.to = it->cmp_it.to - 1;
        }
        glyph->avoid_cursor_p = it->avoid_cursor_p;
        glyph->multibyte_p = it->multibyte_p;
        glyph->padding_p = 0;
        glyph->glyph_not_available_p = 0;
        glyph->face_id = it->face_id;
 -      glyph->slice = null_glyph_slice;
        glyph->font_type = FONT_TYPE_UNKNOWN;
 +      if (it->bidi_p)
 +      {
 +        glyph->resolved_level = it->bidi_it.resolved_level;
 +        if ((it->bidi_it.type & 7) != it->bidi_it.type)
 +          abort ();
 +        glyph->bidi_type = it->bidi_it.type;
 +      }
        ++it->glyph_row->used[area];
      }
    else
     IT->voffset.  */
  
  static INLINE void
 -take_vertical_position_into_account (it)
 -     struct it *it;
 +take_vertical_position_into_account (struct it *it)
  {
    if (it->voffset)
      {
     an overview of struct display_iterator.  */
  
  static void
 -produce_image_glyph (it)
 -     struct it *it;
 +produce_image_glyph (struct it *it)
  {
    struct image *img;
    struct face *face;
          glyph->glyph_not_available_p = 0;
          glyph->face_id = it->face_id;
          glyph->u.img_id = img->id;
 -        glyph->slice = slice;
 +        glyph->slice.img = slice;
          glyph->font_type = FONT_TYPE_UNKNOWN;
 +        if (it->bidi_p)
 +          {
 +            glyph->resolved_level = it->bidi_it.resolved_level;
 +            if ((it->bidi_it.type & 7) != it->bidi_it.type)
 +              abort ();
 +            glyph->bidi_type = it->bidi_it.type;
 +          }
          ++it->glyph_row->used[area];
        }
        else
     stretch.  ASCENT is the ascent of the glyph (0 <= ASCENT <= HEIGHT).  */
  
  static void
 -append_stretch_glyph (it, object, width, height, ascent)
 -     struct it *it;
 -     Lisp_Object object;
 -     int width, height;
 -     int ascent;
 +append_stretch_glyph (struct it *it, Lisp_Object object,
 +                    int width, int height, int ascent)
  {
    struct glyph *glyph;
    enum glyph_row_area area = it->area;
    glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
    if (glyph < it->glyph_row->glyphs[area + 1])
      {
 +      /* If the glyph row is reversed, we need to prepend the glyph
 +       rather than append it.  */
 +      if (it->glyph_row->reversed_p && area == TEXT_AREA)
 +      {
 +        struct glyph *g;
 +
 +        /* Make room for the additional glyph.  */
 +        for (g = glyph - 1; g >= it->glyph_row->glyphs[area]; g--)
 +          g[1] = *g;
 +        glyph = it->glyph_row->glyphs[area];
 +      }
        glyph->charpos = CHARPOS (it->position);
        glyph->object = object;
        glyph->pixel_width = width;
        glyph->face_id = it->face_id;
        glyph->u.stretch.ascent = ascent;
        glyph->u.stretch.height = height;
 -      glyph->slice = null_glyph_slice;
 +      glyph->slice.img = null_glyph_slice;
        glyph->font_type = FONT_TYPE_UNKNOWN;
 +      if (it->bidi_p)
 +      {
 +        glyph->resolved_level = it->bidi_it.resolved_level;
 +        if ((it->bidi_it.type & 7) != it->bidi_it.type)
 +          abort ();
 +        glyph->bidi_type = it->bidi_it.type;
 +      }
 +      else
 +      {
 +        glyph->resolved_level = 0;
 +        glyph->bidi_type = UNKNOWN_BT;
 +      }
        ++it->glyph_row->used[area];
      }
    else
     ASCENT must be in the range 0 <= ASCENT <= 100.  */
  
  static void
 -produce_stretch_glyph (it)
 -     struct it *it;
 +produce_stretch_glyph (struct it *it)
  {
    /* (space :width WIDTH :height HEIGHT ...)  */
    Lisp_Object prop, plist;
  
  
  static Lisp_Object
 -calc_line_height_property (it, val, font, boff, override)
 -     struct it *it;
 -     Lisp_Object val;
 -     struct font *font;
 -     int boff, override;
 +calc_line_height_property (struct it *it, Lisp_Object val, struct font *font,
 +                         int boff, int override)
  {
    Lisp_Object face_name = Qnil;
    int ascent, descent, height;
  }
  
  
 -/* RIF:
 -   Produce glyphs/get display metrics for the display element IT is
 -   loaded with.  See the description of struct it in dispextern.h
 -   for an overview of struct it.  */
 +/* Append a glyph for a glyphless character to IT->glyph_row.  FACE_ID
 +   is a face ID to be used for the glyph.  FOR_NO_FONT is nonzero if
 +   and only if this is for a character for which no font was found.
  
 -void
 -x_produce_glyphs (it)
 -     struct it *it;
 -{
 -  int extra_line_spacing = it->extra_line_spacing;
 +   If the display method (it->glyphless_method) is
 +   GLYPHLESS_DISPLAY_ACRONYM or GLYPHLESS_DISPLAY_HEX_CODE, LEN is a
 +   length of the acronym or the hexadecimal string, UPPER_XOFF and
 +   UPPER_YOFF are pixel offsets for the upper part of the string,
 +   LOWER_XOFF and LOWER_YOFF are for the lower part.
  
 -  it->glyph_not_available_p = 0;
 +   For the other display methods, LEN through LOWER_YOFF are zero.  */
  
 -  if (it->what == IT_CHARACTER)
 -    {
 -      XChar2b char2b;
 -      struct face *face = FACE_FROM_ID (it->f, it->face_id);
 -      struct font *font = face->font;
 -      int font_not_found_p = font == NULL;
 -      struct font_metrics *pcm = NULL;
 -      int boff;                       /* baseline offset */
 +static void
 +append_glyphless_glyph (struct it *it, int face_id, int for_no_font, int len,
 +                      short upper_xoff, short upper_yoff,
 +                      short lower_xoff, short lower_yoff)
 +{
 +  struct glyph *glyph;
 +  enum glyph_row_area area = it->area;
  
 -      if (font_not_found_p)
 +  glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
 +  if (glyph < it->glyph_row->glyphs[area + 1])
 +    {
 +      /* If the glyph row is reversed, we need to prepend the glyph
 +       rather than append it.  */
 +      if (it->glyph_row->reversed_p && area == TEXT_AREA)
        {
 -        /* When no suitable font found, display an empty box based
 -           on the metrics of the font of the default face (or what
 -           remapped).  */
 -        struct face *no_font_face
 -          = FACE_FROM_ID (it->f,
 -                          NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
 -                          : lookup_basic_face (it->f, DEFAULT_FACE_ID));
 -        font = no_font_face->font;
 -        boff = font->baseline_offset;
 +        struct glyph *g;
 +
 +        /* Make room for the additional glyph.  */
 +        for (g = glyph - 1; g >= it->glyph_row->glyphs[area]; g--)
 +          g[1] = *g;
 +        glyph = it->glyph_row->glyphs[area];
 +      }
 +      glyph->charpos = CHARPOS (it->position);
 +      glyph->object = it->object;
 +      glyph->pixel_width = it->pixel_width;
 +      glyph->ascent = it->ascent;
 +      glyph->descent = it->descent;
 +      glyph->voffset = it->voffset;
 +      glyph->type = GLYPHLESS_GLYPH;
 +      glyph->u.glyphless.method = it->glyphless_method;
 +      glyph->u.glyphless.for_no_font = for_no_font;
 +      glyph->u.glyphless.len = len;
 +      glyph->u.glyphless.ch = it->c;
 +      glyph->slice.glyphless.upper_xoff = upper_xoff;
 +      glyph->slice.glyphless.upper_yoff = upper_yoff;
 +      glyph->slice.glyphless.lower_xoff = lower_xoff;
 +      glyph->slice.glyphless.lower_yoff = lower_yoff;
 +      glyph->avoid_cursor_p = it->avoid_cursor_p;
 +      glyph->multibyte_p = it->multibyte_p;
 +      glyph->left_box_line_p = it->start_of_box_run_p;
 +      glyph->right_box_line_p = it->end_of_box_run_p;
 +      glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
 +                                    || it->phys_descent > it->descent);
 +      glyph->padding_p = 0;
 +      glyph->glyph_not_available_p = 0;
 +      glyph->face_id = face_id;
 +      glyph->font_type = FONT_TYPE_UNKNOWN;
 +      if (it->bidi_p)
 +      {
 +        glyph->resolved_level = it->bidi_it.resolved_level;
 +        if ((it->bidi_it.type & 7) != it->bidi_it.type)
 +          abort ();
 +        glyph->bidi_type = it->bidi_it.type;
 +      }
 +      ++it->glyph_row->used[area];
 +    }
 +  else
 +    IT_EXPAND_MATRIX_WIDTH (it, area);
 +}
 +
 +
 +/* Produce a glyph for a glyphless character for iterator IT.
 +   IT->glyphless_method specifies which method to use for displaying
 +   the character.  See the description of enum
 +   glyphless_display_method in dispextern.h for the detail.
 +
 +   FOR_NO_FONT is nonzero if and only if this is for a character for
 +   which no font was found.  ACRONYM, if non-nil, is an acronym string
 +   for the character.  */
 +
 +static void
 +produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
 +{
 +  int face_id;
 +  struct face *face;
 +  struct font *font;
 +  int base_width, base_height, width, height;
 +  short upper_xoff, upper_yoff, lower_xoff, lower_yoff;
 +  int len;
 +
 +  /* Get the metrics of the base font.  We always refer to the current
 +     ASCII face.  */
 +  face = FACE_FROM_ID (it->f, it->face_id)->ascii_face;
 +  font = face->font ? face->font : FRAME_FONT (it->f);
 +  it->ascent = FONT_BASE (font) + font->baseline_offset;
 +  it->descent = FONT_DESCENT (font) - font->baseline_offset;
 +  base_height = it->ascent + it->descent;
 +  base_width = font->average_width;
 +
 +  /* Get a face ID for the glyph by utilizing a cache (the same way as
 +     doen for `escape-glyph' in get_next_display_element).  */
 +  if (it->f == last_glyphless_glyph_frame
 +      && it->face_id == last_glyphless_glyph_face_id)
 +    {
 +      face_id = last_glyphless_glyph_merged_face_id;
 +    }
 +  else
 +    {
 +      /* Merge the `glyphless-char' face into the current face.  */
 +      face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
 +      last_glyphless_glyph_frame = it->f;
 +      last_glyphless_glyph_face_id = it->face_id;
 +      last_glyphless_glyph_merged_face_id = face_id;
 +    }
 +
 +  if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
 +    {
 +      it->pixel_width = THIN_SPACE_WIDTH;
 +      len = 0;
 +      upper_xoff = upper_yoff = lower_xoff = lower_yoff = 0;
 +    }
 +  else if (it->glyphless_method == GLYPHLESS_DISPLAY_EMPTY_BOX)
 +    {
 +      width = CHAR_WIDTH (it->c);
 +      if (width == 0)
 +      width = 1;
 +      else if (width > 4)
 +      width = 4;
 +      it->pixel_width = base_width * width;
 +      len = 0;
 +      upper_xoff = upper_yoff = lower_xoff = lower_yoff = 0;
 +    }
 +  else
 +    {
 +      char buf[7], *str;
 +      unsigned int code[6];
 +      int upper_len;
 +      int ascent, descent;
 +      struct font_metrics metrics_upper, metrics_lower;
 +
 +      face = FACE_FROM_ID (it->f, face_id);
 +      font = face->font ? face->font : FRAME_FONT (it->f);
 +      PREPARE_FACE_FOR_DISPLAY (it->f, face);
 +
 +      if (it->glyphless_method == GLYPHLESS_DISPLAY_ACRONYM)
 +      {
 +        if (! STRINGP (acronym) && CHAR_TABLE_P (Vglyphless_char_display))
 +          acronym = CHAR_TABLE_REF (Vglyphless_char_display, it->c);
 +        str = STRINGP (acronym) ? (char *) SDATA (acronym) : "";
        }
        else
        {
 -        boff = font->baseline_offset;
 -        if (font->vertical_centering)
 -          boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
 +        xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
 +        sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c);
 +        str = buf;
 +      }
 +      for (len = 0; str[len] && ASCII_BYTE_P (str[len]); len++)
 +      code[len] = font->driver->encode_char (font, str[len]);
 +      upper_len = (len + 1) / 2;
 +      font->driver->text_extents (font, code, upper_len,
 +                                &metrics_upper);
 +      font->driver->text_extents (font, code + upper_len, len - upper_len,
 +                                &metrics_lower);
 +
 +
 +
 +      /* +4 is for vertical bars of a box plus 1-pixel spaces at both side.  */
 +      width = max (metrics_upper.width, metrics_lower.width) + 4;
 +      upper_xoff = upper_yoff = 2; /* the typical case */
 +      if (base_width >= width)
 +      {
 +        /* Align the upper to the left, the lower to the right.  */
 +        it->pixel_width = base_width;
 +        lower_xoff = base_width - 2 - metrics_lower.width;
 +      }
 +      else
 +      {
 +        /* Center the shorter one.  */
 +        it->pixel_width = width;
 +        if (metrics_upper.width >= metrics_lower.width)
 +          lower_xoff = (width - metrics_lower.width) / 2;
 +        else
 +          upper_xoff = (width - metrics_upper.width) / 2;
 +      }
 +  
 +      /* +5 is for horizontal bars of a box plus 1-pixel spaces at
 +       top, bottom, and between upper and lower strings.  */
 +      height = (metrics_upper.ascent + metrics_upper.descent
 +              + metrics_lower.ascent + metrics_lower.descent) + 5;
 +      /* Center vertically.
 +       H:base_height, D:base_descent
 +       h:height, ld:lower_descent, la:lower_ascent, ud:upper_descent
 +
 +       ascent = - (D - H/2 - h/2 + 1); "+ 1" for rounding up
 +       descent = D - H/2 + h/2;
 +       lower_yoff = descent - 2 - ld;
 +       upper_yoff = lower_yoff - la - 1 - ud;  */
 +      ascent = - (it->descent - (base_height + height + 1) / 2);
 +      descent = it->descent - (base_height - height) / 2;
 +      lower_yoff = descent - 2 - metrics_lower.descent;
 +      upper_yoff = (lower_yoff - metrics_lower.ascent - 1
 +                  - metrics_upper.descent);
 +      /* Don't make the height shorter than the base height. */
 +      if (height > base_height)
 +      {
 +        it->ascent = ascent;
 +        it->descent = descent;
 +      }
 +    }
 +
 +  it->phys_ascent = it->ascent;
 +  it->phys_descent = it->descent;
 +  if (it->glyph_row)
 +    append_glyphless_glyph (it, face_id, for_no_font, len,
 +                          upper_xoff, upper_yoff,
 +                          lower_xoff, lower_yoff);
 +  it->nglyphs = 1;
 +  take_vertical_position_into_account (it);
 +}
 +
 +
 +/* RIF:
 +   Produce glyphs/get display metrics for the display element IT is
 +   loaded with.  See the description of struct it in dispextern.h
 +   for an overview of struct it.  */
 +
 +void
 +x_produce_glyphs (struct it *it)
 +{
 +  int extra_line_spacing = it->extra_line_spacing;
 +
 +  it->glyph_not_available_p = 0;
 +
 +  if (it->what == IT_CHARACTER)
 +    {
 +      XChar2b char2b;
 +      struct face *face = FACE_FROM_ID (it->f, it->face_id);
 +      struct font *font = face->font;
 +      struct font_metrics *pcm = NULL;
 +      int boff;                       /* baseline offset */
 +
 +      if (font == NULL)
 +      {
 +        /* When no suitable font is found, display this character by
 +           the method specified in the first extra slot of
 +           Vglyphless_char_display.  */
 +        Lisp_Object acronym = lookup_glyphless_char_display (-1, it);
 +
 +        xassert (it->what == IT_GLYPHLESS);
 +        produce_glyphless_glyph (it, 1, STRINGP (acronym) ? acronym : Qnil);
 +        goto done;
        }
  
 +      boff = font->baseline_offset;
 +      if (font->vertical_centering)
 +      boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
 +
        if (it->char_to_display != '\n' && it->char_to_display != '\t')
        {
          int stretched_p;
              it->descent = FONT_DESCENT (font) - boff;
            }
  
 -        if (! font_not_found_p
 -            && get_char_glyph_code (it->char_to_display, font, &char2b))
 +        if (get_char_glyph_code (it->char_to_display, font, &char2b))
            {
              pcm = get_per_char_metric (it->f, font, &char2b);
              if (pcm->width == 0
          it->pixel_width = 0;
          it->nglyphs = 0;
  
 -        height = get_it_property(it, Qline_height);
 +        height = get_it_property (it, Qline_height);
          /* Split (line-height total-height) list */
          if (CONSP (height)
              && CONSP (XCDR (height))
              total_height = XCAR (XCDR (height));
              height = XCAR (height);
            }
 -        height = calc_line_height_property(it, height, font, boff, 1);
 +        height = calc_line_height_property (it, height, font, boff, 1);
  
          if (it->override_ascent >= 0)
            {
                it->ascent = XINT (height) - it->descent;
  
              if (!NILP (total_height))
 -              spacing = calc_line_height_property(it, total_height, font, boff, 0);
 +              spacing = calc_line_height_property (it, total_height, font, boff, 0);
              else
                {
 -                spacing = get_it_property(it, Qline_spacing);
 -                spacing = calc_line_height_property(it, spacing, font, boff, 0);
 +                spacing = get_it_property (it, Qline_spacing);
 +                spacing = calc_line_height_property (it, spacing, font, boff, 0);
                }
              if (INTEGERP (spacing))
                {
          XChar2b char2b;
          struct font_metrics *pcm;
          int font_not_found_p;
 -        int pos;
 +        EMACS_INT pos;
  
          for (glyph_len = cmp->glyph_len; glyph_len > 0; glyph_len--)
            if ((c = COMPOSITION_GLYPH (cmp, glyph_len - 1)) != '\t')
        if (it->glyph_row)
        append_composite_glyph (it);
      }
 +  else if (it->what == IT_GLYPHLESS)
 +    produce_glyphless_glyph (it, 0, Qnil);
    else if (it->what == IT_IMAGE)
      produce_image_glyph (it);
    else if (it->what == IT_STRETCH)
      produce_stretch_glyph (it);
  
 + done:
    /* Accumulate dimensions.  Note: can't assume that it->descent > 0
       because this isn't true for images with `:ascent 100'.  */
    xassert (it->ascent >= 0 && it->descent >= 0);
     row being updated.  */
  
  void
 -x_write_glyphs (start, len)
 -     struct glyph *start;
 -     int len;
 +x_write_glyphs (struct glyph *start, int len)
  {
    int x, hpos;
  
     Insert LEN glyphs from START at the nominal cursor position.  */
  
  void
 -x_insert_glyphs (start, len)
 -     struct glyph *start;
 -     int len;
 +x_insert_glyphs (struct glyph *start, int len)
  {
    struct frame *f;
    struct window *w;
     updated_window.  TO_X == -1 means clear to the end of this area.  */
  
  void
 -x_clear_end_of_line (to_x)
 -     int to_x;
 +x_clear_end_of_line (int to_x)
  {
    struct frame *f;
    struct window *w = updated_window;
     of the bar cursor.  */
  
  static enum text_cursor_kinds
 -get_specified_cursor_type (arg, width)
 -     Lisp_Object arg;
 -     int *width;
 +get_specified_cursor_type (Lisp_Object arg, int *width)
  {
    enum text_cursor_kinds type;
  
  
  /* Set the default cursor types for specified frame.  */
  void
 -set_frame_cursor_types (f, arg)
 -     struct frame *f;
 -     Lisp_Object arg;
 +set_frame_cursor_types (struct frame *f, Lisp_Object arg)
  {
    int width;
    Lisp_Object tem;
  }
  
  
 +#ifdef HAVE_WINDOW_SYSTEM
 +
  /* Return the cursor we want to be displayed in window W.  Return
     width of bar/hbar cursor through WIDTH arg.  Return with
     ACTIVE_CURSOR arg set to 1 if cursor in window W is `active'
     In all other cases, we want a hollow box cursor.  */
  
  static enum text_cursor_kinds
 -get_window_cursor_type (w, glyph, width, active_cursor)
 -     struct window *w;
 -     struct glyph *glyph;
 -     int *width;
 -     int *active_cursor;
 +get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
 +                      int *active_cursor)
  {
    struct frame *f = XFRAME (w->frame);
    struct buffer *b = XBUFFER (w->buffer);
  
    /* Detect a nonselected window or nonselected frame.  */
    else if (w != XWINDOW (f->selected_window)
 -#ifdef HAVE_WINDOW_SYSTEM
 -         || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame
 -#endif
 -         )
 +         || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
      {
        *active_cursor = 0;
  
    /* Use normal cursor if not blinked off.  */
    if (!w->cursor_off_p)
      {
 -#ifdef HAVE_WINDOW_SYSTEM
        if (glyph != NULL && glyph->type == IMAGE_GLYPH)
        {
          if (cursor_type == FILLED_BOX_CURSOR)
              cursor_type = HOLLOW_BOX_CURSOR;
            }
        }
 -#endif
        return cursor_type;
      }
  
  }
  
  
 -#ifdef HAVE_WINDOW_SYSTEM
 -
  /* Notice when the text cursor of window W has been completely
     overwritten by a drawing operation that outputs glyphs in AREA
     starting at X0 and ending at X1 in the line starting at Y0 and
     are window-relative.  */
  
  static void
 -notice_overwritten_cursor (w, area, x0, x1, y0, y1)
 -     struct window *w;
 -     enum glyph_row_area area;
 -     int x0, y0, x1, y1;
 +notice_overwritten_cursor (struct window *w, enum glyph_row_area area,
 +                         int x0, int x1, int y0, int y1)
  {
    int cx0, cx1, cy0, cy1;
    struct glyph_row *row;
    if (row->cursor_in_fringe_p)
      {
        row->cursor_in_fringe_p = 0;
 -      draw_fringe_bitmap (w, row, 0);
 +      draw_fringe_bitmap (w, row, row->reversed_p);
        w->phys_cursor_on_p = 0;
        return;
      }
     with respect to the overlapping part OVERLAPS.  */
  
  void
 -x_fix_overlapping_area (w, row, area, overlaps)
 -     struct window *w;
 -     struct glyph_row *row;
 -     enum glyph_row_area area;
 -     int overlaps;
 +x_fix_overlapping_area (struct window *w, struct glyph_row *row,
 +                      enum glyph_row_area area, int overlaps)
  {
    int i, x;
  
     comment of draw_glyphs for the meaning of HL.  */
  
  void
 -draw_phys_cursor_glyph (w, row, hl)
 -     struct window *w;
 -     struct glyph_row *row;
 -     enum draw_glyphs_face hl;
 +draw_phys_cursor_glyph (struct window *w, struct glyph_row *row,
 +                      enum draw_glyphs_face hl)
  {
    /* If cursor hpos is out of bounds, don't draw garbage.  This can
       happen in mini-buffer windows when switching between echo area
       glyphs and mini-buffer.  */
 -  if (w->phys_cursor.hpos < row->used[TEXT_AREA])
 +  if ((row->reversed_p
 +       ? (w->phys_cursor.hpos >= 0)
 +       : (w->phys_cursor.hpos < row->used[TEXT_AREA])))
      {
        int on_p = w->phys_cursor_on_p;
        int x1;
     Erase the image of a cursor of window W from the screen.  */
  
  void
 -erase_phys_cursor (w)
 -     struct window *w;
 +erase_phys_cursor (struct window *w)
  {
    struct frame *f = XFRAME (w->frame);
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
    int hpos = w->phys_cursor.hpos;
    int vpos = w->phys_cursor.vpos;
    int mouse_face_here_p = 0;
    if (cursor_row->cursor_in_fringe_p)
      {
        cursor_row->cursor_in_fringe_p = 0;
 -      draw_fringe_bitmap (w, cursor_row, 0);
 +      draw_fringe_bitmap (w, cursor_row, cursor_row->reversed_p);
        goto mark_cursor_off;
      }
  
       should have cleared the cursor.  Note that we wouldn't be
       able to erase the cursor in this case because we don't have a
       cursor glyph at hand.  */
 -  if (w->phys_cursor.hpos >= cursor_row->used[TEXT_AREA])
 +  if ((cursor_row->reversed_p
 +       ? (w->phys_cursor.hpos < 0)
 +       : (w->phys_cursor.hpos >= cursor_row->used[TEXT_AREA])))
      goto mark_cursor_off;
  
    /* If the cursor is in the mouse face area, redisplay that when
       we clear the cursor.  */
 -  if (! NILP (dpyinfo->mouse_face_window)
 -      && w == XWINDOW (dpyinfo->mouse_face_window)
 -      && (vpos > dpyinfo->mouse_face_beg_row
 -        || (vpos == dpyinfo->mouse_face_beg_row
 -            && hpos >= dpyinfo->mouse_face_beg_col))
 -      && (vpos < dpyinfo->mouse_face_end_row
 -        || (vpos == dpyinfo->mouse_face_end_row
 -            && hpos < dpyinfo->mouse_face_end_col))
 +  if (! NILP (hlinfo->mouse_face_window)
 +      && coords_in_mouse_face_p (w, hpos, vpos)
        /* Don't redraw the cursor's spot in mouse face if it is at the
         end of a line (on a newline).  The cursor appears there, but
         mouse highlighting does not.  */
 -      && cursor_row->used[TEXT_AREA] > hpos)
 +      && cursor_row->used[TEXT_AREA] > hpos && hpos >= 0)
      mouse_face_here_p = 1;
  
    /* Maybe clear the display under the cursor.  */
     where to put the cursor is specified by HPOS, VPOS, X and Y.  */
  
  void
 -display_and_set_cursor (w, on, hpos, vpos, x, y)
 -     struct window *w;
 -     int on, hpos, vpos, x, y;
 +display_and_set_cursor (struct window *w, int on,
 +                      int hpos, int vpos, int x, int y)
  {
    struct frame *f = XFRAME (w->frame);
    int new_cursor_type;
  
    glyph = NULL;
    if (!glyph_row->exact_window_width_line_p
 -      || hpos < glyph_row->used[TEXT_AREA])
 +      || (0 <= hpos && hpos < glyph_row->used[TEXT_AREA]))
      glyph = glyph_row->glyphs[TEXT_AREA] + hpos;
  
    xassert (interrupt_input_blocked);
     of ON.  */
  
  void
 -update_window_cursor (w, on)
 -     struct window *w;
 -     int on;
 +update_window_cursor (struct window *w, int on)
  {
    /* Don't update cursor in windows whose frame is in the process
       of being deleted.  */
     in the window tree rooted at W.  */
  
  static void
 -update_cursor_in_window_tree (w, on_p)
 -     struct window *w;
 -     int on_p;
 +update_cursor_in_window_tree (struct window *w, int on_p)
  {
    while (w)
      {
     Don't change the cursor's position.  */
  
  void
 -x_update_cursor (f, on_p)
 -     struct frame *f;
 -     int on_p;
 +x_update_cursor (struct frame *f, int on_p)
  {
    update_cursor_in_window_tree (XWINDOW (f->root_window), on_p);
  }
     is about to be rewritten.  */
  
  void
 -x_clear_cursor (w)
 -     struct window *w;
 +x_clear_cursor (struct window *w)
  {
    if (FRAME_VISIBLE_P (XFRAME (w->frame)) && w->phys_cursor_on_p)
      update_window_cursor (w, 0);
  }
  
 +#endif /* HAVE_WINDOW_SYSTEM */
 +
 +/* Implementation of draw_row_with_mouse_face for GUI sessions, GPM,
 +   and MSDOS.  */
 +void
 +draw_row_with_mouse_face (struct window *w, int start_x, struct glyph_row *row,
 +                        int start_hpos, int end_hpos,
 +                        enum draw_glyphs_face draw)
 +{
 +#ifdef HAVE_WINDOW_SYSTEM
 +  if (FRAME_WINDOW_P (XFRAME (w->frame)))
 +    {
 +      draw_glyphs (w, start_x, row, TEXT_AREA, start_hpos, end_hpos, draw, 0);
 +      return;
 +    }
 +#endif
 +#if defined (HAVE_GPM) || defined (MSDOS)
 +  tty_draw_row_with_mouse_face (w, row, start_hpos, end_hpos, draw);
 +#endif
 +}
  
  /* EXPORT:
     Display the active region described by mouse_face_* according to DRAW.  */
  
  void
 -show_mouse_face (dpyinfo, draw)
 -     Display_Info *dpyinfo;
 -     enum draw_glyphs_face draw;
 +show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
  {
 -  struct window *w = XWINDOW (dpyinfo->mouse_face_window);
 +  struct window *w = XWINDOW (hlinfo->mouse_face_window);
    struct frame *f = XFRAME (WINDOW_FRAME (w));
  
    if (/* If window is in the process of being destroyed, don't bother
         to do anything.  */
        w->current_matrix != NULL
        /* Don't update mouse highlight if hidden */
 -      && (draw != DRAW_MOUSE_FACE || !dpyinfo->mouse_face_hidden)
 +      && (draw != DRAW_MOUSE_FACE || !hlinfo->mouse_face_hidden)
        /* Recognize when we are called to operate on rows that don't exist
         anymore.  This can happen when a window is split.  */
 -      && dpyinfo->mouse_face_end_row < w->current_matrix->nrows)
 +      && hlinfo->mouse_face_end_row < w->current_matrix->nrows)
      {
        int phys_cursor_on_p = w->phys_cursor_on_p;
        struct glyph_row *row, *first, *last;
  
 -      first = MATRIX_ROW (w->current_matrix, dpyinfo->mouse_face_beg_row);
 -      last = MATRIX_ROW (w->current_matrix, dpyinfo->mouse_face_end_row);
 +      first = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_beg_row);
 +      last = MATRIX_ROW (w->current_matrix, hlinfo->mouse_face_end_row);
  
        for (row = first; row <= last && row->enabled_p; ++row)
        {
          /* For all but the first row, the highlight starts at column 0.  */
          if (row == first)
            {
 -            start_hpos = dpyinfo->mouse_face_beg_col;
 -            start_x = dpyinfo->mouse_face_beg_x;
 +            /* R2L rows have BEG and END in reversed order, but the
 +               screen drawing geometry is always left to right.  So
 +               we need to mirror the beginning and end of the
 +               highlighted area in R2L rows.  */
 +            if (!row->reversed_p)
 +              {
 +                start_hpos = hlinfo->mouse_face_beg_col;
 +                start_x = hlinfo->mouse_face_beg_x;
 +              }
 +            else if (row == last)
 +              {
 +                start_hpos = hlinfo->mouse_face_end_col;
 +                start_x = hlinfo->mouse_face_end_x;
 +              }
 +            else
 +              {
 +                start_hpos = 0;
 +                start_x = 0;
 +              }
 +          }
 +        else if (row->reversed_p && row == last)
 +          {
 +            start_hpos = hlinfo->mouse_face_end_col;
 +            start_x = hlinfo->mouse_face_end_x;
            }
          else
            {
            }
  
          if (row == last)
 -          end_hpos = dpyinfo->mouse_face_end_col;
 +          {
 +            if (!row->reversed_p)
 +              end_hpos = hlinfo->mouse_face_end_col;
 +            else if (row == first)
 +              end_hpos = hlinfo->mouse_face_beg_col;
 +            else
 +              {
 +                end_hpos = row->used[TEXT_AREA];
 +                if (draw == DRAW_NORMAL_TEXT)
 +                  row->fill_line_p = 1; /* Clear to end of line */
 +              }
 +          }
 +        else if (row->reversed_p && row == first)
 +          end_hpos = hlinfo->mouse_face_beg_col;
          else
            {
              end_hpos = row->used[TEXT_AREA];
  
          if (end_hpos > start_hpos)
            {
 -            draw_glyphs (w, start_x, row, TEXT_AREA,
 -                         start_hpos, end_hpos,
 -                         draw, 0);
 +            draw_row_with_mouse_face (w, start_x, row,
 +                                      start_hpos, end_hpos, draw);
  
              row->mouse_face_p
                = draw == DRAW_MOUSE_FACE || draw == DRAW_IMAGE_RAISED;
            }
        }
  
 +#ifdef HAVE_WINDOW_SYSTEM
        /* When we've written over the cursor, arrange for it to
         be displayed again.  */
 -      if (phys_cursor_on_p && !w->phys_cursor_on_p)
 +      if (FRAME_WINDOW_P (f)
 +        && phys_cursor_on_p && !w->phys_cursor_on_p)
        {
          BLOCK_INPUT;
          display_and_set_cursor (w, 1,
                                  w->phys_cursor.x, w->phys_cursor.y);
          UNBLOCK_INPUT;
        }
 +#endif        /* HAVE_WINDOW_SYSTEM */
      }
  
 +#ifdef HAVE_WINDOW_SYSTEM
    /* Change the mouse cursor.  */
 -  if (draw == DRAW_NORMAL_TEXT && !EQ (dpyinfo->mouse_face_window, f->tool_bar_window))
 -    FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor);
 -  else if (draw == DRAW_MOUSE_FACE)
 -    FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor);
 -  else
 -    FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->nontext_cursor);
 +  if (FRAME_WINDOW_P (f))
 +    {
 +      if (draw == DRAW_NORMAL_TEXT
 +        && !EQ (hlinfo->mouse_face_window, f->tool_bar_window))
 +      FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor);
 +      else if (draw == DRAW_MOUSE_FACE)
 +      FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor);
 +      else
 +      FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->nontext_cursor);
 +    }
 +#endif        /* HAVE_WINDOW_SYSTEM */
  }
  
  /* EXPORT:
     face was actually drawn unhighlighted.  */
  
  int
 -clear_mouse_face (dpyinfo)
 -     Display_Info *dpyinfo;
 +clear_mouse_face (Mouse_HLInfo *hlinfo)
  {
    int cleared = 0;
  
 -  if (!dpyinfo->mouse_face_hidden && !NILP (dpyinfo->mouse_face_window))
 +  if (!hlinfo->mouse_face_hidden && !NILP (hlinfo->mouse_face_window))
      {
 -      show_mouse_face (dpyinfo, DRAW_NORMAL_TEXT);
 +      show_mouse_face (hlinfo, DRAW_NORMAL_TEXT);
        cleared = 1;
      }
  
 -  dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
 -  dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
 -  dpyinfo->mouse_face_window = Qnil;
 -  dpyinfo->mouse_face_overlay = Qnil;
 +  hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
 +  hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
 +  hlinfo->mouse_face_window = Qnil;
 +  hlinfo->mouse_face_overlay = Qnil;
    return cleared;
  }
  
 +/* Return non-zero if the coordinates HPOS and VPOS on windows W are
 +   within the mouse face on that window.  */
 +static int
 +coords_in_mouse_face_p (struct window *w, int hpos, int vpos)
 +{
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 +
 +  /* Quickly resolve the easy cases.  */
 +  if (!(WINDOWP (hlinfo->mouse_face_window)
 +      && XWINDOW (hlinfo->mouse_face_window) == w))
 +    return 0;
 +  if (vpos < hlinfo->mouse_face_beg_row
 +      || vpos > hlinfo->mouse_face_end_row)
 +    return 0;
 +  if (vpos > hlinfo->mouse_face_beg_row
 +      && vpos < hlinfo->mouse_face_end_row)
 +    return 1;
 +
 +  if (!MATRIX_ROW (w->current_matrix, vpos)->reversed_p)
 +    {
 +      if (hlinfo->mouse_face_beg_row == hlinfo->mouse_face_end_row)
 +      {
 +        if (hlinfo->mouse_face_beg_col <= hpos && hpos < hlinfo->mouse_face_end_col)
 +          return 1;
 +      }
 +      else if ((vpos == hlinfo->mouse_face_beg_row
 +              && hpos >= hlinfo->mouse_face_beg_col)
 +             || (vpos == hlinfo->mouse_face_end_row
 +                 && hpos < hlinfo->mouse_face_end_col))
 +      return 1;
 +    }
 +  else
 +    {
 +       if (hlinfo->mouse_face_beg_row == hlinfo->mouse_face_end_row)
 +      {
 +        if (hlinfo->mouse_face_end_col < hpos && hpos <= hlinfo->mouse_face_beg_col)
 +          return 1;
 +      }
 +      else if ((vpos == hlinfo->mouse_face_beg_row
 +              && hpos <= hlinfo->mouse_face_beg_col)
 +             || (vpos == hlinfo->mouse_face_end_row
 +                 && hpos > hlinfo->mouse_face_end_col))
 +      return 1;
 +    }
 +  return 0;
 +}
 +
  
  /* EXPORT:
     Non-zero if physical cursor of window W is within mouse face.  */
  
  int
 -cursor_in_mouse_face_p (w)
 -     struct window *w;
 +cursor_in_mouse_face_p (struct window *w)
  {
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
 -  int in_mouse_face = 0;
 +  return coords_in_mouse_face_p (w, w->phys_cursor.hpos, w->phys_cursor.vpos);
 +}
  
 -  if (WINDOWP (dpyinfo->mouse_face_window)
 -      && XWINDOW (dpyinfo->mouse_face_window) == w)
 -    {
 -      int hpos = w->phys_cursor.hpos;
 -      int vpos = w->phys_cursor.vpos;
  
 -      if (vpos >= dpyinfo->mouse_face_beg_row
 -        && vpos <= dpyinfo->mouse_face_end_row
 -        && (vpos > dpyinfo->mouse_face_beg_row
 -            || hpos >= dpyinfo->mouse_face_beg_col)
 -        && (vpos < dpyinfo->mouse_face_end_row
 -            || hpos < dpyinfo->mouse_face_end_col
 -            || dpyinfo->mouse_face_past_end))
 -      in_mouse_face = 1;
 -    }
 +\f
 +/* Find the glyph rows START_ROW and END_ROW of window W that display
 +   characters between buffer positions START_CHARPOS and END_CHARPOS
 +   (excluding END_CHARPOS).  This is similar to row_containing_pos,
 +   but is more accurate when bidi reordering makes buffer positions
 +   change non-linearly with glyph rows.  */
 +static void
 +rows_from_pos_range (struct window *w,
 +                   EMACS_INT start_charpos, EMACS_INT end_charpos,
 +                   struct glyph_row **start, struct glyph_row **end)
 +{
 +  struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
 +  int last_y = window_text_bottom_y (w);
 +  struct glyph_row *row;
  
 -  return in_mouse_face;
 -}
 +  *start = NULL;
 +  *end = NULL;
 +
 +  while (!first->enabled_p
 +       && first < MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w))
 +    first++;
 +
 +  /* Find the START row.  */
 +  for (row = first;
 +       row->enabled_p && MATRIX_ROW_BOTTOM_Y (row) <= last_y;
 +       row++)
 +    {
 +      /* A row can potentially be the START row if the range of the
 +       characters it displays intersects the range
 +       [START_CHARPOS..END_CHARPOS).  */
 +      if (! ((start_charpos < MATRIX_ROW_START_CHARPOS (row)
 +            && end_charpos < MATRIX_ROW_START_CHARPOS (row))
 +           /* See the commentary in row_containing_pos, for the
 +              explanation of the complicated way to check whether
 +              some position is beyond the end of the characters
 +              displayed by a row.  */
 +           || ((start_charpos > MATRIX_ROW_END_CHARPOS (row)
 +                || (start_charpos == MATRIX_ROW_END_CHARPOS (row)
 +                    && !row->ends_at_zv_p
 +                    && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)))
 +               && (end_charpos > MATRIX_ROW_END_CHARPOS (row)
 +                   || (end_charpos == MATRIX_ROW_END_CHARPOS (row)
 +                       && !row->ends_at_zv_p
 +                       && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row))))))
 +      {
 +        /* Found a candidate row.  Now make sure at least one of the
 +           glyphs it displays has a charpos from the range
 +           [START_CHARPOS..END_CHARPOS).
 +
 +           This is not obvious because bidi reordering could make
 +           buffer positions of a row be 1,2,3,102,101,100, and if we
 +           want to highlight characters in [50..60), we don't want
 +           this row, even though [50..60) does intersect [1..103),
 +           the range of character positions given by the row's start
 +           and end positions.  */
 +        struct glyph *g = row->glyphs[TEXT_AREA];
 +        struct glyph *e = g + row->used[TEXT_AREA];
 +
 +        while (g < e)
 +          {
 +            if (BUFFERP (g->object)
 +                && start_charpos <= g->charpos && g->charpos < end_charpos)
 +              *start = row;
 +            g++;
 +          }
 +        if (*start)
 +          break;
 +      }
 +    }
  
 +  /* Find the END row.  */
 +  if (!*start
 +      /* If the last row is partially visible, start looking for END
 +       from that row, instead of starting from FIRST.  */
 +      && !(row->enabled_p
 +         && row->y < last_y && MATRIX_ROW_BOTTOM_Y (row) > last_y))
 +    row = first;
 +  for ( ; row->enabled_p && MATRIX_ROW_BOTTOM_Y (row) <= last_y; row++)
 +    {
 +      struct glyph_row *next = row + 1;
 +
 +      if (!next->enabled_p
 +        || next >= MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w)
 +        /* The first row >= START whose range of displayed characters
 +           does NOT intersect the range [START_CHARPOS..END_CHARPOS]
 +           is the row END + 1.  */
 +        || (start_charpos < MATRIX_ROW_START_CHARPOS (next)
 +            && end_charpos < MATRIX_ROW_START_CHARPOS (next))
 +        || ((start_charpos > MATRIX_ROW_END_CHARPOS (next)
 +             || (start_charpos == MATRIX_ROW_END_CHARPOS (next)
 +                 && !next->ends_at_zv_p
 +                 && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (next)))
 +            && (end_charpos > MATRIX_ROW_END_CHARPOS (next)
 +                || (end_charpos == MATRIX_ROW_END_CHARPOS (next)
 +                    && !next->ends_at_zv_p
 +                    && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (next)))))
 +      {
 +        *end = row;
 +        break;
 +      }
 +      else
 +      {
 +        /* If the next row's edges intersect [START_CHARPOS..END_CHARPOS],
 +           but none of the characters it displays are in the range, it is
 +           also END + 1. */
 +        struct glyph *g = next->glyphs[TEXT_AREA];
 +        struct glyph *e = g + next->used[TEXT_AREA];
  
 +        while (g < e)
 +          {
 +            if (BUFFERP (g->object)
 +                && start_charpos <= g->charpos && g->charpos < end_charpos)
 +              break;
 +            g++;
 +          }
 +        if (g == e)
 +          {
 +            *end = row;
 +            break;
 +          }
 +      }
 +    }
 +}
  
 -\f
 -/* This function sets the mouse_face_* elements of DPYINFO, assuming
 +/* This function sets the mouse_face_* elements of HLINFO, assuming
     the mouse cursor is on a glyph with buffer charpos MOUSE_CHARPOS in
     window WINDOW.  START_CHARPOS and END_CHARPOS are buffer positions
     for the overlay or run of text properties specifying the mouse
  
  static void
  mouse_face_from_buffer_pos (Lisp_Object window,
 -                          Display_Info *dpyinfo,
 +                          Mouse_HLInfo *hlinfo,
                            EMACS_INT mouse_charpos,
                            EMACS_INT start_charpos,
                            EMACS_INT end_charpos,
  {
    struct window *w = XWINDOW (window);
    struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
 -  struct glyph_row *row;
 +  struct glyph_row *r1, *r2;
    struct glyph *glyph, *end;
 -  EMACS_INT ignore;
 +  EMACS_INT ignore, pos;
    int x;
  
    xassert (NILP (display_string) || STRINGP (display_string));
    xassert (NILP (before_string) || STRINGP (before_string));
    xassert (NILP (after_string) || STRINGP (after_string));
  
 -  /* Find the first highlighted glyph.  */
 -  if (start_charpos < MATRIX_ROW_START_CHARPOS (first))
 +  /* Find the rows corresponding to START_CHARPOS and END_CHARPOS.  */
 +  rows_from_pos_range (w, start_charpos, end_charpos, &r1, &r2);
 +  if (r1 == NULL)
 +    r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 +  /* If the before-string or display-string contains newlines,
 +     rows_from_pos_range skips to its last row.  Move back.  */
 +  if (!NILP (before_string) || !NILP (display_string))
 +    {
 +      struct glyph_row *prev;
 +      while ((prev = r1 - 1, prev >= first)
 +           && MATRIX_ROW_END_CHARPOS (prev) == start_charpos
 +           && prev->used[TEXT_AREA] > 0)
 +      {
 +        struct glyph *beg = prev->glyphs[TEXT_AREA];
 +        glyph = beg + prev->used[TEXT_AREA];
 +        while (--glyph >= beg && INTEGERP (glyph->object));
 +        if (glyph < beg
 +            || !(EQ (glyph->object, before_string)
 +                 || EQ (glyph->object, display_string)))
 +          break;
 +        r1 = prev;
 +      }
 +    }
 +  if (r2 == NULL)
      {
 -      dpyinfo->mouse_face_beg_col = 0;
 -      dpyinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (first, w->current_matrix);
 -      dpyinfo->mouse_face_beg_x = first->x;
 -      dpyinfo->mouse_face_beg_y = first->y;
 +      r2 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 +      hlinfo->mouse_face_past_end = 1;
      }
 -  else
 +  else if (!NILP (after_string))
      {
 -      row = row_containing_pos (w, start_charpos, first, NULL, 0);
 -      if (row == NULL)
 -      row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 -
 -      /* If the before-string or display-string contains newlines,
 -       row_containing_pos skips to its last row.  Move back.  */
 -      if (!NILP (before_string) || !NILP (display_string))
 -      {
 -        struct glyph_row *prev;
 -        while ((prev = row - 1, prev >= first)
 -               && MATRIX_ROW_END_CHARPOS (prev) == start_charpos
 -               && prev->used[TEXT_AREA] > 0)
 -          {
 -            struct glyph *beg = prev->glyphs[TEXT_AREA];
 -            glyph = beg + prev->used[TEXT_AREA];
 -            while (--glyph >= beg && INTEGERP (glyph->object));
 -            if (glyph < beg
 -                || !(EQ (glyph->object, before_string)
 -                     || EQ (glyph->object, display_string)))
 -              break;
 -            row = prev;
 -          }
 -      }
 +      /* If the after-string has newlines, advance to its last row.  */
 +      struct glyph_row *next;
 +      struct glyph_row *last
 +      = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
  
 -      glyph = row->glyphs[TEXT_AREA];
 -      end = glyph + row->used[TEXT_AREA];
 -      x = row->x;
 -      dpyinfo->mouse_face_beg_y = row->y;
 -      dpyinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (row, w->current_matrix);
 +      for (next = r2 + 1;
 +         next <= last
 +           && next->used[TEXT_AREA] > 0
 +           && EQ (next->glyphs[TEXT_AREA]->object, after_string);
 +         ++next)
 +      r2 = next;
 +    }
 +  /* The rest of the display engine assumes that mouse_face_beg_row is
 +     either above below mouse_face_end_row or identical to it.  But
 +     with bidi-reordered continued lines, the row for START_CHARPOS
 +     could be below the row for END_CHARPOS.  If so, swap the rows and
 +     store them in correct order.  */
 +  if (r1->y > r2->y)
 +    {
 +      struct glyph_row *tem = r2;
 +
 +      r2 = r1;
 +      r1 = tem;
 +    }
 +
 +  hlinfo->mouse_face_beg_y = r1->y;
 +  hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r1, w->current_matrix);
 +  hlinfo->mouse_face_end_y = r2->y;
 +  hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix);
 +
 +  /* For a bidi-reordered row, the positions of BEFORE_STRING,
 +     AFTER_STRING, DISPLAY_STRING, START_CHARPOS, and END_CHARPOS
 +     could be anywhere in the row and in any order.  The strategy
 +     below is to find the leftmost and the rightmost glyph that
 +     belongs to either of these 3 strings, or whose position is
 +     between START_CHARPOS and END_CHARPOS, and highlight all the
 +     glyphs between those two.  This may cover more than just the text
 +     between START_CHARPOS and END_CHARPOS if the range of characters
 +     strides the bidi level boundary, e.g. if the beginning is in R2L
 +     text while the end is in L2R text or vice versa.  */
 +  if (!r1->reversed_p)
 +    {
 +      /* This row is in a left to right paragraph.  Scan it left to
 +       right.  */
 +      glyph = r1->glyphs[TEXT_AREA];
 +      end = glyph + r1->used[TEXT_AREA];
 +      x = r1->x;
  
        /* Skip truncation glyphs at the start of the glyph row.  */
 -      if (row->displays_text_p)
 +      if (r1->displays_text_p)
        for (; glyph < end
               && INTEGERP (glyph->object)
               && glyph->charpos < 0;
             ++glyph)
          x += glyph->pixel_width;
  
 -      /* Scan the glyph row, stopping before BEFORE_STRING or
 -       DISPLAY_STRING or START_CHARPOS.  */
 +      /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
 +       or DISPLAY_STRING, and the first glyph from buffer whose
 +       position is between START_CHARPOS and END_CHARPOS.  */
        for (; glyph < end
             && !INTEGERP (glyph->object)
 -           && !EQ (glyph->object, before_string)
             && !EQ (glyph->object, display_string)
             && !(BUFFERP (glyph->object)
 -                && glyph->charpos >= start_charpos);
 +                && (glyph->charpos >= start_charpos
 +                    && glyph->charpos < end_charpos));
           ++glyph)
 -      x += glyph->pixel_width;
 -
 -      dpyinfo->mouse_face_beg_x = x;
 -      dpyinfo->mouse_face_beg_col = glyph - row->glyphs[TEXT_AREA];
 -    }
 -
 -  /* Find the last highlighted glyph.  */
 -  row = row_containing_pos (w, end_charpos, first, NULL, 0);
 -  if (row == NULL)
 -    {
 -      row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 -      dpyinfo->mouse_face_past_end = 1;
 +      {
 +        /* BEFORE_STRING or AFTER_STRING are only relevant if they
 +           are present at buffer positions between START_CHARPOS and
 +           END_CHARPOS, or if they come from an overlay.  */
 +        if (EQ (glyph->object, before_string))
 +          {
 +            pos = string_buffer_position (w, before_string,
 +                                          start_charpos);
 +            /* If pos == 0, it means before_string came from an
 +               overlay, not from a buffer position.  */
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +        else if (EQ (glyph->object, after_string))
 +          {
 +            pos = string_buffer_position (w, after_string, end_charpos);
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +        x += glyph->pixel_width;
 +      }
 +      hlinfo->mouse_face_beg_x = x;
 +      hlinfo->mouse_face_beg_col = glyph - r1->glyphs[TEXT_AREA];
      }
 -  else if (!NILP (after_string))
 +  else
      {
 -      /* If the after-string has newlines, advance to its last row.  */
 -      struct glyph_row *next;
 -      struct glyph_row *last
 -      = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 +      /* This row is in a right to left paragraph.  Scan it right to
 +       left.  */
 +      struct glyph *g;
  
 -      for (next = row + 1;
 -         next <= last
 -           && next->used[TEXT_AREA] > 0
 -           && EQ (next->glyphs[TEXT_AREA]->object, after_string);
 -         ++next)
 -      row = next;
 -    }
 +      end = r1->glyphs[TEXT_AREA] - 1;
 +      glyph = end + r1->used[TEXT_AREA];
  
 -  glyph = row->glyphs[TEXT_AREA];
 -  end = glyph + row->used[TEXT_AREA];
 -  x = row->x;
 -  dpyinfo->mouse_face_end_y = row->y;
 -  dpyinfo->mouse_face_end_row = MATRIX_ROW_VPOS (row, w->current_matrix);
 +      /* Skip truncation glyphs at the start of the glyph row.  */
 +      if (r1->displays_text_p)
 +      for (; glyph > end
 +             && INTEGERP (glyph->object)
 +             && glyph->charpos < 0;
 +           --glyph)
 +        ;
  
 -  /* Skip truncation glyphs at the start of the row.  */
 -  if (row->displays_text_p)
 -    for (; glyph < end
 -         && INTEGERP (glyph->object)
 -         && glyph->charpos < 0;
 -       ++glyph)
 -      x += glyph->pixel_width;
 -
 -  /* Scan the glyph row, stopping at END_CHARPOS or when we encounter
 -     AFTER_STRING.  */
 -  for (; glyph < end
 -       && !INTEGERP (glyph->object)
 -       && !EQ (glyph->object, after_string)
 -       && !(BUFFERP (glyph->object) && glyph->charpos >= end_charpos);
 -       ++glyph)
 -    x += glyph->pixel_width;
 +      /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING,
 +       or DISPLAY_STRING, and the first glyph from buffer whose
 +       position is between START_CHARPOS and END_CHARPOS.  */
 +      for (; glyph > end
 +           && !INTEGERP (glyph->object)
 +           && !EQ (glyph->object, display_string)
 +           && !(BUFFERP (glyph->object)
 +                && (glyph->charpos >= start_charpos
 +                    && glyph->charpos < end_charpos));
 +         --glyph)
 +      {
 +        /* BEFORE_STRING or AFTER_STRING are only relevant if they
 +           are present at buffer positions between START_CHARPOS and
 +           END_CHARPOS, or if they come from an overlay.  */
 +        if (EQ (glyph->object, before_string))
 +          {
 +            pos = string_buffer_position (w, before_string, start_charpos);
 +            /* If pos == 0, it means before_string came from an
 +               overlay, not from a buffer position.  */
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +        else if (EQ (glyph->object, after_string))
 +          {
 +            pos = string_buffer_position (w, after_string, end_charpos);
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +      }
 +
 +      glyph++; /* first glyph to the right of the highlighted area */
 +      for (g = r1->glyphs[TEXT_AREA], x = r1->x; g < glyph; g++)
 +      x += g->pixel_width;
 +      hlinfo->mouse_face_beg_x = x;
 +      hlinfo->mouse_face_beg_col = glyph - r1->glyphs[TEXT_AREA];
 +    }
  
 -  /* If we found AFTER_STRING, consume it and stop.  */
 -  if (EQ (glyph->object, after_string))
 +  /* If the highlight ends in a different row, compute GLYPH and END
 +     for the end row.  Otherwise, reuse the values computed above for
 +     the row where the highlight begins.  */
 +  if (r2 != r1)
      {
 -      for (; EQ (glyph->object, after_string) && glyph < end; ++glyph)
 +      if (!r2->reversed_p)
 +      {
 +        glyph = r2->glyphs[TEXT_AREA];
 +        end = glyph + r2->used[TEXT_AREA];
 +        x = r2->x;
 +      }
 +      else
 +      {
 +        end = r2->glyphs[TEXT_AREA] - 1;
 +        glyph = end + r2->used[TEXT_AREA];
 +      }
 +    }
 +
 +  if (!r2->reversed_p)
 +    {
 +      /* Skip truncation and continuation glyphs near the end of the
 +       row, and also blanks and stretch glyphs inserted by
 +       extend_face_to_end_of_line.  */
 +      while (end > glyph
 +           && INTEGERP ((end - 1)->object)
 +           && (end - 1)->charpos <= 0)
 +      --end;
 +      /* Scan the rest of the glyph row from the end, looking for the
 +       first glyph that comes from BEFORE_STRING, AFTER_STRING, or
 +       DISPLAY_STRING, or whose position is between START_CHARPOS
 +       and END_CHARPOS */
 +      for (--end;
 +           end > glyph
 +           && !INTEGERP (end->object)
 +           && !EQ (end->object, display_string)
 +           && !(BUFFERP (end->object)
 +                && (end->charpos >= start_charpos
 +                    && end->charpos < end_charpos));
 +         --end)
 +      {
 +        /* BEFORE_STRING or AFTER_STRING are only relevant if they
 +           are present at buffer positions between START_CHARPOS and
 +           END_CHARPOS, or if they come from an overlay.  */
 +        if (EQ (end->object, before_string))
 +          {
 +            pos = string_buffer_position (w, before_string, start_charpos);
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +        else if (EQ (end->object, after_string))
 +          {
 +            pos = string_buffer_position (w, after_string, end_charpos);
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +      }
 +      /* Find the X coordinate of the last glyph to be highlighted.  */
 +      for (; glyph <= end; ++glyph)
        x += glyph->pixel_width;
 +
 +      hlinfo->mouse_face_end_x = x;
 +      hlinfo->mouse_face_end_col = glyph - r2->glyphs[TEXT_AREA];
      }
    else
      {
 -      /* If there's no after-string, we must check if we overshot,
 -       which might be the case if we stopped after a string glyph.
 -       That glyph may belong to a before-string or display-string
 -       associated with the end position, which must not be
 -       highlighted.  */
 -      Lisp_Object prev_object;
 -      int pos;
 -
 -      while (glyph > row->glyphs[TEXT_AREA])
 -      {
 -        prev_object = (glyph - 1)->object;
 -        if (!STRINGP (prev_object) || EQ (prev_object, display_string))
 -          break;
 -
 -        pos = string_buffer_position (w, prev_object, end_charpos);
 -        if (pos && pos < end_charpos)
 -          break;
 -
 -        for (; glyph > row->glyphs[TEXT_AREA]
 -               && EQ ((glyph - 1)->object, prev_object);
 -             --glyph)
 -          x -= (glyph - 1)->pixel_width;
 +      /* Skip truncation and continuation glyphs near the end of the
 +       row, and also blanks and stretch glyphs inserted by
 +       extend_face_to_end_of_line.  */
 +      x = r2->x;
 +      end++;
 +      while (end < glyph
 +           && INTEGERP (end->object)
 +           && end->charpos <= 0)
 +      {
 +        x += end->pixel_width;
 +        ++end;
 +      }
 +      /* Scan the rest of the glyph row from the end, looking for the
 +       first glyph that comes from BEFORE_STRING, AFTER_STRING, or
 +       DISPLAY_STRING, or whose position is between START_CHARPOS
 +       and END_CHARPOS */
 +      for ( ;
 +           end < glyph
 +           && !INTEGERP (end->object)
 +           && !EQ (end->object, display_string)
 +           && !(BUFFERP (end->object)
 +                && (end->charpos >= start_charpos
 +                    && end->charpos < end_charpos));
 +         ++end)
 +      {
 +        /* BEFORE_STRING or AFTER_STRING are only relevant if they
 +           are present at buffer positions between START_CHARPOS and
 +           END_CHARPOS, or if they come from an overlay.  */
 +        if (EQ (end->object, before_string))
 +          {
 +            pos = string_buffer_position (w, before_string, start_charpos);
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +        else if (EQ (end->object, after_string))
 +          {
 +            pos = string_buffer_position (w, after_string, end_charpos);
 +            if (!pos || (pos >= start_charpos && pos < end_charpos))
 +              break;
 +          }
 +        x += end->pixel_width;
        }
 +      hlinfo->mouse_face_end_x = x;
 +      hlinfo->mouse_face_end_col = end - r2->glyphs[TEXT_AREA];
      }
  
 -  dpyinfo->mouse_face_end_x = x;
 -  dpyinfo->mouse_face_end_col = glyph - row->glyphs[TEXT_AREA];
 -  dpyinfo->mouse_face_window = window;
 -  dpyinfo->mouse_face_face_id
 +  hlinfo->mouse_face_window = window;
 +  hlinfo->mouse_face_face_id
      = face_at_buffer_position (w, mouse_charpos, 0, 0, &ignore,
                               mouse_charpos + 1,
 -                             !dpyinfo->mouse_face_hidden, -1);
 -  show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
 +                             !hlinfo->mouse_face_hidden, -1);
 +  show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
  }
  
 +/* The following function is not used anymore (replaced with
 +   mouse_face_from_string_pos), but I leave it here for the time
 +   being, in case someone would.  */
 +
 +#if 0 /* not used */
  
  /* Find the position of the glyph for position POS in OBJECT in
     window W's current matrix, and return in *X, *Y the pixel
     Value is non-zero if a glyph was found.  */
  
  static int
 -fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p)
 -     struct window *w;
 -     EMACS_INT pos;
 -     Lisp_Object object;
 -     int *hpos, *vpos, *x, *y;
 -     int right_p;
 +fast_find_string_pos (struct window *w, EMACS_INT pos, Lisp_Object object,
 +                    int *hpos, int *vpos, int *x, int *y, int right_p)
  {
    int yb = window_text_bottom_y (w);
    struct glyph_row *r;
  
    return best_glyph != NULL;
  }
 +#endif        /* not used */
 +
 +/* Find the positions of the first and the last glyphs in window W's
 +   current matrix that occlude positions [STARTPOS..ENDPOS] in OBJECT
 +   (assumed to be a string), and return in HLINFO's mouse_face_*
 +   members the pixel and column/row coordinates of those glyphs.  */
 +
 +static void
 +mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo,
 +                          Lisp_Object object,
 +                          EMACS_INT startpos, EMACS_INT endpos)
 +{
 +  int yb = window_text_bottom_y (w);
 +  struct glyph_row *r;
 +  struct glyph *g, *e;
 +  int gx;
 +  int found = 0;
 +
 +  /* Find the glyph row with at least one position in the range
 +     [STARTPOS..ENDPOS], and the first glyph in that row whose
 +     position belongs to that range.  */
 +  for (r = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
 +       r->enabled_p && r->y < yb;
 +       ++r)
 +    {
 +      if (!r->reversed_p)
 +      {
 +        g = r->glyphs[TEXT_AREA];
 +        e = g + r->used[TEXT_AREA];
 +        for (gx = r->x; g < e; gx += g->pixel_width, ++g)
 +          if (EQ (g->object, object)
 +              && startpos <= g->charpos && g->charpos <= endpos)
 +            {
 +              hlinfo->mouse_face_beg_row = r - w->current_matrix->rows;
 +              hlinfo->mouse_face_beg_y = r->y;
 +              hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA];
 +              hlinfo->mouse_face_beg_x = gx;
 +              found = 1;
 +              break;
 +            }
 +      }
 +      else
 +      {
 +        struct glyph *g1;
 +
 +        e = r->glyphs[TEXT_AREA];
 +        g = e + r->used[TEXT_AREA];
 +        for ( ; g > e; --g)
 +          if (EQ ((g-1)->object, object)
 +              && startpos <= (g-1)->charpos && (g-1)->charpos <= endpos)
 +            {
 +              hlinfo->mouse_face_beg_row = r - w->current_matrix->rows;
 +              hlinfo->mouse_face_beg_y = r->y;
 +              hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA];
 +              for (gx = r->x, g1 = r->glyphs[TEXT_AREA]; g1 < g; ++g1)
 +                gx += g1->pixel_width;
 +              hlinfo->mouse_face_beg_x = gx;
 +              found = 1;
 +              break;
 +            }
 +      }
 +      if (found)
 +      break;
 +    }
 +
 +  if (!found)
 +    return;
 +
 +  /* Starting with the next row, look for the first row which does NOT
 +     include any glyphs whose positions are in the range.  */
 +  for (++r; r->enabled_p && r->y < yb; ++r)
 +    {
 +      g = r->glyphs[TEXT_AREA];
 +      e = g + r->used[TEXT_AREA];
 +      found = 0;
 +      for ( ; g < e; ++g)
 +      if (EQ (g->object, object)
 +          && startpos <= g->charpos && g->charpos <= endpos)
 +        {
 +          found = 1;
 +          break;
 +        }
 +      if (!found)
 +      break;
 +    }
 +
 +  /* The highlighted region ends on the previous row.  */
 +  r--;
 +
 +  /* Set the end row and its vertical pixel coordinate.  */
 +  hlinfo->mouse_face_end_row = r - w->current_matrix->rows;
 +  hlinfo->mouse_face_end_y = r->y;
 +
 +  /* Compute and set the end column and the end column's horizontal
 +     pixel coordinate.  */
 +  if (!r->reversed_p)
 +    {
 +      g = r->glyphs[TEXT_AREA];
 +      e = g + r->used[TEXT_AREA];
 +      for ( ; e > g; --e)
 +      if (EQ ((e-1)->object, object)
 +          && startpos <= (e-1)->charpos && (e-1)->charpos <= endpos)
 +        break;
 +      hlinfo->mouse_face_end_col = e - g;
 +
 +      for (gx = r->x; g < e; ++g)
 +      gx += g->pixel_width;
 +      hlinfo->mouse_face_end_x = gx;
 +    }
 +  else
 +    {
 +      e = r->glyphs[TEXT_AREA];
 +      g = e + r->used[TEXT_AREA];
 +      for (gx = r->x ; e < g; ++e)
 +      {
 +        if (EQ (e->object, object)
 +            && startpos <= e->charpos && e->charpos <= endpos)
 +          break;
 +        gx += e->pixel_width;
 +      }
 +      hlinfo->mouse_face_end_col = e - r->glyphs[TEXT_AREA];
 +      hlinfo->mouse_face_end_x = gx;
 +    }
 +}
  
 +#ifdef HAVE_WINDOW_SYSTEM
  
  /* See if position X, Y is within a hot-spot of an image.  */
  
  static int
 -on_hot_spot_p (hot_spot, x, y)
 -     Lisp_Object hot_spot;
 -     int x, y;
 +on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
  {
    if (!CONSP (hot_spot))
      return 0;
  }
  
  Lisp_Object
 -find_hot_spot (map, x, y)
 -     Lisp_Object map;
 -     int x, y;
 +find_hot_spot (Lisp_Object map, int x, int y)
  {
    while (CONSP (map))
      {
@@@ -25026,7 -23133,9 +25029,7 @@@ and the radius of the circle; r may be 
  A polygon is a cons (poly . [x0 y0 x1 y1 ...]) where each pair in the
  vector describes one corner in the polygon.
  Returns the alist element for the first matching AREA in MAP.  */)
 -     (map, x, y)
 -     Lisp_Object map;
 -     Lisp_Object x, y;
 +  (Lisp_Object map, Lisp_Object x, Lisp_Object y)
  {
    if (NILP (map))
      return Qnil;
  
  /* Display frame CURSOR, optionally using shape defined by POINTER.  */
  static void
 -define_frame_cursor1 (f, cursor, pointer)
 -     struct frame *f;
 -     Cursor cursor;
 -     Lisp_Object pointer;
 +define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
  {
    /* Do not change cursor shape while dragging mouse.  */
    if (!NILP (do_mouse_tracking))
      FRAME_RIF (f)->define_frame_cursor (f, cursor);
  }
  
 +#endif        /* HAVE_WINDOW_SYSTEM */
 +
  /* Take proper action when mouse has moved to the mode or header line
     or marginal area AREA of window W, x-position X and y-position Y.
     X is relative to the start of the text display area of W, so the
     position relative to the start of the mode line.  */
  
  static void
 -note_mode_line_or_margin_highlight (window, x, y, area)
 -     Lisp_Object window;
 -     int x, y;
 -     enum window_part area;
 +note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
 +                                  enum window_part area)
  {
    struct window *w = XWINDOW (window);
    struct frame *f = XFRAME (w->frame);
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 -  Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 +#ifdef HAVE_WINDOW_SYSTEM
 +  Display_Info *dpyinfo;
 +#endif
 +  Cursor cursor = No_Cursor;
    Lisp_Object pointer = Qnil;
 -  int charpos, dx, dy, width, height;
 +  int dx, dy, width, height;
 +  EMACS_INT charpos;
    Lisp_Object string, object = Qnil;
    Lisp_Object pos, help;
  
        int x0;
        struct glyph *end;
  
 +      /* Kludge alert: mode_line_string takes X/Y in pixels, but
 +       returns them in row/column units!  */
        string = mode_line_string (w, area, &x, &y, &charpos,
                                 &object, &dx, &dy, &width, &height);
  
             ? MATRIX_MODE_LINE_ROW (w->current_matrix)
             : MATRIX_HEADER_LINE_ROW (w->current_matrix));
  
 -      /* Find glyph */
 +      /* Find the glyph under the mouse pointer.  */
        if (row->mode_line_p && row->enabled_p)
        {
          glyph = row_start_glyph = row->glyphs[TEXT_AREA];
    else
      {
        x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w);
 +      /* Kludge alert: marginal_area_string takes X/Y in pixels, but
 +       returns them in row/column units!  */
        string = marginal_area_string (w, area, &x, &y, &charpos,
                                     &object, &dx, &dy, &width, &height);
      }
  
    help = Qnil;
  
 +#ifdef HAVE_WINDOW_SYSTEM
    if (IMAGEP (object))
      {
        Lisp_Object image_map, hotspot;
        if (NILP (pointer))
        pointer = Fplist_get (XCDR (object), QCpointer);
      }
 +#endif        /* HAVE_WINDOW_SYSTEM */
  
    if (STRINGP (string))
      {
            }
        }
  
 -      if (NILP (pointer))
 -      pointer = Fget_text_property (pos, Qpointer, string);
 -
 -     /* Change the mouse pointer according to what is under X/Y.  */
 -      if (NILP (pointer) && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)))
 +#ifdef HAVE_WINDOW_SYSTEM
 +      if (FRAME_WINDOW_P (f))
        {
 -        Lisp_Object map;
 -        map = Fget_text_property (pos, Qlocal_map, string);
 -        if (!KEYMAPP (map))
 -          map = Fget_text_property (pos, Qkeymap, string);
 -        if (!KEYMAPP (map))
 -          cursor = dpyinfo->vertical_scroll_bar_cursor;
 +        dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +        cursor  = FRAME_X_OUTPUT (f)->nontext_cursor;
 +        if (NILP (pointer))
 +          pointer = Fget_text_property (pos, Qpointer, string);
 +
 +        /* Change the mouse pointer according to what is under X/Y.  */
 +        if (NILP (pointer)
 +            && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)))
 +          {
 +            Lisp_Object map;
 +            map = Fget_text_property (pos, Qlocal_map, string);
 +            if (!KEYMAPP (map))
 +              map = Fget_text_property (pos, Qkeymap, string);
 +            if (!KEYMAPP (map))
 +              cursor = dpyinfo->vertical_scroll_bar_cursor;
 +          }
        }
 +#endif
  
       /* Change the mouse face according to what is under X/Y.  */
        mouse_face = Fget_text_property (pos, Qmouse_face, string);
          int gpos;
          int gseq_length;
          int total_pixel_width;
 -        EMACS_INT ignore;
 +        EMACS_INT begpos, endpos, ignore;
  
          int vpos, hpos;
  
          b = Fprevious_single_property_change (make_number (charpos + 1),
                                                Qmouse_face, string, Qnil);
          if (NILP (b))
 -          b = make_number (0);
 +          begpos = 0;
 +        else
 +          begpos = XINT (b);
  
          e = Fnext_single_property_change (pos, Qmouse_face, string, Qnil);
          if (NILP (e))
 -          e = make_number (SCHARS (string));
 -
 -        /* Calculate the position(glyph position: GPOS) of GLYPH in
 -           displayed string. GPOS is different from CHARPOS.
 -
 -           CHARPOS is the position of glyph in internal string
 -           object. A mode line string format has structures which
 -           is converted to a flatten by emacs lisp interpreter.
 -           The internal string is an element of the structures.
 -           The displayed string is the flatten string. */
 -        gpos = 0;
 -        if (glyph > row_start_glyph)
 -          {
 -            tmp_glyph = glyph - 1;
 -            while (tmp_glyph >= row_start_glyph
 -                   && tmp_glyph->charpos >= XINT (b)
 -                   && EQ (tmp_glyph->object, glyph->object))
 -              {
 -                tmp_glyph--;
 -                gpos++;
 -              }
 -          }
 -
 -        /* Calculate the lenght(glyph sequence length: GSEQ_LENGTH) of
 -           displayed string holding GLYPH.
 -
 -           GSEQ_LENGTH is different from SCHARS (STRING).
 -           SCHARS (STRING) returns the length of the internal string. */
 -        for (tmp_glyph = glyph, gseq_length = gpos;
 -             tmp_glyph->charpos < XINT (e);
 -             tmp_glyph++, gseq_length++)
 -            {
 -              if (!EQ (tmp_glyph->object, glyph->object))
 -                break;
 -            }
 -
 +          endpos = SCHARS (string);
 +        else
 +          endpos = XINT (e);
 +
 +        /* Calculate the glyph position GPOS of GLYPH in the
 +           displayed string, relative to the beginning of the
 +           highlighted part of the string.
 +
 +           Note: GPOS is different from CHARPOS.  CHARPOS is the
 +           position of GLYPH in the internal string object.  A mode
 +           line string format has structures which are converted to
 +           a flattened string by the Emacs Lisp interpreter.  The
 +           internal string is an element of those structures.  The
 +           displayed string is the flattened string.  */
 +        tmp_glyph = row_start_glyph;
 +        while (tmp_glyph < glyph
 +               && (!(EQ (tmp_glyph->object, glyph->object)
 +                     && begpos <= tmp_glyph->charpos
 +                     && tmp_glyph->charpos < endpos)))
 +          tmp_glyph++;
 +        gpos = glyph - tmp_glyph;
 +
 +        /* Calculate the length GSEQ_LENGTH of the glyph sequence of
 +           the highlighted part of the displayed string to which
 +           GLYPH belongs.  Note: GSEQ_LENGTH is different from
 +           SCHARS (STRING), because the latter returns the length of
 +           the internal string.  */
 +        for (tmp_glyph = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1;
 +             tmp_glyph > glyph
 +               && (!(EQ (tmp_glyph->object, glyph->object)
 +                     && begpos <= tmp_glyph->charpos
 +                     && tmp_glyph->charpos < endpos));
 +             tmp_glyph--)
 +          ;
 +        gseq_length = gpos + (tmp_glyph - glyph) + 1;
 +
 +        /* Calculate the total pixel width of all the glyphs between
 +           the beginning of the highlighted area and GLYPH.  */
          total_pixel_width = 0;
          for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++)
            total_pixel_width += tmp_glyph->pixel_width;
  
 -        /* Pre calculation of re-rendering position */
 -        vpos = (x - gpos);
 -        hpos = (area == ON_MODE_LINE
 +        /* Pre calculation of re-rendering position.  Note: X is in
 +           column units here, after the call to mode_line_string or
 +           marginal_area_string.  */
 +        hpos = x - gpos;
 +        vpos = (area == ON_MODE_LINE
                  ? (w->current_matrix)->nrows - 1
                  : 0);
  
 -        /* If the re-rendering position is included in the last
 -           re-rendering area, we should do nothing. */
 -        if ( EQ (window, dpyinfo->mouse_face_window)
 -             && dpyinfo->mouse_face_beg_col <= vpos
 -             && vpos < dpyinfo->mouse_face_end_col
 -             && dpyinfo->mouse_face_beg_row == hpos )
 +        /* If GLYPH's position is included in the region that is
 +           already drawn in mouse face, we have nothing to do.  */
 +        if ( EQ (window, hlinfo->mouse_face_window)
 +             && (!row->reversed_p
 +                 ? (hlinfo->mouse_face_beg_col <= hpos
 +                    && hpos < hlinfo->mouse_face_end_col)
 +                 /* In R2L rows we swap BEG and END, see below.  */
 +                 : (hlinfo->mouse_face_end_col <= hpos
 +                    && hpos < hlinfo->mouse_face_beg_col))
 +             && hlinfo->mouse_face_beg_row == vpos )
            return;
  
 -        if (clear_mouse_face (dpyinfo))
 +        if (clear_mouse_face (hlinfo))
            cursor = No_Cursor;
  
 -        dpyinfo->mouse_face_beg_col = vpos;
 -        dpyinfo->mouse_face_beg_row = hpos;
 -
 -        dpyinfo->mouse_face_beg_x   = original_x_pixel - (total_pixel_width + dx);
 -        dpyinfo->mouse_face_beg_y   = 0;
 -
 -        dpyinfo->mouse_face_end_col = vpos + gseq_length;
 -        dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row;
 -
 -        dpyinfo->mouse_face_end_x   = 0;
 -        dpyinfo->mouse_face_end_y   = 0;
 -
 -        dpyinfo->mouse_face_past_end = 0;
 -        dpyinfo->mouse_face_window  = window;
 +        if (!row->reversed_p)
 +          {
 +            hlinfo->mouse_face_beg_col = hpos;
 +            hlinfo->mouse_face_beg_x   = original_x_pixel
 +                                          - (total_pixel_width + dx);
 +            hlinfo->mouse_face_end_col = hpos + gseq_length;
 +            hlinfo->mouse_face_end_x   = 0;
 +          }
 +        else
 +          {
 +            /* In R2L rows, show_mouse_face expects BEG and END
 +               coordinates to be swapped.  */
 +            hlinfo->mouse_face_end_col = hpos;
 +            hlinfo->mouse_face_end_x   = original_x_pixel
 +                                          - (total_pixel_width + dx);
 +            hlinfo->mouse_face_beg_col = hpos + gseq_length;
 +            hlinfo->mouse_face_beg_x   = 0;
 +          }
  
 -        dpyinfo->mouse_face_face_id = face_at_string_position (w, string,
 -                                                               charpos,
 -                                                               0, 0, 0, &ignore,
 -                                                               glyph->face_id, 1);
 -        show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
 +        hlinfo->mouse_face_beg_row  = vpos;
 +        hlinfo->mouse_face_end_row  = hlinfo->mouse_face_beg_row;
 +        hlinfo->mouse_face_beg_y    = 0;
 +        hlinfo->mouse_face_end_y    = 0;
 +        hlinfo->mouse_face_past_end = 0;
 +        hlinfo->mouse_face_window   = window;
 +
 +        hlinfo->mouse_face_face_id = face_at_string_position (w, string,
 +                                                              charpos,
 +                                                              0, 0, 0,
 +                                                              &ignore,
 +                                                              glyph->face_id,
 +                                                              1);
 +        show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
  
          if (NILP (pointer))
            pointer = Qhand;
        }
        else if ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE))
 -      clear_mouse_face (dpyinfo);
 +      clear_mouse_face (hlinfo);
      }
 -  define_frame_cursor1 (f, cursor, pointer);
 +#ifdef HAVE_WINDOW_SYSTEM
 +  if (FRAME_WINDOW_P (f))
 +    define_frame_cursor1 (f, cursor, pointer);
 +#endif
  }
  
  
     X and Y can be negative or out of range.  */
  
  void
 -note_mouse_highlight (f, x, y)
 -     struct frame *f;
 -     int x, y;
 +note_mouse_highlight (struct frame *f, int x, int y)
  {
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
    enum window_part part;
    Lisp_Object window;
    struct window *w;
    struct buffer *b;
  
    /* When a menu is active, don't highlight because this looks odd.  */
 -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
 +#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) || defined (MSDOS)
    if (popup_activated ())
      return;
  #endif
        || f->pointer_invisible)
      return;
  
 -  dpyinfo->mouse_face_mouse_x = x;
 -  dpyinfo->mouse_face_mouse_y = y;
 -  dpyinfo->mouse_face_mouse_frame = f;
 +  hlinfo->mouse_face_mouse_x = x;
 +  hlinfo->mouse_face_mouse_y = y;
 +  hlinfo->mouse_face_mouse_frame = f;
  
 -  if (dpyinfo->mouse_face_defer)
 +  if (hlinfo->mouse_face_defer)
      return;
  
    if (gc_in_progress)
      {
 -      dpyinfo->mouse_face_deferred_gc = 1;
 +      hlinfo->mouse_face_deferred_gc = 1;
        return;
      }
  
    /* Which window is that in?  */
 -  window = window_from_coordinates (f, x, y, &part, 0, 0, 1);
 +  window = window_from_coordinates (f, x, y, &part, 1);
  
    /* If we were displaying active text in another window, clear that.
       Also clear if we move out of text area in same window.  */
 -  if (! EQ (window, dpyinfo->mouse_face_window)
 +  if (! EQ (window, hlinfo->mouse_face_window)
        || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE
 -        && !NILP (dpyinfo->mouse_face_window)))
 -    clear_mouse_face (dpyinfo);
 +        && !NILP (hlinfo->mouse_face_window)))
 +    clear_mouse_face (hlinfo);
  
    /* Not on a window -> return.  */
    if (!WINDOWP (window))
    w = XWINDOW (window);
    frame_to_window_pixel_xy (w, &x, &y);
  
 +#ifdef HAVE_WINDOW_SYSTEM
    /* Handle tool-bar window differently since it doesn't display a
       buffer.  */
    if (EQ (window, f->tool_bar_window))
        note_tool_bar_highlight (f, x, y);
        return;
      }
 +#endif
  
    /* Mouse is on the mode, header line or margin?  */
    if (part == ON_MODE_LINE || part == ON_HEADER_LINE
        return;
      }
  
 +#ifdef HAVE_WINDOW_SYSTEM
    if (part == ON_VERTICAL_BORDER)
      {
        cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
    else
      cursor = FRAME_X_OUTPUT (f)->text_cursor;
 +#endif
  
    /* Are we in a window whose display is up to date?
       And verify the buffer's text has not changed.  */
        && XFASTINT (w->last_modified) == BUF_MODIFF (b)
        && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b))
      {
 -      int hpos, vpos, pos, i, dx, dy, area;
 +      int hpos, vpos, i, dx, dy, area;
 +      EMACS_INT pos;
        struct glyph *glyph;
        Lisp_Object object;
        Lisp_Object mouse_face = Qnil, overlay = Qnil, position;
        Lisp_Object *overlay_vec = NULL;
        int noverlays;
        struct buffer *obuf;
 -      int obegv, ozv, same_region;
 +      EMACS_INT obegv, ozv;
 +      int same_region;
  
        /* Find the glyph under X/Y.  */
        glyph = x_y_to_hpos_vpos (w, x, y, &hpos, &vpos, &dx, &dy, &area);
  
 +#ifdef HAVE_WINDOW_SYSTEM
        /* Look for :pointer property on image.  */
        if (glyph != NULL && glyph->type == IMAGE_GLYPH)
        {
              if ((image_map = Fplist_get (XCDR (img->spec), QCmap),
                   !NILP (image_map))
                  && (hotspot = find_hot_spot (image_map,
 -                                             glyph->slice.x + dx,
 -                                             glyph->slice.y + dy),
 +                                             glyph->slice.img.x + dx,
 +                                             glyph->slice.img.y + dy),
                      CONSP (hotspot))
                  && (hotspot = XCDR (hotspot), CONSP (hotspot)))
                {
                pointer = Fplist_get (XCDR (img->spec), QCpointer);
            }
        }
 +#endif        /* HAVE_WINDOW_SYSTEM */
  
        /* Clear mouse face if X/Y not over text.  */
        if (glyph == NULL
          || area != TEXT_AREA
 -        || !MATRIX_ROW (w->current_matrix, vpos)->displays_text_p)
 -      {
 -        if (clear_mouse_face (dpyinfo))
 +        || !MATRIX_ROW (w->current_matrix, vpos)->displays_text_p
 +        /* Glyph's OBJECT is an integer for glyphs inserted by the
 +           display engine for its internal purposes, like truncation
 +           and continuation glyphs and blanks beyond the end of
 +           line's text on text terminals.  If we are over such a
 +           glyph, we are not over any text.  */
 +        || INTEGERP (glyph->object)
 +        /* R2L rows have a stretch glyph at their front, which
 +           stands for no text, whereas L2R rows have no glyphs at
 +           all beyond the end of text.  Treat such stretch glyphs
 +           like we do with NULL glyphs in L2R rows.  */
 +        || (MATRIX_ROW (w->current_matrix, vpos)->reversed_p
 +            && glyph == MATRIX_ROW (w->current_matrix, vpos)->glyphs[TEXT_AREA]
 +            && glyph->type == STRETCH_GLYPH
 +            && glyph->avoid_cursor_p))
 +      {
 +        if (clear_mouse_face (hlinfo))
            cursor = No_Cursor;
 -        if (NILP (pointer))
 +#ifdef HAVE_WINDOW_SYSTEM
 +        if (FRAME_WINDOW_P (f) && NILP (pointer))
            {
              if (area != TEXT_AREA)
                cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
              else
                pointer = Vvoid_text_area_pointer;
            }
 +#endif
          goto set_cursor;
        }
  
        else
        noverlays = 0;
  
 -      same_region = (EQ (window, dpyinfo->mouse_face_window)
 -                   && vpos >= dpyinfo->mouse_face_beg_row
 -                   && vpos <= dpyinfo->mouse_face_end_row
 -                   && (vpos > dpyinfo->mouse_face_beg_row
 -                       || hpos >= dpyinfo->mouse_face_beg_col)
 -                   && (vpos < dpyinfo->mouse_face_end_row
 -                       || hpos < dpyinfo->mouse_face_end_col
 -                       || dpyinfo->mouse_face_past_end));
 +      same_region = coords_in_mouse_face_p (w, hpos, vpos);
  
        if (same_region)
        cursor = No_Cursor;
             the one we are currently highlighting, we have to
             check if we enter the overlapping overlay, and then
             highlight only that.  */
 -        || (OVERLAYP (dpyinfo->mouse_face_overlay)
 -            && mouse_face_overlay_overlaps (dpyinfo->mouse_face_overlay)))
 +        || (OVERLAYP (hlinfo->mouse_face_overlay)
 +            && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay)))
        {
          /* Find the highest priority overlay with a mouse-face.  */
          overlay = Qnil;
  
          /* If we're highlighting the same overlay as before, there's
             no need to do that again.  */
 -        if (!NILP (overlay) && EQ (overlay, dpyinfo->mouse_face_overlay))
 +        if (!NILP (overlay) && EQ (overlay, hlinfo->mouse_face_overlay))
            goto check_help_echo;
 -        dpyinfo->mouse_face_overlay = overlay;
 +        hlinfo->mouse_face_overlay = overlay;
  
          /* Clear the display of the old active region, if any.  */
 -        if (clear_mouse_face (dpyinfo))
 +        if (clear_mouse_face (hlinfo))
            cursor = No_Cursor;
  
          /* If no overlay applies, get a text property.  */
                b = make_number (0);
              if (NILP (e))
                e = make_number (SCHARS (object) - 1);
 -
 -            fast_find_string_pos (w, XINT (b), object,
 -                                  &dpyinfo->mouse_face_beg_col,
 -                                  &dpyinfo->mouse_face_beg_row,
 -                                  &dpyinfo->mouse_face_beg_x,
 -                                  &dpyinfo->mouse_face_beg_y, 0);
 -            fast_find_string_pos (w, XINT (e), object,
 -                                  &dpyinfo->mouse_face_end_col,
 -                                  &dpyinfo->mouse_face_end_row,
 -                                  &dpyinfo->mouse_face_end_x,
 -                                  &dpyinfo->mouse_face_end_y, 1);
 -            dpyinfo->mouse_face_past_end = 0;
 -            dpyinfo->mouse_face_window = window;
 -            dpyinfo->mouse_face_face_id
 +            mouse_face_from_string_pos (w, hlinfo, object,
 +                                        XINT (b), XINT (e));
 +            hlinfo->mouse_face_past_end = 0;
 +            hlinfo->mouse_face_window = window;
 +            hlinfo->mouse_face_face_id
                = face_at_string_position (w, object, pos, 0, 0, 0, &ignore,
                                           glyph->face_id, 1);
 -            show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
 +            show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
              cursor = No_Cursor;
            }
          else
                  /* If we are on a display string with no mouse-face,
                     check if the text under it has one.  */
                  struct glyph_row *r = MATRIX_ROW (w->current_matrix, vpos);
 -                int start = MATRIX_ROW_START_CHARPOS (r);
 +                EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
                  pos = string_buffer_position (w, object, start);
                  if (pos > 0)
                    {
                {
                  Lisp_Object before, after;
                  Lisp_Object before_string, after_string;
 +                /* To correctly find the limits of mouse highlight
 +                   in a bidi-reordered buffer, we must not use the
 +                   optimization of limiting the search in
 +                   previous-single-property-change and
 +                   next-single-property-change, because
 +                   rows_from_pos_range needs the real start and end
 +                   positions to DTRT in this case.  That's because
 +                   the first row visible in a window does not
 +                   necessarily display the character whose position
 +                   is the smallest.  */
 +                Lisp_Object lim1 =
 +                  NILP (XBUFFER (buffer)->bidi_display_reordering)
 +                  ? Fmarker_position (w->start)
 +                  : Qnil;
 +                Lisp_Object lim2 =
 +                  NILP (XBUFFER (buffer)->bidi_display_reordering)
 +                  ? make_number (BUF_Z (XBUFFER (buffer))
 +                                 - XFASTINT (w->window_end_pos))
 +                  : Qnil;
  
                  if (NILP (overlay))
                    {
                      /* Handle the text property case.  */
                      before = Fprevious_single_property_change
 -                      (make_number (pos + 1), Qmouse_face, buffer,
 -                       Fmarker_position (w->start));
 +                      (make_number (pos + 1), Qmouse_face, buffer, lim1);
                      after = Fnext_single_property_change
 -                      (make_number (pos), Qmouse_face, buffer,
 -                       make_number (BUF_Z (XBUFFER (buffer))
 -                                    - XFASTINT (w->window_end_pos)));
 +                      (make_number (pos), Qmouse_face, buffer, lim2);
                      before_string = after_string = Qnil;
                    }
                  else
                      if (!STRINGP (after_string))  after_string = Qnil;
                    }
  
 -                mouse_face_from_buffer_pos (window, dpyinfo, pos,
 +                mouse_face_from_buffer_pos (window, hlinfo, pos,
                                              XFASTINT (before),
                                              XFASTINT (after),
                                              before_string, after_string,
        else
          {
            Lisp_Object object = glyph->object;
 -          int charpos = glyph->charpos;
 +          EMACS_INT charpos = glyph->charpos;
  
            /* Try text properties.  */
            if (STRINGP (object)
                       see if the buffer text ``under'' it does.  */
                    struct glyph_row *r
                      = MATRIX_ROW (w->current_matrix, vpos);
 -                  int start = MATRIX_ROW_START_CHARPOS (r);
 -                  int pos = string_buffer_position (w, object, start);
 +                  EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
 +                  EMACS_INT pos = string_buffer_position (w, object, start);
                    if (pos > 0)
                      {
                        help = Fget_char_property (make_number (pos),
          }
        }
  
 +#ifdef HAVE_WINDOW_SYSTEM
        /* Look for a `pointer' property.  */
 -      if (NILP (pointer))
 +      if (FRAME_WINDOW_P (f) && NILP (pointer))
        {
          /* Check overlays first.  */
          for (i = noverlays - 1; i >= 0 && NILP (pointer); --i)
          if (NILP (pointer))
            {
              Lisp_Object object = glyph->object;
 -            int charpos = glyph->charpos;
 +            EMACS_INT charpos = glyph->charpos;
  
              /* Try text properties.  */
              if (STRINGP (object)
                         see if the buffer text ``under'' it does.  */
                      struct glyph_row *r
                        = MATRIX_ROW (w->current_matrix, vpos);
 -                    int start = MATRIX_ROW_START_CHARPOS (r);
 -                    int pos = string_buffer_position (w, object, start);
 +                    EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
 +                    EMACS_INT pos = string_buffer_position (w, object,
 +                                                            start);
                      if (pos > 0)
                        pointer = Fget_char_property (make_number (pos),
                                                      Qpointer, w->buffer);
                                              Qpointer, object);
            }
        }
 +#endif        /* HAVE_WINDOW_SYSTEM */
  
        BEGV = obegv;
        ZV = ozv;
  
   set_cursor:
  
 -  define_frame_cursor1 (f, cursor, pointer);
 +#ifdef HAVE_WINDOW_SYSTEM
 +  if (FRAME_WINDOW_P (f))
 +    define_frame_cursor1 (f, cursor, pointer);
 +#else
 +  /* This is here to prevent a compiler error, about "label at end of
 +     compound statement".  */
 +  return;
 +#endif
  }
  
  
     functions to ensure the mouse-highlight is off.  */
  
  void
 -x_clear_window_mouse_face (w)
 -     struct window *w;
 +x_clear_window_mouse_face (struct window *w)
  {
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
    Lisp_Object window;
  
    BLOCK_INPUT;
    XSETWINDOW (window, w);
 -  if (EQ (window, dpyinfo->mouse_face_window))
 -    clear_mouse_face (dpyinfo);
 +  if (EQ (window, hlinfo->mouse_face_window))
 +    clear_mouse_face (hlinfo);
    UNBLOCK_INPUT;
  }
  
     This is used when the size of F is changed.  */
  
  void
 -cancel_mouse_face (f)
 -     struct frame *f;
 +cancel_mouse_face (struct frame *f)
  {
    Lisp_Object window;
 -  Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
  
 -  window = dpyinfo->mouse_face_window;
 +  window = hlinfo->mouse_face_window;
    if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f)
      {
 -      dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
 -      dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
 -      dpyinfo->mouse_face_window = Qnil;
 +      hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
 +      hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
 +      hlinfo->mouse_face_window = Qnil;
      }
  }
  
  
 -#endif /* HAVE_WINDOW_SYSTEM */
 -
  \f
  /***********************************************************************
                           Exposure Events
     which intersects rectangle R.  R is in window-relative coordinates.  */
  
  static void
 -expose_area (w, row, r, area)
 -     struct window *w;
 -     struct glyph_row *row;
 -     XRectangle *r;
 -     enum glyph_row_area area;
 +expose_area (struct window *w, struct glyph_row *row, XRectangle *r,
 +           enum glyph_row_area area)
  {
    struct glyph *first = row->glyphs[area];
    struct glyph *end = row->glyphs[area] + row->used[area];
     non-zero if mouse-face was overwritten.  */
  
  static int
 -expose_line (w, row, r)
 -     struct window *w;
 -     struct glyph_row *row;
 -     XRectangle *r;
 +expose_line (struct window *w, struct glyph_row *row, XRectangle *r)
  {
    xassert (row->enabled_p);
  
     LAST_OVERLAPPING_ROW is the last such row.  */
  
  static void
 -expose_overlaps (w, first_overlapping_row, last_overlapping_row, r)
 -     struct window *w;
 -     struct glyph_row *first_overlapping_row;
 -     struct glyph_row *last_overlapping_row;
 -     XRectangle *r;
 +expose_overlaps (struct window *w,
 +               struct glyph_row *first_overlapping_row,
 +               struct glyph_row *last_overlapping_row,
 +               XRectangle *r)
  {
    struct glyph_row *row;
  
  /* Return non-zero if W's cursor intersects rectangle R.  */
  
  static int
 -phys_cursor_in_rect_p (w, r)
 -     struct window *w;
 -     XRectangle *r;
 +phys_cursor_in_rect_p (struct window *w, XRectangle *r)
  {
    XRectangle cr, result;
    struct glyph *cursor_glyph;
     have vertical scroll bars.  */
  
  void
 -x_draw_vertical_border (w)
 -     struct window *w;
 +x_draw_vertical_border (struct window *w)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
  
     mouse-face.  */
  
  static int
 -expose_window (w, fr)
 -     struct window *w;
 -     XRectangle *fr;
 +expose_window (struct window *w, XRectangle *fr)
  {
    struct frame *f = XFRAME (w->frame);
    XRectangle wr, r;
     non-zero if the exposure overwrites mouse-face.  */
  
  static int
 -expose_window_tree (w, r)
 -     struct window *w;
 -     XRectangle *r;
 +expose_window_tree (struct window *w, XRectangle *r)
  {
    struct frame *f = XFRAME (w->frame);
    int mouse_face_overwritten_p = 0;
     the entire frame.  */
  
  void
 -expose_frame (f, x, y, w, h)
 -     struct frame *f;
 -     int x, y, w, h;
 +expose_frame (struct frame *f, int x, int y, int w, int h)
  {
    XRectangle r;
    int mouse_face_overwritten_p = 0;
       focus-follows-mouse with delayed raise.  --jason 2001-10-12  */
    if (mouse_face_overwritten_p && !FRAME_GARBAGED_P (f))
      {
 -      Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 -      if (f == dpyinfo->mouse_face_mouse_frame)
 +      Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 +      if (f == hlinfo->mouse_face_mouse_frame)
        {
 -        int x = dpyinfo->mouse_face_mouse_x;
 -        int y = dpyinfo->mouse_face_mouse_y;
 -        clear_mouse_face (dpyinfo);
 +        int x = hlinfo->mouse_face_mouse_x;
 +        int y = hlinfo->mouse_face_mouse_y;
 +        clear_mouse_face (hlinfo);
          note_mouse_highlight (f, x, y);
        }
      }
     empty.  */
  
  int
 -x_intersect_rectangles (r1, r2, result)
 -     XRectangle *r1, *r2, *result;
 +x_intersect_rectangles (XRectangle *r1, XRectangle *r2, XRectangle *result)
  {
    XRectangle *left, *right;
    XRectangle *upper, *lower;
   ***********************************************************************/
  
  void
 -syms_of_xdisp ()
 +syms_of_xdisp (void)
  {
    Vwith_echo_area_save_vector = Qnil;
    staticpro (&Vwith_echo_area_save_vector);
  #endif
    defsubr (&Sformat_mode_line);
    defsubr (&Sinvisible_p);
 +  defsubr (&Scurrent_bidi_paragraph_direction);
  
    staticpro (&Qmenu_bar_update_hook);
    Qmenu_bar_update_hook = intern_c_string ("menu-bar-update-hook");
    staticpro (&Qnobreak_space);
    Qimage = intern_c_string ("image");
    staticpro (&Qimage);
 +  Qtext = intern_c_string ("text");
 +  staticpro (&Qtext);
 +  Qboth = intern_c_string ("both");
 +  staticpro (&Qboth);
 +  Qboth_horiz = intern_c_string ("both-horiz");
 +  staticpro (&Qboth_horiz);
 +  Qtext_image_horiz = intern_c_string ("text-image-horiz");
 +  staticpro (&Qtext_image_horiz);
    QCmap = intern_c_string (":map");
    staticpro (&QCmap);
    QCpointer = intern_c_string (":pointer");
    staticpro (&previous_help_echo_string);
    help_echo_pos = -1;
  
 +  Qright_to_left = intern_c_string ("right-to-left");
 +  staticpro (&Qright_to_left);
 +  Qleft_to_right = intern_c_string ("left-to-right");
 +  staticpro (&Qleft_to_right);
 +
  #ifdef HAVE_WINDOW_SYSTEM
    DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p,
      doc: /* *Non-nil means draw block cursor as wide as the glyph under it.
@@@ -26880,23 -24923,6 +26883,23 @@@ vertical margin.  */)
      doc: /* *Relief thickness of tool-bar buttons.  */);
    tool_bar_button_relief = DEFAULT_TOOL_BAR_BUTTON_RELIEF;
  
 +  DEFVAR_LISP ("tool-bar-style", &Vtool_bar_style,
 +    doc: /* Tool bar style to use.
 +It can be one of
 + image            - show images only
 + text             - show text only
 + both             - show both, text below image
 + both-horiz       - show text to the right of the image
 + text-image-horiz - show text to the left of the image
 + any other        - use system default or image if no system default.  */);
 +  Vtool_bar_style = Qnil;
 +
 +  DEFVAR_INT ("tool-bar-max-label-size", &tool_bar_max_label_size,
 +    doc: /* *Maximum number of characters a label can have to be shown.
 +The tool bar style must also show labels for this to have any effect, see
 +`tool-bar-style'.  */);
 +  tool_bar_max_label_size = DEFAULT_TOOL_BAR_LABEL_SIZE;
 +
    DEFVAR_LISP ("fontification-functions", &Vfontification_functions,
      doc: /* List of functions to call to fontify regions of text.
  Each function is called with one argument POS.  Functions must
@@@ -26945,9 -24971,7 +26948,9 @@@ the frame's other specifications determ
    Vblink_cursor_alist = Qnil;
  
    DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p,
 -    doc: /* *Non-nil means scroll the display automatically to make point visible.  */);
 +    doc: /* Allow or disallow automatic horizontal scrolling of windows.
 +If non-nil, windows are automatically scrolled horizontally to make
 +point visible.  */);
    automatic_hscrolling_p = 1;
    Qauto_hscroll_mode = intern_c_string ("auto-hscroll-mode");
    staticpro (&Qauto_hscroll_mode);
@@@ -27062,53 -25086,23 +27065,53 @@@ baseline.  The default value is 1.  */)
    underline_minimum_offset = 1;
  
    DEFVAR_BOOL ("display-hourglass", &display_hourglass_p,
 -             doc: /* Non-zero means Emacs displays an hourglass pointer on window systems.  */);
 +             doc: /* Non-nil means show an hourglass pointer, when Emacs is busy.
 +This feature only works when on a window system that can change
 +cursor shapes.  */);
    display_hourglass_p = 1;
  
    DEFVAR_LISP ("hourglass-delay", &Vhourglass_delay,
 -             doc: /* *Seconds to wait before displaying an hourglass pointer.
 -Value must be an integer or float.  */);
 +             doc: /* *Seconds to wait before displaying an hourglass pointer when Emacs is busy.  */);
    Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
  
    hourglass_atimer = NULL;
    hourglass_shown_p = 0;
 +
 +  DEFSYM (Qglyphless_char, "glyphless-char");
 +  DEFSYM (Qhex_code, "hex-code");
 +  DEFSYM (Qempty_box, "empty-box");
 +  DEFSYM (Qthin_space, "thin-space");
 +  DEFSYM (Qzero_width, "zero-width");
 +
 +  DEFSYM (Qglyphless_char_display, "glyphless-char-display");
 +  /* Intern this now in case it isn't already done.
 +     Setting this variable twice is harmless.
 +     But don't staticpro it here--that is done in alloc.c.  */
 +  Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots");
 +  Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1));
 +
 +  DEFVAR_LISP ("glyphless-char-display", &Vglyphless_char_display,
 +             doc: /* Char-table to control displaying of glyphless characters.
 +Each element, if non-nil, is an ASCII acronym string (displayed in a box)
 +or one of these symbols:
 +  hex-code:   display the hexadecimal code of a character in a box
 +  empty-box:  display as an empty box
 +  thin-space: display as 1-pixel width space
 +  zero-width: don't display
 +
 +It has one extra slot to control the display of a character for which
 +no font is found.  The value of the slot is `hex-code' or `empty-box'.
 +The default is `empty-box'.  */);
 +  Vglyphless_char_display = Fmake_char_table (Qglyphless_char_display, Qnil);
 +  Fset_char_table_extra_slot (Vglyphless_char_display, make_number (0),
 +                            Qempty_box);
  }
  
  
  /* Initialize this module when Emacs starts.  */
  
  void
 -init_xdisp ()
 +init_xdisp (void)
  {
    Lisp_Object root_window;
    struct window *mini_w;
  
  /* Return non-zero if houglass timer has been started or hourglass is shown.  */
  int
 -hourglass_started ()
 +hourglass_started (void)
  {
    return hourglass_shown_p || hourglass_atimer != NULL;
  }
  
  /* Cancel a currently active hourglass timer, and start a new one.  */
  void
 -start_hourglass ()
 +start_hourglass (void)
  {
  #if defined (HAVE_WINDOW_SYSTEM)
    EMACS_TIME delay;
  /* Cancel the hourglass cursor timer if active, hide a busy cursor if
     shown.  */
  void
 -cancel_hourglass ()
 +cancel_hourglass (void)
  {
  #if defined (HAVE_WINDOW_SYSTEM)
    if (hourglass_atimer)
  }
  #endif /* ! WINDOWSNT  */
  
 -/* arch-tag: eacc864d-bb6a-4b74-894a-1a4399a1358b
 -   (do not change this comment) */
diff --combined src/xterm.c
index e91782395df1a84be802be06f48100c6965512b4,83dd4a4d83f57cda801479a0daf42b31c52ad355..f0ef8746b017ec3ce27b613b7eb176175bc54307
@@@ -1,8 -1,7 +1,8 @@@
  /* X Communication module for terminals which understand the X protocol.
 -   Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 -                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 -                 Free Software Foundation, Inc.
 +
 +Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
 +  2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 +  Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
@@@ -23,7 -22,11 +23,7 @@@ along with GNU Emacs.  If not, see <htt
  /* Xt features made by Fred Pierresteguy.  */
  
  #include <config.h>
 -
 -/* On 4.3 these lose if they come after xterm.h.  */
 -/* Putting these at the beginning seems to be standard for other .c files.  */
  #include <signal.h>
 -
  #include <stdio.h>
  #include <setjmp.h>
  
  #include <sys/types.h>
  #endif /* makedev */
  
 -#ifdef BSD_SYSTEM
  #include <sys/ioctl.h>
 -#endif /* ! defined (BSD_SYSTEM) */
  
  #include "systime.h"
  
 -#ifndef INCLUDED_FCNTL
  #include <fcntl.h>
 -#endif
  #include <ctype.h>
  #include <errno.h>
  #include <setjmp.h>
  #endif
  
  #ifdef USE_LUCID
 -extern int xlwmenu_window_p P_ ((Widget w, Window window));
 -extern void xlwmenu_redisplay P_ ((Widget));
 -#endif
 -
 -#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
 -
 -extern void free_frame_menubar P_ ((struct frame *));
 +#include "../lwlib/xlwmenu.h"
  #endif
  
  #ifdef USE_X_TOOLKIT
@@@ -283,6 -296,25 +283,6 @@@ static int input_signal_count
  
  static int x_noop_count;
  
 -/* Initial values of argv and argc.  */
 -
 -extern char **initial_argv;
 -extern int initial_argc;
 -
 -extern Lisp_Object Vcommand_line_args, Vsystem_name;
 -
 -/* Tells if a window manager is present or not.  */
 -
 -extern Lisp_Object Vx_no_window_manager;
 -
 -extern Lisp_Object Qeql;
 -
 -extern int errno;
 -
 -/* A mask of extra modifier bits to put into every keyboard char.  */
 -
 -extern EMACS_INT extra_keyboard_modifiers;
 -
  /* The keysyms to use for the various modifiers.  */
  
  Lisp_Object Vx_alt_keysym, Vx_hyper_keysym, Vx_meta_keysym, Vx_super_keysym;
@@@ -300,89 -332,65 +300,89 @@@ static Lisp_Object xg_default_icon_file
  Lisp_Object Qx_gtk_map_stock;
  #endif
  
 +/* Some functions take this as char *, not const char *.  */
 +static char emacs_class[] = EMACS_CLASS;
 +
 +/* XEmbed implementation.  */
 +
 +#define XEMBED_VERSION 0
 +
 +enum xembed_info
 +  {
 +    XEMBED_MAPPED = 1 << 0
 +  };
 +
 +enum xembed_message
 +  {
 +    XEMBED_EMBEDDED_NOTIFY        = 0,
 +    XEMBED_WINDOW_ACTIVATE        = 1,
 +    XEMBED_WINDOW_DEACTIVATE      = 2,
 +    XEMBED_REQUEST_FOCUS          = 3,
 +    XEMBED_FOCUS_IN               = 4,
 +    XEMBED_FOCUS_OUT              = 5,
 +    XEMBED_FOCUS_NEXT             = 6,
 +    XEMBED_FOCUS_PREV             = 7,
 +
 +    XEMBED_MODALITY_ON            = 10,
 +    XEMBED_MODALITY_OFF           = 11,
 +    XEMBED_REGISTER_ACCELERATOR   = 12,
 +    XEMBED_UNREGISTER_ACCELERATOR = 13,
 +    XEMBED_ACTIVATE_ACCELERATOR   = 14
 +  };
 +
  /* Used in x_flush.  */
  
 -extern Lisp_Object Vinhibit_redisplay;
 -
 -extern XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
 -extern int x_bitmap_mask P_ ((FRAME_PTR, int));
 -
 -static int x_alloc_nearest_color_1 P_ ((Display *, Colormap, XColor *));
 -static void x_set_window_size_1 P_ ((struct frame *, int, int, int));
 -static const XColor *x_color_cells P_ ((Display *, int *));
 -static void x_update_window_end P_ ((struct window *, int, int));
 -
 -static int x_io_error_quitter P_ ((Display *));
 -static struct terminal *x_create_terminal P_ ((struct x_display_info *));
 -void x_delete_terminal P_ ((struct terminal *));
 -static void x_update_end P_ ((struct frame *));
 -static void XTframe_up_to_date P_ ((struct frame *));
 -static void XTset_terminal_modes P_ ((struct terminal *));
 -static void XTreset_terminal_modes P_ ((struct terminal *));
 -static void x_clear_frame P_ ((struct frame *));
 -static void frame_highlight P_ ((struct frame *));
 -static void frame_unhighlight P_ ((struct frame *));
 -static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
 -static void  x_focus_changed P_ ((int, int, struct x_display_info *,
 -                                struct frame *, struct input_event *));
 -static void x_detect_focus_change P_ ((struct x_display_info *,
 -                                       XEvent *, struct input_event *));
 -static void XTframe_rehighlight P_ ((struct frame *));
 -static void x_frame_rehighlight P_ ((struct x_display_info *));
 -static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
 -static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int,
 -                                 enum text_cursor_kinds));
 -
 -static void x_clip_to_row P_ ((struct window *, struct glyph_row *, int, GC));
 -static void x_flush P_ ((struct frame *f));
 -static void x_update_begin P_ ((struct frame *));
 -static void x_update_window_begin P_ ((struct window *));
 -static void x_after_update_window_line P_ ((struct glyph_row *));
 -static struct scroll_bar *x_window_to_scroll_bar P_ ((Display *, Window));
 -static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *,
 -                                          enum scroll_bar_part *,
 -                                          Lisp_Object *, Lisp_Object *,
 -                                          unsigned long *));
 -static void x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
 -static void x_check_fullscreen P_ ((struct frame *));
 -static void x_check_expected_move P_ ((struct frame *, int, int));
 -static void x_sync_with_move P_ ((struct frame *, int, int, int));
 -static int handle_one_xevent P_ ((struct x_display_info *, XEvent *,
 -                                int *, struct input_event *));
 +static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *);
 +static void x_set_window_size_1 (struct frame *, int, int, int);
 +static const XColor *x_color_cells (Display *, int *);
 +static void x_update_window_end (struct window *, int, 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 XTset_terminal_modes (struct terminal *);
 +static void XTreset_terminal_modes (struct terminal *);
 +static void x_clear_frame (struct frame *);
 +static void frame_highlight (struct frame *);
 +static void frame_unhighlight (struct frame *);
 +static void x_new_focus_frame (struct x_display_info *, struct frame *);
 +static void  x_focus_changed (int, int, struct x_display_info *,
 +                              struct frame *, struct input_event *);
 +static void x_detect_focus_change (struct x_display_info *,
 +                                   XEvent *, struct input_event *);
 +static void XTframe_rehighlight (struct frame *);
 +static void x_frame_rehighlight (struct x_display_info *);
 +static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
 +static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
 +                               enum text_cursor_kinds);
 +
 +static void x_clip_to_row (struct window *, struct glyph_row *, int, GC);
 +static void x_flush (struct frame *f);
 +static void x_update_begin (struct frame *);
 +static void x_update_window_begin (struct window *);
 +static void x_after_update_window_line (struct glyph_row *);
 +static struct scroll_bar *x_window_to_scroll_bar (Display *, Window);
 +static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
 +                                        enum scroll_bar_part *,
 +                                        Lisp_Object *, Lisp_Object *,
 +                                        unsigned long *);
 +static void x_handle_net_wm_state (struct frame *, XPropertyEvent *);
 +static void x_check_fullscreen (struct frame *);
 +static void x_check_expected_move (struct frame *, int, int);
 +static void x_sync_with_move (struct frame *, int, int, int);
 +static int handle_one_xevent (struct x_display_info *, XEvent *,
 +                              int *, struct input_event *);
  /* Don't declare this NO_RETURN because we want no
     interference with debugging failing X calls.  */
 -static SIGTYPE x_connection_closed P_ ((Display *, char *));
 +static SIGTYPE x_connection_closed (Display *, const char *);
  
  
  /* Flush display of frame F, or of all frames if F is null.  */
  
  static void
 -x_flush (f)
 -     struct frame *f;
 +x_flush (struct frame *f)
  {
    /* Don't call XFlush when it is not safe to redisplay; the X
       connection may be broken.  */
@@@ -432,8 -440,9 +432,8 @@@ struct record event_record[100]
  
  int event_record_index;
  
 -record_event (locus, type)
 -     char *locus;
 -     int type;
 +void
 +record_event (char *locus, int type)
  {
    if (event_record_index == sizeof (event_record) / sizeof (struct record))
      event_record_index = 0;
  /* Return the struct x_display_info corresponding to DPY.  */
  
  struct x_display_info *
 -x_display_info_for_display (dpy)
 -     Display *dpy;
 +x_display_info_for_display (Display *dpy)
  {
    struct x_display_info *dpyinfo;
  
  }
  
  #define OPAQUE  0xffffffff
 -#define OPACITY "_NET_WM_WINDOW_OPACITY"
  
  void
 -x_set_frame_alpha (f)
 -     struct frame *f;
 +x_set_frame_alpha (struct frame *f)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Display *dpy = FRAME_X_DISPLAY (f);
    if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
      /* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
         we must treat the former instead of the latter. */
 -    win = FRAME_X_OUTPUT(f)->parent_desc;
 +    win = FRAME_X_OUTPUT (f)->parent_desc;
  
    if (dpyinfo->x_highlight_frame == f)
      alpha = f->alpha[0];
      unsigned long n, left;
  
      x_catch_errors (dpy);
 -    rc = XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False),
 -                          0L, 1L, False, XA_CARDINAL,
 -                          &actual, &format, &n, &left,
 -                          &data);
 +    rc = XGetWindowProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
 +                           0L, 1L, False, XA_CARDINAL,
 +                           &actual, &format, &n, &left,
 +                           &data);
  
      if (rc == Success && actual != None)
 -      if (*(unsigned long *)data == opac)
 -      {
 -        XFree ((void *) data);
 -        x_uncatch_errors ();
 -        return;
 -      }
 -      else
 +      {
        XFree ((void *) data);
 +      if (*(unsigned long *)data == opac)
 +        {
 +          x_uncatch_errors ();
 +          return;
 +        }
 +      }
      x_uncatch_errors ();
    }
  
    x_catch_errors (dpy);
 -  XChangeProperty (dpy, win, XInternAtom (dpy, OPACITY, False),
 +  XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
                   XA_CARDINAL, 32, PropModeReplace,
                   (unsigned char *) &opac, 1L);
    x_uncatch_errors ();
  }
  
  int
 -x_display_pixel_height (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_display_pixel_height (struct x_display_info *dpyinfo)
  {
    return HeightOfScreen (dpyinfo->screen);
  }
  
  int
 -x_display_pixel_width (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_display_pixel_width (struct x_display_info *dpyinfo)
  {
    return WidthOfScreen (dpyinfo->screen);
  }
     because all interesting stuff is done on a window basis.  */
  
  static void
 -x_update_begin (f)
 -     struct frame *f;
 +x_update_begin (struct frame *f)
  {
    /* Nothing to do.  */
  }
     position of W.  */
  
  static void
 -x_update_window_begin (w)
 -     struct window *w;
 +x_update_window_begin (struct window *w)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
 -  struct x_display_info *display_info = FRAME_X_DISPLAY_INFO (f);
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
  
    updated_window = w;
    set_output_cursor (&w->cursor);
  
    BLOCK_INPUT;
  
 -  if (f == display_info->mouse_face_mouse_frame)
 +  if (f == hlinfo->mouse_face_mouse_frame)
      {
        /* Don't do highlighting for mouse motion during the update.  */
 -      display_info->mouse_face_defer = 1;
 +      hlinfo->mouse_face_defer = 1;
  
        /* If F needs to be redrawn, simply forget about any prior mouse
         highlighting.  */
        if (FRAME_GARBAGED_P (f))
 -      display_info->mouse_face_window = Qnil;
 +      hlinfo->mouse_face_window = Qnil;
      }
  
    UNBLOCK_INPUT;
  /* Draw a vertical window border from (x,y0) to (x,y1)  */
  
  static void
 -x_draw_vertical_window_border (w, x, y0, y1)
 -     struct window *w;
 -     int x, y0, y1;
 +x_draw_vertical_window_border (struct window *w, int x, int y0, int y1)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct face *face;
     here.  */
  
  static void
 -x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
 -     struct window *w;
 -     int cursor_on_p, mouse_face_overwritten_p;
 +x_update_window_end (struct window *w, int cursor_on_p, int mouse_face_overwritten_p)
  {
 -  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
 +  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
  
    if (!w->pseudo_window_p)
      {
       XTframe_up_to_date to redisplay the mouse highlight.  */
    if (mouse_face_overwritten_p)
      {
 -      dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
 -      dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
 -      dpyinfo->mouse_face_window = Qnil;
 +      hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
 +      hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
 +      hlinfo->mouse_face_window = Qnil;
      }
  
    updated_window = NULL;
     update_end.  */
  
  static void
 -x_update_end (f)
 -     struct frame *f;
 +x_update_end (struct frame *f)
  {
    /* Mouse highlight may be displayed again.  */
 -  FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0;
 +  MOUSE_HL_INFO (f)->mouse_face_defer = 0;
  
  #ifndef XFlush
    BLOCK_INPUT;
     updated_window is not available here.  */
  
  static void
 -XTframe_up_to_date (f)
 -     struct frame *f;
 +XTframe_up_to_date (struct frame *f)
  {
    if (FRAME_X_P (f))
      {
 -      struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +      Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
  
 -      if (dpyinfo->mouse_face_deferred_gc
 -        || f == dpyinfo->mouse_face_mouse_frame)
 +      if (hlinfo->mouse_face_deferred_gc
 +        || f == hlinfo->mouse_face_mouse_frame)
        {
          BLOCK_INPUT;
 -        if (dpyinfo->mouse_face_mouse_frame)
 -          note_mouse_highlight (dpyinfo->mouse_face_mouse_frame,
 -                                dpyinfo->mouse_face_mouse_x,
 -                                dpyinfo->mouse_face_mouse_y);
 -        dpyinfo->mouse_face_deferred_gc = 0;
 +        if (hlinfo->mouse_face_mouse_frame)
 +          note_mouse_highlight (hlinfo->mouse_face_mouse_frame,
 +                                hlinfo->mouse_face_mouse_x,
 +                                hlinfo->mouse_face_mouse_y);
 +        hlinfo->mouse_face_deferred_gc = 0;
          UNBLOCK_INPUT;
        }
      }
     between bitmaps to be drawn between current row and DESIRED_ROW.  */
  
  static void
 -x_after_update_window_line (desired_row)
 -     struct glyph_row *desired_row;
 +x_after_update_window_line (struct glyph_row *desired_row)
  {
    struct window *w = updated_window;
    struct frame *f;
  }
  
  static void
 -x_draw_fringe_bitmap (w, row, p)
 -     struct window *w;
 -     struct glyph_row *row;
 -     struct draw_fringe_bitmap_params *p;
 +x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fringe_bitmap_params *p)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    Display *display = FRAME_X_DISPLAY (f);
@@@ -894,38 -920,37 +894,38 @@@ XTreset_terminal_modes (struct termina
  
  
  
 -static void x_set_glyph_string_clipping P_ ((struct glyph_string *));
 -static void x_set_glyph_string_gc P_ ((struct glyph_string *));
 -static void x_draw_glyph_string_background P_ ((struct glyph_string *,
 -                                              int));
 -static void x_draw_glyph_string_foreground P_ ((struct glyph_string *));
 -static void x_draw_composite_glyph_string_foreground P_ ((struct glyph_string *));
 -static void x_draw_glyph_string_box P_ ((struct glyph_string *));
 -static void x_draw_glyph_string  P_ ((struct glyph_string *));
 -static void x_compute_glyph_string_overhangs P_ ((struct glyph_string *));
 -static void x_set_cursor_gc P_ ((struct glyph_string *));
 -static void x_set_mode_line_face_gc P_ ((struct glyph_string *));
 -static void x_set_mouse_face_gc P_ ((struct glyph_string *));
 -static int x_alloc_lighter_color P_ ((struct frame *, Display *, Colormap,
 -                                    unsigned long *, double, int));
 -static void x_setup_relief_color P_ ((struct frame *, struct relief *,
 -                                    double, int, unsigned long));
 -static void x_setup_relief_colors P_ ((struct glyph_string *));
 -static void x_draw_image_glyph_string P_ ((struct glyph_string *));
 -static void x_draw_image_relief P_ ((struct glyph_string *));
 -static void x_draw_image_foreground P_ ((struct glyph_string *));
 -static void x_draw_image_foreground_1 P_ ((struct glyph_string *, Pixmap));
 -static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int,
 -                                         int, int, int));
 -static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int,
 -                                  int, int, int, int, int, int,
 -                                  XRectangle *));
 -static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int,
 -                               int, int, int, XRectangle *));
 +static void x_set_glyph_string_clipping (struct glyph_string *);
 +static void x_set_glyph_string_gc (struct glyph_string *);
 +static void x_draw_glyph_string_background (struct glyph_string *,
 +                                            int);
 +static void x_draw_glyph_string_foreground (struct glyph_string *);
 +static void x_draw_composite_glyph_string_foreground (struct glyph_string *);
 +static void x_draw_glyph_string_box (struct glyph_string *);
 +static void x_draw_glyph_string  (struct glyph_string *);
 +static void x_compute_glyph_string_overhangs (struct glyph_string *);
 +static void x_set_cursor_gc (struct glyph_string *);
 +static void x_set_mode_line_face_gc (struct glyph_string *);
 +static void x_set_mouse_face_gc (struct glyph_string *);
 +static int x_alloc_lighter_color (struct frame *, Display *, Colormap,
 +                                  unsigned long *, double, int);
 +static void x_setup_relief_color (struct frame *, struct relief *,
 +                                  double, int, unsigned long);
 +static void x_setup_relief_colors (struct glyph_string *);
 +static void x_draw_image_glyph_string (struct glyph_string *);
 +static void x_draw_image_relief (struct glyph_string *);
 +static void x_draw_image_foreground (struct glyph_string *);
 +static void x_draw_image_foreground_1 (struct glyph_string *, Pixmap);
 +static void x_clear_glyph_string_rect (struct glyph_string *, int,
 +                                       int, int, int);
 +static void x_draw_relief_rect (struct frame *, int, int, int, int,
 +                                int, int, int, int, int, int,
 +                                XRectangle *);
 +static void x_draw_box_rect (struct glyph_string *, int, int, int, int,
 +                             int, int, int, XRectangle *);
 +static void x_scroll_bar_clear (struct frame *);
  
  #if GLYPH_DEBUG
 -static void x_check_font P_ ((struct frame *, struct font *));
 +static void x_check_font (struct frame *, struct font *);
  #endif
  
  
     face.  */
  
  static void
 -x_set_cursor_gc (s)
 -     struct glyph_string *s;
 +x_set_cursor_gc (struct glyph_string *s)
  {
    if (s->font == FRAME_FONT (s->f)
        && s->face->background == FRAME_BACKGROUND_PIXEL (s->f)
  /* Set up S->gc of glyph string S for drawing text in mouse face.  */
  
  static void
 -x_set_mouse_face_gc (s)
 -     struct glyph_string *s;
 +x_set_mouse_face_gc (struct glyph_string *s)
  {
    int face_id;
    struct face *face;
  
    /* What face has to be used last for the mouse face?  */
 -  face_id = FRAME_X_DISPLAY_INFO (s->f)->mouse_face_face_id;
 +  face_id = MOUSE_HL_INFO (s->f)->mouse_face_face_id;
    face = FACE_FROM_ID (s->f, face_id);
    if (face == NULL)
      face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
     matrix was built, so there isn't much to do, here.  */
  
  static INLINE void
 -x_set_mode_line_face_gc (s)
 -     struct glyph_string *s;
 +x_set_mode_line_face_gc (struct glyph_string *s)
  {
    s->gc = s->face->gc;
  }
     pattern.  */
  
  static INLINE void
 -x_set_glyph_string_gc (s)
 -     struct glyph_string *s;
 +x_set_glyph_string_gc (struct glyph_string *s)
  {
    PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
  
     line or menu if we don't have X toolkit support.  */
  
  static INLINE void
 -x_set_glyph_string_clipping (s)
 -     struct glyph_string *s;
 +x_set_glyph_string_clipping (struct glyph_string *s)
  {
    XRectangle *r = s->clip;
    int n = get_glyph_string_clip_rects (s, r, 2);
     the area of SRC.  */
  
  static void
 -x_set_glyph_string_clipping_exactly (src, dst)
 -     struct glyph_string *src, *dst;
 +x_set_glyph_string_clipping_exactly (struct glyph_string *src, struct glyph_string *dst)
  {
    XRectangle r;
  
     Compute left and right overhang of glyph string S.  */
  
  static void
 -x_compute_glyph_string_overhangs (s)
 -     struct glyph_string *s;
 +x_compute_glyph_string_overhangs (struct glyph_string *s)
  {
    if (s->cmp == NULL
        && (s->first_glyph->type == CHAR_GLYPH
  /* Fill rectangle X, Y, W, H with background color of glyph string S.  */
  
  static INLINE void
 -x_clear_glyph_string_rect (s, x, y, w, h)
 -     struct glyph_string *s;
 -     int x, y, w, h;
 +x_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h)
  {
    XGCValues xgcv;
    XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv);
     contains the first component of a composition.  */
  
  static void
 -x_draw_glyph_string_background (s, force_p)
 -     struct glyph_string *s;
 -     int force_p;
 +x_draw_glyph_string_background (struct glyph_string *s, int force_p)
  {
    /* Nothing to do if background has already been drawn or if it
       shouldn't be drawn in the first place.  */
  /* Draw the foreground of glyph string S.  */
  
  static void
 -x_draw_glyph_string_foreground (s)
 -     struct glyph_string *s;
 +x_draw_glyph_string_foreground (struct glyph_string *s)
  {
    int i, x;
  
  /* Draw the foreground of composite glyph string S.  */
  
  static void
 -x_draw_composite_glyph_string_foreground (s)
 -     struct glyph_string *s;
 +x_draw_composite_glyph_string_foreground (struct glyph_string *s)
  {
    int i, j, x;
    struct font *font = s->font;
  }
  
  
 +/* Draw the foreground of glyph string S for glyphless characters.  */
 +
 +static void
 +x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
 +{
 +  struct glyph *glyph = s->first_glyph;
 +  XChar2b char2b[8];
 +  int x, i, j;
 +
 +  /* If first glyph of S has a left box line, start drawing the text
 +     of S to the right of that box line.  */
 +  if (s->face && s->face->box != FACE_NO_BOX
 +      && s->first_glyph->left_box_line_p)
 +    x = s->x + eabs (s->face->box_line_width);
 +  else
 +    x = s->x;
 +
 +  s->char2b = char2b;
 +
 +  for (i = 0; i < s->nchars; i++, glyph++)
 +    {
 +      char buf[7], *str = NULL;
 +      int len = glyph->u.glyphless.len;
 +
 +      if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_ACRONYM)
 +      {
 +        if (len > 0
 +            && CHAR_TABLE_P (Vglyphless_char_display)
 +            && (CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (Vglyphless_char_display))
 +                >= 1))
 +          {
 +            Lisp_Object acronym
 +              = (! glyph->u.glyphless.for_no_font
 +                 ? CHAR_TABLE_REF (Vglyphless_char_display,
 +                                   glyph->u.glyphless.ch)
 +                 : XCHAR_TABLE (Vglyphless_char_display)->extras[0]);
 +            if (STRINGP (acronym))
 +              str = (char *) SDATA (acronym);
 +          }
 +      }
 +      else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE)
 +      {
 +        sprintf ((char *) buf, "%0*X",
 +                 glyph->u.glyphless.ch < 0x10000 ? 4 : 6,
 +                 glyph->u.glyphless.ch);
 +        str = buf;
 +      }
 +
 +      if (str)
 +      {
 +        int upper_len = (len + 1) / 2;
 +        unsigned code;
 +
 +        /* It is assured that all LEN characters in STR is ASCII.  */
 +        for (j = 0; j < len; j++)
 +          {
 +            code = s->font->driver->encode_char (s->font, str[j]);
 +            STORE_XCHAR2B (char2b + j, code >> 8, code & 0xFF);
 +          }
 +        s->font->driver->draw (s, 0, upper_len,
 +                               x + glyph->slice.glyphless.upper_xoff,
 +                               s->ybase + glyph->slice.glyphless.upper_yoff,
 +                               0);
 +        s->font->driver->draw (s, upper_len, len,
 +                               x + glyph->slice.glyphless.lower_xoff,
 +                               s->ybase + glyph->slice.glyphless.lower_yoff,
 +                               0);
 +      }
 +      if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE)
 +      XDrawRectangle (s->display, s->window, s->gc,
 +                      x, s->ybase - glyph->ascent,
 +                      glyph->pixel_width - 1,
 +                      glyph->ascent + glyph->descent - 1);
 +      x += glyph->pixel_width;
 +   }
 +}
 +
  #ifdef USE_X_TOOLKIT
  
 -static struct frame *x_frame_of_widget P_ ((Widget));
 -static Boolean cvt_string_to_pixel P_ ((Display *, XrmValue *, Cardinal *,
 -                                      XrmValue *, XrmValue *, XtPointer *));
 -static void cvt_pixel_dtor P_ ((XtAppContext, XrmValue *, XtPointer,
 -                              XrmValue *, Cardinal *));
 +static struct frame *x_frame_of_widget (Widget);
 +static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
 +                                    XrmValue *, XrmValue *, XtPointer *);
 +static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
 +                            XrmValue *, Cardinal *);
  
  
  /* Return the frame on which widget WIDGET is used.. Abort if frame
     cannot be determined.  */
  
  static struct frame *
 -x_frame_of_widget (widget)
 -     Widget widget;
 +x_frame_of_widget (Widget widget)
  {
    struct x_display_info *dpyinfo;
    Lisp_Object tail;
     if successful.  This is called from lwlib.  */
  
  int
 -x_alloc_nearest_color_for_widget (widget, cmap, color)
 -     Widget widget;
 -     Colormap cmap;
 -     XColor *color;
 +x_alloc_nearest_color_for_widget (Widget widget, Colormap cmap, XColor *color)
  {
    struct frame *f = x_frame_of_widget (widget);
    return x_alloc_nearest_color (f, cmap, color);
     Value is non-zero if successful.  */
  
  int
 -x_alloc_lighter_color_for_widget (widget, display, cmap, pixel, factor, delta)
 -     Widget widget;
 -     Display *display;
 -     Colormap cmap;
 -     unsigned long *pixel;
 -     double factor;
 -     int delta;
 +x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap,
 +                                unsigned long *pixel, double factor, int delta)
  {
    struct frame *f = x_frame_of_widget (widget);
    return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
@@@ -1535,9 -1505,12 +1535,9 @@@ static Pixel cvt_string_to_pixel_value
     Value is True if successful, False otherwise.  */
  
  static Boolean
 -cvt_string_to_pixel (dpy, args, nargs, from, to, closure_ret)
 -     Display *dpy;
 -     XrmValue *args;
 -     Cardinal *nargs;
 -     XrmValue *from, *to;
 -     XtPointer *closure_ret;
 +cvt_string_to_pixel (Display *dpy, XrmValue *args, Cardinal *nargs,
 +                   XrmValue *from, XrmValue *to,
 +                   XtPointer *closure_ret)
  {
    Screen *screen;
    Colormap cmap;
     ARGS and NARGS are like for cvt_string_to_pixel.  */
  
  static void
 -cvt_pixel_dtor (app, to, closure, args, nargs)
 -    XtAppContext app;
 -    XrmValuePtr to;
 -    XtPointer closure;
 -    XrmValuePtr args;
 -    Cardinal *nargs;
 +cvt_pixel_dtor (XtAppContext app, XrmValuePtr to, XtPointer closure, XrmValuePtr args,
 +              Cardinal *nargs)
  {
    if (*nargs != 2)
      {
     say a 24-bit TrueColor map.  */
  
  static const XColor *
 -x_color_cells (dpy, ncells)
 -     Display *dpy;
 -     int *ncells;
 +x_color_cells (Display *dpy, int *ncells)
  {
    struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
  
     colors in COLORS.  Use cached information, if available.  */
  
  void
 -x_query_colors (f, colors, ncolors)
 -     struct frame *f;
 -     XColor *colors;
 -     int ncolors;
 +x_query_colors (struct frame *f, XColor *colors, int ncolors)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
     COLOR.  Use cached information, if available.  */
  
  void
 -x_query_color (f, color)
 -     struct frame *f;
 -     XColor *color;
 +x_query_color (struct frame *f, XColor *color)
  {
    x_query_colors (f, color, 1);
  }
     allocated.  */
  
  static int
 -x_alloc_nearest_color_1 (dpy, cmap, color)
 -     Display *dpy;
 -     Colormap cmap;
 -     XColor *color;
 +x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color)
  {
    int rc;
  
     allocated.  */
  
  int
 -x_alloc_nearest_color (f, cmap, color)
 -     struct frame *f;
 -     Colormap cmap;
 -     XColor *color;
 +x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color)
  {
    gamma_correct (f, color);
    return x_alloc_nearest_color_1 (FRAME_X_DISPLAY (f), cmap, color);
     get color reference counts right.  */
  
  unsigned long
 -x_copy_color (f, pixel)
 -     struct frame *f;
 -     unsigned long pixel;
 +x_copy_color (struct frame *f, long unsigned int pixel)
  {
    XColor color;
  
     get color reference counts right.  */
  
  unsigned long
 -x_copy_dpy_color (dpy, cmap, pixel)
 -     Display *dpy;
 -     Colormap cmap;
 -     unsigned long pixel;
 +x_copy_dpy_color (Display *dpy, Colormap cmap, long unsigned int pixel)
  {
    XColor color;
  
     Value is non-zero if successful.  */
  
  static int
 -x_alloc_lighter_color (f, display, cmap, pixel, factor, delta)
 -     struct frame *f;
 -     Display *display;
 -     Colormap cmap;
 -     unsigned long *pixel;
 -     double factor;
 -     int delta;
 +x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta)
  {
    XColor color, new;
    long bright;
     be allocated, use DEFAULT_PIXEL, instead.  */
  
  static void
 -x_setup_relief_color (f, relief, factor, delta, default_pixel)
 -     struct frame *f;
 -     struct relief *relief;
 -     double factor;
 -     int delta;
 -     unsigned long default_pixel;
 +x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel)
  {
    XGCValues xgcv;
    struct x_output *di = f->output_data.x;
  /* Set up colors for the relief lines around glyph string S.  */
  
  static void
 -x_setup_relief_colors (s)
 -     struct glyph_string *s;
 +x_setup_relief_colors (struct glyph_string *s)
  {
    struct x_output *di = s->f->output_data.x;
    unsigned long color;
     when drawing.  */
  
  static void
 -x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width,
 -                  raised_p, top_p, bot_p, left_p, right_p, clip_rect)
 -     struct frame *f;
 -     int left_x, top_y, right_x, bottom_y, width;
 -     int top_p, bot_p, left_p, right_p, raised_p;
 -     XRectangle *clip_rect;
 +x_draw_relief_rect (struct frame *f,
 +                  int left_x, int top_y, int right_x, int bottom_y, int width,
 +                  int raised_p, int top_p, int bot_p, int left_p, int right_p,
 +                  XRectangle *clip_rect)
  {
    Display *dpy = FRAME_X_DISPLAY (f);
    Window window = FRAME_X_WINDOW (f);
      gc = f->output_data.x->black_relief.gc;
    XSetClipRectangles (dpy, gc, 0, 0, clip_rect, 1, Unsorted);
  
 +  /* This code is more complicated than it has to be, because of two
 +     minor hacks to make the boxes look nicer: (i) if width > 1, draw
 +     the outermost line using the black relief.  (ii) Omit the four
 +     corner pixels.  */
 +
    /* Top.  */
    if (top_p)
 -    for (i = 0; i < width; ++i)
 -      XDrawLine (dpy, window, gc,
 -               left_x + i * left_p, top_y + i,
 -               right_x + 1 - i * right_p, top_y + i);
 +    {
 +      if (width == 1)
 +      XDrawLine (dpy, window, gc,
 +                 left_x  + (left_p  ? 1 : 0), top_y,
 +                 right_x + (right_p ? 0 : 1), top_y);
 +
 +      for (i = 1; i < width; ++i)
 +      XDrawLine (dpy, window, gc,
 +                 left_x  + i * left_p, top_y + i,
 +                 right_x + 1 - i * right_p, top_y + i);
 +    }
  
    /* Left.  */
    if (left_p)
 -    for (i = 0; i < width; ++i)
 -      XDrawLine (dpy, window, gc,
 -               left_x + i, top_y + i, left_x + i, bottom_y - i + 1);
 +    {
 +      if (width == 1)
 +      XDrawLine (dpy, window, gc, left_x, top_y + 1, left_x, bottom_y);
 +
 +      XClearArea (dpy, window, left_x, top_y, 1, 1, False);
 +      XClearArea (dpy, window, left_x, bottom_y, 1, 1, False);
 +
 +      for (i = (width > 1 ? 1 : 0); i < width; ++i)
 +      XDrawLine (dpy, window, gc,
 +                 left_x + i, top_y + i, left_x + i, bottom_y - i + 1);
 +    }
  
    XSetClipMask (dpy, gc, None);
    if (raised_p)
      gc = f->output_data.x->white_relief.gc;
    XSetClipRectangles (dpy, gc, 0, 0, clip_rect, 1, Unsorted);
  
 +  if (width > 1)
 +    {
 +      /* Outermost top line.  */
 +      if (top_p)
 +      XDrawLine (dpy, window, gc,
 +                 left_x  + (left_p  ? 1 : 0), top_y,
 +                 right_x + (right_p ? 0 : 1), top_y);
 +
 +      /* Outermost left line.  */
 +      if (left_p)
 +      XDrawLine (dpy, window, gc, left_x, top_y + 1, left_x, bottom_y);
 +    }
 +
    /* Bottom.  */
    if (bot_p)
 -    for (i = 0; i < width; ++i)
 +    {
        XDrawLine (dpy, window, gc,
 -               left_x + i * left_p, bottom_y - i,
 -               right_x + 1 - i * right_p, bottom_y - i);
 +               left_x  + (left_p  ? 1 : 0), bottom_y,
 +               right_x + (right_p ? 0 : 1), bottom_y);
 +      for (i = 1; i < width; ++i)
 +      XDrawLine (dpy, window, gc,
 +                 left_x  + i * left_p, bottom_y - i,
 +                 right_x + 1 - i * right_p, bottom_y - i);
 +    }
  
    /* Right.  */
    if (right_p)
 -    for (i = 0; i < width; ++i)
 -      XDrawLine (dpy, window, gc,
 -               right_x - i, top_y + i + 1, right_x - i, bottom_y - i);
 +    {
 +      XClearArea (dpy, window, right_x, top_y, 1, 1, False);
 +      XClearArea (dpy, window, right_x, bottom_y, 1, 1, False);
 +      for (i = 0; i < width; ++i)
 +      XDrawLine (dpy, window, gc,
 +                 right_x - i, top_y + i + 1, right_x - i, bottom_y - i);
 +    }
  
    XSetClipMask (dpy, gc, None);
  }
     rectangle to use when drawing.  */
  
  static void
 -x_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width,
 -               left_p, right_p, clip_rect)
 -     struct glyph_string *s;
 -     int left_x, top_y, right_x, bottom_y, width, left_p, right_p;
 -     XRectangle *clip_rect;
 +x_draw_box_rect (struct glyph_string *s,
 +               int left_x, int top_y, int right_x, int bottom_y, int width,
 +               int left_p, int right_p, XRectangle *clip_rect)
  {
    XGCValues xgcv;
  
  /* Draw a box around glyph string S.  */
  
  static void
 -x_draw_glyph_string_box (s)
 -     struct glyph_string *s;
 +x_draw_glyph_string_box (struct glyph_string *s)
  {
    int width, left_x, right_x, top_y, bottom_y, last_x, raised_p;
    int left_p, right_p;
  /* Draw foreground of image glyph string S.  */
  
  static void
 -x_draw_image_foreground (s)
 -     struct glyph_string *s;
 +x_draw_image_foreground (struct glyph_string *s)
  {
    int x = s->x;
    int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
  /* Draw a relief around the image glyph string S.  */
  
  static void
 -x_draw_image_relief (s)
 -     struct glyph_string *s;
 +x_draw_image_relief (struct glyph_string *s)
  {
 -  int x0, y0, x1, y1, thick, raised_p;
 +  int x0, y0, x1, y1, thick, raised_p, extra;
    XRectangle r;
    int x = s->x;
    int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
        raised_p = s->img->relief > 0;
      }
  
 -  x0 = x - thick;
 -  y0 = y - thick;
 -  x1 = x + s->slice.width + thick - 1;
 -  y1 = y + s->slice.height + thick - 1;
 +  extra = s->face->id == TOOL_BAR_FACE_ID
 +    ? XINT (Vtool_bar_button_margin) : 0;
 +
 +  x0 = x - thick - extra;
 +  y0 = y - thick - extra;
 +  x1 = x + s->slice.width + thick - 1 + extra;
 +  y1 = y + s->slice.height + thick - 1 + extra;
  
    x_setup_relief_colors (s);
    get_glyph_string_clip_rect (s, &r);
  /* Draw the foreground of image glyph string S to PIXMAP.  */
  
  static void
 -x_draw_image_foreground_1 (s, pixmap)
 -     struct glyph_string *s;
 -     Pixmap pixmap;
 +x_draw_image_foreground_1 (struct glyph_string *s, Pixmap pixmap)
  {
    int x = 0;
    int y = s->ybase - s->y - image_ascent (s->img, s->face, &s->slice);
     give the rectangle to draw.  */
  
  static void
 -x_draw_glyph_string_bg_rect (s, x, y, w, h)
 -     struct glyph_string *s;
 -     int x, y, w, h;
 +x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h)
  {
    if (s->stippled_p)
      {
   */
  
  static void
 -x_draw_image_glyph_string (s)
 -     struct glyph_string *s;
 +x_draw_image_glyph_string (struct glyph_string *s)
  {
    int box_line_hwidth = eabs (s->face->box_line_width);
    int box_line_vwidth = max (s->face->box_line_width, 0);
  /* Draw stretch glyph string S.  */
  
  static void
 -x_draw_stretch_glyph_string (s)
 -     struct glyph_string *s;
 +x_draw_stretch_glyph_string (struct glyph_string *s)
  {
    xassert (s->first_glyph->type == STRETCH_GLYPH);
  
    if (s->hl == DRAW_CURSOR
        && !x_stretch_cursor_p)
      {
 -      /* If `x-stretch-block-cursor' is nil, don't draw a block cursor
 -       as wide as the stretch glyph.  */
 +      /* If `x-stretch-cursor' is nil, don't draw a block cursor as
 +       wide as the stretch glyph.  */
        int width, background_width = s->background_width;
 -      int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
 +      int x = s->x;
  
 -      if (x < left_x)
 +      if (!s->row->reversed_p)
        {
 -        background_width -= left_x - x;
 -        x = left_x;
 +        int left_x = window_box_left_offset (s->w, TEXT_AREA);
 +
 +        if (x < left_x)
 +          {
 +            background_width -= left_x - x;
 +            x = left_x;
 +          }
 +      }
 +      else
 +      {
 +        /* In R2L rows, draw the cursor on the right edge of the
 +           stretch glyph.  */
 +        int right_x = window_box_right_offset (s->w, TEXT_AREA);
 +
 +        if (x + background_width > right_x)
 +          background_width -= x - right_x;
 +        x += background_width;
        }
        width = min (FRAME_COLUMN_WIDTH (s->f), background_width);
 +      if (s->row->reversed_p)
 +      x -= width;
  
        /* Draw cursor.  */
        x_draw_glyph_string_bg_rect (s, x, s->y, width, s->height);
          XRectangle r;
          GC gc;
  
 -        x += width;
 +        if (!s->row->reversed_p)
 +          x += width;
 +        else
 +          x = s->x;
          if (s->row->mouse_face_p
              && cursor_in_mouse_face_p (s->w))
            {
  /* Draw glyph string S.  */
  
  static void
 -x_draw_glyph_string (s)
 -     struct glyph_string *s;
 +x_draw_glyph_string (struct glyph_string *s)
  {
    int relief_drawn_p = 0;
  
        x_draw_composite_glyph_string_foreground (s);
        break;
  
 +    case GLYPHLESS_GLYPH:
 +      if (s->for_overlaps)
 +      s->background_filled_p = 1;
 +      else
 +      x_draw_glyph_string_background (s, 1);
 +      x_draw_glyphless_glyph_string_foreground (s);
 +      break;
 +
      default:
        abort ();
      }
  /* Shift display to make room for inserted glyphs.   */
  
  void
 -x_shift_glyphs_for_insert (f, x, y, width, height, shift_by)
 -     struct frame *f;
 -     int x, y, width, height, shift_by;
 +x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by)
  {
    XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f),
             f->output_data.x->normal_gc,
     for X frames.  */
  
  static void
 -x_delete_glyphs (f, n)
 -     struct frame *f;
 -     register int n;
 +x_delete_glyphs (struct frame *f, register int n)
  {
    abort ();
  }
     If they are <= 0, this is probably an error.  */
  
  void
 -x_clear_area (dpy, window, x, y, width, height, exposures)
 -     Display *dpy;
 -     Window window;
 -     int x, y;
 -     int width, height;
 -     int exposures;
 +x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures)
  {
    xassert (width > 0 && height > 0);
    XClearArea (dpy, window, x, y, width, height, exposures);
@@@ -2985,10 -2942,9 +2985,10 @@@ x_clear_frame (struct frame *f
  #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)
    /* Make sure scroll bars are redrawn.  As they aren't redrawn by
       redisplay, do it here.  */
 -  gtk_widget_queue_draw (FRAME_GTK_WIDGET (f));
 +  if (FRAME_GTK_WIDGET (f))
 +    gtk_widget_queue_draw (FRAME_GTK_WIDGET (f));
  #endif
 -  
 +
    XFlush (FRAME_X_DISPLAY (f));
  
    UNBLOCK_INPUT;
     *RESULT.  Return 1 if the difference is negative, otherwise 0.  */
  
  static int
 -timeval_subtract (result, x, y)
 -     struct timeval *result, x, y;
 +timeval_subtract (struct timeval *result, struct timeval x, struct timeval y)
  {
    /* Perform the carry for the later subtraction by updating y.  This
       is safer because on some systems the tv_sec member is unsigned.  */
  }
  
  void
 -XTflash (f)
 -     struct frame *f;
 +XTflash (struct frame *f)
  {
    BLOCK_INPUT;
  
  #ifdef USE_GTK
      /* Use Gdk routines to draw.  This way, we won't draw over scroll bars
         when the scroll bars and the edit widget share the same X window.  */
 +    GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
      GdkGCValues vals;
      GdkGC *gc;
      vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f)
                               ^ FRAME_BACKGROUND_PIXEL (f));
      vals.function = GDK_XOR;
 -    gc = gdk_gc_new_with_values (FRAME_GTK_WIDGET (f)->window,
 -                                 &vals,
 -                                 GDK_GC_FUNCTION
 -                                 | GDK_GC_FOREGROUND);
 +    gc = gdk_gc_new_with_values (window,
 +                                 &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND);
  #define XFillRectangle(d, win, gc, x, y, w, h) \
 -    gdk_draw_rectangle (FRAME_GTK_WIDGET (f)->window, \
 -                        gc, TRUE, x, y, w, h)
 +    gdk_draw_rectangle (window, gc, TRUE, x, y, w, h)
  #else
      GC gc;
  
  
  
  static void
 -XTtoggle_invisible_pointer (f, invisible)
 -     FRAME_PTR f;
 -     int invisible;
 +XTtoggle_invisible_pointer (FRAME_PTR f, int invisible)
  {
    BLOCK_INPUT;
 -  if (invisible) 
 +  if (invisible)
      {
        if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0)
          XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
  /* Make audible bell.  */
  
  void
 -XTring_bell ()
 +XTring_bell (struct frame *f)
  {
 -  struct frame *f = SELECTED_FRAME ();
 -
    if (FRAME_X_DISPLAY (f))
      {
  #if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT)
     that is bounded by calls to x_update_begin and x_update_end.  */
  
  static void
 -XTset_terminal_window (n)
 -     register int n;
 +XTset_terminal_window (struct frame *f, int n)
  {
    /* This function intentionally left blank.  */
  }
     lines or deleting -N lines at vertical position VPOS.  */
  
  static void
 -x_ins_del_lines (f, vpos, n)
 -     struct frame *f;
 -     int vpos, n;
 +x_ins_del_lines (struct frame *f, int vpos, int n)
  {
    abort ();
  }
  /* Scroll part of the display as described by RUN.  */
  
  static void
 -x_scroll_run (w, run)
 -     struct window *w;
 -     struct run *run;
 +x_scroll_run (struct window *w, struct run *run)
  {
    struct frame *f = XFRAME (w->frame);
    int x, y, width, height, from_y, to_y, bottom_y;
  
  \f
  static void
 -frame_highlight (f)
 -     struct frame *f;
 +frame_highlight (struct frame *f)
  {
    /* We used to only do this if Vx_no_window_manager was non-nil, but
       the ICCCM (section 4.1.6) says that the window's border pixmap
  }
  
  static void
 -frame_unhighlight (f)
 -     struct frame *f;
 +frame_unhighlight (struct frame *f)
  {
    /* We used to only do this if Vx_no_window_manager was non-nil, but
       the ICCCM (section 4.1.6) says that the window's border pixmap
     Lisp code can tell when the switch took place by examining the events.  */
  
  static void
 -x_new_focus_frame (dpyinfo, frame)
 -     struct x_display_info *dpyinfo;
 -     struct frame *frame;
 +x_new_focus_frame (struct x_display_info *dpyinfo, struct frame *frame)
  {
    struct frame *old_focus = dpyinfo->x_focus_frame;
  
     a FOCUS_IN_EVENT into *BUFP.  */
  
  static void
 -x_focus_changed (type, state, dpyinfo, frame, bufp)
 -     int type;
 -     int state;
 -     struct x_display_info *dpyinfo;
 -     struct frame *frame;
 -     struct input_event *bufp;
 +x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame, struct input_event *bufp)
  {
    if (type == FocusIn)
      {
     Returns FOCUS_IN_EVENT event in *BUFP. */
  
  static void
 -x_detect_focus_change (dpyinfo, event, bufp)
 -     struct x_display_info *dpyinfo;
 -     XEvent *event;
 -     struct input_event *bufp;
 +x_detect_focus_change (struct x_display_info *dpyinfo, XEvent *event, struct input_event *bufp)
  {
    struct frame *frame;
  
  /* Handle an event saying the mouse has moved out of an Emacs frame.  */
  
  void
 -x_mouse_leave (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_mouse_leave (struct x_display_info *dpyinfo)
  {
    x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame);
  }
     the appropriate X display info.  */
  
  static void
 -XTframe_rehighlight (frame)
 -     struct frame *frame;
 +XTframe_rehighlight (struct frame *frame)
  {
    x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame));
  }
  
  static void
 -x_frame_rehighlight (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_frame_rehighlight (struct x_display_info *dpyinfo)
  {
    struct frame *old_highlight = dpyinfo->x_highlight_frame;
  
  
  /* Initialize mode_switch_bit and modifier_meaning.  */
  static void
 -x_find_modifier_meanings (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_find_modifier_meanings (struct x_display_info *dpyinfo)
  {
    int min_code, max_code;
    KeySym *syms;
     Emacs uses.  */
  
  unsigned int
 -x_x_to_emacs_modifiers (dpyinfo, state)
 -     struct x_display_info *dpyinfo;
 -     unsigned int state;
 +x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, unsigned int state)
  {
    EMACS_UINT mod_meta = meta_modifier;
    EMACS_UINT mod_alt  = alt_modifier;
  }
  
  static unsigned int
 -x_emacs_to_x_modifiers (dpyinfo, state)
 -     struct x_display_info *dpyinfo;
 -     unsigned int state;
 +x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, unsigned int state)
  {
    EMACS_UINT mod_meta = meta_modifier;
    EMACS_UINT mod_alt  = alt_modifier;
  /* Convert a keysym to its name.  */
  
  char *
 -x_get_keysym_name (keysym)
 -     KeySym keysym;
 +x_get_keysym_name (int keysym)
  {
    char *value;
  
     the mouse.  */
  
  static Lisp_Object
 -construct_mouse_click (result, event, f)
 -     struct input_event *result;
 -     XButtonEvent *event;
 -     struct frame *f;
 +construct_mouse_click (struct input_event *result, XButtonEvent *event, struct frame *f)
  {
    /* Make the event type NO_EVENT; we'll change that when we decide
       otherwise.  */
@@@ -3758,7 -3751,9 +3758,7 @@@ static XMotionEvent last_mouse_motion_e
  static Lisp_Object last_mouse_motion_frame;
  
  static int
 -note_mouse_movement (frame, event)
 -     FRAME_PTR frame;
 -     XMotionEvent *event;
 +note_mouse_movement (FRAME_PTR frame, XMotionEvent *event)
  {
    last_mouse_movement_time = event->time;
    last_mouse_motion_event = *event;
   ************************************************************************/
  
  static void
 -redo_mouse_highlight ()
 +redo_mouse_highlight (void)
  {
    if (!NILP (last_mouse_motion_frame)
        && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame)))
     movement.  */
  
  static void
 -XTmouse_position (fp, insist, bar_window, part, x, y, time)
 -     FRAME_PTR *fp;
 -     int insist;
 -     Lisp_Object *bar_window;
 -     enum scroll_bar_part *part;
 -     Lisp_Object *x, *y;
 -     unsigned long *time;
 +XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time)
  {
    FRAME_PTR f1;
  
     bits.  */
  
  static struct scroll_bar *
 -x_window_to_scroll_bar (display, window_id)
 -     Display *display;
 -     Window window_id;
 +x_window_to_scroll_bar (Display *display, Window window_id)
  {
    Lisp_Object tail;
  
     if WINDOW is not part of a menu bar.  */
  
  static Widget
 -x_window_to_menu_bar (window)
 -     Window window;
 +x_window_to_menu_bar (Window window)
  {
    Lisp_Object tail;
  
  
  #ifdef USE_TOOLKIT_SCROLL_BARS
  
 -static void x_scroll_bar_to_input_event P_ ((XEvent *, struct input_event *));
 -static void x_send_scroll_bar_event P_ ((Lisp_Object, int, int, int));
 -static void x_create_toolkit_scroll_bar P_ ((struct frame *,
 -                                           struct scroll_bar *));
 -static void x_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *,
 -                                              int, int, int));
 +static void x_scroll_bar_to_input_event (XEvent *, struct input_event *);
 +static void x_send_scroll_bar_event (Lisp_Object, int, int, int);
 +static void x_create_toolkit_scroll_bar (struct frame *,
 +                                         struct scroll_bar *);
 +static void x_set_toolkit_scroll_bar_thumb (struct scroll_bar *,
 +                                            int, int, int);
  
  
  /* Lisp window being scrolled.  Set when starting to interact with
@@@ -4148,11 -4152,17 +4148,11 @@@ static Boolean xaw3d_pick_top
     a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so.  */
  
  static void
 -xt_action_hook (widget, client_data, action_name, event, params,
 -              num_params)
 -     Widget widget;
 -     XtPointer client_data;
 -     String action_name;
 -     XEvent *event;
 -     String *params;
 -     Cardinal *num_params;
 +xt_action_hook (Widget widget, XtPointer client_data, String action_name,
 +              XEvent *event, String *params, Cardinal *num_params)
  {
    int scroll_bar_p;
 -  char *end_action;
 +  const char *end_action;
  
  #ifdef USE_MOTIF
    scroll_bar_p = XmIsScrollBar (widget);
@@@ -4200,7 -4210,9 +4200,7 @@@ static int scroll_bar_windows_size
     amount to scroll of a whole of WHOLE.  */
  
  static void
 -x_send_scroll_bar_event (window, part, portion, whole)
 -     Lisp_Object window;
 -     int part, portion, whole;
 +x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
  {
    XEvent event;
    XClientMessageEvent *ev = (XClientMessageEvent *) &event;
  
        scroll_bar_windows = (struct window **) xrealloc (scroll_bar_windows,
                                                        nbytes);
 -      bzero (&scroll_bar_windows[i], nbytes - old_nbytes);
 +      memset (&scroll_bar_windows[i], 0, nbytes - old_nbytes);
        scroll_bar_windows_size = new_size;
      }
  
     in *IEVENT.  */
  
  static void
 -x_scroll_bar_to_input_event (event, ievent)
 -     XEvent *event;
 -     struct input_event *ievent;
 +x_scroll_bar_to_input_event (XEvent *event, struct input_event *ievent)
  {
    XClientMessageEvent *ev = (XClientMessageEvent *) event;
    Lisp_Object window;
     CALL_DATA is a pointer to a XmScrollBarCallbackStruct.  */
  
  static void
 -xm_scroll_callback (widget, client_data, call_data)
 -     Widget widget;
 -     XtPointer client_data, call_data;
 +xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
  {
    struct scroll_bar *bar = (struct scroll_bar *) client_data;
    XmScrollBarCallbackStruct *cs = (XmScrollBarCallbackStruct *) call_data;
@@@ -4398,8 -4414,7 +4398,8 @@@ xg_scroll_callback (GtkRange     *range
            && FRAME_X_DISPLAY_INFO (f)->grabbed < (1 << 4))
          {
            part = scroll_bar_handle;
 -          whole = adj->upper - adj->page_size;
 +          whole = gtk_adjustment_get_upper (adj) -
 +            gtk_adjustment_get_page_size (adj);
            portion = min ((int)position, whole);
            bar->dragging = make_number ((int)portion);
          }
@@@ -4460,7 -4475,9 +4460,7 @@@ xg_end_scroll_callback (GtkWidget *widg
     the thumb is.  */
  
  static void
 -xaw_jump_callback (widget, client_data, call_data)
 -     Widget widget;
 -     XtPointer client_data, call_data;
 +xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data)
  {
    struct scroll_bar *bar = (struct scroll_bar *) client_data;
    float top = *(float *) call_data;
     Values < height of scroll bar mean line-wise movement.  */
  
  static void
 -xaw_scroll_callback (widget, client_data, call_data)
 -     Widget widget;
 -     XtPointer client_data, call_data;
 +xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
  {
    struct scroll_bar *bar = (struct scroll_bar *) client_data;
    /* The position really is stored cast to a pointer.  */
  
  #ifdef USE_GTK
  static void
 -x_create_toolkit_scroll_bar (f, bar)
 -     struct frame *f;
 -     struct scroll_bar *bar;
 +x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
  {
 -  char *scroll_bar_name = SCROLL_BAR_NAME;
 +  const char *scroll_bar_name = SCROLL_BAR_NAME;
  
    BLOCK_INPUT;
    xg_create_scroll_bar (f, bar, G_CALLBACK (xg_scroll_callback),
  #else /* not USE_GTK */
  
  static void
 -x_create_toolkit_scroll_bar (f, bar)
 -     struct frame *f;
 -     struct scroll_bar *bar;
 +x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
  {
    Window xwindow;
    Widget widget;
    if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
      {
        pixel = f->output_data.x->scroll_bar_background_pixel;
 -      if (pixel != -1) 
 +      if (pixel != -1)
          {
            if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
                                        FRAME_X_COLORMAP (f),
    if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
      {
        pixel = f->output_data.x->scroll_bar_background_pixel;
 -      if (pixel != -1) 
 +      if (pixel != -1)
          {
            if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
                                        FRAME_X_COLORMAP (f),
        || 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, True);
 +      XtSetArg (av[ac], XtNbeNiceToColormap,
 +                DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
        ++ac;
      }
    else
  
  #ifdef USE_GTK
  static void
 -x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
 -     struct scroll_bar *bar;
 -     int portion, position, whole;
 +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 (bar, portion, position, whole)
 -     struct scroll_bar *bar;
 -     int portion, position, whole;
 +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);
     scroll bar. */
  
  static struct scroll_bar *
 -x_scroll_bar_create (w, top, left, width, height)
 -     struct window *w;
 -     int top, left, width, height;
 +x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
  {
    struct frame *f = XFRAME (w->frame);
    struct scroll_bar *bar
                               left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
                               width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
                               max (height, 1));
 -    xg_show_scroll_bar (bar->x_window);
  #else /* not USE_GTK */
      Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
      XtConfigureWidget (scroll_bar,
     to move to the very end of the buffer.  */
  
  static void
 -x_scroll_bar_set_handle (bar, start, end, rebuild)
 -     struct scroll_bar *bar;
 -     int start, end;
 -     int rebuild;
 +x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild)
  {
    int dragging = ! NILP (bar->dragging);
    Window w = bar->x_window;
     nil.  */
  
  static void
 -x_scroll_bar_remove (bar)
 -     struct scroll_bar *bar;
 +x_scroll_bar_remove (struct scroll_bar *bar)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
    BLOCK_INPUT;
     create one.  */
  
  static void
 -XTset_vertical_scroll_bar (w, portion, whole, position)
 -     struct window *w;
 -     int portion, whole, position;
 +XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int position)
  {
    struct frame *f = XFRAME (w->frame);
    struct scroll_bar *bar;
     `*redeem_scroll_bar_hook' is applied to its window before the judgment.  */
  
  static void
 -XTcondemn_scroll_bars (frame)
 -     FRAME_PTR frame;
 +XTcondemn_scroll_bars (FRAME_PTR frame)
  {
    /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS.  */
    while (! NILP (FRAME_SCROLL_BARS (frame)))
     Note that WINDOW isn't necessarily condemned at all.  */
  
  static void
 -XTredeem_scroll_bar (window)
 -     struct window *window;
 +XTredeem_scroll_bar (struct window *window)
  {
    struct scroll_bar *bar;
    struct frame *f;
     last call to `*condemn_scroll_bars_hook'.  */
  
  static void
 -XTjudge_scroll_bars (f)
 -     FRAME_PTR f;
 +XTjudge_scroll_bars (FRAME_PTR f)
  {
    Lisp_Object bar, next;
  
     mark bits.  */
  
  static void
 -x_scroll_bar_expose (bar, event)
 -     struct scroll_bar *bar;
 -     XEvent *event;
 +x_scroll_bar_expose (struct scroll_bar *bar, XEvent *event)
  {
    Window w = bar->x_window;
    FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
  
  
  static void
 -x_scroll_bar_handle_click (bar, event, emacs_event)
 -     struct scroll_bar *bar;
 -     XEvent *event;
 -     struct input_event *emacs_event;
 +x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event)
  {
    if (! WINDOWP (bar->window))
      abort ();
     mark bits.  */
  
  static void
 -x_scroll_bar_note_movement (bar, event)
 -     struct scroll_bar *bar;
 -     XEvent *event;
 +x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
  {
    FRAME_PTR f = XFRAME (XWINDOW (bar->window)->frame);
  
     on the scroll bar.  */
  
  static void
 -x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
 -     FRAME_PTR *fp;
 -     Lisp_Object *bar_window;
 -     enum scroll_bar_part *part;
 -     Lisp_Object *x, *y;
 -     unsigned long *time;
 +x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time)
  {
    struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
    Window w = bar->x_window;
     Clear out the scroll bars, and ask for expose events, so we can
     redraw them.  */
  
 -void
 -x_scroll_bar_clear (f)
 -     FRAME_PTR f;
 +static void
 +x_scroll_bar_clear (FRAME_PTR f)
  {
  #ifndef USE_TOOLKIT_SCROLL_BARS
    Lisp_Object bar;
@@@ -5691,18 -5739,22 +5691,18 @@@ struct x_display_info *XTread_socket_fa
  
  static struct x_display_info *next_noop_dpyinfo;
  
 -#define SET_SAVED_MENU_EVENT(size)                                    \
 +#define SET_SAVED_BUTTON_EVENT                                          \
       do                                                                       \
         {                                                              \
         if (f->output_data.x->saved_menu_event == 0)                   \
             f->output_data.x->saved_menu_event                         \
             = (XEvent *) xmalloc (sizeof (XEvent));                    \
 -         bcopy (&event, f->output_data.x->saved_menu_event, size);    \
 +         *f->output_data.x->saved_menu_event = event;                   \
         inev.ie.kind = MENU_BAR_ACTIVATE_EVENT;                        \
         XSETFRAME (inev.ie.frame_or_window, f);                        \
         }                                                              \
       while (0)
  
 -#define SET_SAVED_BUTTON_EVENT SET_SAVED_MENU_EVENT (sizeof (XButtonEvent))
 -#define SET_SAVED_KEY_EVENT    SET_SAVED_MENU_EVENT (sizeof (XKeyEvent))
 -
 -
  enum
  {
    X_EVENT_NORMAL,
  
  #ifdef HAVE_X_I18N
  static int
 -x_filter_event (dpyinfo, event)
 -     struct x_display_info *dpyinfo;
 -     XEvent *event;
 +x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
  {
    /* XFilterEvent returns non-zero if the input method has
     consumed the event.  We pass the frame's X window to
@@@ -5743,7 -5797,10 +5743,7 @@@ static struct input_event *current_hold
     It is invoked before the XEvent is translated to a GdkEvent,
     so we have a chance to act on the event before GTK. */
  static GdkFilterReturn
 -event_handler_gdk (gxev, ev, data)
 -     GdkXEvent *gxev;
 -     GdkEvent *ev;
 -     gpointer data;
 +event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
  {
    XEvent *xev = (XEvent *) gxev;
  
  #endif /* USE_GTK */
  
  
 +static void xembed_send_message (struct frame *f, Time time,
 +                                 enum xembed_message message,
 +                                 long detail, long data1, long data2);
 +
  /* Handles the XEvent EVENT on display DPYINFO.
  
     *FINISH is X_EVENT_GOTO_OUT if caller should stop reading events.
     We return the number of characters stored into the buffer. */
  
  static int
 -handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
 -     struct x_display_info *dpyinfo;
 -     XEvent *eventp;
 -     int *finish;
 -     struct input_event *hold_quit;
 +handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, struct input_event *hold_quit)
  {
    union {
      struct input_event ie;
    struct frame *f = NULL;
    struct coding_system coding;
    XEvent event = *eventp;
 +  Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
  
    *finish = X_EVENT_NORMAL;
  
    EVENT_INIT (inev.ie);
    inev.ie.kind = NO_EVENT;
    inev.ie.arg = Qnil;
 -  
 +
    if (pending_event_wait.eventtype == event.type)
      pending_event_wait.eventtype = 0; /* Indicates we got it.  */
 -  
 +
    switch (event.type)
      {
      case ClientMessage:
  
        /* If mouse-highlight is an integer, input clears out
         mouse highlighting.  */
 -      if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
 +      if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
          && (f == 0
 -            || !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)))
 +            || !EQ (f->tool_bar_window, hlinfo->mouse_face_window)))
          {
 -          clear_mouse_face (dpyinfo);
 -          dpyinfo->mouse_face_hidden = 1;
 +          clear_mouse_face (hlinfo);
 +          hlinfo->mouse_face_hidden = 1;
          }
  
  #if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS
               this enables ComposeCharacter to work whether or
               not it is combined with Meta.  */
            if (modifiers & dpyinfo->meta_mod_mask)
 -            bzero (&compose_status, sizeof (compose_status));
 +            memset (&compose_status, 0, sizeof (compose_status));
  
  #ifdef HAVE_X_I18N
            if (FRAME_XIC (f))
            if (compose_status.chars_matched > 0 && nbytes == 0)
              break;
  
 -          bzero (&compose_status, sizeof (compose_status));
 +          memset (&compose_status, 0, sizeof (compose_status));
            orig_keysym = keysym;
  
          /* Common for all keysym input events.  */
              {
                /* Decode the input data.  */
                int require;
 -              unsigned char *p;
  
                /* The input should be decoded with `coding_system'
                   which depends on which X*LookupString function
        f = x_top_window_to_frame (dpyinfo, event.xcrossing.window);
        if (f)
          {
 -          if (f == dpyinfo->mouse_face_mouse_frame)
 +          if (f == hlinfo->mouse_face_mouse_frame)
              {
                /* If we move outside the frame, then we're
                   certainly no longer on any text in the frame.  */
 -              clear_mouse_face (dpyinfo);
 -              dpyinfo->mouse_face_mouse_frame = 0;
 +              clear_mouse_face (hlinfo);
 +              hlinfo->mouse_face_mouse_frame = 0;
              }
  
            /* Generate a nil HELP_EVENT to cancel a help-echo.
          else
            f = x_window_to_frame (dpyinfo, event.xmotion.window);
  
 -        if (dpyinfo->mouse_face_hidden)
 +        if (hlinfo->mouse_face_hidden)
            {
 -            dpyinfo->mouse_face_hidden = 0;
 -            clear_mouse_face (dpyinfo);
 +            hlinfo->mouse_face_hidden = 0;
 +            clear_mouse_face (hlinfo);
            }
  
  #ifdef USE_GTK
  
                  window = window_from_coordinates (f,
                                                    event.xmotion.x, event.xmotion.y,
 -                                                  0, 0, 0, 0);
 +                                                  0, 0);
  
                  /* Window will be selected only when it is not selected now and
                     last mouse movement event was not in it.  Minibuffer window
  
              /* If we move outside the frame, then we're
                 certainly no longer on any text in the frame.  */
 -            clear_mouse_face (dpyinfo);
 +            clear_mouse_face (hlinfo);
            }
  
          /* If the contents of the global variable help_echo_string
                              event.xconfigure.height);
            f = 0;
          }
 -#endif  
 +#endif
        if (f)
          {
  #ifndef USE_X_TOOLKIT
            /* GTK creates windows but doesn't map them.
               Only get real positions when mapped. */
            if (FRAME_GTK_OUTER_WIDGET (f)
 -              && GTK_WIDGET_MAPPED (FRAME_GTK_OUTER_WIDGET (f)))
 +              && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f)))
  #endif
              {
              x_real_positions (f, &f->left_pos, &f->top_pos);
             by the rest of Emacs, we put it here.  */
          int tool_bar_p = 0;
  
 -        bzero (&compose_status, sizeof (compose_status));
 +        memset (&compose_status, 0, sizeof (compose_status));
        last_mouse_glyph_frame = 0;
          last_user_time = event.xbutton.time;
  
                  int x = event.xbutton.x;
                  int y = event.xbutton.y;
  
 -                window = window_from_coordinates (f, x, y, 0, 0, 0, 1);
 +                window = window_from_coordinates (f, x, y, 0, 1);
                  tool_bar_p = EQ (window, f->tool_bar_window);
  
                  if (tool_bar_p && event.xbutton.button < 4)
             Instead, save it away
             and we will pass it to Xt from kbd_buffer_get_event.
             That way, we can run some Lisp code first.  */
 -        if (
 +        if (! popup_activated ()
  #ifdef USE_GTK
 -            ! popup_activated ()
              /* Gtk+ menus only react to the first three buttons. */
              && event.xbutton.button < 3
 -            &&
  #endif
 -            f && event.type == ButtonPress
 +            && f && event.type == ButtonPress
              /* Verify the event is really within the menu bar
                 and not just sent to it due to grabbing.  */
              && event.xbutton.x >= 0
            {
              SET_SAVED_BUTTON_EVENT;
              XSETFRAME (last_mouse_press_frame, f);
 -#ifdef USE_GTK
              *finish = X_EVENT_DROP;
 -#endif
            }
          else if (event.type == ButtonPress)
            {
              last_mouse_press_frame = Qnil;
              goto OTHER;
            }
 -
 -#ifdef USE_MOTIF /* This should do not harm for Lucid,
 -                  but I am trying to be cautious.  */
 -        else if (event.type == ButtonRelease)
 -          {
 -            if (!NILP (last_mouse_press_frame))
 -              {
 -                f = XFRAME (last_mouse_press_frame);
 -                if (f->output_data.x)
 -                  SET_SAVED_BUTTON_EVENT;
 -              }
 -            else
 -              goto OTHER;
 -          }
 -#endif /* USE_MOTIF */
          else
            goto OTHER;
  #endif /* USE_X_TOOLKIT || USE_GTK */
  
     Returns the value handle_one_xevent sets in the finish argument.  */
  int
 -x_dispatch_event (event, display)
 -     XEvent *event;
 -     Display *display;
 +x_dispatch_event (XEvent *event, Display *display)
  {
    struct x_display_info *dpyinfo;
    int finish = X_EVENT_NORMAL;
     EXPECTED is nonzero if the caller knows input is available.  */
  
  static int
 -XTread_socket (terminal, expected, hold_quit)
 -     struct terminal *terminal;
 -     int expected;
 -     struct input_event *hold_quit;
 +XTread_socket (struct terminal *terminal, int expected, struct input_event *hold_quit)
  {
    int count = 0;
    XEvent event;
     mode lines must be clipped to the whole window.  */
  
  static void
 -x_clip_to_row (w, row, area, gc)
 -     struct window *w;
 -     struct glyph_row *row;
 -     int area;
 -     GC gc;
 +x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    XRectangle clip_rect;
  /* Draw a hollow box cursor on window W in glyph row ROW.  */
  
  static void
 -x_draw_hollow_cursor (w, row)
 -     struct window *w;
 -     struct glyph_row *row;
 +x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
     --gerd.  */
  
  static void
 -x_draw_bar_cursor (w, row, width, kind)
 -     struct window *w;
 -     struct glyph_row *row;
 -     int width;
 -     enum text_cursor_kinds kind;
 +x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text_cursor_kinds kind)
  {
    struct frame *f = XFRAME (w->frame);
    struct glyph *cursor_glyph;
  
        if (kind == BAR_CURSOR)
        {
 +        int x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
 +
          if (width < 0)
            width = FRAME_CURSOR_WIDTH (f);
          width = min (cursor_glyph->pixel_width, width);
  
          w->phys_cursor_width = width;
  
 -        XFillRectangle (dpy, window, gc,
 -                        WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
 +        /* If the character under cursor is R2L, draw the bar cursor
 +           on the right of its glyph, rather than on the left.  */
 +        if ((cursor_glyph->resolved_level & 1) != 0)
 +          x += cursor_glyph->pixel_width - width;
 +
 +        XFillRectangle (dpy, window, gc, x,
                          WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
                          width, row->height);
        }
  /* RIF: Define cursor CURSOR on frame F.  */
  
  static void
 -x_define_frame_cursor (f, cursor)
 -     struct frame *f;
 -     Cursor cursor;
 +x_define_frame_cursor (struct frame *f, Cursor cursor)
  {
    if (!f->pointer_invisible
        && f->output_data.x->current_cursor != cursor)
  /* RIF: Clear area on frame F.  */
  
  static void
 -x_clear_frame_area (f, x, y, width, height)
 -     struct frame *f;
 -     int x, y, width, height;
 +x_clear_frame_area (struct frame *f, int x, int y, int width, int height)
  {
    x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                x, y, width, height, False);
  /* RIF: Draw cursor on window W.  */
  
  static void
 -x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
 -     struct window *w;
 -     struct glyph_row *glyph_row;
 -     int x, y;
 -     int cursor_type, cursor_width;
 -     int on_p, active_p;
 +x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int y, int cursor_type, int cursor_width, int on_p, int active_p)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
  
        w->phys_cursor_on_p = 1;
  
        if (glyph_row->exact_window_width_line_p
 -        && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])
 +        && (glyph_row->reversed_p
 +            ? (w->phys_cursor.hpos < 0)
 +            : (w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])))
        {
          glyph_row->cursor_in_fringe_p = 1;
 -        draw_fringe_bitmap (w, glyph_row, 0);
 +        draw_fringe_bitmap (w, glyph_row, glyph_row->reversed_p);
        }
        else
 -      switch (cursor_type)
        {
 -      case HOLLOW_BOX_CURSOR:
 -        x_draw_hollow_cursor (w, glyph_row);
 -        break;
 +        switch (cursor_type)
 +          {
 +          case HOLLOW_BOX_CURSOR:
 +            x_draw_hollow_cursor (w, glyph_row);
 +            break;
  
 -      case FILLED_BOX_CURSOR:
 -        draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
 -        break;
 +          case FILLED_BOX_CURSOR:
 +            draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
 +            break;
  
 -      case BAR_CURSOR:
 -        x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR);
 -        break;
 +          case BAR_CURSOR:
 +            x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR);
 +            break;
  
 -      case HBAR_CURSOR:
 -        x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR);
 -        break;
 +          case HBAR_CURSOR:
 +            x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR);
 +            break;
  
 -      case NO_CURSOR:
 -        w->phys_cursor_width = 0;
 -        break;
 +          case NO_CURSOR:
 +            w->phys_cursor_width = 0;
 +            break;
  
 -      default:
 -        abort ();
 +          default:
 +            abort ();
 +          }
        }
  
  #ifdef HAVE_X_I18N
  /* Make the x-window of frame F use the gnu icon bitmap.  */
  
  int
 -x_bitmap_icon (f, file)
 -     struct frame *f;
 -     Lisp_Object file;
 +x_bitmap_icon (struct frame *f, Lisp_Object file)
  {
    int bitmap_id;
  
     Use ICON_NAME as the text.  */
  
  int
 -x_text_icon (f, icon_name)
 -     struct frame *f;
 -     char *icon_name;
 +x_text_icon (struct frame *f, const char *icon_name)
  {
    if (FRAME_X_WINDOW (f) == 0)
      return 1;
@@@ -7559,7 -7653,9 +7559,7 @@@ static struct x_error_message_stack *x_
     x_catch_errors is in effect.  */
  
  static void
 -x_error_catcher (display, error)
 -     Display *display;
 -     XErrorEvent *error;
 +x_error_catcher (Display *display, XErrorEvent *error)
  {
    XGetErrorText (display, error->error_code,
                 x_error_message->string,
  
     Calling x_uncatch_errors resumes the normal error handling.  */
  
 -void x_check_errors ();
 +void x_check_errors (Display *dpy, const char *format);
  
  void
 -x_catch_errors (dpy)
 -     Display *dpy;
 +x_catch_errors (Display *dpy)
  {
    struct x_error_message_stack *data = xmalloc (sizeof (*data));
  
     DPY should be the display that was passed to x_catch_errors.  */
  
  void
 -x_uncatch_errors ()
 +x_uncatch_errors (void)
  {
    struct x_error_message_stack *tmp;
  
     sprintf (a buffer, FORMAT, the x error message text) as the text.  */
  
  void
 -x_check_errors (dpy, format)
 -     Display *dpy;
 -     char *format;
 +x_check_errors (Display *dpy, const char *format)
  {
    /* Make sure to catch any errors incurred so far.  */
    XSync (dpy, False);
    if (x_error_message->string[0])
      {
        char string[X_ERROR_MESSAGE_SIZE];
 -      bcopy (x_error_message->string, string, X_ERROR_MESSAGE_SIZE);
 +      memcpy (string, x_error_message->string, X_ERROR_MESSAGE_SIZE);
        x_uncatch_errors ();
        error (format, string);
      }
     since we did x_catch_errors on DPY.  */
  
  int
 -x_had_errors_p (dpy)
 -     Display *dpy;
 +x_had_errors_p (Display *dpy)
  {
    /* Make sure to catch any errors incurred so far.  */
    XSync (dpy, False);
  /* Forget about any errors we have had, since we did x_catch_errors on DPY.  */
  
  void
 -x_clear_errors (dpy)
 -     Display *dpy;
 +x_clear_errors (Display *dpy)
  {
    x_error_message->string[0] = 0;
  }
  /* Close off all unclosed x_catch_errors calls.  */
  
  void
 -x_fully_uncatch_errors ()
 +x_fully_uncatch_errors (void)
  {
    while (x_error_message)
      x_uncatch_errors ();
  /* Nonzero if x_catch_errors has been done and not yet canceled.  */
  
  int
 -x_catching_errors ()
 +x_catching_errors (void)
  {
    return x_error_message != 0;
  }
  
  #if 0
  static unsigned int x_wire_count;
 -x_trace_wire ()
 +x_trace_wire (void)
  {
    fprintf (stderr, "Lib call: %d\n", ++x_wire_count);
  }
     which will do the appropriate cleanup for us.  */
  
  static SIGTYPE
 -x_connection_signal (signalnum)       /* If we don't have an argument, */
 -     int signalnum;           /* some compilers complain in signal calls.  */
 +x_connection_signal (int signalnum)   /* If we don't have an argument, */
 +                              /* some compilers complain in signal calls.  */
  {
  #ifdef USG
    /* USG systems forget handlers when they are used;
@@@ -7715,7 -7816,7 +7715,7 @@@ static char *error_msg
     instead of dumping core when XtCloseDisplay fails.  */
  
  static void
 -x_fatal_error_signal ()
 +x_fatal_error_signal (void)
  {
    fprintf (stderr, "%s\n", error_msg);
    exit (70);
     the text of an error message that lead to the connection loss.  */
  
  static SIGTYPE
 -x_connection_closed (dpy, error_message)
 -     Display *dpy;
 -     char *error_message;
 +x_connection_closed (Display *dpy, const char *error_message)
  {
    struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
    Lisp_Object frame, tail;
         Closing the display is reported to lead to a bus error on
         OpenWindows in certain situations.  I suspect that is a bug
         in OpenWindows.  I don't know how to circumvent it here.  */
 -      extern void (*fatal_error_signal_hook) P_ ((void));
        fatal_error_signal_hook = x_fatal_error_signal;
        XtCloseDisplay (dpy);
        fatal_error_signal_hook = NULL;
@@@ -7838,8 -7942,8 +7838,8 @@@ For details, see etc/PROBLEMS.\n"
    if (terminal_list == 0)
      {
        fprintf (stderr, "%s\n", error_msg);
 -      shut_down_emacs (0, 0, Qnil);
 -      exit (70);
 +      Fkill_emacs (make_number (70));
 +      /* NOTREACHED */
      }
  
    /* Ordinary stack unwind doesn't deal with these.  */
  
  /* We specifically use it before defining it, so that gcc doesn't inline it,
     otherwise gdb doesn't know how to properly put a breakpoint on it.  */
 -static void x_error_quitter P_ ((Display *, XErrorEvent *));
 +static void x_error_quitter (Display *, XErrorEvent *);
  
  /* This is the first-level handler for X protocol errors.
     It calls x_error_quitter or x_error_catcher.  */
  
  static int
 -x_error_handler (display, error)
 -     Display *display;
 -     XErrorEvent *error;
 +x_error_handler (Display *display, XErrorEvent *error)
  {
    if (x_error_message)
      x_error_catcher (display, error);
  
  /* .gdbinit puts a breakpoint here, so make sure it is not inlined.  */
  
 -#if __GNUC__ >= 3  /* On GCC 3.0 we might get a warning.  */
 -#define NO_INLINE __attribute__((noinline))
 -#else
 -#define NO_INLINE
 -#endif
 -
 -/* Some versions of GNU/Linux define noinline in their headers.  */
 -
 -#ifdef noinline
 -#undef noinline
 -#endif
 -
  /* On older GCC versions, just putting x_error_quitter
     after x_error_handler prevents inlining into the former.  */
  
  static void NO_INLINE
 -x_error_quitter (display, error)
 -     Display *display;
 -     XErrorEvent *error;
 +x_error_quitter (Display *display, XErrorEvent *error)
  {
    char buf[256], buf1[356];
  
     If that was the only one, it prints an error message and kills Emacs.  */
  
  static int
 -x_io_error_quitter (display)
 -     Display *display;
 +x_io_error_quitter (Display *display)
  {
    char buf[256];
  
     FONT-OBJECT.  */
  
  Lisp_Object
 -x_new_font (f, font_object, fontset)
 -     struct frame *f;
 -     Lisp_Object font_object;
 -     int fontset;
 +x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
  {
    struct font *font = XFONT_OBJECT (font_object);
  
     pointer to the x_display_info structure corresponding to XIM.  */
  
  static void
 -xim_destroy_callback (xim, client_data, call_data)
 -     XIM xim;
 -     XPointer client_data;
 -     XPointer call_data;
 +xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
  {
    struct x_display_info *dpyinfo = (struct x_display_info *) client_data;
    Lisp_Object frame, tail;
  
  #ifdef HAVE_X11R6
  /* This isn't prototyped in OSF 5.0 or 5.1a.  */
 -extern char *XSetIMValues P_ ((XIM, ...));
 +extern char *XSetIMValues (XIM, ...);
  #endif
  
  /* Open the connection to the XIM server on display DPYINFO.
     RESOURCE_NAME is the resource name Emacs uses.  */
  
  static void
 -xim_open_dpy (dpyinfo, resource_name)
 -     struct x_display_info *dpyinfo;
 -     char *resource_name;
 +xim_open_dpy (struct x_display_info *dpyinfo, char *resource_name)
  {
    XIM xim;
  
        if (dpyinfo->xim)
        XCloseIM (dpyinfo->xim);
        xim = XOpenIM (dpyinfo->display, dpyinfo->xrdb, resource_name,
 -                   EMACS_CLASS);
 +                   emacs_class);
        dpyinfo->xim = xim;
  
        if (xim)
     when the callback was registered.  */
  
  static void
 -xim_instantiate_callback (display, client_data, call_data)
 -     Display *display;
 -     XPointer client_data;
 -     XPointer call_data;
 +xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_data)
  {
    struct xim_inst_t *xim_inst = (struct xim_inst_t *) client_data;
    struct x_display_info *dpyinfo = xim_inst->dpyinfo;
     in the XIM instantiate callback function.  */
  
  static void
 -xim_initialize (dpyinfo, resource_name)
 -     struct x_display_info *dpyinfo;
 -     char *resource_name;
 +xim_initialize (struct x_display_info *dpyinfo, char *resource_name)
  {
    dpyinfo->xim = NULL;
  #ifdef HAVE_XIM
        xim_inst->dpyinfo = dpyinfo;
        len = strlen (resource_name);
        xim_inst->resource_name = (char *) xmalloc (len + 1);
 -      bcopy (resource_name, xim_inst->resource_name, len + 1);
 +      memcpy (xim_inst->resource_name, resource_name, len + 1);
        XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
 -                                    resource_name, EMACS_CLASS,
 +                                    resource_name, emacs_class,
                                      xim_instantiate_callback,
                                      /* This is XPointer in XFree86
                                         but (XPointer *) on Tru64, at
  /* Close the connection to the XIM server on display DPYINFO. */
  
  static void
 -xim_close_dpy (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +xim_close_dpy (struct x_display_info *dpyinfo)
  {
  #ifdef HAVE_XIM
    if (use_xim)
  #ifdef HAVE_X11R6_XIM
        if (dpyinfo->display)
        XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
 -                                        NULL, EMACS_CLASS,
 +                                        NULL, emacs_class,
                                          xim_instantiate_callback, NULL);
        xfree (dpyinfo->xim_callback_data->resource_name);
        xfree (dpyinfo->xim_callback_data);
     from its current recorded position values and gravity.  */
  
  void
 -x_calc_absolute_position (f)
 -     struct frame *f;
 +x_calc_absolute_position (struct frame *f)
  {
    int flags = f->size_hint_flags;
  
     which means, do adjust for borders but don't change the gravity.  */
  
  void
 -x_set_offset (f, xoff, yoff, change_gravity)
 -     struct frame *f;
 -     register int xoff, yoff;
 -     int change_gravity;
 +x_set_offset (struct frame *f, register int xoff, register int yoff, int change_gravity)
  {
    int modified_top, modified_left;
  
     http://freedesktop.org/wiki/Specifications/wm-spec.  */
  
  static int
 -wm_supports (f, atomname)
 -     struct frame *f;
 -     const char *atomname;
 +wm_supports (struct frame *f, Atom want_atom)
  {
    Atom actual_type;
    unsigned long actual_size, bytes_remaining;
    int i, rc, actual_format;
 -  Atom prop_atom;
    Window wmcheck_window;
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Window target_window = dpyinfo->root_window;
    Display *dpy = FRAME_X_DISPLAY (f);
    unsigned char *tmp_data = NULL;
    Atom target_type = XA_WINDOW;
 -  Atom want_atom;
  
    BLOCK_INPUT;
  
 -  prop_atom = XInternAtom (dpy, "_NET_SUPPORTING_WM_CHECK", False);
 -
    x_catch_errors (dpy);
    rc = XGetWindowProperty (dpy, target_window,
 -                           prop_atom, 0, max_len, False, target_type,
 +                           dpyinfo->Xatom_net_supporting_wm_check,
 +                           0, max_len, False, target_type,
                             &actual_type, &actual_format, &actual_size,
                             &bytes_remaining, &tmp_data);
  
        dpyinfo->net_supported_window = 0;
  
        target_type = XA_ATOM;
 -      prop_atom = XInternAtom (dpy, "_NET_SUPPORTED", False);
        tmp_data = NULL;
        rc = XGetWindowProperty (dpy, target_window,
 -                               prop_atom, 0, max_len, False, target_type,
 +                               dpyinfo->Xatom_net_supported,
 +                               0, max_len, False, target_type,
                                 &actual_type, &actual_format, &actual_size,
                                 &bytes_remaining, &tmp_data);
  
      }
  
    rc = 0;
 -  want_atom = XInternAtom (dpy, atomname, False);
  
    for (i = 0; rc == 0 && i < dpyinfo->nr_net_supported_atoms; ++i)
      rc = dpyinfo->net_supported_atoms[i] == want_atom;
  }
  
  static void
 -set_wm_state (frame, add, what, what2)
 -     Lisp_Object frame;
 -     int add;
 -     const char *what;
 -     const char *what2;
 -{
 -  const char *atom = "_NET_WM_STATE";
 -  Fx_send_client_event (frame, make_number (0), frame,
 -                        make_unibyte_string (atom, strlen (atom)),
 -                        make_number (32),
 -                        /* 1 = add, 0 = remove */
 +set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value)
 +{
 +  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (frame));
 +
 +  x_send_client_event (frame, make_number (0), frame,
 +                       dpyinfo->Xatom_net_wm_state,
 +                       make_number (32),
 +                       /* 1 = add, 0 = remove */
 +                       Fcons
 +                       (make_number (add ? 1 : 0),
                          Fcons
 -                        (make_number (add ? 1 : 0),
 -                         Fcons
 -                         (make_unibyte_string (what, strlen (what)),
 -                          what2 != 0
 -                          ? Fcons (make_unibyte_string (what2, strlen (what2)),
 -                                   Qnil)
 -                          : Qnil)));
 +                        (make_fixnum_or_float (atom),
 +                         value != 0
 +                         ? Fcons (make_fixnum_or_float (value), Qnil)
 +                         : Qnil)));
  }
  
  void
 -x_set_sticky (f, new_value, old_value)
 -     struct frame *f;
 -     Lisp_Object new_value, old_value;
 +x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
  {
    Lisp_Object frame;
 +  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
    XSETFRAME (frame, f);
 +
    set_wm_state (frame, NILP (new_value) ? 0 : 1,
 -                "_NET_WM_STATE_STICKY", NULL);
 +                dpyinfo->Xatom_net_wm_state_sticky, None);
  }
  
  /* Return the current _NET_WM_STATE.
     STICKY is set to 1 if the sticky state is set, 0 if not.  */
  
  static void
 -get_current_vm_state (struct frame *f,
 +get_current_wm_state (struct frame *f,
                        Window window,
                        int *size_state,
                        int *sticky)
            else
              *size_state = FULLSCREEN_HEIGHT;
          }
 -      else if (a == dpyinfo->Xatom_net_wm_state_fullscreen_atom)
 +      else if (a == dpyinfo->Xatom_net_wm_state_fullscreen)
          *size_state = FULLSCREEN_BOTH;
        else if (a == dpyinfo->Xatom_net_wm_state_sticky)
          *sticky = 1;
  /* Do fullscreen as specified in extended window manager hints */
  
  static int
 -do_ewmh_fullscreen (f)
 -     struct frame *f;
 +do_ewmh_fullscreen (struct frame *f)
  {
 -  int have_net_atom = wm_supports (f, "_NET_WM_STATE");
 -  Lisp_Object lval = get_frame_param (f, Qfullscreen);
 +  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state);
    int cur, dummy;
  
 -  get_current_vm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
 +  get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
  
    /* Some window managers don't say they support _NET_WM_STATE, but they do say
       they support _NET_WM_STATE_FULLSCREEN.  Try that also.  */
    if (!have_net_atom)
 -      have_net_atom = wm_supports (f, "_NET_WM_STATE_FULLSCREEN");
 +    have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state_fullscreen);
  
    if (have_net_atom && cur != f->want_fullscreen)
      {
        Lisp_Object frame;
 -      const char *fs = "_NET_WM_STATE_FULLSCREEN";
 -      const char *fw = "_NET_WM_STATE_MAXIMIZED_HORZ";
 -      const char *fh = "_NET_WM_STATE_MAXIMIZED_VERT";
  
        XSETFRAME (frame, f);
  
          case FULLSCREEN_BOTH:
            if (cur == FULLSCREEN_WIDTH || cur == FULLSCREEN_MAXIMIZED
                || cur == FULLSCREEN_HEIGHT)
 -            set_wm_state (frame, 0, fw, fh);
 -          set_wm_state (frame, 1, fs, NULL);
 +            set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_maximized_horz,
 +                          dpyinfo->Xatom_net_wm_state_maximized_vert);
 +          set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_fullscreen, None);
            break;
          case FULLSCREEN_WIDTH:
            if (cur == FULLSCREEN_BOTH || cur == FULLSCREEN_HEIGHT
                || cur == FULLSCREEN_MAXIMIZED)
 -            set_wm_state (frame, 0, fs, fh);
 +            set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen,
 +                          dpyinfo->Xatom_net_wm_state_maximized_vert);
            if (cur != FULLSCREEN_MAXIMIZED)
 -            set_wm_state (frame, 1, fw, NULL);
 +            set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_maximized_horz, None);
            break;
          case FULLSCREEN_HEIGHT:
            if (cur == FULLSCREEN_BOTH || cur == FULLSCREEN_WIDTH
                || cur == FULLSCREEN_MAXIMIZED)
 -            set_wm_state (frame, 0, fs, fw);
 +            set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen,
 +                          dpyinfo->Xatom_net_wm_state_maximized_horz);
            if (cur != FULLSCREEN_MAXIMIZED)
 -            set_wm_state (frame, 1, fh, NULL);
 +            set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_maximized_vert, None);
            break;
          case FULLSCREEN_MAXIMIZED:
            if (cur == FULLSCREEN_BOTH)
 -            set_wm_state (frame, 0, fs, NULL);
 -          set_wm_state (frame, 1, fw, fh);
 +            set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen, None);
 +          set_wm_state (frame, 1, dpyinfo->Xatom_net_wm_state_maximized_horz,
 +                        dpyinfo->Xatom_net_wm_state_maximized_vert);
            break;
          case FULLSCREEN_NONE:
            if (cur == FULLSCREEN_BOTH)
 -            set_wm_state (frame, 0, fs, NULL);
 +            set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_fullscreen, None);
            else
 -            set_wm_state (frame, 0, fw, fh);
 +            set_wm_state (frame, 0, dpyinfo->Xatom_net_wm_state_maximized_horz,
 +                          dpyinfo->Xatom_net_wm_state_maximized_vert);
          }
  
        f->want_fullscreen = FULLSCREEN_NONE;
  }
  
  static void
 -XTfullscreen_hook (f)
 -     FRAME_PTR f;
 +XTfullscreen_hook (FRAME_PTR f)
  {
    if (f->async_visible)
      {
  
  
  static void
 -x_handle_net_wm_state (f, event)
 -     struct frame *f;
 -     XPropertyEvent *event;
 +x_handle_net_wm_state (struct frame *f, XPropertyEvent *event)
  {
    int value = FULLSCREEN_NONE;
    Lisp_Object lval;
    int sticky = 0;
  
 -  get_current_vm_state (f, event->window, &value, &sticky);
 +  get_current_wm_state (f, event->window, &value, &sticky);
    lval = Qnil;
 -  switch (value) 
 +  switch (value)
      {
      case FULLSCREEN_WIDTH:
        lval = Qfullwidth;
        lval = Qmaximized;
        break;
      }
 -      
 +
    store_frame_param (f, Qfullscreen, lval);
    store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
  }
  /* Check if we need to resize the frame due to a fullscreen request.
     If so needed, resize the frame. */
  static void
 -x_check_fullscreen (f)
 -     struct frame *f;
 +x_check_fullscreen (struct frame *f)
  {
    if (do_ewmh_fullscreen (f))
      return;
    if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
      return; /* Only fullscreen without WM or with EWM hints (above). */
  
+   /* Setting fullscreen to nil doesn't do anything.  We could save the
+      last non-fullscreen size and restore it, but it seems like a
+      lot of work for this unusual case (no window manager running).  */
    if (f->want_fullscreen != FULLSCREEN_NONE)
      {
-       int width = FRAME_COLS (f), height = FRAME_LINES (f);
+       int width = FRAME_PIXEL_WIDTH (f), height = FRAME_PIXEL_HEIGHT (f);
        struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
        switch (f->want_fullscreen)
            height = x_display_pixel_height (dpyinfo);
          }
  
-       if (FRAME_COLS (f) != width || FRAME_LINES (f) != height)
-         {
-           change_frame_size (f, height, width, 0, 1, 0);
-           SET_FRAME_GARBAGED (f);
-           cancel_mouse_face (f);
-         }
+       XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
+                      width, height);
      }
  }
  
     compensate by moving the window right and down by the proper amount.  */
  
  static void
 -x_check_expected_move (f, expected_left, expected_top)
 -     struct frame *f;
 -     int expected_left;
 -     int expected_top;
 +x_check_expected_move (struct frame *f, int expected_left, int expected_top)
  {
    int current_left = 0, current_top = 0;
  
     of an exact comparison.  */
  
  static void
 -x_sync_with_move (f, left, top, fuzzy)
 -    struct frame *f;
 -    int left, top, fuzzy;
 +x_sync_with_move (struct frame *f, int left, int top, int fuzzy)
  {
    int count = 0;
  
  
  /* Wait for an event on frame F matching EVENTTYPE.  */
  void
 -x_wait_for_event (f, eventtype)
 -     struct frame *f;
 -     int eventtype;
 +x_wait_for_event (struct frame *f, int eventtype)
  {
    int level = interrupt_input_blocked;
  
  
        FD_ZERO (&fds);
        FD_SET (fd, &fds);
 -      
 +
        EMACS_GET_TIME (time_now);
        EMACS_SUB_TIME (tmo, tmo_at, time_now);
  
     size changes.  Otherwise we leave the window gravity unchanged.  */
  
  static void
 -x_set_window_size_1 (f, change_gravity, cols, rows)
 -     struct frame *f;
 -     int change_gravity;
 -     int cols, rows;
 +x_set_window_size_1 (struct frame *f, int change_gravity, int cols, int rows)
  {
    int pixelwidth, pixelheight;
  
    f->scroll_bar_actual_width
      = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
         ? 0
 -       : FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0
 -       ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)
 -       : (FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)));
 +       : FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f));
  
    compute_fringe_widths (f, 0);
  
 -  pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols);
 +  pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols)
 +    + FRAME_TOOLBAR_WIDTH (f);
    pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows)
      + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
  
     Otherwise we leave the window gravity unchanged.  */
  
  void
 -x_set_window_size (f, change_gravity, cols, rows)
 -     struct frame *f;
 -     int change_gravity;
 -     int cols, rows;
 +x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
  {
    BLOCK_INPUT;
  
    if (NILP (tip_frame) || XFRAME (tip_frame) != f)
      {
        int r, c;
 -        
 +
        /* When the frame is maximized/fullscreen or running under for
           example Xmonad, x_set_window_size_1 will be a no-op.
           In that case, the right thing to do is extend rows/cols to
  /* Mouse warping.  */
  
  void
 -x_set_mouse_position (f, x, y)
 -     struct frame *f;
 -     int x, y;
 +x_set_mouse_position (struct frame *f, int x, int y)
  {
    int pix_x, pix_y;
  
  /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F.  */
  
  void
 -x_set_mouse_pixel_position (f, pix_x, pix_y)
 -     struct frame *f;
 -     int pix_x, pix_y;
 +x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
  {
    BLOCK_INPUT;
  
  /* focus shifting, raising and lowering.  */
  
  void
 -x_focus_on_frame (f)
 -     struct frame *f;
 +x_focus_on_frame (struct frame *f)
  {
  #if 0
    /* I don't think that the ICCCM allows programs to do things like this
  }
  
  void
 -x_unfocus_frame (f)
 -     struct frame *f;
 +x_unfocus_frame (struct frame *f)
  {
  #if 0
    /* Look at the remarks in x_focus_on_frame.  */
  /* Raise frame F.  */
  
  void
 -x_raise_frame (f)
 -     struct frame *f;
 +x_raise_frame (struct frame *f)
  {
    BLOCK_INPUT;
    if (f->async_visible)
  /* Lower frame F.  */
  
  void
 -x_lower_frame (f)
 -     struct frame *f;
 +x_lower_frame (struct frame *f)
  {
    if (f->async_visible)
      {
  /* Activate frame with Extended Window Manager Hints */
  
  void
 -x_ewmh_activate_frame (f)
 -     FRAME_PTR f;
 +x_ewmh_activate_frame (FRAME_PTR f)
  {
    /* See Window Manager Specification/Extended Window Manager Hints at
       http://freedesktop.org/wiki/Specifications/wm-spec  */
  
 -  const char *atom = "_NET_ACTIVE_WINDOW";
 -  if (f->async_visible && wm_supports (f, atom))
 +  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
 +  if (f->async_visible && wm_supports (f, dpyinfo->Xatom_net_active_window))
      {
        Lisp_Object frame;
        XSETFRAME (frame, f);
 -      Fx_send_client_event (frame, make_number (0), frame,
 -                            make_unibyte_string (atom, strlen (atom)),
 -                            make_number (32),
 -                            Fcons (make_number (1),
 -                                   Fcons (make_number (last_user_time),
 -                                          Qnil)));
 +      x_send_client_event (frame, make_number (0), frame,
 +                           dpyinfo->Xatom_net_active_window,
 +                           make_number (32),
 +                           Fcons (make_number (1),
 +                                  Fcons (make_number (last_user_time),
 +                                         Qnil)));
      }
  }
  
  static void
 -XTframe_raise_lower (f, raise_flag)
 -     FRAME_PTR f;
 -     int raise_flag;
 +XTframe_raise_lower (FRAME_PTR f, int raise_flag)
  {
    if (raise_flag)
      x_raise_frame (f);
  \f
  /* XEmbed implementation.  */
  
 -void
 -xembed_set_info (f, flags)
 -     struct frame *f;
 -     enum xembed_info flags;
 +static void
 +xembed_set_info (struct frame *f, enum xembed_info flags)
  {
 -  Atom atom;
    unsigned long data[2];
 -
 -  atom = XInternAtom (FRAME_X_DISPLAY (f), "_XEMBED_INFO", False);
 +  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
    data[0] = XEMBED_VERSION;
    data[1] = flags;
  
 -  XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), atom, atom,
 +  XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
 +                   dpyinfo->Xatom_XEMBED_INFO, dpyinfo->Xatom_XEMBED_INFO,
                   32, PropModeReplace, (unsigned char *) data, 2);
  }
  
 -void
 -xembed_send_message (f, time, message, detail, data1, data2)
 -     struct frame *f;
 -     Time time;
 -     enum xembed_message message;
 -     long detail;
 -     long data1;
 -     long data2;
 +static void
 +xembed_send_message (struct frame *f, Time time, enum xembed_message message, long int detail, long int data1, long int data2)
  {
    XEvent event;
  
     finishes with it.  */
  
  void
 -x_make_frame_visible (f)
 -     struct frame *f;
 +x_make_frame_visible (struct frame *f)
  {
    Lisp_Object type;
    int original_top, original_left;
            /* It could be confusing if a real alarm arrives while
               processing the fake one.  Turn it off and let the
               handler reset it.  */
 -          extern void poll_for_input_1 P_ ((void));
            int old_poll_suppress_count = poll_suppress_count;
            poll_suppress_count = 1;
            poll_for_input_1 ();
  /* Make the frame visible (mapped and not iconified).  */
  
  void
 -x_make_frame_invisible (f)
 -     struct frame *f;
 +x_make_frame_invisible (struct frame *f)
  {
    Window window;
  
  /* Change window state from mapped to iconified.  */
  
  void
 -x_iconify_frame (f)
 -     struct frame *f;
 +x_iconify_frame (struct frame *f)
  {
    int result;
    Lisp_Object type;
  /* Free X resources of frame F.  */
  
  void
 -x_free_frame_resources (f)
 -     struct frame *f;
 +x_free_frame_resources (struct frame *f)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Lisp_Object bar;
    struct scroll_bar *b;
 +  Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
  
    BLOCK_INPUT;
  
  #else  /* !USE_X_TOOLKIT */
  
  #ifdef USE_GTK
 -      /* In the GTK version, tooltips are normal X
 -         frames.  We must check and free both types. */
 -      if (FRAME_GTK_OUTER_WIDGET (f))
 -        {
 -          gtk_widget_destroy (FRAME_GTK_OUTER_WIDGET (f));
 -          FRAME_X_WINDOW (f) = 0; /* Set to avoid XDestroyWindow below */
 -          FRAME_GTK_OUTER_WIDGET (f) = 0;
 -        }
 +      xg_free_frame_widgets (f);
  #endif /* USE_GTK */
  
        if (FRAME_X_WINDOW (f))
    if (f == dpyinfo->x_highlight_frame)
      dpyinfo->x_highlight_frame = 0;
  
 -  if (f == dpyinfo->mouse_face_mouse_frame)
 +  if (f == hlinfo->mouse_face_mouse_frame)
      {
 -      dpyinfo->mouse_face_beg_row
 -      = dpyinfo->mouse_face_beg_col = -1;
 -      dpyinfo->mouse_face_end_row
 -      = dpyinfo->mouse_face_end_col = -1;
 -      dpyinfo->mouse_face_window = Qnil;
 -      dpyinfo->mouse_face_deferred_gc = 0;
 -      dpyinfo->mouse_face_mouse_frame = 0;
 +      hlinfo->mouse_face_beg_row
 +      = hlinfo->mouse_face_beg_col = -1;
 +      hlinfo->mouse_face_end_row
 +      = hlinfo->mouse_face_end_col = -1;
 +      hlinfo->mouse_face_window = Qnil;
 +      hlinfo->mouse_face_deferred_gc = 0;
 +      hlinfo->mouse_face_mouse_frame = 0;
      }
  
    UNBLOCK_INPUT;
  /* Destroy the X window of frame F.  */
  
  void
 -x_destroy_window (f)
 -     struct frame *f;
 +x_destroy_window (struct frame *f)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
  
  #ifndef USE_GTK
  void
 -x_wm_set_size_hint (f, flags, user_position)
 -     struct frame *f;
 -     long flags;
 -     int user_position;
 +x_wm_set_size_hint (struct frame *f, long flags, int user_position)
  {
    XSizeHints size_hints;
    Window window = FRAME_OUTER_WINDOW (f);
  /* Used for IconicState or NormalState */
  
  void
 -x_wm_set_window_state (f, state)
 -     struct frame *f;
 -     int state;
 +x_wm_set_window_state (struct frame *f, int state)
  {
  #ifdef USE_X_TOOLKIT
    Arg al[1];
  }
  
  void
 -x_wm_set_icon_pixmap (f, pixmap_id)
 -     struct frame *f;
 -     int pixmap_id;
 +x_wm_set_icon_pixmap (struct frame *f, int pixmap_id)
  {
    Pixmap icon_pixmap, icon_mask;
  
  }
  
  void
 -x_wm_set_icon_position (f, icon_x, icon_y)
 -     struct frame *f;
 -     int icon_x, icon_y;
 +x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
  {
    Window window = FRAME_OUTER_WINDOW (f);
  
     font table.  */
  
  static void
 -x_check_font (f, font)
 -     struct frame *f;
 -     struct font *font;
 +x_check_font (struct frame *f, struct font *font)
  {
    Lisp_Object frame;
  
@@@ -9781,7 -9990,8 +9781,7 @@@ static int x_session_initialized
  /* Test whether two display-name strings agree up to the dot that separates
     the screen number from the server number.  */
  static int
 -same_x_server (name1, name2)
 -     const char *name1, *name2;
 +same_x_server (const char *name1, const char *name2)
  {
    int seen_colon = 0;
    const unsigned char *system_name = SDATA (Vsystem_name);
     get to the first bit.  With MASK 0x7e0, *BITS is set to 6, and *OFFSET
     to 5.  */
  static void
 -get_bits_and_offset (mask, bits, offset)
 -     unsigned long mask;
 -     int *bits;
 -     int *offset;
 +get_bits_and_offset (long unsigned int mask, int *bits, int *offset)
  {
    int nr = 0;
    int off = 0;
     But don't permanently open it, just test its availability.  */
  
  int
 -x_display_ok (display)
 -    const char *display;
 +x_display_ok (const char *display)
  {
      int dpy_ok = 1;
      Display *dpy;
  
  #ifdef USE_GTK
  static void
 -my_log_handler (log_domain, log_level, message, user_data)
 -     const gchar *log_domain;
 -     GLogLevelFlags log_level;
 -     const gchar *message;
 -     gpointer user_data;
 +my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
  {
    if (!strstr (message, "g_set_prgname"))
        fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message);
  }
  #endif
 -  
 +
  /* Open a connection to X display DISPLAY_NAME, and return
     the structure that describes the open display.
     If we cannot contact the display, return null.  */
  
  struct x_display_info *
 -x_term_init (display_name, xrm_option, resource_name)
 -     Lisp_Object display_name;
 -     char *xrm_option;
 -     char *resource_name;
 +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;
    XrmDatabase xrdb;
 +  Mouse_HLInfo *hlinfo;
  
    BLOCK_INPUT;
  
      char *argv[NUM_ARGV];
      char **argv2 = argv;
      guint id;
 -#ifndef HAVE_GTK_MULTIDISPLAY
 -    if (!EQ (Vinitial_window_system, Qx))
 -      error ("Sorry, you cannot connect to X servers with the GTK toolkit");
 -#endif
  
      if (x_initialized++ > 1)
        {
 -#ifdef HAVE_GTK_MULTIDISPLAY
 -        /* Opening another display.  If xg_display_open returns less
 -           than zero, we are probably on GTK 2.0, which can only handle
 -           one display.  GTK 2.2 or later can handle more than one.  */
 -        if (xg_display_open (SDATA (display_name), &dpy) < 0)
 -#endif
 -          error ("Sorry, this version of GTK can only handle one display");
 +        xg_display_open (SDATA (display_name), &dpy);
        }
      else
        {
 +        static char display_opt[] = "--display";
 +        static char name_opt[] = "--name";
 +        
          for (argc = 0; argc < NUM_ARGV; ++argc)
            argv[argc] = 0;
  
  
          if (! NILP (display_name))
            {
 -            argv[argc++] = "--display";
 +            argv[argc++] = display_opt;
              argv[argc++] = SDATA (display_name);
            }
  
 -        argv[argc++] = "--name";
 +        argv[argc++] = name_opt;
          argv[argc++] = resource_name;
  
          XSetLocaleModifiers ("");
  
          /* Load our own gtkrc if it exists.  */
          {
 -          char *file = "~/.emacs.d/gtkrc";
 +          const char *file = "~/.emacs.d/gtkrc";
            Lisp_Object s, abs_file;
  
            s = make_string (file, strlen (file));
    /* We have definitely succeeded.  Record the new connection.  */
  
    dpyinfo = (struct x_display_info *) xmalloc (sizeof (struct x_display_info));
 -  bzero (dpyinfo, sizeof *dpyinfo);
 +  memset (dpyinfo, 0, sizeof *dpyinfo);
 +  hlinfo = &dpyinfo->mouse_highlight;
  
    terminal = x_create_terminal (dpyinfo);
  
    dpyinfo->bitmaps_size = 0;
    dpyinfo->bitmaps_last = 0;
    dpyinfo->scratch_cursor_gc = 0;
 -  dpyinfo->mouse_face_mouse_frame = 0;
 -  dpyinfo->mouse_face_deferred_gc = 0;
 -  dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
 -  dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
 -  dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID;
 -  dpyinfo->mouse_face_window = Qnil;
 -  dpyinfo->mouse_face_overlay = Qnil;
 -  dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0;
 -  dpyinfo->mouse_face_defer = 0;
 -  dpyinfo->mouse_face_hidden = 0;
 +  hlinfo->mouse_face_mouse_frame = 0;
 +  hlinfo->mouse_face_deferred_gc = 0;
 +  hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
 +  hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
 +  hlinfo->mouse_face_face_id = DEFAULT_FACE_ID;
 +  hlinfo->mouse_face_window = Qnil;
 +  hlinfo->mouse_face_overlay = Qnil;
 +  hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0;
 +  hlinfo->mouse_face_defer = 0;
 +  hlinfo->mouse_face_hidden = 0;
    dpyinfo->x_focus_frame = 0;
    dpyinfo->x_focus_event_frame = 0;
    dpyinfo->x_highlight_frame = 0;
        dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
      }
  
 -  dpyinfo->Xatom_wm_protocols
 -    = XInternAtom (dpyinfo->display, "WM_PROTOCOLS", False);
 -  dpyinfo->Xatom_wm_take_focus
 -    = XInternAtom (dpyinfo->display, "WM_TAKE_FOCUS", False);
 -  dpyinfo->Xatom_wm_save_yourself
 -    = XInternAtom (dpyinfo->display, "WM_SAVE_YOURSELF", False);
 -  dpyinfo->Xatom_wm_delete_window
 -    = XInternAtom (dpyinfo->display, "WM_DELETE_WINDOW", False);
 -  dpyinfo->Xatom_wm_change_state
 -    = XInternAtom (dpyinfo->display, "WM_CHANGE_STATE", False);
 -  dpyinfo->Xatom_wm_configure_denied
 -    = XInternAtom (dpyinfo->display, "WM_CONFIGURE_DENIED", False);
 -  dpyinfo->Xatom_wm_window_moved
 -    = XInternAtom (dpyinfo->display, "WM_MOVED", False);
 -  dpyinfo->Xatom_wm_client_leader
 -    = XInternAtom (dpyinfo->display, "WM_CLIENT_LEADER", False);
 -  dpyinfo->Xatom_editres
 -    = XInternAtom (dpyinfo->display, "Editres", False);
 -  dpyinfo->Xatom_CLIPBOARD
 -    = XInternAtom (dpyinfo->display, "CLIPBOARD", False);
 -  dpyinfo->Xatom_TIMESTAMP
 -    = XInternAtom (dpyinfo->display, "TIMESTAMP", False);
 -  dpyinfo->Xatom_TEXT
 -    = XInternAtom (dpyinfo->display, "TEXT", False);
 -  dpyinfo->Xatom_COMPOUND_TEXT
 -    = XInternAtom (dpyinfo->display, "COMPOUND_TEXT", False);
 -  dpyinfo->Xatom_UTF8_STRING
 -    = XInternAtom (dpyinfo->display, "UTF8_STRING", False);
 -  dpyinfo->Xatom_DELETE
 -    = XInternAtom (dpyinfo->display, "DELETE", False);
 -  dpyinfo->Xatom_MULTIPLE
 -    = XInternAtom (dpyinfo->display, "MULTIPLE", False);
 -  dpyinfo->Xatom_INCR
 -    = XInternAtom (dpyinfo->display, "INCR", False);
 -  dpyinfo->Xatom_EMACS_TMP
 -    = XInternAtom (dpyinfo->display, "_EMACS_TMP_", False);
 -  dpyinfo->Xatom_TARGETS
 -    = XInternAtom (dpyinfo->display, "TARGETS", False);
 -  dpyinfo->Xatom_NULL
 -    = XInternAtom (dpyinfo->display, "NULL", False);
 -  dpyinfo->Xatom_ATOM_PAIR
 -    = XInternAtom (dpyinfo->display, "ATOM_PAIR", False);
 -  /* For properties of font.  */
 -  dpyinfo->Xatom_PIXEL_SIZE
 -    = XInternAtom (dpyinfo->display, "PIXEL_SIZE", False);
 -  dpyinfo->Xatom_AVERAGE_WIDTH
 -    = XInternAtom (dpyinfo->display, "AVERAGE_WIDTH", False);
 -  dpyinfo->Xatom_MULE_BASELINE_OFFSET
 -    = XInternAtom (dpyinfo->display, "_MULE_BASELINE_OFFSET", False);
 -  dpyinfo->Xatom_MULE_RELATIVE_COMPOSE
 -    = XInternAtom (dpyinfo->display, "_MULE_RELATIVE_COMPOSE", False);
 -  dpyinfo->Xatom_MULE_DEFAULT_ASCENT
 -    = XInternAtom (dpyinfo->display, "_MULE_DEFAULT_ASCENT", False);
 -
 -  /* Ghostscript support.  */
 -  dpyinfo->Xatom_PAGE = XInternAtom (dpyinfo->display, "PAGE", False);
 -  dpyinfo->Xatom_DONE = XInternAtom (dpyinfo->display, "DONE", False);
 -
 -  dpyinfo->Xatom_Scrollbar = XInternAtom (dpyinfo->display, "SCROLLBAR",
 -                                        False);
 -
 -  dpyinfo->Xatom_XEMBED = XInternAtom (dpyinfo->display, "_XEMBED",
 -                                     False);
 -
 -  dpyinfo->Xatom_net_wm_state
 -    = XInternAtom (dpyinfo->display, "_NET_WM_STATE", False);
 -  dpyinfo->Xatom_net_wm_state_fullscreen_atom
 -    = XInternAtom (dpyinfo->display, "_NET_WM_STATE_FULLSCREEN", False);
 -  dpyinfo->Xatom_net_wm_state_maximized_horz
 -    = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
 -  dpyinfo->Xatom_net_wm_state_maximized_vert
 -    = XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
 -  dpyinfo->Xatom_net_wm_state_sticky
 -    = XInternAtom (dpyinfo->display, "_NET_WM_STATE_STICKY", False);
 -  dpyinfo->Xatom_net_window_type
 -    = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE", False);
 -  dpyinfo->Xatom_net_window_type_tooltip
 -    = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE_TOOLTIP", False);
 -  dpyinfo->Xatom_net_frame_extents  
 -    = XInternAtom (dpyinfo->display, "_NET_FRAME_EXTENTS", False);
 -  dpyinfo->cut_buffers_initialized = 0;
 +  {
 +    const struct
 +    {
 +      const char *name;
 +      Atom *atom;
 +    } atom_refs[] = {
 +      { "WM_PROTOCOLS", &dpyinfo->Xatom_wm_protocols  },
 +      { "WM_TAKE_FOCUS", &dpyinfo->Xatom_wm_take_focus },
 +      { "WM_SAVE_YOURSELF", &dpyinfo->Xatom_wm_save_yourself },
 +      { "WM_DELETE_WINDOW", &dpyinfo->Xatom_wm_delete_window },
 +      { "WM_CHANGE_STATE", &dpyinfo->Xatom_wm_change_state },
 +      { "WM_CONFIGURE_DENIED", &dpyinfo->Xatom_wm_configure_denied },
 +      { "WM_MOVED", &dpyinfo->Xatom_wm_window_moved },
 +      { "WM_CLIENT_LEADER", &dpyinfo->Xatom_wm_client_leader },
 +      { "Editres", &dpyinfo->Xatom_editres },
 +      { "CLIPBOARD", &dpyinfo->Xatom_CLIPBOARD },
 +      { "TIMESTAMP", &dpyinfo->Xatom_TIMESTAMP },
 +      { "TEXT", &dpyinfo->Xatom_TEXT },
 +      { "COMPOUND_TEXT", &dpyinfo->Xatom_COMPOUND_TEXT },
 +      { "UTF8_STRING", &dpyinfo->Xatom_UTF8_STRING },
 +      { "DELETE", &dpyinfo->Xatom_DELETE },
 +      { "MULTIPLE", &dpyinfo->Xatom_MULTIPLE },
 +      { "INCR", &dpyinfo->Xatom_INCR },
 +      { "_EMACS_TMP_",  &dpyinfo->Xatom_EMACS_TMP },
 +      { "TARGETS", &dpyinfo->Xatom_TARGETS },
 +      { "NULL", &dpyinfo->Xatom_NULL },
 +      { "ATOM_PAIR", &dpyinfo->Xatom_ATOM_PAIR },
 +      { "_XEMBED_INFO", &dpyinfo->Xatom_XEMBED_INFO },
 +      /* For properties of font.  */
 +      { "PIXEL_SIZE", &dpyinfo->Xatom_PIXEL_SIZE },
 +      { "AVERAGE_WIDTH", &dpyinfo->Xatom_AVERAGE_WIDTH },
 +      { "_MULE_BASELINE_OFFSET", &dpyinfo->Xatom_MULE_BASELINE_OFFSET },
 +      { "_MULE_RELATIVE_COMPOSE", &dpyinfo->Xatom_MULE_RELATIVE_COMPOSE },
 +      { "_MULE_DEFAULT_ASCENT", &dpyinfo->Xatom_MULE_DEFAULT_ASCENT },
 +      /* Ghostscript support.  */
 +      { "DONE", &dpyinfo->Xatom_DONE },
 +      { "PAGE", &dpyinfo->Xatom_PAGE },
 +      { "SCROLLBAR", &dpyinfo->Xatom_Scrollbar },
 +      { "_XEMBED", &dpyinfo->Xatom_XEMBED },
 +      /* EWMH */
 +      { "_NET_WM_STATE", &dpyinfo->Xatom_net_wm_state },
 +      { "_NET_WM_STATE_FULLSCREEN", &dpyinfo->Xatom_net_wm_state_fullscreen },
 +      { "_NET_WM_STATE_MAXIMIZED_HORZ",
 +        &dpyinfo->Xatom_net_wm_state_maximized_horz },
 +      { "_NET_WM_STATE_MAXIMIZED_VERT",
 +        &dpyinfo->Xatom_net_wm_state_maximized_vert },
 +      { "_NET_WM_STATE_STICKY", &dpyinfo->Xatom_net_wm_state_sticky },
 +      { "_NET_WM_WINDOW_TYPE", &dpyinfo->Xatom_net_window_type },
 +      { "_NET_WM_WINDOW_TYPE_TOOLTIP",
 +        &dpyinfo->Xatom_net_window_type_tooltip },
 +      { "_NET_WM_ICON_NAME", &dpyinfo->Xatom_net_wm_icon_name },
 +      { "_NET_WM_NAME", &dpyinfo->Xatom_net_wm_name },
 +      { "_NET_SUPPORTED",  &dpyinfo->Xatom_net_supported },
 +      { "_NET_SUPPORTING_WM_CHECK", &dpyinfo->Xatom_net_supporting_wm_check },
 +      { "_NET_WM_WINDOW_OPACITY", &dpyinfo->Xatom_net_wm_window_opacity },
 +      { "_NET_ACTIVE_WINDOW", &dpyinfo->Xatom_net_active_window },
 +      { "_NET_FRAME_EXTENTS", &dpyinfo->Xatom_net_frame_extents },
 +      /* Session management */
 +      { "SM_CLIENT_ID", &dpyinfo->Xatom_SM_CLIENT_ID },
 +      { "_XSETTINGS_SETTINGS", &dpyinfo->Xatom_xsettings_prop },
 +      { "MANAGER", &dpyinfo->Xatom_xsettings_mgr },
 +    };
 +
 +    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 (sizeof (Atom) * total_atom_count);
 +    char **atom_names = xmalloc (sizeof (char *) * total_atom_count);
 +    char xsettings_atom_name[64];
 +
 +    for (i = 0; i < atom_count; i++)
 +      atom_names[i] = (char *) atom_refs[i].name;
 +
 +    /* Build _XSETTINGS_SN atom name */
 +    snprintf (xsettings_atom_name, sizeof (xsettings_atom_name),
 +              "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen));
 +    atom_names[i] = xsettings_atom_name;
 +
 +    XInternAtoms (dpyinfo->display, atom_names, total_atom_count,
 +                  False, atoms_return);
 +
 +    for (i = 0; i < atom_count; i++)
 +      *atom_refs[i].atom = atoms_return[i];
 +
 +    /* Manual copy of last atom */
 +    dpyinfo->Xatom_xsettings_sel = atoms_return[i];
 +
 +    xfree (atom_names);
 +    xfree (atoms_return);
 +  }
  
    dpyinfo->x_dnd_atoms_size = 8;
    dpyinfo->x_dnd_atoms_length = 0;
    dpyinfo->connection = connection;
  
    {
 -    extern int gray_bitmap_width, gray_bitmap_height;
 -    extern char *gray_bitmap_bits;
      dpyinfo->gray
        = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
                                     gray_bitmap_bits,
  
    xsettings_initialize (dpyinfo);
  
 -#ifdef subprocesses
    /* This is only needed for distinguishing keyboard and process input.  */
    if (connection != 0)
      add_keyboard_wait_descriptor (connection);
 -#endif
  
  #ifdef F_SETOWN
    fcntl (connection, F_SETOWN, getpid ());
     and without sending any more commands to the X server.  */
  
  void
 -x_delete_display (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_delete_display (struct x_display_info *dpyinfo)
  {
    struct terminal *t;
  
  #ifdef HAVE_X_SM
          /* Close X session management when we close its display.  */
          if (t->id == 1 && x_session_have_connection ())
 -          x_session_close();
 +          x_session_close ();
  #endif
          delete_terminal (t);
          break;
     that slows us down.  */
  
  static void
 -x_process_timeouts (timer)
 -     struct atimer *timer;
 +x_process_timeouts (struct atimer *timer)
  {
    BLOCK_INPUT;
    x_timeout_atimer_activated_flag = 0;
     processed, these widgets don't behave normally.  */
  
  void
 -x_activate_timeout_atimer ()
 +x_activate_timeout_atimer (void)
  {
    BLOCK_INPUT;
    if (!x_timeout_atimer_activated_flag)
@@@ -10688,7 -10910,7 +10688,7 @@@ x_create_terminal (struct x_display_inf
  }
  
  void
 -x_initialize ()
 +x_initialize (void)
  {
    baud_rate = 19200;
  
  
  
  void
 -syms_of_xterm ()
 +syms_of_xterm (void)
  {
    x_error_message = NULL;
  
@@@ -10802,11 -11024,9 +10802,11 @@@ selected window or cursor position is p
    x_mouse_click_focus_ignore_position = 0;
  
    DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
 -    doc: /* What X toolkit scroll bars Emacs uses.
 -A value of nil means Emacs doesn't use X toolkit scroll bars.
 -Otherwise, value is a symbol describing the X toolkit.  */);
 +    doc: /* Which toolkit scroll bars Emacs uses, if any.
 +A value of nil means Emacs doesn't use toolkit scroll bars.
 +With the X Window system, the value is a symbol describing the
 +X toolkit.  Possible values are: gtk, motif, xaw, or xaw3d.
 +With MS Windows, the value is t.  */);
  #ifdef USE_TOOLKIT_SCROLL_BARS
  #ifdef USE_MOTIF
    Vx_toolkit_scroll_bars = intern_c_string ("motif");
@@@ -10872,3 -11092,5 +10872,3 @@@ default is nil, which is the same as `s
  
  #endif /* HAVE_X_WINDOWS */
  
 -/* arch-tag: 6d4e4cb7-abc1-4302-9585-d84dcfb09d0f
 -   (do not change this comment) */