]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs-24; up to 2012-05-07T14:57:18Z!michael.albinus@gmx.de
authorChong Yidong <cyd@gnu.org>
Fri, 21 Sep 2012 03:03:48 +0000 (11:03 +0800)
committerChong Yidong <cyd@gnu.org>
Fri, 21 Sep 2012 03:03:48 +0000 (11:03 +0800)
12 files changed:
1  2 
doc/lispref/ChangeLog
doc/lispref/debugging.texi
lisp/ChangeLog
lisp/ido.el
lisp/mail/emacsbug.el
lisp/progmodes/idlw-shell.el
lisp/subr.el
src/ChangeLog
src/eval.c
src/fileio.c
src/unexmacosx.c
src/xdisp.c

diff --combined doc/lispref/ChangeLog
index 329c194f45ac9316d299803afab38fa0db3d8cb1,e9764332bdb85db026cbf6a0183e7e3e2c04eddb..6e4ffff3df6432e9a4e31dd4296db26ddaae165b
@@@ -1,89 -1,10 +1,93 @@@
 -2012-08-24  Chong Yidong  <cyd@gnu.org>
+ 2012-09-12  Glenn Morris  <rgm@gnu.org>
+       * debugging.texi (Using Debugger): Fix typo.
 +2012-09-18  Chong Yidong  <cyd@gnu.org>
  
 -      * Version 24.2 released.
 +      * display.texi (Faces): Discuss anonymous faces.
 +      (Face Attributes): Tweak intro.
 +      (Defining Faces): Move after the Face Attributes node.  Copyedits.
 +      (Displaying Faces): Describe role of inheritance.
 +
 +      * customize.texi (Customization): Define customization more
 +      carefully (Bug#11440).
 +      (Common Keywords): Add xref to Constant Variables.
 +
 +      * variables.texi (Defining Variables): Link to defcustom's node
 +      instead of the higher-level Customization chapter.
 +
 +2012-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify, document, and port floating-point (Bug#12381).
 +      * numbers.texi (Float Basics, Arithmetic Operations, Math Functions):
 +      Document that / and mod (with floating point arguments), along
 +      with asin, acos, log, log10, expt and sqrt, return special values
 +      instead of signaling exceptions.
 +      (Float Basics): Document that logb operates on the absolute value
 +      of its argument.
 +      (Math Functions): Document that (log ARG BASE) also returns NaN if
 +      BASE is negative.  Document that (expt X Y) returns NaN if X is a
 +      finite negative number and Y a finite non-integer.
 +
 +2012-09-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * lists.texi (Sets And Lists): Explain that the return value for
 +      delete should be used, like for delq.
 +
 +      * minibuf.texi (Yes-or-No Queries): Document recentering and
 +      scrolling in y-or-n-p.  Remove gratuitous example.
 +
 +      * searching.texi (Search and Replace): Document window scrolling
 +      entries in query-replace-map.
 +
 +2012-09-08  Chong Yidong  <cyd@gnu.org>
 +
 +      * syntax.texi (Syntax Table Internals): Define "raw syntax
 +      descriptor" terminology (Bug#12383).
 +      (Syntax Descriptors): Mention raw syntax descriptors.
 +
 +2012-09-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * variables.texi (Creating Buffer-Local): Fix description of
 +      local-variable-if-set-p (Bug#10713).
 +
 +      * eval.texi (Intro Eval): Add index entry for sexp (Bug#12233).
 +
 +      * windows.texi (Display Action Functions)
 +      (Choosing Window Options): Remove obsolete variable
 +      display-buffer-reuse-frames.
 +      (Switching Buffers): Minor doc tweak for switch-to-buffer.
 +
 +      * positions.texi (Narrowing): Document buffer-narrowed-p.
 +
 +      * markers.texi (Moving Markers): Add xref to Point (Bug#7151).
 +
 +      * syntax.texi (Low-Level Parsing): Add xref to Parser State
 +      (Bug#12269).
 +
 +2012-09-04  Lars Ingebrigtsen  <larsi@gnus.org>
 +
 +      * debugging.texi (Explicit Debug): Document `debug-on-message'.
 +
 +2012-09-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * windows.texi (Window Configurations): Recommend against using
 +      save-window-excursion (Bug#12075).
 +
 +      * control.texi (Catch and Throw):
 +      * positions.texi (Excursions): Don't mention it.
 +
 +2012-09-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Better seed support for (random).
 +      * numbers.texi (Random Numbers): Document new behavior of
 +      the calls (random) and (random STRING).
 +
 +2012-08-21  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * windows.texi (Window Point): Document recent changes in
 +      window-point and set-window-point.
 +      (Selecting Windows): Document recent change in select-window.
  
  2012-08-06  Eli Zaretskii  <eliz@gnu.org>
  
        * variables.texi (Lexical Binding): Disambiguate the index entry
        for "closures".
  
 -2012-06-19  Glenn Morris  <rgm@gnu.org>
 +2012-08-05  Chong Yidong  <cyd@gnu.org>
 +
 +      * display.texi (Defining Faces): Move documentation of
 +      frame-background-mode to the Emacs manual (Bug#7774).
 +
 +2012-08-04  Chong Yidong  <cyd@gnu.org>
 +
 +      * syntax.texi (Syntax Basics): Rearrange the text for clarity.
 +      Fix description of syntax table inheritance.
 +      (Syntax Table Functions): Don't refer to internal contents of
 +      syntax table, since that is not explained yet.  Copyedits.
 +      (Standard Syntax Tables): Node deleted.
 +      (Syntax Table Internals): Misc clarifications.  Improve table
 +      formatting.
 +
 +      * keymaps.texi (Inheritance and Keymaps):
 +      * text.texi (Sticky Properties): Tweak index entry.
 +
 +2012-07-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * nonascii.texi (Character Sets): Fix a typo.  (Bug#12062)
 +
 +2012-07-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Prefer typical American spelling for "acknowledgment".
 +      * intro.texi (Acknowledgments): Rename from Acknowledgements.
 +
 +2012-07-21  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * commands.texi (Special Events): Mention language-change event.
 +      (Input Events, Interactive Codes):
 +      * keymaps.texi (Key Sequences): Mention events that are
 +      non-keyboard but also non-mouse events.
 +
 +2012-07-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * text.texi (Insertion): Document insert-char changes.
 +
 +2012-07-15  Leo Liu  <sdl.web@gmail.com>
 +
 +      * display.texi (Fringe Bitmaps): Add exclamation-mark.
 +
 +2012-07-13  Chong Yidong  <cyd@gnu.org>
 +
 +      * buffers.texi (Read Only Buffers): Document toggle-read-only
 +      changes.  Reword to account for the fact that read-only is
 +      currently not supported in overlay properties.
 +
 +2012-07-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * loading.texi (Library Search): Index site-lisp directories.
 +
 +2012-07-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * intro.texi (A Sample Function Description): Fix incorrect
 +      markup, undoing previous change.
 +      (A Sample Variable Description): Minor clarifications and markup
 +      improvements.
 +
 +      * elisp.texi (Top):
 +      * text.texi (Text): Fix menu order.
 +
 +2012-07-06  Richard Stallman  <rms@gnu.org>
 +
 +      * intro.texi (Evaluation Notation, A Sample Function Description):
 +      (A Sample Variable Description): Improve/undo previous changes.
 +
 +2012-07-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * intro.texi (A Sample Function Description): Fix cross-refs.
 +
 +2012-07-05  Michael Witten  <mfwitten@gmail.com>  (tiny change)
 +
 +      * intro.texi (Evaluation Notation, A Sample Function Description)
 +      (A Sample Variable Description, Version Info): Copy edits (bug#11862).
 +
 +2012-06-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * processes.texi (Asynchronous Processes, Input to Processes):
 +      * internals.texi (Process Internals): Don't capitalize "pty".
 +
 +2012-06-24  Thien-Thi Nguyen  <ttn@gnuvola.org>
 +
 +      * processes.texi (Asynchronous Processes): Make the pty vs pipe
 +      discussion more prominent.
 +
 +2012-06-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * commands.texi (Misc Events): Document the language-change event.
 +
 +2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Support higher-resolution time stamps (Bug#9000).
 +      * os.texi (Time of Day, Time Parsing, Processor Run Time, Idle Timers):
 +      * processes.texi (System Processes):
 +      Time stamp resolution is now picosecond, not microsecond.
 +
 +2012-06-21  Glenn Morris  <rgm@gnu.org>
  
        * Makefile.in: Rename infodir to buildinfodir throughout.  (Bug#11737)
  
 +2012-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * functions.texi (Defining Functions):
 +      * macros.texi (Defining Macros): Un-define the return value of `defun',
 +      `defmacro' and `defalias'.
 +
 +2012-06-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * elisp.texi: Remove urlcolor setting.
 +
 +2012-06-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * display.texi (Face Attributes): Copyedits.  Add a few cindex entries.
 +      Overlining no longer behaves exactly like underlining.
 +
 +2012-06-16  Aurelien Aptel  <aurelien.aptel@gmail.com>
 +
 +      * display.texi (Face Attributes):
 +      Document wave-style underline face attribute.
 +
  2012-06-11  Chong Yidong  <cyd@gnu.org>
  
 -      * elisp.texi, vol1.texi, vol2.texi: Remove urlcolor setting.
 +      * display.texi (ImageMagick Images): ImageMagick now supports the
 +      :background property.
 +
 +2012-06-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * internals.texi (Garbage Collection): Typo fix.
 +
 +2012-06-09  Chong Yidong  <cyd@gnu.org>
  
 -      * vol2.texi: Include package.texi.
 +      * text.texi (Special Properties): Clarify the meaning of a list of
 +      faces in the `face' property.
  
 -2012-06-01  Chong Yidong  <cyd@gnu.org>
 +      * display.texi (Face Remapping): Minor clarification.
  
 -      * Version 24.1 released.
 +2012-06-08  Chong Yidong  <cyd@gnu.org>
  
 -2012-05-15  Chong Yidong  <cyd@gnu.org>
 +      * display.texi (Face Attributes): Font family does not accept
 +      wildcards.  De-document obsolete :bold and :italic attributes.
 +      (Defining Faces): Use new-style face spec format.
  
 -      * functions.texi (Obsolete Functions): Fix doc for
 -      set-advertised-calling-convention.
 +2012-06-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * internals.texi (Garbage Collection): Document new
 +      vector management code and vectorlike_header structure.
 +
 +2012-06-03  Chong Yidong  <cyd@gnu.org>
 +
 +      * modes.texi (Mode Line Data): Use "mode line construct"
 +      terminology for consistency.
 +
 +2012-05-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * abbrevs.texi, advice.texi, anti.texi, backups.texi:
 +      * buffers.texi, commands.texi, compile.texi, control.texi:
 +      * customize.texi, debugging.texi, display.texi, doclicense.texi:
 +      * edebug.texi, elisp.texi, errors.texi, eval.texi, files.texi:
 +      * frames.texi, functions.texi, gpl.texi, hash.texi, help.texi:
 +      * hooks.texi, index.texi, internals.texi, intro.texi, keymaps.texi:
 +      * lists.texi, loading.texi, macros.texi, maps.texi, markers.texi:
 +      * minibuf.texi, modes.texi, nonascii.texi, numbers.texi:
 +      * objects.texi, os.texi, package.texi, positions.texi:
 +      * processes.texi, searching.texi, sequences.texi, streams.texi:
 +      * strings.texi, symbols.texi, syntax.texi, text.texi, tips.texi:
 +      * variables.texi, windows.texi: Nuke hand-written node pointers.
 +
 +2012-05-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * functions.texi (Obsolete Functions):
 +      Fix doc for set-advertised-calling-convention.
  
        * modes.texi (Mode Help): Fix describe-mode.
  
  
        * variables.texi (Variable Aliases): Fix make-obsolete-variable.
  
 -2012-05-15  Martin Rudalics  <rudalics@gmx.at>
 +2012-05-27  Martin Rudalics  <rudalics@gmx.at>
  
 -      * commands.texi (Recursive Editing): recursive-edit is a
 -      command.
 +      * commands.texi (Recursive Editing): recursive-edit is a command.
  
        * compile.texi (Docs and Compilation):
        byte-compile-dynamic-docstrings is an option.
        progress-reporter-force-update have VALUE argument optional.
        (Animated Images): Use non-@code{nil} instead of non-nil.
  
 -      * files.texi (Format Conversion Round-Trip): Use non-@code{nil}
 -      instead of non-nil.
 +      * files.texi (Format Conversion Round-Trip):
 +      Use non-@code{nil} instead of non-nil.
  
        * frames.texi (Creating Frames): make-frame is a command.
        (Input Focus): select-frame is a command.
        (Pointer Shape): void-text-area-pointer is an option.
  
 -      * help.texi (Describing Characters): read-kbd-macro is a
 -      command.
 +      * help.texi (Describing Characters): read-kbd-macro is a command.
        (Help Functions): describe-prefix-bindings is a command.
  
        * markers.texi (Creating Markers): Both arguments of copy-marker
        * modes.texi (Mode Line Variables): mode-line-remote and
        mode-line-client are not options.
        (Imenu): imenu-add-to-menubar is a command.
 -      (SMIE Indentation Helpers): Use non-@code{nil} instead of
 -      non-nil.
 +      (SMIE Indentation Helpers): Use non-@code{nil} instead of non-nil.
  
        * os.texi (Sound Output): play-sound-file is a command.
  
 -      * package.texi (Package Archives): Use @key{RET} instead of
 -      @kbd{RET}.
 +      * package.texi (Package Archives): Use @key{RET} instead of @kbd{RET}.
  
 -      * processes.texi (Signals to Processes): Use @key{RET} instead
 -      of @code{RET}.
 +      * processes.texi (Signals to Processes):
 +      Use @key{RET} instead of @code{RET}.
        (Signals to Processes): signal-process is a command.
  
 -      * text.texi (Clickable Text): Use @key{RET} instead of
 -      @kbd{RET}.
 +      * text.texi (Clickable Text): Use @key{RET} instead of @kbd{RET}.
        (Base 64): base64-encode-string is not a command while
        base64-decode-region is.
  
        * windows.texi (Switching Buffers): pop-to-buffer is a command.
  
 -2012-05-08  Glenn Morris  <rgm@gnu.org>
 +2012-05-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (MKDIR_P): New, set by configure.
 +      (mkinfodir): Use $MKDIR_P.
 +
 +2012-05-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * loading.texi (Loading Non-ASCII): Replace the obsolete "unibyte: t"
 +      with "coding: raw-text".
 +      Concept of multibyte sessions no longer exists.
 +
 +      * files.texi (File Locks): Mention create-lockfiles option.
 +
 +2012-05-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * vol1.texi, vol2.texi: Remove files.
 +      * elisp.texi: Add VOL1,2 conditionals equivalent to vol1,2.texi
 +      * two-volume.make: Use elisp.texi as input rather than vol1,2.texi.
  
        * Makefile.in (clean, mostlyclean): Add some more vol1/2 items.
  
        * two-volume.make (emacsdir): New.
        (tex): Add directory with emacsver.texi to TEXINPUTS.
  
 -2012-05-05  Glenn Morris  <rgm@gnu.org>
 -
        * minibuf.texi (Minibuffer History, Basic Completion):
        Tweak page breaks.
  
        (Sequencing, Conditionals, Signaling Errors, Handling Errors):
        Tweak page breaks.
  
 -2012-05-04  Glenn Morris  <rgm@gnu.org>
 +2012-05-08  Glenn Morris  <rgm@gnu.org>
  
 -      * lists.texi (List-related Predicates, List Variables):
 -      Tweak page-breaks.
 -      (Sets And Lists): Convert inforef to xref.
 +      * two.el: Remove; unused since creation of two-volume.make.
  
 -      * text.texi (Auto Filling): Don't mention Emacs 19.
 +      * vol1.texi, vol2.texi: No need to keep menus in these files.
  
 -      * commands.texi (Event Input Misc): Don't mention unread-command-char.
 -      * numbers.texi (Predicates on Numbers): Don't mention Emacs 18.
 +2012-05-05  Glenn Morris  <rgm@gnu.org>
  
        * objects.texi (Process Type, Overlay Type): Tweak page-breaks.
  
        (Lisp History): Convert inforef to xref.
        (Lisp History, Printing Notation, Version Info): Improve page-breaks.
  
 +      * text.texi (Auto Filling): Don't mention Emacs 19.
 +
 +      * commands.texi (Event Input Misc): Don't mention unread-command-char.
 +      * numbers.texi (Predicates on Numbers): Don't mention Emacs 18.
 +
        * elisp.texi (DATE): Forgot to change the month in 2012-04-21 change.
  
 -2012-05-01  Glenn Morris  <rgm@gnu.org>
 +      * lists.texi (List-related Predicates, List Variables):
 +      Tweak page-breaks.
 +      (Sets And Lists): Convert inforef to xref.
 +
 +2012-05-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
 +      (info, infoclean): Use $INFO_EXT.
 +      ($(infodir)/elisp$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
 +      * makefile.w32-in (INFO_EXT, INFO_OPTS): New.
 +      (info, maintainer-clean): Use $INFO_EXT.
 +      ($(infodir)/elisp$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
 +
 +2012-05-04  Chong Yidong  <cyd@gnu.org>
 +
 +      * os.texi (Timers): Use defopt for timer-max-repeats.
 +
 +2012-05-03  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * os.texi (Time of Day): Do not limit current-time-string
 +      to years 1000..9999.
 +
 +2012-05-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * display.texi (Font Lookup):
 +      * frames.texi (Pointer Shape):
 +      * processes.texi (Subprocess Creation): Use defopt for options.
 +
 +2012-05-02  Glenn Morris  <rgm@gnu.org>
  
        * elisp.texi (@copying):
        * intro.texi (Introduction): Only print VERSION in the TeX version.
  
 -2012-04-29  Chong Yidong  <cyd@gnu.org>
 +2012-05-02  Chong Yidong  <cyd@gnu.org>
  
        * text.texi (Change Hooks): Minor fix for after-change-functions.
  
 -2012-04-28  Glenn Morris  <rgm@gnu.org>
 +2012-05-02  Glenn Morris  <rgm@gnu.org>
  
        * package.texi (Packaging Basics):
        * loading.texi (Autoload):
        * files.texi (Magic File Names):
        Reword to remove/reduce some overly long/short lines.
  
 -2012-04-26  Glenn Morris  <rgm@gnu.org>
 +2012-04-27  Glenn Morris  <rgm@gnu.org>
  
        * elisp.texi, vol1.texi, vol2.texi: Some fixes for detailed menu.
        * modes.texi (Major Modes, Auto-Indentation):
        * buffers.texi (Buffers): Some fixes for menu descriptions.
  
 -2012-04-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 -
 +2012-04-27  Stefan Monnier  <monnier@iro.umontreal.ca>
        * functions.texi (Simple Lambda, Argument List):
        * eval.texi (Function Indirection): Avoid deprecated form.
  
 -2012-04-26  Glenn Morris  <rgm@gnu.org>
 +2012-04-27  Glenn Morris  <rgm@gnu.org>
  
        * book-spine.texi, elisp.texi, vol1.texi, vol2.texi:
        Add "et al." to authors.
        * symbols.texi, syntax.texi, text.texi, tips.texi, variables.texi:
        Use Texinfo recommended convention for quotes+punctuation.
  
 -2012-04-23  Chong Yidong  <cyd@gnu.org>
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
  
        * keymaps.texi (Scanning Keymaps): Fix description of NO-REMAP arg
        to where-is-internal (Bug#10872).
  
 -2012-04-21  Glenn Morris  <rgm@gnu.org>
 +2012-04-27  Glenn Morris  <rgm@gnu.org>
  
        * macros.texi (Indenting Macros): Fix typo.
  
        * minibuf.texi (Intro to Minibuffers):
        Tweak discussion of resizing minibuffer window.
  
 +2012-04-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * elisp-covers.texi, front-cover-1.texi: Remove files.
 +
 +      * tindex.pl: Remove file.
 +
 +      * makefile.w32-in (srcs):
 +      * Makefile.in (srcs): Remove back.texi (which is unused).
 +
 +2012-04-24  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * os.texi (Notifications): Extend possible notification hints.
 +      Add notifications-get-capabilities.
 +
  2012-04-20  Chong Yidong  <cyd@gnu.org>
  
        * processes.texi (Asynchronous Processes): Mention nil argument to
        * elisp.texi, vol1.texi, vol2.texi, minibuf.texi (Completion):
        Update "High-Level Completion" description.
  
 -2012-04-19  Glenn Morris  <rgm@gnu.org>
 -
        * minibuf.texi (Minibuffers):
        * elisp.texi, vol1.texi, vol2.texi: Fix minibuffer subsection order.
  
        (Minibuffer Misc): Mention minibuffer-message-timeout, and
        minibuffer-inactive-mode.
  
 -2012-04-18  Glenn Morris  <rgm@gnu.org>
 -
        * processes.texi (Serial Ports, Byte Packing, Bindat Spec)
        (Bindat Functions): Copyedits.
  
 -2012-04-18  Christopher Schmidt  <christopher@ch.ristopher.com>
 +2012-04-20  Christopher Schmidt  <christopher@ch.ristopher.com>
  
        * files.texi (Saving Buffers): Document `visit and `visit-save'
        values of require-final-newline.
  
 -2012-04-18  Glenn Morris  <rgm@gnu.org>
 +2012-04-20  Glenn Morris  <rgm@gnu.org>
  
        * processes.texi (Output from Processes, Filter Functions):
        Mention waiting-for-user-input-p.
        (Network): Add encrypted network overview paragraph.
        Cross-reference the Emacs-GnuTLS manual.  Use @acronym.
  
 -2012-04-17  Chong Yidong  <cyd@gnu.org>
 +2012-04-20  Chong Yidong  <cyd@gnu.org>
  
        * help.texi (Keys in Documentation): Mention :advertised-binding.
  
        * keymaps.texi (Menu Bar): Move most of the :advertised-binding
        description to help.texi.
  
 -2012-04-16  Glenn Morris  <rgm@gnu.org>
 +2012-04-20  Glenn Morris  <rgm@gnu.org>
  
        * processes.texi (Process Information, Input to Processes)
        (Signals to Processes, Output from Processes, Process Buffers)
        (Process Information): Fix typo.
        (Bindat Spec): Use Texinfo-recommended form of quote+punctuation.
  
 -2012-04-14  Glenn Morris  <rgm@gnu.org>
 +2012-04-15  Glenn Morris  <rgm@gnu.org>
  
        * anti.texi (Antinews): Copyedits.  Don't @dfn anything here.
        open-network-stream does exist in Emacs 23, but is simpler.
  
 -2012-04-13  Chong Yidong  <cyd@gnu.org>
 +2012-04-15  Chong Yidong  <cyd@gnu.org>
  
        * customize.texi (Custom Themes): Also document load-theme etc.
  
 -2012-04-12  Chong Yidong  <cyd@gnu.org>
 +2012-04-14  Chong Yidong  <cyd@gnu.org>
  
        * customize.texi (Applying Customizations):
        (Custom Themes): New nodes.
        * modes.texi (Defining Minor Modes, Defining Minor Modes):
        * os.texi (Startup Summary): Copyedits.
  
 -2012-04-12  Glenn Morris  <rgm@gnu.org>
 +2012-04-14  Glenn Morris  <rgm@gnu.org>
  
        * loading.texi (Loading Non-ASCII): "unibyte:" can also be at the end.
  
 -2012-04-10  Glenn Morris  <rgm@gnu.org>
 -
        * strings.texi (Case Tables):
        * objects.texi (General Escape Syntax):
        * keymaps.texi (Key Sequences): Use @acronym with "ASCII".
  
        * compile.texi (Compiler Errors): Add missing space in buffer name.
  
 -2012-04-08  Chong Yidong  <cyd@gnu.org>
 +2012-04-14  Chong Yidong  <cyd@gnu.org>
  
        * processes.texi (Query Before Exit): Remove obsolete function
        process-kill-without-query (Bug#11190).
  
 -2012-04-08  Glenn Morris  <rgm@gnu.org>
 +2012-04-14  Glenn Morris  <rgm@gnu.org>
  
        * files.texi, frames.texi, loading.texi, os.texi, processes.texi:
        Use @env for environment variables.
  
 -2012-04-07  Glenn Morris  <rgm@gnu.org>
 -
        * Makefile.in: Replace non-portable use of $< in ordinary rules.
  
 +2012-04-12  Jari Aalto  <jari.aalto@cante.net>
 +
 +      * processes.texi (Synchronous Processes): Mention
 +      `default-directory' (bug#7515).
 +
 +2012-04-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * customize.texi (Variable Definitions): Remove user-variable-p.
 +
 +      * commands.texi (Interactive Codes):
 +      * help.texi (Accessing Documentation):
 +      * minibuf.texi (High-Level Completion): Callers changed.
 +
  2012-04-06  Chong Yidong  <cyd@gnu.org>
  
        * minibuf.texi (Programmed Completion): Document metadata method.
  
        * functions.texi (Function Safety): Texinfo usage fix.
  
 -2009-01-04  Eduard Wiebe  <usenet@pusto.de>  (tiny patch)
 +2009-01-04  Eduard Wiebe  <usenet@pusto.de>  (tiny change)
  
        * objects.texi (General Escape Syntax): Fix typo.
  
        (Recording Input): Document that clear-this-command-keys clears
        the vector to be returned by recent-keys.
  
 -      * keymaps.texi (Scanning Keymaps) <where-is-internal>: The
 -      argument keymap can be a list.
 +      * keymaps.texi (Scanning Keymaps) <where-is-internal>:
 +      The argument keymap can be a list.
  
        * nonascii.texi (User-Chosen Coding Systems)
        <select-safe-coding-system>: Document the new argument
        * Makefile (dist): Don't bother excluding autosave files; they'll
        never make it into the temp directory anyway, and the hash marks
        in the name are problematic for make and the Bourne shell.
 -      (srcs):
 +      (srcs): ???
  
  1993-02-12  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
  
  ;; coding: utf-8
  ;; End:
  
 -  Copyright (C) 1998-2012  Free Software Foundation, Inc.
 +  Copyright (C) 1998-2012 Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
index 5aeff576d09335a7a694b166a2be7c34d4605d6b,892fe5ac447b138f1ce5eefba5155a0fc6f43909..2226db942d1e0c4c861f6a5804ba921a3bfb9db1
@@@ -2,7 -2,8 +2,7 @@@
  @c This is part of the GNU Emacs Lisp Reference Manual.
  @c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc.
  @c See the file elisp.texi for copying conditions.
 -@setfilename ../../info/debugging
 -@node Debugging, Read and Print, Advising Functions, Top
 +@node Debugging
  @chapter Debugging Lisp Programs
  
    There are several ways to find and investigate problems in an Emacs
@@@ -298,11 -299,6 +298,11 @@@ of @code{(debug)} isn't ignored, it wil
  program!)  The most common suitable places are inside a @code{progn} or
  an implicit @code{progn} (@pxref{Sequencing}).
  
 +  If you don't know exactly where in the source code you want to put
 +the debug statement, but you want to display a backtrace when a
 +certain message is displayed, you can set @code{debug-on-message} to a
 +regular expression matching the desired message.
 +
  @node Using Debugger
  @subsection Using the Debugger
  
@@@ -331,7 -327,7 +331,7 @@@ variable is temporarily set according t
  non-@code{nil}, @code{debug-on-error} will temporarily be set to
  @code{t}.  This means that any further errors that occur while doing a
  debugging session will (by default) trigger another backtrace.  If
- this is not want you want, you can either set
+ this is not what you want, you can either set
  @code{eval-expression-debug-on-error} to @code{nil}, or set
  @code{debug-on-error} to @code{nil} in @code{debugger-mode-hook}.
  
diff --combined lisp/ChangeLog
index f7f4193e7776a377c089ac4007072d3b5bd591d6,0fae89f1e01679a2935077f660fb53947204af07..e6fa549e8671b62d1f6e4557b12df20688ccf252
 -2012-09-16  Leo Liu  <sdl.web@gmail.com>
++2012-09-21  Leo Liu  <sdl.web@gmail.com>
+       IDO: Disable match re-ordering for buffer switching.
+       * ido.el (ido-buffer-disable-smart-matches): New variable.
+       (ido-set-matches-1): Use it.  (Bug#2042)
 -2012-09-12  Jose Marino  <marinoj@nso.edu>  (tiny change)
++2012-09-21  Jose Marino  <marinoj@nso.edu>  (tiny change)
+       * progmodes/idlw-shell.el (idlwave-shell-complete-filename):
+       Fix 2011-05-17 change.  (Bug#12418)
 -2012-09-11  Leo Liu  <sdl.web@gmail.com>
++2012-09-21  Leo Liu  <sdl.web@gmail.com>
+       * subr.el (ignore-errors): Mention with-demoted-errors in doc-string.
 -2012-09-11  Glenn Morris  <rgm@gnu.org>
++2012-09-21  Glenn Morris  <rgm@gnu.org>
+       * emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords):
+       Be more robust about locating simple.el.
 -2012-09-10  Glenn Morris  <rgm@gnu.org>
++2012-09-21  Glenn Morris  <rgm@gnu.org>
+       * mail/emacsbug.el (report-emacs-bug): Trap load-path-shadows errors.
++2012-09-21  Joel Bion  <jpbion@westvi.com>  (tiny change)
++
++      * pcmpl-gnu.el (pcmpl-gnu-tarfile-regexp): Add tar.xz.  (Bug#12382)
++
 +2012-09-20  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (query-replace-read-from): Use `read-regexp' instead
 +      of `read-from-minibuffer' when `regexp-flag' is non-nil.
 +      (occur-read-primary-args): Use `read-regexp' instead of
 +      `read-string'.
 +      (multi-occur-in-matching-buffers): Use `read-regexp' instead of
 +      `read-from-minibuffer'.
 +      * isearch.el (isearch-occur): Use `read-regexp' instead of
 +      `read-string'.
 +      * dired.el (dired-read-regexp): Use `read-regexp' instead of
 +      `read-from-minibuffer'.
 +      * progmodes/grep.el (grep-read-regexp): Use `read-regexp' instead
 +      of `read-string'.  (Bug#7567)
 +
 +      * replace.el (read-regexp): Rename DEFAULT-VALUE arg to DEFAULTS
 +      and allow accepting a list of strings prepended to a list of
 +      standard default values.  Doc fix.  (Bug#12321)
 +
 +      * replace.el (read-regexp): Add HISTORY arg.  (Bug#7567)
 +
 +      * replace.el (read-regexp): Don't add ": " when PROMPT already
 +      ends with a colon and space.  (Bug#12321)
 +
 +2012-09-20  Tassilo Horn  <tsdh@gnu.org>
 +
 +      * doc-view.el (doc-view-display): Better fix for the cl-assertion
 +      error.
 +
 +2012-09-20  Stefan Merten  <smerten@oekonux.de>
 +
 +      * rst.el: Integrate support for `imenu' and `which-function'.
 +      Fixes feature request bug#11711.
 +      (rst-mode): Create `imenu-create-index-function'.
 +      (rst-get-stripped-line): Delete after refactoring.
 +      (rst-section-tree, rst-section-tree-rec)
 +      (rst-section-tree-point): Refactor and document properly.
 +      (rst-imenu-find-adornments-for-position)
 +      (rst-imenu-convert-cell, rst-imenu-create-index): New
 +      function.
 +
 +2012-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexp--obsolete-warning): New function.
 +      (macroexp--expand-all): Use it.
 +      (macroexp--funcall-and-return): Remove by folding it into its sole
 +      caller (macroexp--warn-and-return).
 +      * emacs-lisp/bytecomp.el (byte-compile-warn-obsolete):
 +      Use macroexp--obsolete-warning.
 +
 +      * calc/calc.el: Fix last change by removing the whole chunk, since it
 +      was only needed back when Calc was not bundled.
 +
 +2012-09-20  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * emacs-lisp/debug.el (debug): Restore assignment to
 +      debugger-old-buffer removed on 2012-09-08.
 +
 +2012-09-20  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-diff): Remove (require 'diff) since
 +      `diff-latest-backup-file' is now autoloaded.
 +
 +2012-09-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * vc/diff.el (diff-latest-backup-file): Autoload.
 +
 +2012-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * calc/calc.el: Remove redundant autoload shape check.
 +      (sel-mode): Don't defvar.
 +      (calc-get-stack-element): Add `sel-mode' arg instead.
 +      (calc-top, calc-top-list): Pass it this additional argument.
 +      * calc/calc-store.el (calc-store-map):
 +      * calc/calc-map.el (calc-apply, calc-reduce, calc-map)
 +      (calc-map-equation, calc-outer-product, calc-inner-product):
 +      * calc/calc-aent.el (calc-alg-entry): Don't bind sel-mode.
 +
 +      * emacs-lisp/macroexp.el (macroexp--expand-all): Fix last change.
 +
 +2012-09-19  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-diff): Add (require 'diff) because
 +      `diff-latest-backup-file' is not autoloaded.
 +      (dired-do-chxxx, dired-do-chmod): Set `no-error-if-not-filep' arg
 +      of `dired-get-filename' to t to not report error when there is
 +      no default file on the current line.
 +
 +2012-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from
 +      macroexp--eval-if-compile.
 +      (macroexp--funcall-and-return, macroexp--warn-and-return): New funs.
 +      (macroexp--expand-all): Use them (bug#12371).
 +
 +      * doc-view.el (doc-view-guess-paper-size)
 +      (doc-view-scale-bounding-box): Fix unbound `caddr'.
 +
 +2012-09-19  Tassilo Horn  <tsdh@gnu.org>
 +
 +      New feature: set optimal slice from BoundingBox information.
 +      * doc-view.el (doc-view-mode-map): Add keybinding.
 +      (doc-view-menu): Add menu entry.
 +      (doc-view-set-slice): Adapt docstring.
 +      (doc-view-get-bounding-box, doc-view-guess-paper-size)
 +      (doc-view-scale-bounding-box)
 +      (doc-view-set-slice-from-bounding-box): New functions.
 +      (doc-view-paper-sizes): New defvar.
 +
 +2012-09-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/macroexp.el (byte-compile-warn-obsolete)
 +      (byte-compile-log-warning): Autoload.  (Bug#12371)
 +
 +      * calendar/calendar.el (calendar-american-month-header)
 +      (calendar-european-month-header, calendar-iso-month-header)
 +      (calendar-month-header): New options.
 +      (calendar-set-date-style): Set calendar-month-header.  Redraw calendar.
 +      (calendar-generate-month): Use calendar-month-header.  (Bug#9510)
 +
 +2012-09-19  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * startup.el (command-line-ns-option-alist): Add -g and --geometry.
 +
 +2012-09-18  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-diff): Restore original functionality of
 +      getting the default value, but keep new feature of using the
 +      latest existing backup file (`diff-latest-backup-file').
 +
 +2012-09-18  Juri Linkov  <juri@jurta.org>
 +
 +      * dired.el (dired-mark): If the region is active in Transient Mark
 +      mode, mark all files in the active region.  Doc fix.
 +      (dired-unmark, dired-flag-file-deletion, dired-unmark-backward):
 +      Doc fix.  (Bug#10624)
 +
 +2012-09-18  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-do-chxxx, dired-do-chmod): Default file
 +      attributes for M-n are pulled from the file at point.
 +      (dired-do-chgrp, dired-do-chown, dired-do-touch): Doc fix.
 +      Suggested by Drew Adams.  (Bug#10624)
 +
 +2012-09-18  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el (ruby-brace-to-do-end): Don't add extra
 +      whitespace after "end".
 +      (ruby-do-end-to-brace): Collapse block to one line if it fits
 +      within fill-column.
 +
 +2012-09-18  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * emacs-lisp/debug.el (debugger-bury-or-kill): Fix customization
 +      value.
 +      (debug): Don't remove debugger window when debugger is expected
 +      to be back.
 +
 +2012-09-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * custom.el (defface): Doc fix.
 +
 +      * cus-edit.el (custom-unlispify-remove-prefixes): Add warning.
 +
 +2012-09-18  Martin Blais  <blais@furius.ca>  (tiny change)
 +
 +      * progmodes/compile.el (compilation-start): Use compilation-always-kill
 +      to initialize query-on-exit; then test that instead (bug#12288).
 +
 +2012-09-17  Stefan Merten  <smerten@oekonux.de>
 +
 +      * rst.el: Add support for `testcover'.
 +      (rst-defcustom-testcover, rst-testcover-add-compose)
 +      (rst-testcover-add-1value): New functions.
 +      (rst-portable-mark-active-p): Replace by `use-region-p'.
 +      (rst-update-section, rst-classify-adornment)
 +      (rst-find-title-line): Mark `1value' forms.
 +      (rst-classify-adornment): Remove superfluous form.
 +      (rst-update-section, rst-get-adornments-around)
 +      (rst-adornment-complete-p, rst-get-next-adornment)
 +      (rst-adjust, rst-promote-region)
 +      (rst-display-adornments-hierarchy, rst-straighten-adornments)
 +      (rst-find-pfx-in-region, rst-section-tree-rec)
 +      (rst-section-tree-point, rst-toc-insert, rst-toc-insert-node)
 +      (rst-toc-node, rst-toc, rst-forward-section)
 +      (rst-iterate-leftmost-paragraphs)
 +      (rst-iterate-leftmost-paragraphs-2, rst-enumerate-region)
 +      (rst-bullet-list-region)
 +      (rst-convert-bullets-to-enumeration, rst-font-lock-keywords)
 +      (rst-compile-find-conf, rst-compile)
 +      (rst-repeat-last-character): Fix style.
 +
 +2012-09-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * comint.el (comint--complete-file-name-data): Don't add a space
 +      if the status is `sole'; that adds a gratuitous space in the
 +      completion-cycling case (Bug#12092).
 +
 +      * pcomplete.el (pcomplete-completions-at-point): Likewise.
 +
 +2012-09-17  Richard Stallman  <rms@gnu.org>
 +
 +      * mail/rmailmm.el (rmail-mime-toggle-raw): Do rmail-mime-insert
 +      only in the mime-shown mode, not in raw mode.
 +      (rmail-mime): Toggle off mime by displaying the message without
 +      mime processing.  (Bug#12305)
 +
 +      * mail/rmail.el (rmail-retry-failure):
 +      Turn off mime processing first.  (Bug#12037)
 +
 +      * epa-mail.el (epa-mail-encrypt): Fix bug when a name has no key.
 +
 +2012-09-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * shell.el (shell-file-name-chars, shell-file-name-quote-list)
 +      (shell-dynamic-complete-functions): Convert to defcustom.
 +      (shell-prompt-pattern, shell-completion-fignore): Doc fix.
 +
 +      * bookmark.el (bookmark-bmenu-toggle-filenames): Doc fixes.
 +      * comint.el (comint-prompt-read-only):
 +      * custom.el (defcustom):
 +      * hi-lock.el (hi-lock-mode):
 +      * ibuffer.el (ibuffer-formats):
 +      * ielm.el (ielm-prompt-read-only):
 +      * novice.el (disable-command):
 +      * saveplace.el (toggle-save-place):
 +      * speedbar.el (speedbar-supported-extension-expressions):
 +      * startup.el (auto-save-list-file-prefix, init-file-user)
 +      (after-init-hook, inhibit-startup-echo-area-message):
 +      * strokes.el (strokes-help):
 +      * time-stamp.el (time-stamp):
 +      * calendar/calendar.el (calendar, diary-file):
 +      * calendar/diary-lib.el (diary-mail-entries, diary)
 +      (diary-list-entries-hook):
 +      * calendar/holidays.el (holidays, calendar-holidays):
 +      * calendar/lunar.el (lunar-phases):
 +      * calendar/solar.el (sunrise-sunset):
 +      * emulation/edt.el (edt-load-keys):
 +      * emulation/viper.el (viper-mode):
 +      * eshell/em-alias.el (eshell-command-aliases-list):
 +      * eshell/esh-util.el (eshell-convert-numeric-arguments):
 +      * international/ogonek.el (ogonek-information):
 +      * net/tramp-cmds.el (tramp-bug):
 +      * net/quickurl.el (quickurl-reread-hook-postfix):
 +      * play/decipher.el (decipher-font-lock-keywords):
 +      * progmodes/cc-styles.el (c-set-style):
 +      * progmodes/idlw-shell.el (idlwave-shell-prompt-pattern):
 +      * progmodes/inf-lisp.el (inferior-lisp-prompt):
 +      * progmodes/octave-mod.el (octave-mode):
 +      * progmodes/sql.el (sql-mode, sql-interactive-mode, sql-password):
 +      * progmodes/verilog-mode.el (verilog-read-defines):
 +      * textmodes/two-column.el (2C-mode): Likewise.
 +
 +2012-09-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * mail/mailabbrev.el (mail-abbrev-expand-hook): Work for a mail aliasee
 +      that holds many addresses.
 +
 +2012-09-16  Chong Yidong  <cyd@gnu.org>
 +
 +      * align.el (align-areas): Call the indication function with
 +      positions instead of markers for arguments (Bug#12343).
 +
 +      * files.el (parse-colon-path): Use split-string (Bug#12351).
 +
 +      * window.el (special-display-popup-frame): Doc fix (Bug#8853).
 +      (display-buffer-function): Mark as obsolete.
 +
 +      * progmodes/compile.el (compilation-parse-errors): Accept list
 +      values similar to font-lock-keywords (Bug#12136).
 +      Suggested by Oleksandr Manzyuk.
 +      (compilation-error-regexp-alist): Doc fix.
 +
 +2012-09-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * version.el (emacs-bzr-version-bzr): New function.
 +      (emacs-bzr-get-version): Add optional EXTERNAL argument.
 +
 +      * vc/vc-bzr.el (vc-bzr-working-revision): For lightweight local
 +      checkouts, check the parent dirstate matches the branch.
 +      Add "--tree" to "bzr revno" arguments.  Don't try to shorten the
 +      empty string.
 +
 +      * version.el (emacs-bzr-version): Doc fix.
 +      (emacs-bzr-version-dirstate): New function.
 +      (emacs-bzr-get-version): For lightweight checkouts, if the parent
 +      is local try and check that it matches the branch.  If not, just
 +      use dirstate information.  (Bug#12441)
 +
 +2012-09-14  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-do-chmod): Use `eq' to detect empty input.
 +      (Bug#12399)
 +
 +2012-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/advice.el (ad-prognify): Remove, use macroexp-progn.
 +
 +      * emacs-lisp/edebug.el: Miscellaneous cleanup.
 +      Remove obsolete byte-compiler hack that tried to silence some warnings.
 +      (edebug-submit-bug-report): Remove.
 +      (edebug-get-buffer-window, edebug-sit-for, edebug-input-pending-p):
 +      Remove aliases, use the un-prefixed name instead.
 +      (edebug-pop-to-buffer): Consider other frames.
 +      (edebug-original-read):: Make it more obvious that it's always defined.
 +      (edebug--make-form-data-entry, edebug--form-data-name)
 +      (edebug--form-data-begin, edebug--form-data-end): Rename from the
 +      single-dashed name, and implement with cl-defstruct.
 +      (edebug-set-form-data-entry): Use the standard accessors.
 +      (edebug-make-top-form-data-entry): Use push.
 +      (edebug-no-match): Drop useless `funcall'.
 +      (mapcar, mapconcat, mapatoms, apply, funcall): Don't add debug specs
 +      to functions.
 +      (defsubst, dont-compile, eval-when-compile, eval-and-compile)
 +      (delay-mode-hooks, with-temp-file, with-temp-message, ad-dolist)
 +      (with-syntax-table, push, pop, 1value, noreturn, defadvice)
 +      (easy-menu-define, with-custom-print): Remove redundant specs.
 +      (edebug-outside-overriding-local-map)
 +      (edebug-outside-overriding-terminal-local-map): Remove, unused.
 +      (edebug--display): Bind unread-command-events directly to nil rather
 +      than binding it to unread-command-events and later setting it to nil.
 +      (edebug--display): Kill edebug-eval-buffer here...
 +      (edebug--recursive-edit): ...rather than here.
 +      Bind standard-output and standard-input.
 +      (edebug-eval): Check cl-macroexpand-all is fboundp.
 +      (edebug-temp-display-freq-count): Fix last change.
 +
 +      * emacs-lisp/easymenu.el (easy-menu-define): Add `debug' spec.
 +      * subr.el (noreturn, 1value): Add `debug' spec.
 +      * emacs-lisp/advice.el: Require cl-lib.
 +      (ad-copy-tree): Remove, use copy-tree instead.
 +      (ad-dolist): Remove use dolist or cl-dolist instead.
 +      (ad-do-return): Remove, use cl-return instead.
 +      (defadvice): Add `debug' spec.
 +
 +2012-09-13  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-do-chxxx): Use `eq' to detect empty input.
 +      (Bug#12399)
 +
 +2012-09-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * calc/calc.el (math-compose-expr):
 +      * calc/calc-ext.el (math-compose-expr):
 +      * progmodes/cc-defs.el (cl-macroexpand-all):
 +      * progmodes/cc-langs.el (delete-duplicates, mapcan)
 +      (cl-macroexpand-all): Update declarations.
 +
 +      * vc/vc.el: No need to require ediff.
 +      (ediff-load-version-control): Declare.
 +      (ediff-vc-internal): Fix declaration.
 +      (vc-version-ediff): Require ediff.
 +
 +2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use a more backwards-compatible timer format (Bug#12430).
 +      * emacs-lisp/timer.el (timer): PSECS is now at the end, rather than
 +      being right after USECS, as that better supports old code that
 +      inadvisedly looked directly at the timer vector.
 +
 +2012-09-13  Kenichi Handa  <handa@gnu.org>
 +
 +      * language/chinese.el ("Chinese-GB", "Chinese-BIG5")
 +      ("Chinese-CNS", "Chinese-EUC-TW"): Add chinese-gbk to
 +      `coding-priority' property of these language environment.
 +
 +2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix glitches caused by addition of psec to timers (Bug#12430).
 +      * image.el (image-animate-timer):
 +      * time.el (display-time-world-timer):
 +      Use timer--function and timer--args rather than raw access to
 +      timer vector.
 +
 +2012-09-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-warning-prefix):
 +      If not compiling a file, try using load-file-name.
 +
 +2012-09-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/edebug.el (edebug-outside-unread-command-events):
 +      Fix last change.
 +      (edebug-update-eval-list): Use `push'.
 +
 +      * emacs-lisp/edebug.el: Use lexical-binding.
 +      Remove the "edebug-" prefix from non-dynamically-scoped variables.
 +      Mark unused args with underscore.
 +      (edebug-save-restriction, edebug-outside-excursion): Use `declare'.
 +      (edebug-form-data): Use defvar-local.
 +      (edebug-make-before-and-after-form, edebug-make-after-form):
 +      Use backquote.
 +      (edebug-args, edebug-value, edebug-after-index, edebug-arg-mode):
 +      Not dynamically scoped any more.
 +      (edebug--enter-trace): Add arguments `function' and `args'.
 +      Rename from edebug-enter-trace.
 +      (edebug-enter): Call it accordingly.  Bind edebug-function explicitly.
 +      (edebug--update-coverage): Add `after-index' and `value' args.
 +      Rename from edebug-update-coverage.
 +      (edebug-slow-after): Call it accordingly.
 +      (edebug--recursive-edit): Add arg `arg-mode'.  Rename from
 +      edebug-recursive-edit.
 +      (edebug--display): Call it accordingly.  Add args `value',
 +      `offset-index', and `arg-mode'.  Rename from edebug-display.
 +      (edebug-debugger, edebug): Call it accordingly.
 +      (edebug-eval-display-list): Use dolist.
 +
 +2012-09-12  Juri Linkov  <juri@jurta.org>
 +
 +      * info.el (Info-search): Don't check for isearch-mode and
 +      isearch-regexp before let-binding search-spaces-regexp to
 +      Info-search-whitespace-regexp.
 +      (Info-isearch-search): Let-bind Info-search-whitespace-regexp to
 +      search-whitespace-regexp if isearch-lax-whitespace or
 +      isearch-regexp-lax-whitespace is non-nil.
 +      (Info-mode): Don't set local variable search-whitespace-regexp.
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00811.html
 +
 +2012-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/debug.el (debugger-outer-unread-command-char, debug)
 +      (debugger-env-macro): Remove support for unread-command-char.
 +
 +      * subr.el (set-temporary-overlay-map): Minimize slightly the impact of
 +      the temporary map re-appearing on emulation-mode-map-alists.
 +
 +      * emacs-lisp/edebug.el (def-edebug-form-spec): Remove, it's been broken
 +      since 22.1.
 +
 +      * ehelp.el (with-electric-help): Accept functions in
 +      electric-help-form-to-execute.
 +      (electric-help-execute-extended, electric-help-ctrl-x-prefix): Use it.
 +      And replace unread-command-char -> unread-command-events.
 +
 +2012-09-12  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Sync with Tramp 2.2.6.
 +
 +      * net/tramp.el (tramp-accept-process-output): Don't use
 +      JUST-THIS-ONE in the XEmacs case.
 +
 +      * net/trampver.el: Update release number.
 +
 +2012-09-12  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * emacs-lisp/debug.el (debugger-previous-window-height):
 +      New variable.
 +      (debug): When debugger-jumping-flag is non-nil try to restore
 +      height of debugger window.  (Bug#8789)
 +
 +2012-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/edebug.el (edebug-enter): Don't mess with
 +      overriding-local-map and pre/post-command-hook here.
 +      (edebug-recursive-edit): Do it here instead (bug#12345).
 +      (edebug-outside-unread-command-char): Remove all uses of
 +      unread-command-char.
 +
 +      * emacs-lisp/debug.el (debug): Don't bind debug-on-error since
 +      inhibit-debugger is bound instead.
 +
 +2012-09-11  Bastien Guerry  <bzg@gnu.org>
 +
 +      * subr.el (set-temporary-overlay-map): Add a docstring.
 +      (Bug#12346)
 +
 +2012-09-11  Bastien Guerry  <bzg@gnu.org>
 +
 +      * minibuffer.el (completion-table-subvert): Fix docstring.
 +      (Bug#12347)
 +
 +2012-09-11  Bastien Guerry  <bzg@gnu.org>
 +
 +      * help-fns.el (describe-variable): Fix typo.  (Bug#12346)
 +
 +2012-09-10  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 3.1
 +      (sql-db2-escape-newlines): New variable.
 +      (sql-escape-newlines-filter): Use it.
 +
 +2012-09-10  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * custom.el (custom-theme-load-confirm): Remove unneeded assignment.
 +
 +2012-09-10  Dan Nicolaescu  <dann@gnu.org>
 +
 +      * vc/diff-mode.el (diff-mode-menu):
 +      Bind diff-remove-trailing-whitespace.
 +
 +2012-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var.
 +      (emacs-lisp-byte-code-comment, emacs-lisp-byte-code-syntax-propertize)
 +      (emacs-lisp-byte-code-mode): New functions.
 +      (eval-sexp-add-defvars): Don't skip defvars in column >0.
 +      (eval-defun-2): Remove bogus interactive spec.
 +      (lisp-indent-line): Remove redundant whole-exp code, now done in
 +      indent-according-to-mode.
 +      (save-match-data): Remove redundant indent data.
 +
 +      * emacs-lisp/benchmark.el (benchmark-run, benchmark-run-compiled):
 +      Use `declare'.
 +
 +2012-09-09  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (replace-regexp-lax-whitespace): New defcustom.
 +      (replace-lax-whitespace, query-replace-regexp)
 +      (query-replace-regexp-eval, replace-regexp): Doc fix.
 +      (perform-replace, replace-highlight): Let-bind
 +      isearch-lax-whitespace to replace-lax-whitespace and
 +      isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace.
 +
 +      * isearch.el (isearch-query-replace): Let-bind
 +      replace-lax-whitespace to isearch-lax-whitespace and
 +      replace-regexp-lax-whitespace to
 +      isearch-regexp-lax-whitespace.  (Bug#10885)
 +
 +2012-09-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eshell/em-unix.el (eshell/sudo): Explicitly drop return value.
 +
 +2012-09-09  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-state-cache-init):
 +      Initialise c-state-semi-nonlit-pos-cache\(-limit\)? properly.
 +      (c-record-parse-state-state):
 +      Record c-state-semi-nonlit-pos-cache\(-limit\)?.
 +
 +2012-09-09  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * register.el (register-separator): Rename from
 +      separator-register.  All uses changed.  Doc fix.
 +      (register): Fix version.
 +
 +2012-09-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * replace.el (query-replace-map): Bind four new symbols for
 +      requesting window scrolling.
 +
 +      * subr.el (y-or-n-p): Handle the window-scrolling bindings in
 +      query-replace-map (Bug#8948).
 +
 +      * custom.el (custom-theme-load-confirm): Use y-or-n-p.
 +
 +      * emacs-lisp/map-ynp.el (map-y-or-n-p): Don't bind scrolling keys
 +      since they are now in query-replace-map.
 +
 +      * window.el (scroll-other-window-down): Make the arg optional.
 +
 +2012-09-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * files.el (hack-local-variables-confirm): Use quit-window to kill
 +      the *Local Variables* buffer.
 +
 +2012-09-08  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block,
 +      not just expect to be at its beginning.  Adjust callees.
 +      Succeed when do-end block has no space before the pipe character.
 +      (ruby-brace-to-do-end): When the original block is one-liner,
 +      convert to multiline.  Reindent the result.
 +
 +2012-09-08  Jambunathan K  <kjambunathan@gmail.com>
 +
 +      * register.el (register): New group.
 +      (register-separator): New user option.
 +      (increment-register): Route it to `append-to-register', if
 +      register contains text.  Implication is that `C-x r +' can now be
 +      used for appending to a text register (bug#12217).
 +      (append-to-register, prepend-to-register): Add separator based on
 +      `register-separator.
 +
  2012-09-08  Alan Mackenzie  <acm@muc.de>
  
        AWK Mode: make auto-newline work when there's "==" in the pattern.
        * progmodes/cc-cmds.el (c-point-syntax): Handle virtual semicolons
        correctly.
 -      * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test
 -      more rigorously for "=" token.
 +      * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5A.3):
 +      Test more rigorously for "=" token.
  
 -2012-09-08  Joel Bion  <jpbion@westvi.com>  (tiny change)
 +2012-09-08  Dmitry Gutov  <dgutov@yandex.ru>
  
 -      * pcmpl-gnu.el (pcmpl-gnu-tarfile-regexp): Add tar.xz.  (Bug#12382)
 +      * progmodes/ruby-mode.el (ruby-match-expression-expansion):
 +      Only fail when reached LIMIT.
 +
 +2012-09-08  Chong Yidong  <cyd@gnu.org>
 +
 +      * dired.el (dired-mode-map): Don't bind M-=.
 +
 +      * dired-aux.el (dired-diff): Use backup file as default.
 +
 +2012-09-08  Drew Adams  <drew.adams@oracle.com>
 +
 +      * subr.el (add-to-history): Fix delete usage (Bug#12314).
 +
 +2012-09-08  Chong Yidong  <cyd@gnu.org>
 +
 +      * subr.el (syntax-after, syntax-class): Doc fix.
 +
 +2012-09-08  Martin Rudalics  <rudalics@gmx.at>
  
 -2012-08-31  Glenn Morris  <rgm@gnu.org>
 +      * window.el (display-buffer-in-previous-window): New buffer
 +      display action function.
 +
 +      * emacs-lisp/debug.el (debugger-bury-or-kill): New option.
 +      (debugger-previous-window): New variable.
 +      (debug): Rewrite using display-buffer-in-previous-window,
 +      quit-restore-window and debugger-bury-or-kill.  (Bug#8789)
 +
 +2012-09-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/byte-run.el (defun): Tweak message.  Simplify code.
 +
 +2012-09-07  Matt McClure  <mlm@aya.yale.edu>  (tiny change)
 +
 +      * progmodes/python.el (python-shell-send-string):
 +      When default-directory is remote, create temp file on remote
 +      filesystem.
 +      (python-shell-send-file): When file is remote, pass local view of
 +      file paths to remote Python interpreter.  (Bug#12340)
 +
 +2012-09-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * window.el (switch-to-buffer): Doc fix (Bug#12181).
 +
 +      * files.el (after-find-file): Don't fail on a read-only buffer if
 +      require-final-newline is `visit' or `visit-save' (Bug#11156).
 +
 +      * subr.el (read-char-choice): Allow quitting via ESC ESC.
 +
 +      * userlock.el (ask-user-about-supersession-threat):
 +      Use read-char-choice (Bug#12093).
 +
 +2012-09-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * subr.el (buffer-narrowed-p): New function.
 +
 +      * ses.el (ses-widen):
 +      * simple.el (count-words--buffer-message):
 +      * net/browse-url.el (browse-url-of-buffer): Use it
 +
 +      * simple.el (count-words-region): Don't signal an error if there
 +      is a non-nil prefix arg and the mark is not set.
 +
 +      * help.el (describe-key-briefly): Allow the message to be seen
 +      when invoked from the minibuffer (Bug#7014).
 +
 +2012-09-07  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el (ruby-end-of-defun)
 +      (ruby-beginning-of-defun): Simplify, allow indentation before
 +      block beginning and end keywords.
 +      (ruby-beginning-of-defun): Only consider 3 keywords defun beginners.
 +      (ruby-end-of-defun): Expect that the point is at the beginning of
 +      the defun.
 +
 +2012-09-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl--do-arglist): Understand _ on &key args
 +      (bug#12367).
 +      (cl--make-usage-args): Strip _ from argument names.
 +
 +2012-09-06  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
 +
 +      * progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use
 +      obsolete alias speedbar-key-map.
 +      (vhdl-doc-variable, vhdl-doc-mode): Use called-interactively-p.
 +      (vhdl-index-menu-init): Don't use obsolete variable
 +      font-lock-maximum-size.
 +
 +2012-09-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * frame.el (window-system-version): Mark as obsolete.
 +
 +      * speedbar.el (speedbar-update-flag, speedbar-mode): Remove uses
 +      of obsolete variable speedbar-key-map.
 +
 +2012-09-06  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (replace-lax-whitespace): New defcustom.
 +      (query-replace, query-replace-regexp, query-replace-regexp-eval)
 +      (replace-string, replace-regexp): Mention it in docstrings.
 +      (perform-replace, replace-highlight): Let-bind
 +      isearch-lax-whitespace and isearch-regexp-lax-whitespace according
 +      to the values of replace-lax-whitespace and regexp-flag.
 +      Don't let-bind search-whitespace-regexp.  (Bug#10885)
 +
 +      * isearch.el (isearch-query-replace): Let-bind
 +      replace-lax-whitespace instead of let-binding
 +      replace-search-function and replace-re-search-function.
 +      (isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace
 +      and isearch-regexp-lax-whitespace to lazy-highlight variables.
 +      (isearch-toggle-symbol): Set isearch-regexp to nil
 +      in isearch-word mode (like in isearch-toggle-word).
 +
 +2012-09-06  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (replace-search-function)
 +      (replace-re-search-function): Set default values to nil.
 +      (perform-replace): Let-bind isearch-related variables based on
 +      replace-related values, call `isearch-search-fun' and let-bind
 +      the result to `search-function'.  Remove code that sets
 +      `search-function' and `search-string' separately for
 +      `delimited-flag'.
 +      (replace-highlight): Add new argument `delimited-flag' and
 +      rename other arguments to the names used in `perform-replace'.
 +      Let-bind `isearch-word' to the argument `delimited-flag'.
 +      (Bug#10885, bug#10887)
 +
 +2012-09-07  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from
 +      ruby-beginning-of-indent, simplify, allow all keywords to have
 +      indentation before them.
 +      (ruby-beginning-of-indent): Adjust for above.  Search until the
 +      found point is not inside a string or comment.
 +      (ruby-font-lock-keywords): Allow symbols to start with "@"
 +      character, give them higher priority than variables.
 +      (ruby-syntax-propertize-function)
 +      (ruby-font-lock-syntactic-keywords): Remove the "not comments"
 +      matchers.  Expression expansions are not comments when inside a
 +      string, and there comment syntax status is irrelevant.
 +      (ruby-match-expression-expansion): New function.  Check that
 +      expression expansion is inside a string, and it's not escaped.
 +      (ruby-font-lock-keywords): Use it.
 +
 +2012-09-05  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * help.el (temp-buffer-max-height): New default value.
 +      (temp-buffer-resize-frames): New option.
 +      (resize-temp-buffer-window): Optionally resize frame.
 +
 +      * window.el (fit-frame-to-buffer-bottom-margin): New option.
 +      (fit-frame-to-buffer): New function.
 +
 +2012-09-05  Glenn Morris  <rgm@gnu.org>
  
        * emulation/cua-rect.el (cua--init-rectangles):
        * textmodes/picture.el (picture-mode-map):
        * play/blackbox.el (blackbox-mode-map): Remap right-char and left-char
        like forward-char and backward-char.  (Bug#12317)
  
 -2012-08-30  Leo Liu  <sdl.web@gmail.com>
 +2012-09-05  Leo Liu  <sdl.web@gmail.com>
  
        * progmodes/flymake.el (flymake-warning-re): New variable.
        (flymake-parse-line): Use it.
  
 -2012-08-30  Glenn Morris  <rgm@gnu.org>
 +2012-09-05  Glenn Morris  <rgm@gnu.org>
  
        * calendar/holidays.el (holiday-christian-holidays):
        Rename an entry.  (Bug#12289)
  
 -2012-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB
        (bug#12222).
  
 -2012-08-27  Leo Liu  <sdl.web@gmail.com>
 +2012-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * loadup.el: Load macroexp.  Remove hack.
 +      * emacs-lisp/macroexp.el (macroexp--eval-if-compile): New function.
 +      (macroexp--expand-all): Use it to get better warnings.
 +      (macroexp--backtrace, macroexp--trim-backtrace-frame)
 +      (internal-macroexpand-for-load): New functions.
 +      (macroexp--pending-eager-loads): New var.
 +      (emacs-startup-hook): New hack to replace one in loadup.el.
 +      * emacs-lisp/cl-macs.el (cl--compiler-macro-list*)
 +      (cl--compiler-macro-cXXr): Move to top, before they can be used.
 +      (cl-psetf): Simplify.
 +      (cl-defstruct): Add indent rule.
 +
 +2012-09-04  Lars Ingebrigtsen  <larsi@gnus.org>
 +
 +      * mail/smtpmail.el (smtpmail-send-it): Prefer the From: header
 +      over `user-mail-address' for the SMTP MAIL FROM envelope.
 +      (smtpmail-via-smtp): Ditto.
 +
 +2012-09-04  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el: Clean up keybindings.
 +      (ruby-mode-map): Don't bind ruby-electric-brace,
 +      ruby-beginning-of-defun, ruby-end-of-defun, ruby-mark-defun,
 +      backward-kill-word, reindent-then-newline-and-indent.
 +      (ruby-mark-defun): Remove.
 +      (ruby-electric-brace): Remove.  Obsoleted by electric-indent-chars.
 +      (ruby-mode): Set local beginning-of-defun-function and
 +      end-of-defun-function values.
 +
 +2012-09-03  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (temp-buffer-window-setup-hook)
 +      (temp-buffer-window-show-hook): New hooks.
 +      (temp-buffer-window-setup, temp-buffer-window-show)
 +      (with-temp-buffer-window): New functions.
 +      (fit-window-to-buffer): Remove unused optional argument OVERRIDE.
 +      (special-display-popup-frame): Make sure the window used shows BUFFER.
 +
 +      * help.el (temp-buffer-resize-mode): Fix doc-string.
 +      (resize-temp-buffer-window): New optional argument WINDOW.
 +
 +      * files.el (recover-file, save-buffers-kill-emacs):
 +      * dired.el (dired-mark-pop-up): Use with-temp-buffer-window.
 +
 +2012-09-02  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * eshell/em-unix.el (eshell/sudo): When we have an ad-hoc
 +      remote definition of `default-directory', ensure we can connect.
 +
 +2012-09-02  Juri Linkov  <juri@jurta.org>
 +
 +      Toggle whitespace matching mode with M-s SPC.
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00008.html
 +
 +      * isearch.el (search-whitespace-regexp): Doc fix.
 +      Remove cons cell customization.
 +      (isearch-mode-map): Bind "\M-s " to isearch-toggle-lax-whitespace.
 +      (isearch-lax-whitespace, isearch-regexp-lax-whitespace):
 +      New variables.
 +      (isearch-forward, isearch-forward-regexp): Doc fix.
 +      (isearch-toggle-lax-whitespace): New command.
 +      (search-forward-lax-whitespace, search-backward-lax-whitespace)
 +      (re-search-forward-lax-whitespace)
 +      (re-search-backward-lax-whitespace): New functions.
 +      (isearch-whitespace-regexp): Remove function.
 +      (isearch-query-replace): Let-bind replace-search-function and
 +      replace-re-search-function.
 +      (isearch-occur): Let-bind search-spaces-regexp according to the
 +      value of isearch-lax-whitespace and isearch-regexp-lax-whitespace.
 +      (isearch-quote-char): Check isearch-regexp-lax-whitespace in the
 +      condition for C-q SPC.
 +      (isearch-search-fun-default): Use new functions mentioned above.
 +      (isearch-search-forward, isearch-search-backward): Remove functions.
 +      (isearch-search): Don't let-bind search-spaces-regexp.
 +      (isearch-lazy-highlight-space-regexp): Remove variable.
 +      (isearch-lazy-highlight-lax-whitespace)
 +      (isearch-lazy-highlight-regexp-lax-whitespace): New variables.
 +      (isearch-lazy-highlight-new-loop): Use them.
 +      (isearch-lazy-highlight-search): Don't let-bind search-spaces-regexp.
 +
 +2012-09-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * dired.el (dired-mode-map): Menu string fixes (Bug#11616).
 +
 +2012-09-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * simple.el (undo): Tweak message in undo-only case.  (Bug#12283)
 +
 +2012-09-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * term.el: Tidy up menu definitions.
 +      (term-mode-map): Use easymenu for In/Out, Complete menus.
 +      (term-pager-break-map): Initialize in the defvar.
 +      (term-terminal-menu, term-signals-menu): Define with easymenu.
 +      (term-terminal-menu): Also show it in line-mode.  (Bug#11957)
 +      (term-pager-menu): New, extracted from term-process-pager.
 +      (term-mode, term-char-mode, term-process-pager): Use easymenu-add.
 +      (term-update-mode-line): Propertize line/char and page items.
 +      (term-process-pager): Move keymap initialization elsewhere.
 +
 +2012-09-01  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (switch-to-prev-buffer): Handle additional values of
 +      BURY-OR-KILL argument.  Don't switch in minibuffer window.
 +      (switch-to-next-buffer): Don't switch in minibuffer window.
 +      (quit-restore-window): New function based on quit-window.
 +      Handle additional values of former KILL argument.
 +      (quit-window): Call quit-restore-window with appropriate
 +      interpretation of KILL argument.
 +      (display-buffer-below-selected): New buffer display action
 +      function.
 +
 +2012-09-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-at-point-functions): Complete docstring
 +      (bug#12254).
 +
 +2012-09-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Better seed support for (random).
 +      * play/5x5.el, play/animate.el, play/cookie1.el, play/dissociate.el:
 +      * play/doctor.el, play/dunnet.el, play/gomoku.el, play/landmark.el:
 +      * play/mpuz.el, play/tetris.el, play/zone.el:
 +      * calc/calc-comb.el (math-init-random-base):
 +      * play/blackbox.el (bb-init-board):
 +      * play/life.el (life):
 +      * server.el (server-use-tcp):
 +      * type-break.el (type-break):
 +      Remove unnecessary call to (random t).
 +      * net/sasl.el (sasl-unique-id-function):
 +      Change (random t) to (random), now that the latter is more random.
 +      * play/life.el (life-initialized): Remove no-longer-needed var.
 +
 +2012-08-31  Alp Aker  <alp.tekin.aker@gmail.com>
 +
 +      * window.el (switch-to-prev-buffer, switch-to-next-buffer):
 +      Consider frame's buffer predicate when choosing the buffer.
 +      (Bug#12081)
 +
 +2012-08-30  Richard Stallman  <rms@gnu.org>
 +
 +      * simple.el (special-mode-map): Delete binding for `z'.
 +
 +2012-08-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * progmodes/compile.el (compilation-always-kill): Doc fix.
 +
 +2012-08-30  Chong Yidong  <cyd@gnu.org>
 +
 +      * window.el (display-buffer-reuse-frames): Make the obsolescence
 +      message more informative.
 +
 +2012-08-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * paren.el (show-paren-delay):
 +      Add a :set function.  Doc fix.  (Bug#12297)
 +
 +2012-08-29  Martin Blais  <blais@furius.ca>  (tiny change)
 +
 +      * progmodes/compile.el (compilation-always-kill): New var.
 +      (compilation-start): Use it.
 +
 +2012-08-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (read-only-mode): Move from files.el for bootstrapping.
 +      * files.el (read-only-mode): Move to simple.el.
 +
 +      * files.el (read-only-mode): New minor mode.
 +      (toggle-read-only): Use it and mark obsolete.
 +      (find-file--read-only):
 +      * vc/vc.el (vc-next-action, vc-checkout):
 +      * vc/vc-cvs.el (vc-cvs-checkout):
 +      * obsolete/vc-mcvs.el (vc-mcvs-update):
 +      * ffap.el (ffap--toggle-read-only): Update callers.
 +
 +2012-08-29  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * eshell/esh-ext.el (eshell-external-command): Do not examine
 +      remote shell scripts.
 +      See <https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/1035790>.
 +
 +      * net/tramp-sh.el (tramp-remote-path): Add "/sbin" and
 +      "/usr/local/sbin".
 +
 +2012-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el (buffer-string): Fix setter macro (bug#12293).
 +
 +2012-08-28  Leo Liu  <sdl.web@gmail.com>
  
        * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to
        completion-at-point.  (Bug#12220)
  
        * progmodes/sh-script.el (sh-indent-comment): Change to t (bug#12267).
  
 -2012-08-24  Chong Yidong  <cyd@gnu.org>
 -
 -      * Version 24.2 released.
 -
 -2012-08-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * files.el (safe-local-eval-forms): Fix before-save-hook entry to
        be buffer-local; add delete-trailing-whitespace (bug#12259).
  
 -2012-08-22  Jeremy Moore  <jmoore@ieee.org>  (tiny change)
 +2012-08-28  Jeremy Moore  <jmoore@ieee.org>  (tiny change)
  
        * progmodes/hideif.el (hif-compress-define-list):
        Fix typo.  (Bug#11951)
  
 -2012-08-20  Dan Nicolaescu  <dann@gnu.org>
 +2012-08-28  Dan Nicolaescu  <dann@gnu.org>
  
        * progmodes/hideshow.el (hs-block-end-regexp): Restore lost
        buffer local setting.
  
 -2012-08-15  Glenn Morris  <rgm@gnu.org>
 -
 -      * vc/log-edit.el (log-edit-font-lock-gnu-style): Mark safe if boolean.
 -
 -2012-08-15  Leo Liu  <sdl.web@gmail.com>
 -
        * net/rcirc.el (rcirc-split-message): Fix for buffer-local
        rcirc-encode-coding-system.
  
 -2012-08-13  Leo Liu  <sdl.web@gmail.com>
 +2012-08-28  Leo Liu  <sdl.web@gmail.com>
  
        * net/rcirc.el (rcirc-split-message): New function.
        (rcirc-send-message): Use it.  (Bug#12051)
  
 -2012-08-10  Glenn Morris  <rgm@gnu.org>
 +2012-08-28  Juri Linkov  <juri@jurta.org>
  
 -      * emacs-lisp/copyright.el (copyright-update-directory): Logic fix.
 +      * info.el (Info-fontify-node): Hide empty lines at the end of
 +      the node.  (Bug#12272)
  
 -      * tutorial.el (help-with-tutorial):
 -      * emacs-lisp/copyright.el (copyright-update-directory):
 -      * emacs-lisp/autoload.el (autoload-find-generated-file)
 -      (autoload-find-file): Disable local eval: (for insurance).
 +2012-08-27  Drew Adams  <drew.adams@oracle.com>
  
 -2012-08-07  Glenn Morris  <rgm@gnu.org>
 +      * dired.el (dired-pop-to-buffer): Make window start at beginning
 +      of buffer (Bug#12281).
  
 -      * files.el (hack-local-variables-filter): If an eval: form is not
 -      known to be safe, and enable-local-variables is :safe, then ignore
 -      the form totally, as is done for non-eval forms.  (Bug#12155)
 -      This is CVE-2012-3479.
 +2012-08-26  Chong Yidong  <cyd@gnu.org>
  
 -2012-08-07  Chong Yidong  <cyd@gnu.org>
 +      * window.el (special-display-regexps, special-display-frame-alist)
 +      (special-display-buffer-names, special-display-function)
 +      (display-buffer-reuse-frames): Mark as obsolete.
  
 -      * mouse.el (mouse-drag-track): Deactivate the mark before popping.
 +      * progmodes/compile.el: Don't use display-buffer-reuse-frames.
  
 -2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * help.el (help-print-return-message): Don't treat
 +      display-buffer-reuse-frames specially.
  
 -      * progmodes/cperl-mode.el (cperl-mode): Yet another fix for
 -      syntax-propertize-function (bug#10095).
 +2012-08-26  Chong Yidong  <cyd@gnu.org>
  
 -2012-07-28  Chong Yidong  <cyd@gnu.org>
 +      * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action):
 +      New variable, replacing gdb-frame-parameters.
 +      (gdb-frame-io-buffer, gdb-frame-breakpoints-buffer)
 +      (gdb-frame-threads-buffer, gdb-frame-memory-buffer)
 +      (gdb-frame-disassembly-buffer, gdb-frame-stack-buffer)
 +      (gdb-frame-locals-buffer, gdb-frame-registers-buffer): Use it.
 +      (def-gdb-frame-for-buffer): Macro deleted.  It is easier to define
 +      the functions directly with gdb-display-buffer-other-frame-action.
 +      (gdb-display-breakpoints-buffer, gdb-display-threads-buffer)
 +      (gdb-display-memory-buffer, gdb-display-disassembly-buffer)
 +      (gdb-display-stack-buffer, gdb-display-locals-buffer)
 +      (gdb-display-registers-buffer): Define directly.
 +      (def-gdb-display-buffer): Macro deleted.
 +      (gdb-display-buffer): Remove second and third args, callers don't
 +      use them.  Defer to the default display-buffer behavior, apart
 +      from making windows dedicated.
 +      (gdb-setup-windows): Don't call display-buffer unnecessarily.
  
 -      * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to
 -      gdb-get-location.
 +      * progmodes/gud.el (gud-display-line): Just use display-buffer.
  
 -2012-07-25  Leo Liu  <sdl.web@gmail.com>
 +      * window.el (display-buffer-pop-up-frame): Handle a
 +      pop-up-frame-parameters alist entry.
 +      (display-buffer): Document it.
  
 -      * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in
 -      the alist (bug#12029).
 +2012-08-26  Chong Yidong  <cyd@gnu.org>
  
 -2012-07-25  Chong Yidong  <cyd@gnu.org>
 +      * isearch.el (search-whitespace-regexp): Make string and nil
 +      values apply to both ordinary and regexp search.  Allow a cons
 +      cell value to distinguish between the two.
 +      (isearch-whitespace-regexp, isearch-search-forward)
 +      (isearch-search-backward): New functions.
 +      (isearch-occur, isearch-search-fun-default, isearch-search)
 +      (isearch-lazy-highlight-new-loop): Use them.
 +      (isearch-forward, isearch-forward-regexp): Doc fix.
  
 -      * mouse.el (mouse-drag-track): Do not set the mark if the user
 -      releases the mouse without selecting anything (Bug#11588).
 +2012-08-26  Chong Yidong  <cyd@gnu.org>
  
 -2012-07-21  Leo Liu  <sdl.web@gmail.com>
 +      * faces.el (help-argument-name): Always inherit from italic
 +      (Bug#12213).
  
 -      * progmodes/cc-cmds.el (c-defun-name):
 -      Use match-string-no-properties instead for consistency.
 +2012-08-25  Martin Rudalics  <rudalics@gmx.at>
  
 -2012-07-20  Leo Liu  <sdl.web@gmail.com>
 +      * window.el (window--even-window-heights): Even heights when
 +      WINDOW and the selected window form a vertical combination.
 +      (display-buffer-use-some-window): Provide that window used gets
 +      sized back by quit-window.  (Bug#11880) and (Bug#12091)
  
 -      * progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly.
 -      (Bug#7879)
 +2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix file time stamp problem with bzr and CVS (Bug#12001).
 +      * vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information
 +      in the file's time stamp, since the version control system loses
 +      that information.
 +
 +2012-08-22  Juri Linkov  <juri@jurta.org>
 +
 +      * info.el (Info-fontify-node): Hide the suffix of the
 +      Info file name in the header line.  (Bug#12187)
 +
 +2012-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/cal-tex.el (cal-tex-weekly-common):
 +      Restore leading blank page.
 +
 +2012-08-22  Le Wang  <l26wang@gmail.com>  (tiny change)
 +
 +      * misc.el (forward-to-word, backward-to-word): Activate or extend
 +      the region under `shift-select-mode'.  (Bug#12231)
 +
 +2012-08-22  Bastien Guerry  <bzg@gnu.org>
 +
 +      * progmodes/executable.el (executable-prefix): Set to "#!" instead
 +      of "#! ".  http://www.in-ulm.de/~mascheck/various/shebang/#details
 +      gives details on why the space is never needed.
 +
 +2012-08-22  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (walk-window-tree, window-with-parameter):
 +      New optional argument MINIBUF to control whether these functions
 +      should run on the minibuffer window.
 +      (window-at-side-list): Don't operate on minibuffer window.
 +      (window-in-direction): Simplify and rewrite doc-string.
 +      (window--size-ignore): Rename to window--size-ignore-p.
 +      Update callers.
 +      (display-buffer-in-atom-window, window--major-non-side-window)
 +      (window--major-side-window, display-buffer-in-major-side-window)
 +      (delete-side-window, display-buffer-in-side-window):
 +      New functions.
 +      (window--side-check, window-deletable-p, delete-window)
 +      (delete-other-windows, split-window): Handle side windows and
 +      atomic windows appropriately.
 +      (window--display-buffer): Call display-buffer-record-window also
 +      when the window buffer did not change.
 +
 +2012-08-22  Christopher Schmidt  <christopher@ch.ristopher.com>
 +
 +      * help-fns.el (help-fns--key-bindings):
 +      Abbreviate non-symbol remap targets.  (Bug#12174)
 +
 +2012-08-22  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * dired.el (dired-mark-remembered): Don't clobber point.
 +      (Bug#11795)
 +
 +2012-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/bug-reference.el (bug-reference): New custom group.
 +      (bug-reference-bug-regexp): Make it a defcustom.
 +
 +2012-08-22  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * progmodes/js.el (js-indent-level, js-expr-indent-offset)
 +      (js-paren-indent-offset, js-square-indent-offset)
 +      (js-curly-indent-offset): Add :safe (Bug#12257).
 +
 +2012-08-22  Edward O'Connor  <hober0@gmail.com>
 +
 +      * json.el (json-key-format): Add error properties.
 +      (json-encode-key): New function.
 +      (json-encode-hash-table, json-encode-alist, json-encode-plist):
 +      Use json-encode-key.
 +
 +2012-08-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/cal-tex.el (cal-tex-longday): New function, replacing...
 +      (cal-tex-leftday, cal-tex-rightday): Remove functions.
 +      (cal-tex-weekly-common, cal-tex-cursor-filofax-2week):
 +      Update for above change.
 +
 +2012-08-21  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * cus-face.el (custom-face-attributes): Fix customize type for the
 +      :underline attribute.  (Bug#11805)
 +
 +2012-08-21  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (window-point-1, set-window-point-1): Remove.
 +      (window-in-direction, record-window-buffer)
 +      (set-window-buffer-start-and-point, split-window-below)
 +      (window--state-get-1, display-buffer-record-window):
 +      Replace calls to window-point-1 and set-window-point-1 by calls to
 +      window-point and set-window-point respectively.
 +
 +2012-08-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/cal-tex.el (cal-tex-weekly-common): New function.
 +      (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week):
 +      Use it.
 +
 +      * calendar/cal-tex.el (cal-tex-rightday): Add optional funcname arg.
 +      (cal-tex-shortday): New function.
 +      (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-week)
 +      (cal-tex-cursor-filofax-daily): Use the above.
 +
 +      * calendar/cal-tex.el (cal-tex-leftday, cal-tex-rightday):
 +      New functions.
 +      (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week)
 +      (cal-tex-cursor-filofax-week): Use them.
 +
 +      * calendar/cal-tex.el (cal-tex-lefthead, cal-tex-righthead):
 +      New constants.
 +      (cal-tex-cursor-week-at-a-glance, cal-tex-cursor-filofax-2week)
 +      (cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use them.
 +
 +      * calendar/cal-tex.el (cal-tex-preamble): Generate new buffers.
 +      (cal-tex-end-document): Don't rely on buffer name.
 +
 +      * calendar/cal-tex.el (cal-tex-cursor-filofax-year):
 +      Use cal-tex-vspace.
 +      (cal-tex-vspace, cal-tex-hspace, cal-tex-em, cal-tex-bf)
 +      (cal-tex-Huge-bf, cal-tex-large-bf): Use cal-tex-cmd.
 +      (cal-tex-scriptsize, cal-tex-huge, cal-tex-Huge, cal-tex-large):
 +      Use cal-tex-arg.
 +
 +      * calendar/cal-tex.el (cal-tex-cursor-filofax-year)
 +      (cal-tex-cursor-week, cal-tex-cursor-week2)
 +      (cal-tex-cursor-week-iso, cal-tex-cursor-week-at-a-glance)
 +      (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
 +      (cal-tex-cursor-filofax-daily, cal-tex-cursor-day)
 +      (cal-tex-insert-preamble, cal-tex-b-document)
 +      (cal-tex-e-document, cal-tex-b-center, cal-tex-e-center):
 +      Improve cal-tex-cmd usage.
 +
 +      * calendar/cal-tex.el (cal-tex-filofax-paper): New function.
 +      (cal-tex-cursor-filofax-year, cal-tex-cursor-filofax-2week)
 +      (cal-tex-cursor-filofax-week, cal-tex-cursor-filofax-daily): Use it.
 +      (cal-tex-weekly-paper): New function.
 +      (cal-tex-cursor-week, cal-tex-cursor-week2)
 +      (cal-tex-cursor-week-iso, cal-tex-cursor-week-monday)
 +      (cal-tex-cursor-day): Use it.
 +
 +      * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance)
 +      (cal-tex-cursor-filofax-week): Remove leading blank page.
 +
 +      * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance):
 +      Add autoload cookie.  For now at least, don't use color, since
 +      no other cal-tex function does.
 +
 +      * calendar/cal-tex.el (cal-tex-cursor-week-iso)
 +      (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week)
 +      (cal-tex-cursor-filofax-daily): Correct start date for diary entries.
 +
 +2012-08-21  Juri Linkov  <juri@jurta.org>
 +
 +      * info.el (Info-file-attributes): New variable.
 +      (info-insert-file-contents): Add file attributes to
 +      `Info-file-attributes'.  Clear the caches `Info-index-nodes' and
 +      `Info-toc-nodes' when previous modtime of the Info file is less
 +      than new modtime.
 +      (Info-toc-nodes, Info-index-nodes): Move definitions up to the top
 +      of info.el.  (Bug#12230)
 +
 +2012-08-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/diary-lib.el (diary-include-files, diary-sexp-entry):
 +      * calendar/holidays.el (calendar-holiday-list):
 +      Report errors with display-warning rather than beep'n'sleep.
 +
 +2012-08-20  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-accept-process-output): Accept only output
 +      from PROC.  Otherwise, process filters and sentinels might be
 +      confused.  (Bug#12145)
 +
 +2012-08-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * descr-text.el (describe-text-properties-1): Use overlays-in to
 +      report on empty overlays (Bug#3322).
 +
 +2012-08-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * mail/rmailout.el (rmail-output-read-file-name):
 +      Trap and report errors in rmail-output-file-alist elements.
 +
 +      * font-lock.el (font-lock-add-keywords): Doc fix (quote face names
 +      since most non-font-lock faces are not also variables).
 +
 +2012-08-20  Edward Reingold  <reingold@iit.edu>
 +
 +      * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance):
 +      New function.  (Bug12160)
 +
 +2012-08-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * mail/rmailout.el (rmail-output-read-file-name):
 +      Fix previous change (when the alist is nil or does not match).
 +
 +2012-08-19  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el (xml-escape-string): Don't refer to xml-entity-alist
 +      (Bug#12228).
 +
 +2012-08-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * simple.el (yank-handled-properties): New defcustom.
 +      (yank-excluded-properties): Add font-lock-face and category.
 +      (yank): Doc fix.
 +
 +      * subr.el (remove-yank-excluded-properties):
 +      Obey yank-handled-properties.  The special handling of font-lock-face
 +      and category is now done this way, instead of being hard-coded.
 +      (insert-for-yank-1): Remove font-lock-face handling.
 +      (yank-handle-font-lock-face-property)
 +      (yank-handle-category-property): New function.
 +
 +2012-08-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * mail/rmailout.el (rmail-output-read-file-name):
 +      Check rmail-output-file-alist against the full message body
 +      in the correct rmail buffer.  (Bug#12214)
 +
 +2012-08-17  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-sh.el (tramp-sh-handle-start-file-process):
 +      Eliminate superfluous prompt.  (Bug#12203)
 +
 +2012-08-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * mouse.el (mouse-appearance-menu): If x-select-font returns a
 +      font spec, set the font directly (Bug#3228).
 +
 +2012-08-17  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (delete-window): Fix last fix.
 +
 +2012-08-16  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (window-valid-p): Move to window.c.
 +      (window-child, window-child-count, window-last-child)
 +      (window-normalize-window, window-combined-p)
 +      (window-combinations, window-atom-root, window-min-size)
 +      (window-sizable, window-sizable-p, window-size-fixed-p)
 +      (window-min-delta, window-max-delta, window--resizable)
 +      (window--resizable-p, window-resizable, window-total-size)
 +      (window-full-height-p, window-full-width-p, window-body-size)
 +      (window-at-side-p, adjust-window-trailing-edge, maximize-window)
 +      (minimize-window, window-deletable-p, delete-window)
 +      (delete-other-windows, set-window-buffer-start-and-point)
 +      (next-buffer, previous-buffer, split-window, balance-windows-2)
 +      (set-window-text-height, window-buffer-height)
 +      (fit-window-to-buffer, shrink-window-if-larger-than-buffer)
 +      (truncated-partial-width-window-p): Minor code adjustments.
 +      In doc-strings state whether the argument window has to denote a
 +      live, valid or any window.
 +
 +2012-08-16  Phil Sainty  <psainty@orcon.net.nz>  (tiny change)
 +
 +      * progmodes/subword.el (subword-forward-function)
 +      (subword-backward-function, subword-forward-regexp)
 +      (subword-backward-regexp): New variables.
 +      (subword-forward, subword-forward-internal, subword-backward-internal):
 +      Use new variables, eg so that different "word" definitions
 +      can be easily used.  (Bug#11411)
 +
 +2012-08-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/vc-mtn.el (vc-mtn-revision-completion-table): Handle completion
 +      for composite selectors.
 +      * vc/vc.el (vc-diff-build-argument-list-internal): Don't prevent
 +      operation just because we can't find a previous revision.
 +
 +2012-08-15  Chong Yidong  <cyd@gnu.org>
 +
 +      * frame.el (set-frame-font): Accept font objects.
 +
 +2012-08-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/tex-mode.el (tex-insert-quote): ~ is a space (bug#12137).
 +
 +2012-08-15  Wolfgang Jenkner  <wjenkner@inode.at>
 +
 +      * man.el (Man-overstrike-face, Man-underline-face)
 +      (Man-reverse-face): Remove variables.
 +      (Man-overstrike, Man-underline, Man-reverse): New faces.
 +      (Man-fontify-manpage): Use them instead of the variables.
 +      (Man-cleanup-manpage): Comment change.
 +      (Man-ansi-color-map): New variable.
 +      (Man-fontify-manpage): Use it.
 +      Call ansi-color-apply-on-region to replace ad hoc code (bug#12147).
 +
 +      Implement ANSI SGR parameters 22-27 (bug#12146).
 +      * ansi-color.el (ansi-colors): Doc fix.
 +      (ansi-color-context, ansi-color-context-region): Doc fix.
 +      (ansi-color--find-face): New function.
 +      (ansi-color-apply, ansi-color-apply-on-region): Use it.
 +      Rename the local variable `face' to `codes' since it is now a list of
 +      ansi codes.  Doc fix.
 +      (ansi-color-get-face): Remove.
 +      (ansi-color-parse-sequence): New function, derived from
 +      ansi-color-get-face.
 +      (ansi-color-apply-sequence): Use it.  Rewrite, and support ansi
 +      codes 22-27.
 +
 +2012-08-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (read-passwd): Allow use from a minibuffer.
 +
 +2012-08-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * tooltip.el (tooltip-identifier-from-point): Don't treat tokens
 +      inside comments and strings as identifiers.
 +
 +      * progmodes/gud.el (gud-tooltip-print-command): Quote the
 +      expression to evaluate.  This allows to evaluate expressions with
 +      embedded whitespace.
 +      (gud-tooltip-tips): Add a blank before the newline in the
 +      message-box text, for the benefit of message-box emulation on
 +      MS-Windows.
 +
 +      * progmodes/gdb-mi.el (gdb-tooltip-print): Don't ignore error
 +      messages from GDB, pop them up in a tooltip to give feedback to
 +      user.
 +      (gdb-tooltip-print-1): Quote the expression to evaluate.
 +      This allows to evaluate expressions with embedded whitespace.
 +      (gdb-inferior-io--init-proc): Don't send "-inferior-tty" command
 +      if the TTY name is nil or empty (which happens when communicating
 +      with the inferior via pipes, e.g. on MS-Windows).
 +      (gdb-internals): If GDB sends a "&\n" empty debugging message,
 +      don't send that to the GUD buffer.
 +
 +2012-08-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-setq-default):
 +      Optimize away setq-default with no args, as for setq.  (Bug#12195)
 +
 +2012-08-14  Chong Yidong  <cyd@gnu.org>
 +
 +      * minibuffer.el (read-file-name): Doc fix (Bug#10881).
 +
 +      * emacs-lisp/regexp-opt.el (regexp-opt-charset): Doc fix
 +      (Bug#12085).
 +
 +2012-08-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-recompile-file): Doc fix.
 +
 +2012-08-14  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-sh.el (tramp-open-shell): Cache the shell name.
 +      (tramp-find-shell, tramp-open-connection-setup-interactive-shell):
 +      Use cached shell name.
 +
 +2012-08-14  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el (python-shell-send-string):
 +      (python-shell-send-setup-code): Do not use `format' with `message'.
 +
 +2012-08-14  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el: Improve percent literals (bug#6286).
 +      (ruby-percent-literal-beg-re): New constant.
 +      (ruby-syntax-general-delimiters-goto-beg): Rename to
 +      `ruby-syntax-enclosing-percent-literal', improve literal type check.
 +      (ruby-syntax-propertize-general-delimiters): Rename to
 +      `ruby-syntax-propertize-percent-literal', it's a shorter and more
 +      popular term.  Adjust comments everywhere.
 +      (ruby-syntax-propertize-percent-literal): Only propertize when not
 +      inside a simple string or comment.  When the literal is unclosed,
 +      leave the text after it unpropertized.
 +      (ruby-syntax-methods-before-regexp): New constant.
 +      (ruby-syntax-propertize-function): Use it to recognize regexps.
 +      Don't look at the text after regexp, just use the whitelist.
 +
 +2012-08-14  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-recompile-file): When LOAD is
 +      non-nil always load the compiled file if it exists.  (Bug#12197)
 +
 +2012-08-14  Chong Yidong  <cyd@gnu.org>
 +
 +      * hi-lock.el (hi-lock-mode): Do not unilaterally enable font lock.
 +      (hi-lock-set-pattern): When deciding whether to use font lock or
 +      overlays, look at font-lock-mode instead of font-lock-fontified
 +      (Bug#12168).
 +      (hi-lock-mode, hi-lock-line-face-buffer, hi-lock-unface-buffer)
 +      (hi-lock-face-buffer, hi-lock-face-phrase-buffer): Doc fix.
 +
 +2012-08-14  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * subr.el (internal--after-with-selected-window): Fix typo
 +      (Bug#12193).
 +
 +2012-08-14  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      Use `completion-table-dynamic' for completion functions.
 +      * progmodes/python.el
 +      (python-shell-completion--do-completion-at-point)
 +      (python-shell-completion--get-completions):
 +      Remove functions.
 +      (python-shell-completion-complete-at-point): New function.
 +      (python-completion-complete-at-point): Use it.
 +
 +2012-08-13  Jambunathan K  <kjambunathan@gmail.com>
 +
 +      * vc/vc-dir.el (vc-dir-hide-state): New command (bug#12159).
 +      (vc-dir-hide-up-to-date): Route it to `vc-dir-hide-state'.
 +
 +2012-08-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (function-get): Refine `autoload' arg so it can also
 +      autoload functions for gv.el (bug#12191).
 +      * emacs-lisp/edebug.el (get-edebug-spec): Adjust so it only
 +      autoloads macros.
 +
 +      * color.el (color-xyz-to-lab, color-lab-to-xyz, color-cie-de2000):
 +      Prefer pcase-let over destructuring-bind.
 +      * vc/diff-mode.el (diff-remove-trailing-whitespace): Same.
 +      Also, remove whitespace as we go, rather than after accumulating the
 +      various places.
 +
 +      * subr.el (internal--before-with-selected-window)
 +      (internal--after-with-selected-window): Fix typo seleted->selected.
 +      (with-selected-window): Adjust callers.
 +      Reported by Dmitry Gutov <dgutov@yandex.ru>.
 +
 +2012-08-13  Bastien Guerry  <bzg@gnu.org>
 +
 +      * window.el (special-display-popup-frame): Minor docstring
 +      enhancement.  (Bug#12172)
 +
 +2012-08-13  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * tar-mode.el (tar-header-data-end): Only ignore size for files of
 +      type 1-6.
 +      (tar-header-block-summarize, tar-get-descriptor): Handle pax
 +      extended headers.
 +
 +      * files.el (hack-local-variables-filter): Remove useless eval.
 +
 +2012-08-13  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * subr.el (with-selected-window): Fix last change.
 +
 +2012-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (internal--before-with-seleted-window)
 +      (internal--after-with-seleted-window): New functions.
 +      (with-selected-window): Use them, to replace dependency on
 +      tty-top-frame.
 +
 +2012-08-12  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 +
 +      * progmodes/ruby-mode.el (ruby-mode-map): Remove unnecessary
 +      binding for `newline'.
 +      (ruby-move-to-block): When moving backward, stop at block opening,
 +      not indentation.
 +      * progmodes/ruby-mode.el (ruby-brace-to-do-end)
 +      (ruby-do-end-to-brace, ruby-toggle-block): New functions.
 +      * progmodes/ruby-mode.el (ruby-mode-map): Add binding for
 +      `ruby-toggle-block'.
 +
 +2012-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * ibuffer.el (ibuffer-do-toggle-read-only):
 +      * dired.el (dired-toggle-read-only):
 +      * buff-menu.el (Buffer-menu-toggle-read-only):
 +      * bindings.el (mode-line-toggle-read-only):
 +      * bs.el (bs-toggle-readonly): Call toggle-read-only interactively.
 +
 +2012-08-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * descr-text.el (describe-char): Put the overlays over the
 +      "displayed as" character.
 +
 +2012-08-12  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-units.el (math-default-units-table): Give an
 +      initial value.
 +      (math-put-default-units): Add options to put composite units and
 +      unit systems in the default units table.
 +      (calc-convert-units): Send composite units to
 +      `math-put-default-units' when appropriate.
 +
 +2012-08-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/copyright.el (copyright-update-directory): Logic fix.
 +
 +      * tutorial.el (help-with-tutorial):
 +      * emacs-lisp/copyright.el (copyright-update-directory):
 +      * emacs-lisp/autoload.el (autoload-find-generated-file)
 +      (autoload-find-file): Disable local eval: (for insurance).
 +
 +      * files.el (hack-local-variables-filter): If an eval: form is not
 +      known to be safe, and enable-local-variables is :safe, then ignore
 +      the form totally, as is done for non-eval forms.  (Bug#12155)
 +      This is CVE-2012-3479.
 +
 +2012-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/rx.el (rx-constituents): Don't define as constant.
 +      (rx-form): Simplify.
 +
 +2012-08-09  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el (ruby-expr-beg, ruby-parse-partial):
 +      ?, _, and : are symbol constituents, ! is not (but kinda should be).
 +      (ruby-syntax-propertize-heredoc): Use ruby-singleton-class-p.
 +      (ruby-syntax-propertize-function): Adjust for changes in
 +      `ruby-syntax-propertize-heredoc'.
 +
 +2012-08-09 Nobuyoshi Nakada  <nobu@ruby-lang.org>
 +
 +      * progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated
 +      binding (use `M-;' instead).
 +      (ruby-singleton-class-p): New function.
 +      (ruby-expr-beg, ruby-in-here-doc-p) Use it.
 +
 +2012-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl-loop): Improve debug spec.
 +
 +2012-08-10  Chong Yidong  <cyd@gnu.org>
 +
 +      * progmodes/python.el (python-shell-get-process-name): Don't mess
 +      with same-window-buffer-names.
 +
 +      * eshell/eshell.el (eshell-add-to-window-buffer-names)
 +      (eshell-remove-from-window-buffer-names): Make obsolete.
 +      (eshell-buffer-name, eshell-unload-hook): Don't use them.
 +      (eshell): Just use pop-to-buffer-same-window instead.
 +
 +2012-08-10  Chong Yidong  <cyd@gnu.org>
 +
 +      * bindings.el: Bind M-= back to count-words-region.
 +
 +      * simple.el (count-words-region): Accept a prefix arg for acting
 +      on the entire buffer.
 +      (count-words--buffer-message): New helper function.
 +
 +2012-08-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * term/x-win.el (x-menu-bar-open): Always pass last-nonmenu-event.
 +      * subr.el (eventp): `nil' is not an event, and eventp is not hot.
 +      (event-start, event-end): Use posn-at-point to return a more
 +      informative posn.
 +      (posnp): New function.
 +      * mouse.el (popup-menu-normalize-position): Use it.
 +
 +2012-08-10  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * mouse.el (popup-menu-normalize-position): New function.
 +      (popup-menu): Use `popup-menu-normalize-position' to normalize
 +      the form for POSITION argument.
 +
 +      * term/x-win.el (x-menu-bar-open):
 +      Use the value returend from (posn-at-point) as position
 +      passed to `popup-menu'.
 +
 +2012-08-09  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calccomp.el (math-compose-expr): Add extra argument
 +      indicating that parentheses should be put around products in
 +      denominators.  Give multiplication precedence over division during
 +      composition.
 +
 +2012-08-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * man.el (Man-switches, Man-sed-command, Man-awk-command)
 +      (Man-mode-hook, Man-cooked-hook, Man-untabify-command-args)
 +      (Man-untabify-command, manual-program): Convert to defcustom
 +      (Bug#10429).
 +
 +      * vc/add-log.el (change-log-mode): Bind comment-start to nil.
 +
 +      * descr-text.el (describe-char): Don't insert extra newlines
 +      (Bug#10127).
 +
 +      * vc/log-view.el (log-view-diff): Use use-region-p (Bug#10133).
 +      (log-view-diff-changeset, log-view-minor-wrap): Likewise.
 +
 +      * align.el (align-region): Delete temporary markers (Bug#10047).
 +      Plus some code cleanups.
 +
 +2012-08-09  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el (python-pdbtrack-tracked-buffer)
 +      (python-pdbtrack-buffers-to-kill, python-shell-internal-buffer)
 +      (python-shell-internal-last-output): Use make-local-variable
 +      instead of make-variable-buffer-local.
 +
 +2012-08-09  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el: Enhancements to forward-sexp.
 +      (python-nav-forward-sexp): Rename from
 +      python-nav-forward-sexp-function.
 +      (python-nav--forward-sexp, python-nav--backward-sexp):
 +      New functions.
 +
 +2012-08-09  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-menu.el (calc-modes-menu): Add entries for matrix
 +      modes and simplification modes.
 +
 +2012-08-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * delsel.el (delete-selection-pre-hook): Don't propagate the
 +      file-supersession signals (bug#12161).
 +
 +2012-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl.el (cl-map-keymap-recursively, cl-map-intervals)
 +      (cl-map-extents): Add compatibility aliases (bug#12135).
 +
 +2012-08-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-sh.el (tramp-find-file-exists-command): Protect the
 +      tests by `ignore-error'.
 +      (tramp-find-shell): Open also a new shell, when cache is already
 +      set.  Reported by Carsten Bormann <cabo@tzi.org>.  (Bug#12148)
 +
 +2012-08-08  Juri Linkov  <juri@jurta.org>
 +
 +      * bookmark.el: Add `defaults' property to the bookmark record.
 +      (bookmark-current-buffer): Doc fix.
 +      (bookmark-make-record): Add `defaults' property with default values
 +      to the bookmark record.
 +      (bookmark-minibuffer-read-name-map): Remove key binding "\C-u"
 +      with `bookmark-insert-current-bookmark'.
 +      (bookmark-set): Get `defaults' property from the bookmark record
 +      and use it in `read-from-minibuffer'.
 +      (bookmark-insert-current-bookmark): Remove function.
 +
 +      * info.el (Info-bookmark-make-record): Add `defaults' property
 +      with values of canonical Info node name, the current Info file
 +      name and the current Info node name.  (Bug#12107)
 +
 +2012-08-08  Juri Linkov  <juri@jurta.org>
 +
 +      * files.el (basic-save-buffer): Use `buffer-name' as the default
 +      of `read-file-name' when buffer is not visiting a file (bug#12128).
 +
 +2012-08-08  Juri Linkov  <juri@jurta.org>
 +
 +      * info.el (Info-isearch-search): Doc fix.
 +      (Info-search): Change search-failed message from "initial node" to
 +      "end of node" (bug#12078).
 +      (Info-isearch-search): Change `isearch-string-state' to
 +      `isearch--state-string'.
 +
 +2012-08-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * language/persian.el: Remove file.
 +      * language/misc-lang.el: Move unique part of persian.el here.
 +      * loadup.el: Remove language/persian.
 +
 +2012-08-08  Ã“scar Fuentes  <ofv@wanadoo.es>
 +
 +      * vc/diff-mode.el (diff-remove-trailing-whitespace): New function.
 +
 +2012-08-08  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el Fixed defsubst warning.
 +      (python-syntax-context) Rename from python-info-ppss-context.
 +      (python-syntax-context-type): Rename from
 +      python-info-ppss-context-type.
 +      (python-syntax-comment-or-string-p): Rename from
 +      python-info-ppss-comment-or-string-p.
 +
 +2012-08-08  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-misc.el (calc-record-why): Don't record a message twice.
 +
 +2012-08-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs-lisp/lisp-mode.el (eval-defun-1): Handle standard value of
 +      a defcustom that is quoted with backquote.
 +
 +      * calc/calc-prog.el (math-do-defmath): Use backquote forms.
 +      Fix handling of interactive spec when the body uses return.
 +      (math-do-arg-check, math-define-function-body): Use backquote forms.
 +      * calc/calc-ext.el (math-defcache): Likewise.
 +      * calc/calc-rewr.el (math-rwfail, math-rweval): Likewise.
 +      * allout.el (allout-new-exposure): Likewise.
 +      * calc/calcalg2.el (math-tracing-integral): Likewise.
 +      * info.el (Info-last-menu-item): Likewise.
 +      * emulation/vip.el (vip-loop): Likewise.
 +      * textmodes/artist.el (artist-funcall): Likewise.
 +      * menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle):
 +      Construct menu-item directly.
 +
 +      * progmodes/autoconf.el (font-lock-syntactic-keywords):
 +      Don't declare.
 +
 +2012-08-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * simple.el (deactivate-mark): Preserve text properties when
 +      saving the primary selection (Bug#8384).
 +
 +2012-08-07  Kevin Ryde  <user42@zip.com.au>
 +
 +      * woman.el (woman0-if): Quietly treat ".if v" as false (Bug#12109).
 +      (woman-parse-numeric-value): On a bad .IP line, issue a warning
 +      and continue processing (Bug#12110).
 +
 +2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/cperl-mode.el (cperl-mode): Yet another fix for
 +      syntax-propertize-function (bug#10095).
 +
 +2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * help-fns.el (help-fns--key-bindings, help-fns--signature)
 +      (help-fns--parent-mode, help-fns--obsolete): New funs, extracted from
 +      describe-function-1.
 +      (describe-function-1): Use them.  Move compiler macro after sig.
 +      (help-fns--compiler-macro): Use function-get.  Assume we're already in
 +      standard-output.  Adjust layout to new call order.
 +
 +      * emacs-lisp/cl-macs.el (cl--sm-macroexpand): Fix handling of
 +      re-binding a symbol that has a symbol-macro (bug#12119).
 +
 +2012-08-06  Mohsen BANAN  <libre@mohsen.1.banan.byname.net>
 +
 +      * language/persian.el: New file.  (Bug#11812)
 +      * loadup.el: Add language/persian.el.
 +
 +2012-08-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * window.el (window--maybe-raise-frame): New function.
 +      (window--display-buffer): Split off from here.
 +      (display-buffer-reuse-window, display-buffer-pop-up-frame)
 +      (display-buffer-pop-up-window, display-buffer-use-some-window):
 +      Obey an inhibit-switch-frame action alist entry.
 +      (display-buffer): Update doc.
 +
 +      * replace.el (occur-after-change-function): Avoid losing focus by
 +      using the inhibit-switch-frame display parameter (Bug#12139).
 +
 +2012-08-06  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      Make internal shell process buffer names start with space.
 +      * progmodes/python.el (python-shell-make-comint): Add optional
 +      argument INTERNAL.
 +      (run-python-internal): Use it.
 +      (python-shell-internal-get-or-create-process): Check for new
 +      internal buffer names.
 +
 +2012-08-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * eshell/esh-ext.el (eshell/addpath): Use dolist and mapconcat.
 +      Do less getting and setting of environment variables.
 +
 +2012-08-05  Chong Yidong  <cyd@gnu.org>
 +
 +      * proced.el (proced): Add substitution string to docstring to
 +      trigger autoloading of the proced library on C-h f (Bug#1768).
 +
 +      * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
 +      Don't show defvars which have no second argument (Bug#8638).
 +
 +      * imenu.el (imenu-generic-expression): Move documentation here
 +      from imenu--generic-function.
 +      (imenu--generic-function): Refer to imenu-generic-expression.
 +
 +2012-08-05  Vegard Ã˜ye  <vegard_oye@hotmail.com>  (tiny change)
 +
 +      * emulation/viper-init.el (viper-deflocalvar): Add docstring and
 +      indentation declaration.
 +      (viper-loop): Add indentation declaration (Bug#7025).
 +
 +2012-08-05  Chong Yidong  <cyd@gnu.org>
 +
 +      * help-fns.el (describe-variable): Add hyperlink for
 +      directory-local variables files.  Improve buffer-local and
 +      permanent-local reporting; suggested by MON KEY (Bug#6644).
 +
 +      * help-mode.el (help-dir-local-var-def): New button type.
 +
 +      * files.el (kill-buffer-hook): Provide a defvar.
 +
 +2012-08-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * eshell/esh-ext.el (eshell/addpath):
 +      Also update eshell-path-env.  (Bug#12013)
 +
 +2012-08-05  Chong Yidong  <cyd@gnu.org>
 +
 +      * wdired.el (wdired-mode, wdired-change-to-wdired-mode): Doc fixes.
 +
 +      * fringe.el (fringe-styles): Add docstring.
 +      (fringe--check-mode): New function.
 +      (set-fringe-mode, set-fringe-style): Use it.
 +      (fringe-mode, set-fringe-style): Doc fixes (Bug#6480).
 +
 +      * files.el (set-auto-mode): Fix invalid setq call.
 +
 +2012-08-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * isearch.el: Misc simplification; use defstruct.
 +      (isearch-mode-map): Dense maps now work like sparse ones.
 +      (isearch--state): New defstruct.
 +      (isearch-string-state, isearch-message-state, isearch-point-state)
 +      (isearch-success-state, isearch-forward-state)
 +      (isearch-other-end-state, isearch-word-state, isearch-error-state)
 +      (isearch-wrapped-state, isearch-barrier-state)
 +      (isearch-case-fold-search-state, isearch-pop-fun-state): Remove,
 +      replaced by defstruct's accessors.
 +      (isearch--set-state): Rename from isearch-top-state and change
 +      calling convention.
 +      (isearch-push-state): Use new isearch--get-state.
 +      (isearch-toggle-word): Disable regexp when enabling word.
 +      (isearch-message-prefix): Remove unused arg _c-q-hack.
 +      (isearch-message-suffix): Remove unused arg _ellipsis.
 +
 +2012-08-04  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * simple.el (list-processes--refresh): For a server use :host or
 +      :local as the address.
 +      (list-processes): Doc fix.
 +
 +2012-08-04  Michal Nazarewicz  <mina86@mina86.com>
 +
 +      * lisp/mpc.el: Support password in host argument.
 +      (mpc--proc-connect): Parse and use new password element.
 +      Set mpc-proc variable instead of returning process.
 +      (mpc-proc): Adjust accordingly.
 +
 +2012-08-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * whitespace.el (whitespace-display-mappings): Use Unicode
 +      codepoints, instead of emacs-mule codepoints.  See
 +      http://lists.gnu.org/archive/html/help-gnu-emacs/2012-07/msg00366.html
 +      for the details.
 +
 +      * files.el (file-truename): Don't skip symlink-chasing part on
 +      windows-nt.  Incorporate the resolution of 8+3 short aliases on
 +      Windows into the loop that recursively chases symlinks.
 +      Compare directory and its parent case-insensitively on MS-Windows and
 +      MS-DOS.
 +
 +2012-08-03  Chong Yidong  <cyd@gnu.org>
 +
 +      * menu-bar.el (menu-bar-tools-menu): Remove PCL-CVS.
 +
 +      * sort.el (sort-regexp-fields): Doc fix.
 +
 +2012-08-03  Tassilo Horn  <tsdh@gnu.org>
 +
 +      * textmodes/reftex.el (reftex-compile-variables): Make keyvals
 +      labels regex position point at the expected place.
 +
 +2012-08-03  MON KEY  <monkey@sandpframing.com>
 +
 +      * net/imap.el (imap-interactive-login, imap-authenticate)
 +      (imap-mailbox-lsub, imap-mailbox-list)
 +      (imap-mailbox-status-asynch, imap-mailbox-acl-delete)
 +      (imap-fetch, imap-message-flag-permanent-p, imap-envelope-from)
 +      (imap-parse-response): Doc fix.
 +
 +2012-08-03  João Távora  <joaotavora@gmail.com>
 +
 +      * textmodes/tex-mode.el (latex-forward-sexp): Terminate the loop
 +      if sexp scanning does not move point (Bug#5734).
 +
 +2012-08-02  Tassilo Horn  <tsdh@gnu.org>
 +
 +      * textmodes/reftex-vars.el (reftex-default-label-alist-entries):
 +      Add listings, minted, and ctable packages.
 +      (reftex-label-alist-builtin): Move listings, minted, and ctable
 +      entries before LaTeX.
 +      (reftex-label-alist): Docfix.
 +
 +2012-08-02  Bastien Guerry  <bzg@gnu.org>
 +
 +      * replace.el (occur): Fix docstring (bug#12122).
 +
 +2012-08-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/authors.el (authors-renamed-files-alist): Add ms-w32.h.
 +
 +2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Obsolete alias inactivate-current-input-method-function (Bug#10150).
 +      * international/mule-cmds.el: Create
 +      inactivate-current-input-method-function as an obsolete alias for
 +      deactivate-current-input-method-function.  See Katsumi Yamaoka in
 +      <http://bugs.gnu.org/10150#46>.
 +
 +2012-08-01  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-mode.el (calc-set-simplify-mode): Use `cond' instead
 +      of nested `if's.
 +
 +2012-08-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/autoconf.el (autoconf-definition-regexp):
 +      Add AH_TEMPLATE, adjust submatch numbering.
 +      (autoconf-font-lock-keywords, autoconf-imenu-generic-expression)
 +      (autoconf-current-defun-function): Update for above change.
 +      (autoconf-current-defun-function): First skip to end of current word.
 +
 +2012-08-01  Rupert Swarbrick  <rswarbrick@gmail.com>  (tiny change)
 +
 +      * calendar/cal-html.el (cal-html-insert-agenda-days):
 +      Fix typo.  (Bug#12018)
 +
 +2012-07-31  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      Shell processes: enhancements to startup and CEDET compatibility.
 +      * progmodes/python.el (python-shell-send-setup-max-wait): Delete var.
 +      (python-shell-make-comint): accept-process-output at startup.
 +      (run-python-internal): Set inferior-python-mode-hook to nil.
 +      (python-shell-internal-get-or-create-process): call sit-for.
 +      (python-preoutput-result): Add obsolete alias.
 +      (python-shell-internal-send-string): Use it.
 +      (python-shell-send-setup-code): Remove call to
 +      accept-process-output.
 +
 +2012-07-31  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * buff-menu.el (list-buffers-noselect): Use prefix-numeric-value.
 +      (Bug#12108)
 +
 +2012-07-31  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc-mode.el (calc-basic-simplification-mode): Rename from
 +      `calc-limited-simplification-mode'.
 +      (calc-alg-simplification-mode): New function.
 +      (calc-set-simplify-mode): Adjust message.
 +
 +      * calc.el (calc-set-mode-line): Adjust mode line display for
 +      basic simplification mode.
 +
 +      * calc-help.el (calc-m-prefix-help): Update help message.
 +
 +      * calc-ext.el (calc-init-extensions): Add bindings and autoloads
 +      for `calc-basic-simplify-mode' and `calc-alg-simplify-mode'.
 +
 +2012-07-31  Bastien Guerry  <bzg@gnu.org>
 +
 +      * man.el (man): Fix comment.  (bug#12101)
 +
 +2012-07-31  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (switch-to-prev-buffer, switch-to-next-buffer):
 +      Don't return a non-nil value when no suitable buffer was found.
 +
 +2012-07-31  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el (run-python-internal): Disable font lock for
 +      internal shells.
 +
 +2012-07-30  Stefan Merten  <smerten@oekonux.de>
 +
 +      * rst.el: Silence `checkdoc-ispell'.
 +      (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
 +      (rst-official-version, rst-official-cvs-rev)
 +      (rst-package-emacs-version-alist): Update to upstream V1.3.1.
 +      (rst-mode-map): New key binding.
 +
 +2012-07-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Update .PHONY listings in makefiles.
 +      * Makefile.in (.PHONY): Add all, doit, custom-deps, finder-data,
 +      autoloads, update-subdirs, updates, bzr-update, update-authors,
 +      compile-onefile, compile-calc, backup-compiled-files,
 +      compile-after-backup, compile-one-process, mh-autoloads,
 +      bootstrap-clean, distclean, maintainer-clean.
 +
 +2012-07-29  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc.el (calc-simplify-mode): Make 'alg the default value.
 +      (calc-set-mode-line): Don't display "AlgSimp ".
 +
 +      * calc/calc-mode.el (calc-alg-simplify-mode): Remove function.
 +      (calc-lim-simplify-mode): New function.
 +      (calc-set-simplify-mode): Default to 'alg.
 +      (calc-default-simplify-mode): Make algebraic simplifications
 +      the default.
 +
 +      * calc/calc-ext.el (calc-init-extensions): Remove binding for
 +      `calc-alg-simplify-mode'.  Add binding for `calc-lim-simplify-mode'.
 +
 +      * calc/calc-help.el (calc-m-prefix-help): Change messages to
 +      indicate new simplification modes.
 +
 +      * calc/README: Mention new default simplification mode.
 +
 +      * calc/calc.el (math-normalize-error): New variable.
 +      (math-normalize): Set `math-normalize-error' to t
 +      when there's an error.
 +
 +      * calc/calc-alg.el (math-simplify): Don't simplify when
 +      `math-normalize' returns an error.
 +
 +2012-07-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/mule-cmds.el (set-locale-environment): Revert last
 +      change, since display-graphic-p returns nil when this function is
 +      called during startup.  Instead...
 +
 +      * term/w32console.el (terminal-init-w32console): ...setup the
 +      keyboard and terminal encoding for TTY sessions here.  (Bug#12082)
 +
 +2012-07-29  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (goto-line): Don't display default line number in the
 +      prompt because it should be displayed by `read-number' (bug#9952).
 +      Add the current line number to the defaults of `goto-line' to
 +      allow its easier modification by users with `M-n' (bug#9201).
 +
 +      * subr.el (read-number): Support multiple default values like in
 +      other minibuffer reading functions.  Replace `read' with
 +      `string-to-number' for consistency with `number-to-string'.
 +
 +2012-07-29  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      deactive->inactive, inactivate->deactivate spelling fixes (Bug#10150)
 +      * emulation/viper-init.el (viper-deactivate-input-method-action):
 +      Rename from viper-inactivate-input-method-action.
 +      (viper-deactivate-input-method):
 +      Rename from viper-inactivate-input-method.
 +      * follow.el (follow-inactive-menu): Rename from follow-deactive-menu.
 +      * international/mule-cmds.el (deactivate-input-method):
 +      Rename from inactivate-input-method.
 +      Also run input-method-deactivate-hook.
 +      (deactivate-current-input-method-function):
 +      Rename from inactivate-current-input-method-function.
 +      (input-method-deactivate-hook): New hook.
 +      (input-method-inactivate-hook): Mark obsolete.
 +      (inactivate-input-method): Mark obsolete.
 +
 +      * international/quail.el (quail-activate):
 +      Also run quail-deactivate-hook.
 +      (quail-deactivate): Rename from quail-inactivate.
 +      * international/robin.el (robin-activate):
 +      Also run robin-deactivate-hook.
 +      (robin-deactivate): Rename from robin-inactivate.
 +
 +2012-07-29  Chong Yidong  <cyd@gnu.org>
 +
 +      * simple.el (indicate-copied-region): New function.
 +      (kill-ring-save): Split off from here.
 +
 +      * rect.el (copy-rectangle-as-kill): Call indicate-copied-region.
 +      (kill-rectangle): Set deactivate-mark to t on read-only error.
 +
 +      * register.el (copy-to-register, copy-rectangle-to-register):
 +      Deactivate the mark, and use indicate-copied-region (Bug#10056).
 +      (append-to-register, prepend-to-register):
 +      Call 2012-07-29  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (async-shell-command-buffer): New defcustom.
 +      (shell-command): Use it.  (Bug#4719)
 +
 +2012-07-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/mule-cmds.el (set-locale-environment): In a
 +      console session on MS-Windows, set up keyboard and terminal
 +      encoding from the OEM codepage, not the ANSI codepage.
 +      (Bug#12055)
 +
 +2012-07-28  Chong Yidong  <cyd@gnu.org>
 +
 +      * progmodes/gdb-mi.el (gdb-place-breakpoints): Fix the call to
 +      gdb-get-location.
 +
 +2012-07-28  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in
 +      the alist (bug#12029).
 +
 +2012-07-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (custom-deps, finder-data, updates, compile)
 +      (compile-always, compile-first)
 +      ($(lisp)/calendar/cal-loaddefs.el)
 +      ($(lisp)/calendar/diary-loaddefs.el)
 +      ($(lisp)/calendar/hol-loaddefs.el, $(lisp)/mh-e/mh-loaddefs.el)
 +      ($(lisp)/net/tramp-loaddefs.el, bootstrap)
 +      ($(lisp)/progmodes/cc-mode.elc): Depend on $(lisp)subdirs.el,
 +      instead of on update-subdirs.
 +      (bootstrap-clean): Delete $(lisp)/subdirs.el.
 +
 +2012-07-28  Chong Yidong  <cyd@gnu.org>
 +
 +      * vc/vc.el (vc-root-diff, vc-print-root-log): Prompt for a
 +      directory if vc-deduce-backend returns nil (Bug#7350).
 +
 +      * simple.el (delete-trailing-lines): New option.
 +      (delete-trailing-whitespace): Obey it (Bug#11879).
 +
 +2012-07-28  David Engster  <deng@randomsample.de>
 +
 +      * xml.el (xml-node-name, xml-parse-file, xml-parse-region):
 +      Explanation of new 'symbol-qnames feature in doc-strings.
 +      (xml-maybe-do-ns): Return expanded names as plain symbols if
 +      'symbol-qnames was provided in XML-NS argument (Bug#11916).
 +      (xml-parse-tag-1): Deal with new definition of PARSE-NS argument.
 +
 +2012-07-27  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      Consistent completion in inferior python with emacs -nw.
 +      * progmodes/python.el (inferior-python-mode): replace "<tab>"
 +      binding in inferior-python-mode-map with "\t".
 +      (python-shell-completion-complete-at-point)
 +      (python-completion-complete-at-point): Remove interactive spec.
 +
 +2012-07-27  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calccomp.el (math-compose-expr): Undo previous change.
 +
 +2012-07-27  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el (python-mode-map): Add keybinding for
 +      run-python.
 +      (python-shell-make-comint): Fix pop-to-buffer call.
 +      (run-python): Autoload.  New arg SHOW.
 +      (python-shell-get-or-create-process): Do not pop python process
 +      buffer.
 +
 +2012-07-27  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * notifications.el (notifications-on-action-signal)
 +      (notifications-on-closed-signal): Use also the bus address for the map.
 +      (notifications-notify, notifications-close-notification)
 +      (notifications-get-capabilities): Add optional argument BUS.
 +
 +2012-07-27  Tassilo Horn  <tsdh@gnu.org>
 +
 +      * textmodes/reftex-vars.el (reftex-label-alist-builtin):
 +      Add support for the lstlisting and minted environments, and for the
 +      ctable macro.
 +      * textmodes/reftex.el (reftex-compile-variables): Also recognize
 +      labels written in keyvals syntax.
 +
 +2012-07-27  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calccomp.el (math-compose-expr): Use parentheses when
 +      there is a product in the denominator of a fraction.
 +
 +2012-07-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in ($(lisp)/calendar/cal-loaddefs.el)
 +      ($(lisp)/calendar/diary-loaddefs.el)
 +      ($(lisp)/calendar/hol-loaddefs.el, $(lisp)/mh-e/mh-loaddefs.el)
 +      ($(lisp)/net/tramp-loaddefs.el): Depend on update-subdirs.
 +      Fixes failures in parallel bootstrap because subdirs.el is being
 +      rewritten while the autoload files are built at the same time,
 +      which needs to load subdirs.el.
 +
 +2012-07-26  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * mouse.el (popup-menu): Fix doc-string and re-indent code.
 +      (mouse-drag-line): Don't exit tracking when a switch-frame or
 +      switch-window event occurs (Bug#12006).
 +
 +2012-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * mouse.el (popup-menu): Fix last change.
 +
 +2012-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Autoload from Lisp with more care.  Follow aliases when looking for
 +      function properties.
 +      * subr.el (autoloadp): New function.
 +      (symbol-file): Use it.
 +      (function-get): New function.
 +      * emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
 +      autoload-do-load.
 +      * emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
 +      (lisp-indent-function):
 +      * emacs-lisp/gv.el (gv-get):
 +      * emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
 +      * emacs-lisp/byte-opt.el (byte-optimize-form):
 +      * emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
 +      * emacs-lisp/autoload.el (make-autoload, autoload-print-form):
 +      Use function-get.
 +      * emacs-lisp/cl.el: Don't propagate function properties any more.
 +
 +      * speedbar.el (speedbar-add-localized-speedbar-support):
 +      * emacs-lisp/disass.el (disassemble-internal):
 +      * desktop.el (desktop-load-file):
 +      * help-fns.el (help-function-arglist, find-lisp-object-file-name)
 +      (describe-function-1):
 +      * emacs-lisp/find-func.el (find-function-noselect):
 +      * emacs-lisp/elp.el (elp-instrument-function):
 +      * emacs-lisp/advice.el (ad-has-proper-definition):
 +      * apropos.el (apropos-safe-documentation, apropos-macrop):
 +      * emacs-lisp/debug.el (debug-on-entry):
 +      * emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
 +      * emacs-lisp/byte-opt.el (byte-compile-inline-expand):
 +      * calc/calc.el (name): Use autoloadp & autoload-do-load.
 +
 +2012-07-25  Alp Aker  <alp.tekin.aker@gmail.com>
 +
 +      * international/mule-cmds.el (ucs-insert): Mark it as an obsolete
 +      function, not an obsolete variable (Bug#12046).
 +
 +2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * faces.el (face-spec-reset-face): Fix last change.  (Bug#12042)
 +
 +2012-07-25  Christopher Schmidt  <christopher@ch.ristopher.com>
 +
 +      * emacs-lisp/pp.el (pp-display-expression): Select old selected
 +      window only if it is still live (Bug#12034).
 +
 +2012-07-25  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * subr.el (redirect-frame-focus): Add advertised calling
 +      convention (Bug#12030).
 +
 +2012-07-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Prefer typical American spelling for "acknowledgment".
 +      * vc/add-log.el (change-log-acknowledgment): Rename from
 +      change-log-acknowledgement, with an alias for the old name.
 +
 +2012-07-25  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc-alg.el (math-simplify-divide): Don't cross multiply
 +      in an equation when the lhs is a variable.
 +
 +2012-07-24  Julien Danjou  <julien@danjou.info>
 +
 +      * net/netrc.el (netrc-find-service-number, netrc-store-data):
 +      Remove, unused.
 +
 +2012-07-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * startup.el (command-line): Don't display an empty user name in
 +      the error message about non-existent home directory, when
 +      init-file-user was set to an empty string.  See
 +      http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00835.html
 +      for the details and context.
 +
 +2012-07-22  Vincent Belaïche  <vincentb1@users.sourceforge.net>
 +
 +      * ses.el (ses-cell-formula-aset): New macro.
 +      (ses-cell-references-aset): New macro.
 +      (ses-cell-p): New function.
 +      (ses-rename-cell): Do no longer rely on complex operations like
 +      ses-cell-set-formula or ses-set-cell to change the cell and handle
 +      the undo at the same time, but rather use lower level new macros
 +      `ses-cell-formula-aset' and `ses-cell-references-aset' and handle
 +      the undo directly.  Refresh the mode line.
 +
 +2012-07-21  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/cc-cmds.el (c-defun-name):
 +      Use match-string-no-properties instead for consistency.
 +
 +2012-07-20  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/cc-cmds.el (c-defun-name): Handle objc selectors properly.
 +      (Bug#7879)
 +
 +      * progmodes/cc-langs.el (c-symbol-start): Include char _ (bug#11986).
 +
 +2012-07-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package.
 +      * progmodes/bug-reference.el, misearch.el: Provide themselves
 +      (bug#11915).
 +
 +      * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
 +      of narrowed buffer (bug#11966).
 +
 +2012-07-20  Vincent Belaïche  <vincentb1@users.sourceforge.net>
 +
 +      * ses.el (ses-rename-cell): Set new name also in reference list of
 +      cells of which the renamed cell depends.
 +
 +2012-07-20  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * term/x-win.el (x-menu-bar-open): Use `frame-parameter'
 +      to check whether menu-bar is shown or not.  If not shown,
 +      show the menu-bar as a popup menu instead of using tmm.
 +      * mouse.el (popup-menu): Accept `point' as `position' argument.
 +
 +2012-07-20  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el (ruby-parse-partial): No error when end
 +      up inside string symbol literal (bug#11923).
 +
 +2012-07-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * startup.el (fancy-startup-text): Read the whole tutorial, not
 +      just its first 256 bytes.  Prevents gibberish in display of the
 +      tutorial title.
 +
 +2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Drop idle buffer compaction due to an absence of the
 +      proved efficiency.
 +      * compact.el: Remove.
 +
 +2012-07-19  Sam Steingold  <sds@gnu.org>
 +
 +      * vc/vc-dispatcher.el (vc-compilation-mode): Add, based on
 +      vc-bzr-pull & vc-bzr-merge-branch.
 +      * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): Use it.
 +      (vc-bzr-error-regexp-alist): Rename from vc-bzr-error-regex-alist
 +      for consistency with compilation-error-regexp-alist.
 +      * vc/vc-git.el (vc-git-error-regexp-alist): Add.
 +      (vc-git-pull, vc-git-merge-branch): Call vc-compilation-mode.
 +      * vc/vc-hg.el (vc-hg-error-regexp-alist): Add.
 +      (vc-hg-pull, vc-hg-merge-branch): Call vc-compilation-mode.
 +
 +2012-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/chart.el: Use lexical-binding.
 +      (chart-emacs-storage): Don't hardcode the list of entries.
 +
 +2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Next round of tweaks caused by Fgarbage_collect changes.
 +      * emacs-lisp/chart.el (chart-emacs-storage): Adjust again.
 +
 +2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Compact buffers when idle.
 +      * compact.el: New file.
 +
 +2012-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (eventp): Presume that if it looks vaguely like an event,
 +      it's an event (bug#10190).
 +
 +2012-07-19  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      Enhancements to ppss related code (thanks Stefan).
 +      * progmodes/python.el (python-indent-context)
 +      (python-indent-calculate-indentation, python-indent-dedent-line)
 +      (python-indent-electric-colon, python-nav-forward-block)
 +      (python-mode-abbrev-table)
 +      (python-info-assignment-continuation-line-p): Simplify checks
 +      for ppss context.
 +      (python-info-continuation-line-p): Cleanup.
 +      (python-info-ppss-context): Do not catch 'quote.
 +      (python-info-ppss-context-type)
 +      (python-info-ppss-comment-or-string-p): Simplify.
 +
 +2012-07-18  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el: Enhancements to eldoc support.
 +      (python-info-current-symbol): New function.
 +      (python-eldoc-at-point): Use python-info-current-symbol.
 +      (python-info-current-defun): Fix cornercase on first defun scan.
 +      (python-eldoc--get-doc-at-point): Use python-info-current-symbol
 +      and signal error when no inferior python process is available.
 +
 +2012-07-18  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * vc/vc-git.el (vc-git-state): Don't call `vc-git-registered',
 +      assume it's always t.
 +      (vc-git-registered): Remove caching, the function is only called
 +      once.
 +      (vc-git-branches): Use `vc-git--call' instead of `call-process'.
 +
 +2012-07-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * subr.el (last-input-char, last-command-char): Remove (Bug#9195).
 +
 +      * simple.el (count-words): Report on narrowing (Bug#9959).
 +
 +      * bindings.el: Bind M-= to count-words.
 +
 +      * faces.el (face-spec-reset-face): Handle reverse video (Bug#4238).
 +
 +2012-07-18  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * progmodes/sh-script.el (sh-imenu-generic-expression):
 +      Capture a function with `function' keyword and without parentheses
 +      like "function FOO" (bug#11856).
 +
 +2012-07-18  Tassilo Horn  <tassilo@member.fsf.org>
 +
 +      * window.el (split-window-sensibly): Make WINDOW argument
 +      optional.
 +
 +2012-07-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * subr.el (keyboard-translate): Doc fix (Bug#7261).
 +
 +      * isearch.el (isearch-mode-map): Handle C-x 8 key translations,
 +      and make C-x 8 RET exit isearch (Bug#11439).
 +
 +      * international/iso-transl.el: Move isearch-mode-map key
 +      definitions to isearch.el.
 +
 +2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/eieio.el: Adapt further to gv.el (bug#11970).
 +      (eieio-defclass): Use gv-define-setter when possible.
 +
 +2012-07-18  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Reflect recent changes in Fgarbage_collect.
 +      * emacs-lisp/chart.el (chart-emacs-storage): Change to
 +      reflect new format of data returned by Fgarbage_collect.
 +
 +2012-07-17  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      New utility functions + python-info-ppss-context fix (Bug#11910).
 +      * progmodes/python.el (python-info-beginning-of-block-statement-p)
 +      (python-info-ppss-comment-or-string-p): New functions.
 +      (python-info-ppss-context): Small fix for string check.
 +
 +2012-07-17  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-aux.el (dired-do-async-shell-command): Doc fix.
 +      (dired-do-async-shell-command): Don't add `*' at the end of the
 +      command (Bug#11815).
 +      (dired-do-shell-command): Doc fix.
 +      (dired-shell-stuff-it): Strip the trailing "&" and ";" if any.
 +      Join the individual commands using either "&" or ";" as the
 +      separator depending on the values of these trailing characters.
 +      At the end re-add the trailing "&".  (Bug#10598)
 +
 +      * simple.el (async-shell-command): Sync the interactive spec with
 +      `shell-command'.  Doc fix.
 +      (shell-command): Doc fix.
 +
 +2012-07-17  Juri Linkov  <juri@jurta.org>
 +
 +      * descr-text.el (describe-char): Fix format args.  (Bug#10129)
 +
 +2012-07-17  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      Final renames and doc fixes for movement commands (bug#11899).
 +      * progmodes/python.el (python-nav-beginning-of-statement):
 +      Rename from python-nav-statement-start.
 +      (python-nav-end-of-statement): Rename from
 +      python-nav-statement-end.
 +      (python-nav-beginning-of-block): Rename from
 +      python-nav-block-start.
 +      (python-nav-end-of-block): Rename from python-nav-block-end.
 +
 +2012-07-17  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el (python-shell-send-string-no-output):
 +      Allow accept-process-output to quit, keeping shell process ready for
 +      future interactions (Bug#11868).
 +
 +2012-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name.
 +
 +      * emacs-lisp/elint.el (elint-find-args-in-code):
 +      Use help-function-arglist, so as to handle lexical byte-code.
 +
 +      * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last
 +      change (bug#11826).
 +
 +2012-07-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/cc-engine.el (c-forward-sws, c-backward-sws):
 +      Avoid spuriously marking the buffer as modified because of c-is-sws.
 +
 +      * progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
 +      as not-a-comment (bug#11946).
 +
 +      * emacs-lisp/macroexp.el (macroexp-let2): Use more informative names
 +      for uninterned vars.
 +
 +      * xt-mouse.el (xterm-mouse-translate-1, xterm-mouse-event-read):
 +      Use read-event since we don't really want to read chars but bytes.
 +
 +      * textmodes/tex-mode.el (tex-font-lock-keywords-1): Highlight not only
 +      $$..$$ but also $..$ using regexps (bug#11953).
 +      Use tex-verbatim for \url and \path.
 +      (tex-font-lock-keywords): Define as defconst like the others.
 +      (tex-common-initialization): Don't use font-lock-syntax-table any more.
 +
 +2012-07-16  René Kyllingstad  <Rene@Kyllingstad.com>  (tiny change)
 +
 +      * international/mule-cmds.el (ucs-insert): Make it an obsolete
 +      alias for insert-char.
 +
 +2012-07-16  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el: Simplified imenu implementation.
 +      (python-nav-jump-to-defun): Remove command.
 +      (python-mode-map): Use `imenu' instead.
 +      (python-nav-list-defun-positions-cache)
 +      (python-imenu-include-defun-type, python-imenu-make-tree)
 +      (python-imenu-subtree-root-label, python-imenu-index-alist):
 +      Remove vars.
 +      (python-nav-list-defun-positions, python-nav-read-defun)
 +      (python-imenu-tree-assoc, python-imenu-make-element-tree)
 +      (python-imenu-make-tree, python-imenu-create-index):
 +      Remove functions.
 +      (python-mode): Update to interact with imenu by setting
 +      `imenu-extract-index-name-function' only.
 +
 +2012-07-16  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el: Enhancements to navigation commands.
 +      (python-nav-backward-sentence)
 +      (python-nav-forward-sentence): Remove.
 +      (python-nav-backward-statement, python-nav-forward-statement)
 +      (python-nav-statement-start, python-nav-statement-end)
 +      (python-nav-backward-block, python-nav-forward-block)
 +      (python-nav-block-start, python-nav-block-end)
 +      (python-nav-forward-sexp-function)
 +      (python-info-current-line-comment-p)
 +      (python-info-current-line-empty-p): New functions.
 +      (python-indent-context): Use `python-nav-statement-start'.
 +
 +2012-07-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * eshell/em-ls.el (eshell/ls): Use `apply'.
 +
 +      * eshell/em-unix.el (eshell/su, eshell/sudo): Apply Tramp's ad-hoc
 +      multi-hops, instead of Tramp internals.
 +
 +      * vc/ediff.el (ediff-directories): Add trailing space to prompts.
 +
 +      * vc/ediff-diff.el (ediff-same-file-contents): Handle the case,
 +      when F1 and F2 are located on different hosts.
 +
 +2012-07-14  Chong Yidong  <cyd@gnu.org>
 +
 +      * xt-mouse.el: Implement extended mouse coordinates (Bug#10642).
 +      (xterm-mouse-translate): Move code into xterm-mouse-translate-1.
 +      (xterm-mouse-translate-extended, xterm-mouse-translate-1)
 +      (xterm-mouse--read-event-sequence-1000)
 +      (xterm-mouse--read-event-sequence-1006): New functions.  For old
 +      mouse protocol, handle M-mouse-X events correctly.
 +      (xterm-mouse-event): New arg specifying mouse protocol.
 +      (turn-on-xterm-mouse-tracking-on-terminal)
 +      (turn-off-xterm-mouse-tracking-on-terminal): Send DEC 1006
 +      sequence to toggle extended coordinates on newer XTerms.
 +      This appears to be harmless on terminals which do not support this.
 +
 +2012-07-14  Leo Liu  <sdl.web@gmail.com>
 +
 +      Add fringe bitmap indicators for flymake.  (Bug#11253)
 +      * progmodes/flymake.el (flymake-highlight-line): Use fringe bitmaps.
 +      (flymake-make-overlay): New arg BITMAP.
 +      (flymake-error-bitmap, flymake-warning-bitmap)
 +      (flymake-fringe-indicator-position): New user variables.
 +
 +      * fringe.el: New bitmap exclamation-mark.
 +
 +2012-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * progmodes/cc-cmds.el (c-defun-name): Recognize Objective-C methods
 +      also (Bug#7879).
 +
 +2012-07-14  Chong Yidong  <cyd@gnu.org>
 +
 +      * electric.el (electric-pair-post-self-insert-function): Fix pair
 +      insertion in empty-region case (Bug#11520).
 +
 +2012-07-14  Chong Yidong  <cyd@gnu.org>
 +
 +      * bindings.el: Consolidate ctl-x-r-map bindings.
 +      Bind copy-rectangle-as-kill to C-x r w.
 +
 +      * rect.el, register.el: Move bindings to bindings.el.
 +
 +2012-07-14  Reuben Thomas  <rrt@sc3d.org>
 +
 +      * rect.el (copy-rectangle-as-kill): New command (Bug#739).
 +
 +2012-07-13  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs-lisp/cl.el (labels): Remove spurious quote.  (Bug#11938)
 +
 +2012-07-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * bindings.el (top): Use `mapc' instead of `mapcar'.
 +
 +      * loadup.el (top): Remove bogus `if' choice (brought by 2008-06-21T01:38:39Z!monnier@iro.umontreal.ca).
 +
 +2012-07-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * progmodes/sql.el (sql-comint): Suppress the check for program on
 +      remote hosts.  Reported by Francis Devereux <francis@devrx.org>.
 +      (Bug#11908)
 +
 +2012-07-13  Chong Yidong  <cyd@gnu.org>
 +
 +      * bindings.el: Assign a non-nil permanent-local property to
 +      per-buffer variables which lack a default value (Bug#11930).
 +
 +      * help-fns.el (describe-variable): In the "automatically becomes
 +      local" notice, take note of permanent-local variables.
 +
 +2012-07-13  Chong Yidong  <cyd@gnu.org>
 +
 +      * files.el (toggle-read-only): Doc fix and code cleanup.  New arg
 +      to allow printing the message when called from Lisp.
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
 +      Remove toggle-read-only.
 +
 +      * bs.el (bs-toggle-readonly):
 +      * buff-menu.el (Buffer-menu-toggle-read-only):
 +      Remove with-no-warnings around toggle-read-only.
 +
 +      * ffap.el (ffap--toggle-read-only): Accept a list of buffers.
 +      Remove with-no-warnings around toggle-read-only.
 +      (ffap-read-only, ffap-read-only-other-window)
 +      (ffap-read-only-other-frame): Callers changed.
 +
 +      * help-mode.el: Don't require view package.
 +      (help-mode-finish): Set buffer-read-only instead of calling
 +      toggle-read-only.
 +
 +      * bindings.el (mode-line-toggle-read-only):
 +      * dired.el (dired-toggle-read-only):
 +      * ibuffer.el (ibuffer-do-toggle-read-only): Call toggle-read-only
 +      with non-nil second arg.
 +
 +      * emacs-lisp/eieio-custom.el (eieio-customize-object):
 +      * vc/ediff.el (ediff-set-read-only-in-buf-A): Set buffer-read-only
 +      directly.
 +
 +2012-07-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * emacs-lisp/bytecomp.el (byte-recompile-directory): Use cl-incf,
 +      not incf.
 +
 +2012-07-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      More CL cleanups and reduction of use of cl.el.
 +      * woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
 +      * vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
 +      * textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
 +      * strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
 +      * progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
 +      * play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
 +      * play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
 +      * net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
 +      * image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
 +      * eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
 +      * eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
 +      * eshell/em-cmpl.el, eshell/em-banner.el:
 +      * calendar/parse-time.el: Use cl-lib.
 +      * wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
 +      * vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
 +      * textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
 +      * term/ns-win.el, term.el, shell.el, ps-samp.el:
 +      * progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
 +      * progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
 +      * play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
 +      * net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
 +      * net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
 +      * mail/mailheader.el, mail/feedmail.el: Don't use CL.
 +      * ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
 +      * eshell/esh-opt.el (eshell-eval-using-options): Quote code with
 +      `lambda' rather than with `quote'.
 +      (eshell-do-opt): Adjust accordingly.
 +      (eshell-process-option): Simplify.
 +      * eshell/esh-var.el:
 +      * eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
 +      * emacs-lisp/pcase.el (pcase--dontcare-upats, pcase--let*)
 +      (pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
 +      to `pcase--dontcare'.
 +      * emacs-lisp/cl.el (labels): Mark obsolete.
 +      (cl--letf, letf): Move to cl-lib.
 +      (cl--letf*, letf*): Remove.
 +      * emacs-lisp/cl-lib.el (cl-nth-value): Use defalias.
 +      * emacs-lisp/cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
 +      (cl-progv): Rewrite.
 +      (cl--letf, cl-letf): Move from cl.el.
 +      (cl-letf*): New macro.
 +      * emacs-lisp/cl-extra.el (cl--progv-before, cl--progv-after): Remove.
 +
 +2012-07-11  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/ange-ftp.el (ange-ftp-cf1): Update the files cache.
 +
 +2012-07-11  Chong Yidong  <cyd@gnu.org>
 +
 +      * vc/log-edit.el (log-edit-vc-backend): New variable.
 +      (log-edit): Doc fix.
 +
 +      * vc/vc-dispatcher.el (vc-log-edit): New args.  Use PARAMS
 +      argument of log-edit to set up all local variables.
 +      (vc-start-logentry): New optional arg specifying VC backend.
 +
 +      * vc/vc.el (vc-checkin): Use it.
 +      (vc-deduce-fileset): Handle Log Edit buffers.
 +      (vc-diff): Make first argument optional too.
 +
 +      * vc/log-view.el (log-view-vc-fileset, log-view-vc-backend): Doc fix.
 +
 +2012-07-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * eshell/esh-ext.el (eshell-remote-command): Remove remote part of
 +      command, just in case.  The function is not needed anymore.
 +      (eshell-external-command): Do not call `eshell-remote-command'.
 +
 +2012-07-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Reduce use of (require 'cl).
 +      * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el:
 +      * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el:
 +      * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el:
 +      * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el:
 +      * international/quail.el, info-xref.el, imenu.el, image-mode.el:
 +      * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el:
 +      * battery.el, avoid.el, abbrev.el: Use cl-lib.
 +      * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el:
 +      * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el:
 +      * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el:
 +      * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el:
 +      * calculator.el, autorevert.el, apropos.el: Don't require CL.
 +      * emacs-lisp/bytecomp.el (byte-recompile-directory, display-call-tree)
 +      (byte-compile-unfold-bcf, byte-compile-check-variable):
 +      * emacs-lisp/byte-opt.el (byte-compile-trueconstp)
 +      (byte-compile-nilconstp):
 +      * emacs-lisp/autoload.el (make-autoload): Use pcase.
 +      * face-remap.el (text-scale-adjust): Simplify pcase patterns.
 +
 +      * emacs-lisp/gv.el (cond): Make it a valid place.
 +      (if): Simplify slightly.
 +
 +      * emacs-lisp/pcase.el (pcase): Accept self-quoting exps as "upatterns".
 +      (pcase--self-quoting-p): New function.
 +      (pcase--u1): Use it.
 +
 +2012-07-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/authors.el (authors-fixed-entries):
 +      (authors-renamed-files-alist): Update for configure.in -> configure.ac.
 +
 +2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Rename configure.in to configure.ac (Bug#11603).
 +      * emacs-lisp/authors.el (authors-canonical-file-name):
 +      * progmodes/autoconf.el (autoconf-mode):
 +      Prefer configure.ac to configure.in.
 +
 +2012-07-08  Chong Yidong  <cyd@gnu.org>
 +
 +      * mouse.el (mouse-drag-line): Rewrite the track-mouse loop.
 +      Implement the mouse-1-click-follows-link handling properly.
 +
 +      * info.el (Info-link-keymap): Use follow-link mechanism for
 +      header-line links (Bug#374).
 +
 +      * simple.el (deactivate-mark): Do not set the primary selection
 +      if another program has acquired it (Bug#11772).
 +
 +2012-07-07  Kevin Ryde  <user42@zip.com.au>
 +
 +      * woman.el (woman-strings): Fix double-quote handling (Bug#1151).
 +      (woman-decode-region): Replace escaped-escapes without destroying
 +      bold or underline (Bug#11552).
 +      (woman2-process-escapes): Handle nofill regions (Bug#11591).
 +
 +2012-07-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * simple.el (yank-pop-change-selection): Doc fix (Bug#11361).
 +      (interprogram-cut-function, interprogram-paste-function):
 +      Mention that we typically mean the clipboard.
 +
 +2012-07-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * kmacro.el (kmacro-call-macro): Restore repeat message.  (Bug#11817)
 +
 +      * files.el (toggle-read-only): Restrict message to interactive use.
 +
 +2012-07-06  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-restricted-shell-hosts-alist): New defcustom.
 +
 +      * net/tramp-sh.el (tramp-maybe-open-connection): Handle it.
 +
 +2012-07-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (compile-one-process): Rename from "recompile".
 +
 +      * Makefile.in (bzr-update): "compile" is the same as "recompile
 +      autoloads", but parallelizable, so use that instead.
 +
 +2012-07-06  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * window.el (quit-window): Always restore window height when
 +      it's saved in quit-restore parameter (Bug#11810).
 +
 +2012-07-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * simple.el (kill-whole-line): Doc tweak.
 +
 +2012-07-06  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.el (file-relative-name): Compare file names
 +      case-insensitively if on MS-Windows or MS-DOS, or if
 +      read-file-name-completion-ignore-case is non-nil.  Don't use
 +      case-fold-search for this purpose.  (Bug#11827)
 +
 +2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * calendar/cal-dst.el (calendar-current-time-zone):
 +      Return calendar-current-time-zone-cache if non-nil.
 +
 +2012-07-17  Masatake YAMATO  <yamato@redhat.com>
 +2012-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * calendar/cal-dst.el (calendar-current-time-zone):
 +      Return calendar-current-time-zone-cache if non-nil.
 +
 +2012-07-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (cvs-update): Remove old alias.
 +
 +2012-07-05  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Sync with Tramp 2.2.6-pre.
 +
 +      * net/tramp.el (tramp-drop-volume-letter): Provide an XEmacs
 +      compatible declaration.
 +
 +      * net/tramp-cmds.el (tramp-append-tramp-buffers):
 +      Protect `list-load-path-shadows' call.
 +
 +      * net/tramp-compat.el (top): Require packages, which aren't
 +      autoloaded anymore for XEmacs.  Protect call of
 +      `tramp-file-name-handler' by `tramp-compat-funcall', pacifying the
 +      compiler.  Do not require tramp-util.el and tramp-vc.el anymore,
 +      it hurts at least for SXEmacs.
 +      (tramp-compat-temporary-file-directory): In XEmacs, there is no
 +      standard-value for `temporary-file-directory'.
 +
 +      * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
 +      Redirect stderr to /dev/null.
 +      (tramp-sh-handle-write-region): uid and gid can be floats.
 +      Reported by Russell Sim <russell.sim@gmail.com>.
 +      (tramp-sh-handle-vc-registered): Hide errors.
 +      (tramp-vc-file-name-handler): Use dummy results for `process-file'
 +      and `start-file-process'.
 +      (tramp-maybe-open-connection): Check also whether `non-essential'
 +      is bound.
 +
 +2012-07-04  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el (xml--parse-buffer): Use xml-syntax-table.
 +      (xml-parse-tag): Likewise, and avoid changing entity tables.
 +      (xml-syntax-table): Define from scratch, making sure not to give
 +      x2000 and other Unicode spaces whitespace syntax, since those are
 +      not spaces in XML.
 +      (xml-parse-fragment): Delete unused function.
 +      (xml-name-start-char-re, xml-name-char-re, xml-name-re)
 +      (xml-names-re, xml-nmtoken-re, xml-nmtokens-re, xml-char-ref-re)
 +      (xml-entity-ref, xml-pe-reference-re)
 +      (xml-reference-re,xml-att-value-re, xml-tokenized-type-re)
 +      (xml-notation-type-re, xml-enumeration-re, xml-enumerated-type-re)
 +      (xml-att-type-re, xml-default-decl-re, xml-att-def-re)
 +      (xml-entity-value-re): Use syntax references in regexps where
 +      possible; no need to define inside a let-binding.
 +      (xml-parse-dtd): Use xml-pe-reference-re.
 +      (xml-entity-or-char-ref-re): New defconst.
 +      (xml-parse-string, xml-substitute-special): Use it.
 +
 +2012-07-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.el (locate-dominating-file): Allow `name' to be a predicate.
 +      (find-file--read-only): New function.
 +      (find-file-read-only, find-file-read-only-other-window)
 +      (find-file-read-only-other-frame): Use it.
 +      (insert-file-contents-literally): Don't `fset'.
 +      (get-free-disk-space): Use locate-dominating-file.
 +
 +      * emacs-lisp/bytecomp.el (byte-compile): Don't signal an error if the
 +      function is already compiled.
 +
 +      * xml.el (xml-name-regexp): Remove, redundant.  Use xml-name-re.
 +
 +2012-07-03  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * vc/ediff-diff.el (ediff-same-file-contents): Fix it for remote
 +      files on the same host.
 +
 +2012-07-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * help-fns.el (describe-function-1): Only call
 +      help-fns--autoloaded-p when we have a file name.  (Bug#11848)
 +
 +2012-07-03  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el: Protect parser against XML bombs.
 +      (xml-entity-expansion-limit): New variable.
 +      (xml-parse-string, xml-substitute-special): Use it.
 +      (xml-parse-dtd): Avoid infloop if the DTD is not terminated.
 +
 +2012-07-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/bug-reference.el (bug-reference-bug-regexp):
 +      Allow linking to specific messages in debbugs reports (eg 123#5).
 +
 +2012-07-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el: Fix entity and character reference expansion, allowing
 +      them to expand into markup as per XML spec.
 +      (xml-default-ns): New variable.
 +      (xml-entity-alist): Use XML spec definitions for lt and amp.
 +      (xml-parse-region): Make first two arguments optional.
 +      Discard text properties.
 +      (xml-parse-tag-1): New function, spun off from xml-parse-tag.
 +      All callers changed.
 +      (xml-parse-tag): Call xml-parse-tag-1.  For backward
 +      compatibility, this function should not modify buffer contents.
 +      (xml-parse-tag-1): Fix opening-tag regexp.
 +      (xml-parse-string): Rewrite, handling entity and character
 +      references properly.
 +      (xml--entity-replacement-text): Signal an error if a parameter
 +      entity is undefined.
 +
 +2012-07-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * comint.el (comint-output-filter): Filter out repeated prompts.
 +
 +      * net/ange-ftp.el (ange-ftp-expand-file-name): Use ange-ftp-ftp-name
 +      and file-name-absolute-p.
 +      (ange-ftp-file-exists-p): Use ange-ftp-file-exists-p for
 +      internal calls.
 +
 +2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Spelling fixes.
 +      * emacs-lisp/bytecomp.el (byte-compile--reify-function):
 +      Rename from byte-compile--refiy-function.  All uses changed.
 +
 +2012-07-01  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el (xml--parse-buffer): New function.  Move most of
 +      xml-parse-region here.
 +      (xml-parse-region): Copy region into a temporary buffer, since
 +      parameter entity substitution requires changing buffer contents.
 +      Use xml--parse-buffer.
 +      (xml-parse-file): Use xml--parse-buffer.
 +      (xml-parse-dtd): Make parameter entity substitution work right.
 +      Use proper regexps for ELEMENT declarations (Bug#7172).
 +
 +2012-06-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * comint.el (follow-comint-scroll-to-bottom): Fix declaration.
 +
 +      * net/secrets.el, net/tramp-gvfs.el, net/xesam.el, net/zeroconf.el:
 +      Remove outdated and unnecessary dbus declarations.
 +
 +2012-06-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * emacs-lisp/timer.el (timer-until): Subtract results of
 +      float-time, instead of taking float-time of the result of
 +      time-subtract, since float-time signals an error for negative time
 +      arguments.
 +
 +2012-06-30  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el (xml-*-re): Convert defvars into defconsts, and
 +      eval-and-compile them so eval-and-compile works on derivatives.
 +      (xml--entity-replacement-text): Use eval-and-comple.
 +
 +2012-06-30  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * vc/vc-git.el (vc-git-registered): Use cache property
 +      `git-registered'.
 +      (vc-git-mode-line-string): Call `vc-working-revision' instead of
 +      `vc-git-working-revision' in order to benefit from the cache.
 +      (vc-git-root): Use cache property `git-root'.  (Bug#11757)
 +
 +2012-06-30  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * vc/vc-hooks.el (vc-before-save): Clear cache if file has been
 +      removed (likely outside Emacs).  (Bug#11757)
 +
 +2012-06-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el: Require macroexp.
 +
 +2012-06-30  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el: Implement XML parameter entities.
 +      (xml-parameter-entity-alist): New variable.
 +      (xml-parse-region, xml-parse-fragment): Preserve previous values
 +      of xml-entity-alist and xml-parameter-entity-alist, so that
 +      repeated calls on different documents do not change them.
 +      (xml-parse-tag): Fix doctype regexp.
 +      (xml--entity-replacement-text): New function.
 +      (xml-parse-dtd): Use it.  Don't handle system entities; doing that
 +      properly requires url retrieval which is unimplemented.
 +      (xml-escape-string): Doc fix.
 +
 +2012-06-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2.
 +
 +2012-06-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * fringe.el (fringe-mode): Doc fix.
 +
 +2012-06-29  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/ange-ftp.el (ange-ftp-get-passwd): Throw if `non-essential'
 +      is non-nil.
 +      (ange-ftp-ignore-errors-if-non-essential): New defmacro.
 +      (ange-ftp-file-name-all-completions): Use it.  (Bug#11808)
 +
 +2012-06-29  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * calendar/cal-dst.el (calendar-current-time-zone):
 +      Return calendar-current-time-zone-cache if non-nil.
 +
 +2012-06-29  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * progmodes/which-func.el (which-func-format):
 +      Add mouse-face.  (Bug#11698)
 +
 +2012-06-29  Leo Liu  <sdl.web@gmail.com>
 +
 +      * textmodes/enriched.el (enriched-next-annotation): Use eq (Bug#11528).
 +
 +2012-06-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (minibuffer-confirm-exit-commands):
 +      Add completion-at-point (bug#11725).
 +
 +2012-06-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/f90.el (f90-font-lock-keywords-2):
 +      Add some preprocessor elements.  (Bug#10499)
 +
 +2012-06-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/cperl-mode.el (cperl-update-syntaxification):
 +      Use syntax-propertize (bug#11739).
 +
 +2012-06-28  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/cl-lib.el (cl-pushnew): Don't capture X (bug#11811).
 +
 +2012-06-28  Julien Danjou  <julien@danjou.info>
 +
 +      * term.el (term-handle-colors-array): Use a set of new faces to
 +      color the terminal.  Also uses :inverse-video property.
 +      (term-default-fg-color): Set to nil by default, deprecate in favor
 +      of `term-face'.
 +      (term-default-bg-color): Set to nil by default, deprecate in favor
 +      of `term-face'.
 +      (term-current-face): Use `term-face' by default.
 +      (term-bold-attribute): Variable deleted.
 +
 +2012-06-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * simple.el (completion-list-mode-finish):
 +      Don't use toggle-read-only.  (Since completion-list-mode has
 +      a special mode-class, it wasn't doing anything extra anyway.)
 +
 +2012-06-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Make inlining of other-mode interpreted functions work (bug#11799).
 +      * emacs-lisp/bytecomp.el (byte-compile--refiy-function): New fun.
 +      (byte-compile): Use it to fix compilation of lexical-binding closures.
 +      * emacs-lisp/byte-opt.el (byte-compile-inline-expand): Compile the
 +      function, if needed.
 +
 +2012-06-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * help-mode.el (help-make-xrefs): Don't just withstand
 +      cyclic-variable-indirection but any error in documentation-property.
 +
 +      * loadup.el (purify-flag): Pre-grow the hash-table to reduce the
 +      memory use.
 +      * bindings.el (bindings--define-key): New function.
 +      * vc/vc-hooks.el, replace.el, menu-bar.el, international/mule-cmds.el:
 +      * emacs-lisp/lisp-mode.el, buff-menu.el, bookmark.el:
 +      * bindings.el: Use it to purecopy define-key bindings.
 +
 +      * textmodes/rst.el (rst-adornment-faces-alist): Avoid copy-list.
 +
 +      * emacs-lisp/cl.el (flet): Mark obsolete.
 +      * emacs-lisp/cl-macs.el (cl-flet*): New macro.
 +      * vc/vc-rcs.el (vc-rcs-annotate-command, vc-rcs-parse):
 +      * progmodes/js.el (js-c-fill-paragraph):
 +      * progmodes/ebrowse.el (ebrowse-switch-member-buffer-to-sibling-class)
 +      (ebrowse-switch-member-buffer-to-derived-class):
 +      * play/5x5.el (5x5-solver): Use cl-flet.
 +
 +      * emacs-lisp/cl.el: Use lexical-binding.  Fix flet (bug#11780).
 +      (cl--symbol-function): New macro.
 +      (cl--letf, cl--letf*): Use it.
 +
 +      * emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):
 +      Strip "toggle-" if any.
 +
 +2012-06-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * info.el (Info-default-directory-list): Move here from paths.el.
 +      * paths.el: Remove file, which is now empty.
 +      * loadup.el: No longer load "paths".
 +
 +      * custom.el (custom-initialize-delay): Doc fix.
 +
 +      * 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/em-xtra.el: Replace eshell-defgroup with "(progn (defgroup".
 +      * eshell/eshell.el (eshell-defgroup): Remove alias.
 +
 +2012-06-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * help.el (help-enable-auto-load): New variable.
 +
 +      * help-fns.el (help-fns--autoloaded-p): New function.
 +      (describe-function-1): Refer to a function as "autoloaded" if it
 +      was autoloaded at any time in the past.  Perform autoloading if
 +      help-enable-auto-load is non-nil.
 +
 +2012-06-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (compile, compile-always): Depend on
 +      update-subdirs, not on subdirs.el.  Otherwise, several different
 +      sub-targets of 'bootstrap' running in parallel could
 +      simultaneously write to subdirs.el, producing a garbled file.
 +
 +2012-06-26  Sam Steingold  <sds@gnu.org>
 +
 +      * files.el (file-name-base): New convenience function.
 +      * autoinsert.el, cus-dep.el, doc-view.el, image-dired.el:
 +      * woman.el, eshell/esh-cmd.el, progmodes/ada-xref.el:
 +      * progmodes/cc-defs.el, progmodes/cperl-mode.el:
 +      * progmodes/flymake.el, progmodes/gud.el, progmodes/idlwave.el:
 +      * textmodes/ispell.el, textmodes/reftex-ref.el:
 +      * textmodes/tex-mode.el: Use it.
 +      Did not touch cedet and org because they are maintained elsewhere.
 +
 +2012-06-26  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * calendar/calendar.el (calendar-exit): Don't try to delete or
 +      iconify last frame.  See:
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00372.html
 +
 +2012-06-25  Jim Diamond  <Jim.Diamond@AcadiaU.ca>  (tiny change)
 +
 +      * server.el (server-process-filter): Remember dir in the
 +      process's `server-client-directory' properties.
 +
 +2012-06-24  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el (xml-parse-tag): Correctly handle comment embedded in
 +      non-tag text.
 +
 +2012-06-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (COMPILE_FIRST): Synch with changes in 2012-06-22T21:24:54Z!monnier@iro.umontreal.ca.
 +
 +2012-06-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * help-fns.el (describe-variable): Don't croak when doc is not found.
 +      * vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only.
 +      * menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more.
 +      * emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place.
 +      * emacs-lisp/smie.el (smie-next-sexp): CSE.
 +      * emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid
 +      ((lambda ..) ..).
 +      * emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
 +
 +2012-06-23  Chong Yidong  <cyd@gnu.org>
 +
 +      * info.el (Info-mouse-follow-link): Accept symbol values of
 +      link-args.  Select window; suggested by Gerhard Kahl (Bug#11672).
 +      (Info-fontify-node): Use Info-link-keymap for all navigation
 +      buttons, with link-args property to perform the desired action.
 +      (Info-link-keymap): Doc fix.
 +      (Info-next-link-keymap, Info-prev-link-keymap)
 +      (Info-up-link-keymap): Delete now-unused keymaps.
 +
 +2012-06-23  Chong Yidong  <cyd@gnu.org>
 +
 +      * mouse.el (mouse-drag-track): Deactivate the mark before popping.
 +
 +      * progmodes/python.el (python-skeleton-define): Mark abbrevs as
 +      system abbrevs.
 +
 +      * ansi-color.el (ansi-color-apply-on-region): Doc fix.
 +
 +2012-06-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl--make-usage-args): Handle improper lists
 +      (bug#11719).
 +
 +      * minibuffer.el (completion--twq-try): Try to fail more gracefully when
 +      the requote function doesn't work properly (bug#11714).
 +
 +2012-06-23  Glenn Morris  <rgm@gnu.org>
 +
 +      * pcmpl-rpm.el (pcmpl-rpm-packages): Give status messages.
 +
 +2012-06-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Further GV/CL cleanups.
 +      * emacs-lisp/gv.el (gv-get): Autoload functions to find their
 +      gv-expander.
 +      (gv--defun-declaration): New function.
 +      (defun-declarations-alist): Use it.
 +      (gv-define-modify-macro, gv-pushnew!, gv-inc!, gv-dec!): Remove.
 +      (gv-place): Autoload.
 +      * emacs-lisp/cl.el (cl--dotimes, cl--dolist): Remember subr.el's
 +      original definition of dotimes and dolist.
 +      * emacs-lisp/cl-macs.el (cl-expr-access-order): Remove unused.
 +      (cl-dolist, cl-dotimes): Use `dolist' and `dotimes'.
 +      * emacs-lisp/cl-lib.el: Move gv handlers from cl-macs to here.
 +      (cl-fifth, cl-sixth, cl-seventh, cl-eighth)
 +      (cl-ninth, cl-tenth): Move gv handler to the function's definition.
 +      * emacs-lisp/cl-extra.el (cl-subseq, cl-get, cl-getf): Move gv handler
 +      to the function's definition.
 +      * Makefile.in (COMPILE_FIRST): Re-order to speed it up by about 50%.
 +      * window.el:
 +      * files.el:
 +      * faces.el:
 +      * env.el: Don't use CL.
 +
 +2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Support higher-resolution time stamps (Bug#9000).
 +
 +      * calendar/time-date.el (with-decoded-time-value): New arg
 +      PICO-SYMBOL in VARLIST.  It's optional, for backward compatibility.
 +      (encode-time-value): New optional arg PICO.  New type 3.
 +      (time-to-seconds) [!float-time]: Support the new picoseconds
 +      component if it's used.
 +      (seconds-to-time, time-subtract, time-add):
 +      Support ps-resolution time stamps as well.
 +
 +      * emacs-lisp/timer.el (timer): New component psecs.  All uses changed.
 +      (timerp): Timer vectors now have length 9, not 8.
 +      (timer--time): Support new-style (4-part) time stamps.
 +      (timer-next-integral-multiple-of-time): Time stamps now have
 +      picosecond resolution, so take a bit more care about rounding.
 +      (timer-relative-time, timer-inc-time): New optional arg psecs.
 +      (timer-set-time-with-usecs): Set psecs to 0.
 +      (timer--activate): Check psecs component, too.
 +
 +      * proced.el (proced-time-lessp): Support ps-resolution stamps.
 +
 +2012-06-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
 +      Move the non-essential binding to the post/pre-command-hook where it is
 +      more obviously correct.
 +
 +      * subr.el (read-passwd): Don't use a history at all.
 +      * savehist.el (savehist-save): Remove password saved accidentally
 +      because of the above bug.
 +
 +2012-06-22  Bastien Guerry  <bzg@gnu.org>
 +
 +      * files.el (toggle-read-only): Display a message telling whether
 +      the buffer is read-only or not (bug#11726).
 +
 +2012-06-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/gv.el: New file.
 +      * subr.el (push, pop): Extend to generalized variables.
 +      * loadup.el (macroexp): Unload if preloaded and uncompiled (bug#11657).
 +      * emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove.
 +      * emacs-lisp/cl-macs.el: Require gv.  Use gv-define-setter,
 +      gv-define-simple-setter, and gv-define-expander.
 +      Remove setf-methods defined in gv.  Rename cl-setf -> setf.
 +      (cl-setf, cl-do-pop, cl-get-setf-method): Remove.
 +      (cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf)
 +      (cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el.
 +      (cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with
 +      gv-letplace.
 +      (cl-defstruct): Don't define setf-method any more.
 +      * emacs-lisp/cl.el (flet): Don't autoload.
 +      (cl--letf, letf, cl--letf*, letf*, cl--gv-adapt)
 +      (define-setf-expander, defsetf, define-modify-macro)
 +      (cl-struct-setf-expander): Move from cl-lib.el.
 +      * emacs-lisp/syntax.el:
 +      * emacs-lisp/ewoc.el:
 +      * emacs-lisp/smie.el:
 +      * emacs-lisp/cconv.el:
 +      * emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push.
 +      (timer--time): Use gv-define-simple-setter.
 +      * emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let²
 +      to avoid coding-system problems in subr.el.  Adjust all users.
 +      (macroexp--maxsize, macroexp-small-p): New functions.
 +      * emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf.
 +      * scroll-bar.el (scroll-bar-mode):
 +      * simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
 +      (normal-erase-is-backspace-mode): Don't use the `eq' place.
 +      * winner.el (winner-configuration, winner-make-point-alist)
 +      (winner-set-conf, winner-get-point, winner-set): Don't abuse letf.
 +      * files.el (locate-file-completion-table): Avoid list*.
 +
 +2012-06-22  Chong Yidong  <cyd@gnu.org>
 +
 +      * dired-aux.el (dired-do-create-files): Doc fix (Bug#11327).
 +      (dired-create-files): Doc fix (Bug#11329).
 +      (dired-do-copy): Doc fix (Bug#11334).
 +      (dired-mark-read-string): Doc fix (Bug#11553).
 +
 +      * dired.el (dired-recursive-copies, dired-recursive-deletes):
 +      Doc fix (Bug#11326).
 +      (dired-make-relative): Doc fix (Bug#11332).  Remove unused arg.
 +      (dired-dwim-target): Doc fix.
 +
 +      * wdired.el (wdired-mode): Doc fix.
 +
 +2012-06-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * pcmpl-rpm.el (pcmpl-rpm-cache): New option.
 +      (pcmpl-rpm-cache-stamp-file): New constant.
 +      (pcmpl-rpm-cache-time, pcmpl-rpm-packages): New variables.
 +      (pcmpl-rpm-packages): Optionally cache list of packages.
 +
 +      * pcmpl-rpm.el (pcmpl-rpm): New group.
 +      (pcmpl-rpm-query-options): New option.
 +      (pcmpl-rpm-packages): No need to inline it.
 +      Use pcmpl-rpm-query-options.
 +
 +      * calendar/calendar.el (calendar-in-read-only-buffer):
 +      Avoid some needless mode changes.
 +
 +2012-06-21  Chong Yidong  <cyd@gnu.org>
 +
 +      * desktop.el (desktop-read): Don't prompt if daemon (Bug#11674).
 +      (desktop-path): Remove . from the default value (Bug#10977).
 +      (desktop-read): Use user-emacs-directory if desktop-path is nil.
 +
 +2012-06-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * term.el (term-send-raw-meta): Make C-M-<char> keys work (Bug#8172).
 +
 +2012-06-20  David Röthlisberger  <david@rothlis.net>  (tiny change)
 +
 +      * ido.el (ido-switch-buffer, ido-find-file): Fix up doc of C-j
 +      (bug#11201).
 +
 +2012-06-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * term.el (term-window-width): Handle the case of a missing right
 +      fringe (Bug#8837).
 +      (term-check-size): Use window-text-height (Bug#5445).
 +      (term-mode): Use define-derived-mode.  Minor cleanups.
 +      Set font-lock-defaults (Bug#7692).
 +      (term-move-columns, term-insert-char, term-emulate-terminal)
 +      (term-erase-in-line, term-insert-spaces): Use font-lock-face.
 +
 +2012-06-20  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/ange-ftp.el (ange-ftp-get-passwd):
 +      Bind `enable-recursive-minibuffers'.
 +      (ange-ftp-get-process): Throw if `non-essential' is non-nil.
 +
 +2012-06-19  David Röthlisberger  <david@rothlis.net>  (tiny change)
 +
 +      * ido.el (ido-find-file): Mention C-d binding in docstring (bug#11244).
 +
 +2012-06-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/python.el (python-mode): Derive from prog-mode.
 +
 +2012-06-19  Kevin Gallagher  <Kevin.Gallagher@boeing.com>
 +
 +      * emulation/edt.el (edt-default-menu-bar-update-buffers)
 +      (edt-user-menu-bar-update-buffers): New functions.
 +      (edt-default-emulation-setup, edt-user-emulation-setup): Use them.
 +
 +2012-06-19  Chong Yidong  <cyd@gnu.org>
 +
 +      * subr.el (with-selected-window): Preserve the selected window's
 +      terminal's top-frame (Bug#4702).
 +
 +      * window.el (save-selected-window): Likewise.
 +
 +2012-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/python.el (python-rx-constituents): Move backquote.
 +      (python-skeleton-define, python-define-auxiliary-skeleton):
 +      Use `declare'.
 +
 +2012-06-18  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * minibuffer.el (read-file-name-default): Revert the patch from
 +      2012-06-17.
 +
 +2012-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase--expand): Warn for unused pattern.
 +      (pcase--u1, pcase--q1): Don't use apply-partially.
 +
 +2012-06-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/python.el (python-proc, python-buffer)
 +      (python-send-receive, python-send-string): Fix obsolete versions.
 +
 +2012-06-18  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (special-display-p): Completely remove stringp
 +      check.  Suggested by Andreas Schwab <schwab@linux-m68k.org>.
 +
 +2012-06-17  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
 +
 +      * net/tramp.el (tramp-file-name-handler): Catch 'non-essential.
 +
 +      * net/ange-ftp.el (ange-ftp-gwp-start, ange-ftp-start-process):
 +      * net/tramp-sh.el (tramp-maybe-open-connection):
 +      Throw if `non-essential' is non-nil.
 +
 +2012-06-17  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (special-display-p): Signal an error if BUFFER-NAME
 +      is not a string (Bug#11713).
 +
 +2012-06-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * progmodes/python.el (python-info-beginning-of-backslash):
 +      Rename from python-info-beginning-of-backlash, as a spelling fix.
 +
 +2012-06-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * term.el (term-emulate-terminal): If term-check-size is called,
 +      move point to the process mark without resetting point (Bug#4635).
 +
 +2012-06-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * international/mule-cmds.el (mule-menu-keymap)
 +      (set-language-environment, set-locale-environment): Doc tweaks.
 +
 +2012-06-16  Aurelien Aptel  <aurelien.aptel@gmail.com>
 +
 +      * cus-face.el (custom-face-attributes): Add wave-style underline
 +      attribute.
 +      * faces.el (set-face-attribute): Update docstring to describe
 +      wave-style underline attribute.
 +
 +2012-06-16  Chong Yidong  <cyd@gnu.org>
 +
 +      * term/xterm.el (terminal-init-xterm): Discard input before
 +      querying background mode (Bug#10959).
 +
 +2012-06-16  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el: Added and corrected some comments.
 +      (rst-re-alist-def): Improve symbol syntax.
 +      (rst-mode-syntax-table): Correct syntax entries.
 +      (rst-cvs-header, rst-svn-rev, rst-svn-timestamp)
 +      (rst-official-version, rst-official-cvs-rev): Update version
 +      information.
 +
 +2012-06-15  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (COMPILE_FIRST): Synch with makefile.in changes
 +      in 2008-06-22T13:57:28Z!monnier@iro.umontreal.ca.
 +
 +2012-06-15  Fabián Ezequiel Gallina  <fgallina@cuca>
 +
 +      * progmodes/python.el: New python.el merge.
 +      (python-guess-indent): Obsolete var.
 +      (python-indent-guess-indent-offset): New defcustom.
 +      (python-indent): Obsolete var.
 +      (python-indent-offset): New defcustom.
 +      (python-python-command, python-jython-command): Delete var.
 +      (python-shell-interpreter): New defcustom.
 +      (python-pdbtrack-do-tracking-p): Delete var.
 +      (python-pdbtrack-activate): New defcustom.
 +      (python-use-skeletons): Obsolete var.
 +      (python-skeleton-autoinsert): New defcustom.
 +      (inferior-python-filter-regexp, python-continuation-offset)
 +      (python-honour-comment-indentation, python-indent-string-contents)
 +      (python-jython-packages, python-mode-hook)
 +      (python-pdbtrack-minor-mode-string, python-remove-cwd-from-path)
 +      (python-shell-prompt-alist)
 +      (python-source-modes): Delete defcustoms.
 +      (python-check-buffer-name, python-eldoc-setup-code)
 +      (python-eldoc-string-code, python-ffap-setup-code)
 +      (python-ffap-string-code, python-fill-comment-function)
 +      (python-fill-decorator-function, python-fill-paren-function)
 +      (python-fill-string-function, python-imenu-include-defun-type)
 +      (python-imenu-make-tree, python-imenu-subtree-root-label)
 +      (python-pdbtrack-stacktrace-info-regexp, python-shell-buffer-name)
 +      (python-shell-compilation-regexp-alist)
 +      (python-shell-completion-module-string-code)
 +      (python-shell-completion-pdb-string-code)
 +      (python-shell-completion-setup-code)
 +      (python-shell-completion-string-code)
 +      (python-shell-enable-font-lock, python-shell-exec-path)
 +      (python-shell-extra-pythonpaths)
 +      (python-shell-internal-buffer-name, python-shell-interpreter-args)
 +      (python-shell-process-environment)
 +      (python-shell-prompt-block-regexp)
 +      (python-shell-prompt-output-regexp)
 +      (python-shell-prompt-pdb-regexp, python-shell-prompt-regexp)
 +      (python-shell-send-setup-max-wait, python-shell-setup-codes)
 +      (python-shell-virtualenv-path): New defcustoms.
 +      (brm-menu, eldoc-documentation-function, inferior-python-mode-map)
 +      (inferior-python-mode-syntax-table, python--prompt-regexp)
 +      (python-buffer, python-command python-python-command)
 +      (python-default-template, python-imports, python-indent-index)
 +      (python-indent-list, python-indent-list-length)
 +      (python-mode-running, python-pdbtrack-is-tracking-p)
 +      (python-preoutput-continuation, python-preoutput-leftover)
 +      (python-preoutput-result, python-preoutput-skip-next-prompt)
 +      (python-prev-dir/file, python-recursing)
 +      (python-saved-check-command, python-version-checked)
 +      (python-which-func-length-limit)
 +      (view-return-to-alist): Delete vars.
 +      (python-check-custom-command, python-dotty-syntax-table)
 +      (python-imenu-index-alist, python-indent-current-level)
 +      (python-indent-dedenters, python-indent-levels)
 +      (python-nav-beginning-of-defun-regexp)
 +      (python-nav-list-defun-positions-cache)
 +      (python-pdbtrack-buffers-to-kill, python-pdbtrack-tracked-buffer)
 +      (python-shell-internal-buffer)
 +      (python-skeleton-available): New vars.
 +      (def-python-skeleton): Delete macro.
 +      (python-skeleton-define): New macro.
 +      (python-define-auxiliary-skeleton, python-rx): New macros.
 +      (python-insert-class): Delete command.
 +      (python-skeleton-class): New command.
 +      (python-insert-def): Delete command.
 +      (python-skeleton-def): New command.
 +      (python-insert-for): Delete command.
 +      (python-skeleton-for): New command.
 +      (python-insert-if): Delete command.
 +      (python-skeleton-if): New command.
 +      (python-insert-try/except, python-insert-try/finally): Delete commands.
 +      (python-skeleton-try): New command.
 +      (python-insert-while): Delete command.
 +      (python-skeleton-while): New command.
 +      (python-backspace): Delete command.
 +      (python-indent-dedent-line-backspace): New command.
 +      (python-electric-colon): Delete command.
 +      (python-indent-electric-colon): New command.
 +      (python-guess-indent): Delete command.
 +      (python-indent-guess-indent-offset): New command.
 +      (python-shift-left): Delete command.
 +      (python-indent-shift-left): New command.
 +      (python-shift-right): Delete command.
 +      (python-indent-shift-right): New command.
 +      (python-find-function): Delete command.
 +      (python-nav-jump-to-defun): New command.
 +      (python-next-statement): Delete command.
 +      (python-nav-forward-sentence): New command.
 +      (python-previous-statement): Delete command.
 +      (python-nav-backward-sentence): New command.
 +      (python-fill-paragraph): Delete command.
 +      (python-fill-paragraph-function): New command.
 +      (python-send-buffer): Delete command.
 +      (python-shell-send-buffer): New command.
 +      (python-send-defun): Delete command.
 +      (python-shell-send-defun): New command.
 +      (python-send-region, python-send-region-and-go): Delete commands.
 +      (python-shell-send-region)
 +      (python-shell-switch-to-shell): New commands.
 +      (python-send-string): Delete command.
 +      (python-shell-send-string): New command.
 +      (python-switch-to-python): Delete command.
 +      (python-shell-switch-to-shell): New command.
 +      (python-describe-symbol): Delete command.
 +      (python-eldoc-at-point): New command.
 +      (python--set-prompt-regexp, python-args-to-list)
 +      (python-after-info-look, python-check-version)
 +      (python-check-comint-prompt, python-find-imports)
 +      (python-execute-file, turn-off-pdbtrack, turn-on-pdbtrack)
 +      (python-unload-function, python-expand-template)
 +      (python-maybe-jython, python-preoutput-filter)
 +      (python-pdbtrack-get-source-buffer)
 +      (python-pdbtrack-grub-for-buffer, python-pdbtrack-overlay-arrow)
 +      (python-pdbtrack-toggle-stack-tracking)
 +      (python-pdbtrack-track-stack-file, python-initial-text)
 +      (python-first-word, python-comment-line-p, python-send-command)
 +      (python-setup-brm, python-sentinel, python-set-proc)
 +      (python-skip-out, python-input-filter, python-outdent-p)
 +      (python-outline-level, python-backslash-continuation-line-p)
 +      (python-end-of-block, python-end-of-statement, python-mark-block)
 +      (python-beginning-of-block, python-beginning-of-statement)
 +      (python-blank-line-p, python-beginning-of-string)
 +      (python-open-block-statement-p): Delete functions.
 +      (python-indent-line, python-indent-line-1): Delete functions.
 +      (python-indent-line): New function.
 +      (python-indentation-levels): Delete function.
 +      (python-indent-calculate-levels): New function.
 +      (python-proc): Delete function.
 +      (python-shell-get-process): New function.
 +      (python-send-receive): Delete function.
 +      (python-shell-send-string-no-output): New function.
 +      (python-module-path): Delete function.
 +      (python-ffap-module-path): New function.
 +      (python-completion-at-point)
 +      (python-symbol-completions): Delete functions.
 +      (python-completion-complete-at-point): New function.
 +      (python-load-file): Delete function.
 +      (python-shell-send-file): New function.
 +      (python-calculate-indentation): Delete function.
 +      (python-indent-calculate-indentation): New function.
 +      (python-skip-comments/blanks): Delete function.
 +      (python-util-forward-comment): New function.
 +      (python-continuation-line-p): Delete function.
 +      (python-info-continuation-line-p): New function.
 +      (python-which-func, python-current-defun): Delete function.
 +      (python-info-current-defun): New function.
 +      (python-beginning-of-defun): Delete function.
 +      (python-nav-beginning-of-defun): New function.
 +      (python-close-block-statement-p)
 +      (python-block-end-p): Delete function.
 +      (python-info-closing-block): New function.
 +      (python-comint-output-filter-function)
 +      (python-eldoc--get-doc-at-point, python-end-of-defun-function)
 +      (python-fill-comment, python-fill-decorator, python-fill-paren)
 +      (python-fill-string, python-imenu-make-element-tree)
 +      (python-imenu-make-tree, python-imenu-tree-assoc)
 +      (python-indent-context, python-indent-dedent-line)
 +      (python-indent-line-function)
 +      (python-indent-post-self-insert-function)
 +      (python-indent-toggle-levels)
 +      (python-info-assignment-continuation-line-p)
 +      (python-info-beginning-of-backlash)
 +      (python-info-block-continuation-line-p)
 +      (python-info-closing-block-message)
 +      (python-info-line-ends-backslash-p)
 +      (python-info-looking-at-beginning-of-defun)
 +      (python-info-ppss-context, python-info-ppss-context-type)
 +      (python-nav-list-defun-positions, python-nav-read-defun)
 +      (python-nav-sentence-end, python-nav-sentence-start)
 +      (python-pdbtrack-comint-output-filter-function)
 +      (python-pdbtrack-set-tracked-buffer)
 +      (python-shell-calculate-exec-path)
 +      (python-shell-calculate-process-environment)
 +      (python-shell-completion--do-completion-at-point)
 +      (python-shell-completion--get-completions)
 +      (python-shell-completion-complete-at-point)
 +      (python-shell-completion-complete-or-indent)
 +      (python-shell-get-or-create-process)
 +      (python-shell-get-process-name)
 +      (python-shell-internal-get-or-create-process)
 +      (python-shell-internal-get-process-name)
 +      (python-shell-internal-send-string, python-shell-make-comint)
 +      (python-shell-parse-command, python-shell-send-setup-code)
 +      (python-skeleton-add-menu-items)
 +      (python-util-clone-local-variables, python-util-position)
 +      (run-python-internal, python-indentation-levels)
 +      (python-nav-beginning-of-defun)
 +      (python-completion-complete-at-point): New functions.
 +      (run-python): Change arguments.  New API requirements.
 +
 +2012-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el (cl--defsubst-expand): Autoload inliner
 +      (bug#11649).
 +
 +      * emacs-lisp/macroexp.el (macroexp--compiler-macro): New function.
 +      (macroexp--expand-all): Use it.
 +
 +      * emacs-lisp/cl-macs.el (cl--transform-function-property): Remove.
 +      (cl-define-setf-expander, cl-deftype, cl-define-compiler-macro):
 +      Use `cl-function' instead.
 +
 +2012-06-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (COMPILE_FIRST): Remove subr.el.
 +      Suggested by Stefan Monnier while discussing bug#11657.
 +
 +2012-06-14  Sam Steingold  <sds@gnu.org>
 +
 +      * files.el (abort-if-file-too-large): Use `file-size-human-readable'.
 +
 +2012-06-14  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * play/doctor.el (doctor-doc): Remove parameter and use
 +      doctor-sent instead of sent.
 +      (doctor-read-print): Use doctor-sent instead of sent.  (Bug#11708)
 +
 +2012-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.el: Require cl-lib.
 +      (file-name-non-special): Replace case -> cl-case.
 +
 +      * emacs-lisp/cl-macs.el (cl-defstruct): Don't add print-func.
 +
 +      * emacs-lisp/edebug.el (edebug-read-function): Remove old incorrect
 +      mapping from #' to function*.
 +
 +2012-06-13  Chong Yidong  <cyd@gnu.org>
 +
 +      * mouse.el (mouse-drag-track): Do not set the mark if the user
 +      releases the mouse without selecting anything (Bug#11588).
 +
 +2012-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/tex-mode.el (latex-indent): Recognize tex-verbatim at EOB
 +      as well (bug#11646).
 +
 +      * loadup.el: Count byte-code functions as well.
 +
 +      * emacs-lisp/byte-opt.el (featurep): Move compiler-macro...
 +      * emacs-lisp/bytecomp.el (featurep): ...here (bug#11692).
 +
 +      * emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt
 +      (bug#11649).  Add cl-defun and cl-defmacro.
 +
 +2012-06-13  Drew Adams  <drew.adams@oracle.com>
 +
 +      * help-mode.el (help-bookmark-make-record, help-bookmark-jump):
 +      Fix last change.
 +
 +2012-06-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/dbus.el (dbus-call-method): Use timeout for `read-event'.
 +      Otherwise, it blocks in batch mode.
 +
 +2012-06-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * help-mode.el (bookmark-make-record-default): Declare.
 +
 +2012-06-13  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/package.el (list-packages): Compute a list of
 +      packages that are newly-available since the last list-packages
 +      invocation.
 +      (package-menu--new-package-list): New var.
 +      (package-menu--generate, package-menu--print-info)
 +      (package-menu--status-predicate, package-menu-mark-install):
 +      Handle new status label "new".
 +
 +2012-06-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl-remf): Fix error in recent
 +      conversion to backquotes.
 +
 +2012-06-12  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/edebug.el (edebug-inhibit-emacs-lisp-mode-bindings):
 +      Rename from gud-inhibit-global-bindings.
 +
 +      * emacs-lisp/eieio.el (eieio-pre-method-execution-hooks): Doc fix.
 +
 +      * nxml/nxml-glyph.el (nxml-glyph-set-functions): Rename abnormal
 +      hook from nxml-glyph-set-hook.
 +
 +      * progmodes/cwarn.el (cwarn-mode): Remove redundant variable
 +      declaration.
 +
 +      * progmodes/pascal.el (pascal-toggle-completions): Doc fix.
 +
 +      * textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path):
 +      Convert to defcustom.
 +
 +2012-06-12  Drew Adams  <drew.adams@oracle.com>
 +
 +      * help-mode.el (help-bookmark-make-record, help-bookmark-jump):
 +      New functions.
 +      (help-mode): Use them.
 +
 +2012-06-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/fortran.el (fortran-font-lock-keywords-3):
 +      Use preprocessor face for directives.
 +      (fortran-directive-re): Doc fix.
 +
 +2012-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl-parse-loop-clause): Fix error in recent
 +      conversion to backquotes (bug#11652).
 +
 +      Fix compiler-expansion of CL's cXXr functions (bug#11673).
 +      * emacs-lisp/cl-lib.el (cl--defalias): New function.
 +      (cl-values, cl-values-list, cl-copy-seq, cl-svref, cl-first)
 +      (cl-second, cl-rest, cl-endp, cl-third, cl-fourth): Use it.
 +      (cl-plusp, cl-minusp, cl-fifth, cl-sixth, cl-seventh, cl-eighth)
 +      (cl-ninth, cl-tenth): Mark them as inlinable.
 +      (cl-caaar, cl-caadr, cl-cadar, cl-caddr, cl-cdaar, cl-cdadr)
 +      (cl-cddar, cl-cdddr, cl-caaaar, cl-caaadr, cl-caadar, cl-caaddr)
 +      (cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr, cl-cdaaar, cl-cdaadr)
 +      (cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr, cl-cdddar, cl-cddddr):
 +      Add a compiler-macro declaration to use cl--compiler-macro-cXXr.
 +      (cl-list*, cl-adjoin): Don't put an autoload manually.
 +      * emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin)
 +      (cl--compiler-macro-list*): Add autoload cookie.
 +      (cl--compiler-macro-cXXr): New function.
 +
 +      * help-fns.el (help-fns--compiler-macro): New function extracted from
 +      describe-function-1; follow aliases and use `compiler-macro' property.
 +      (describe-function-1): Use it.
 +
 +2012-06-11  Chong Yidong  <cyd@gnu.org>
 +
 +      * startup.el (fancy-splash-head): Use splash.svg even if librsvg
 +      is uninstalled, if imagemagick is installed.
 +
 +2012-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el: Use lexical-binding.
 +      (cl-map-extents, cl-maclisp-member): Remove.
 +      (cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring)
 +      (cl--set-substring, cl--block-wrapper, cl--block-throw)
 +      (cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix.
 +      * emacs-lisp/cl-extra.el: Use lexical-binding.
 +      (cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals)
 +      (cl--map-overlays, cl--set-frame-visible-p, cl--progv-save)
 +      (cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf)
 +      (cl--do-remf, cl--do-prettyprint): Use "cl--" prefix.
 +      * emacs-lisp/cl-seq.el: Use lexical-binding.
 +      (cl--parsing-keywords, cl--check-key, cl--check-test-nokey)
 +      (cl--check-test, cl--check-match): Use "cl--" prefix and backquotes.
 +      (cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec):
 +      * emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix.
 +      * edmacro.el (edmacro-mismatch): Simplify to remove dependence on
 +      CL's internals.
 +
 +2012-06-11  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Sync with Tramp 2.2.6-pre.
 +
 +      * net/tramp-cache.el (tramp-dump-connection-properties): Let-bind
 +      `print-length' and `print-level' to nil, in order to avoid
 +      truncation.  Reported by Christopher Schmidt
 +      <christopher@ristopher.com>.
 +
 +      * net/tramp-cmds.el (tramp-cleanup-connection): Delete also process.
 +
 +      * net/tramp-compat.el (tramp-compat-condition-case-unless-debug):
 +      New defmacro.
 +      (tramp-compat-copy-directory): Add optional argument
 +      COPY-CONTENTS.  It is not handled yet.
 +
 +      * net/tramp-ftp.el (tramp-disable-ange-ftp): Fix docstring.
 +      (tramp-ftp-file-name-p): Simplify.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
 +      * net/tramp-gw.el (tramp-gw-open-connection): Add hop to
 +      connection vector.
 +
 +      * net/tramp-sh.el (tramp-copy-size-limit): Fix docstring.
 +      (tramp-methods): Do not use `tramp-password-end-of-line'.
 +      (tramp-completion-function-alist-putty): Handle UNIX case.
 +      (tramp-remote-path): Add "/opt/bin", "/opt/sbin" and "/opt/local/bin".
 +      (tramp-do-file-attributes-with-stat)
 +      (tramp-do-directory-files-and-attributes-with-stat) Return uid and
 +      gid as real numbers.  They could run out of integer range on cygwin.
 +      (tramp-do-copy-or-rename-file-out-of-band): Better trace format.
 +      (tramp-sh-handle-expand-file-name): Handle hops.
 +      (tramp-open-connection-setup-interactive-shell):
 +      Use `tramp-cleanup'.  Move check for busyboxes ...
 +      (tramp-find-shell): ... here.  Simplify implementation.
 +      Set "remote-shell" property also for alternative shells.
 +      (tramp-remote-coding-commands): Check "test -c /dev/stdout".
 +      If failing, a regular file would be written otherwise.
 +      Reported by Dmitry Kurochkin <dmitry.kurochkin@gmail.com>.
 +      (tramp-find-inline-encoding): Cache the coding commands in the
 +      process cache.  Apply test command on the remote side, if defined.
 +      (tramp-find-inline-compress): Cache the compress commands in the
 +      process cache.
 +      (tramp-compute-multi-hops): Save `tramp-default-proxies-alist'
 +      when requested.  Handle hops.
 +      (tramp-current-connection): New defvar.
 +      (tramp-maybe-open-connection): Use `tramp-cleanup'.
 +      Throw `suppress', if there was a failed connection shortly before.
 +      Handle user interrupt.  (Bug#10187)
 +      (tramp-get-inline-compress, tramp-get-inline-coding):
 +      Read connection properties from the process cache.
 +
 +      * net/tramp-smb.el (tramp-smb-server-version)
 +      (tramp-smb-wrong-passwd-regexp, tramp-smb-actions-with-tar):
 +      New defconsts.
 +      (tramp-smb-prompt): Extend for powershell prompt.
 +      (tramp-smb-file-name-handler-alist): Add handlers for
 +      `process-file', `shell-command' and `start-file-process'.
 +      (tramp-smb-winexe-program, tramp-smb-winexe-shell-command)
 +      (tramp-smb-winexe-shell-command-switch): New defcustoms.
 +      (tramp-smb-file-name-p): Simplify.
 +      (tramp-smb-action-with-tar, tramp-smb-handle-process-file)
 +      (tramp-smb-kill-winexe-function, tramp-smb-call-winexe)
 +      (tramp-smb-shell-quote-argument): New defuns.
 +      (tramp-smb-handle-copy-directory): Add COPY-CONTENTS argument.
 +      Implement using "tar".  By this, time-stamps are preserved.
 +      (tramp-smb-handle-copy-file): Handle also the case of directories.
 +      (tramp-smb-do-file-attributes-with-stat)
 +      (tramp-smb-get-file-entries, tramp-smb-get-cifs-capabilities):
 +      Use `tramp-get-connection-buffer').
 +      (tramp-smb-handle-rename-file): Use "rename", when source and
 +      target are on the same share.
 +      (tramp-smb-maybe-open-connection): Handle wrong passwords.
 +      Use `tramp-smb-server-version'.
 +      (tramp-smb-wait-for-output): Remove prompt.
 +
 +      * net/tramp.el (top): Require 'cl.
 +      (tramp-methods, tramp-rsh-end-of-line):
 +      Remove `tramp-password-end-of-line' from docstring.
 +      (tramp-save-ad-hoc-proxies): New defcustom.
 +      (tramp-completion-function-alist): Adapt docstring.
 +      (tramp-default-password-end-of-line): Remove defcustom.
 +      (tramp-shell-prompt-pattern): Allow "[]" style prompts.  (Bug#11065)
 +      (tramp-user-regexp, tramp-file-name-regexp-unified)
 +      (tramp-file-name-regexp-url): Extend regexp by hop separator.
 +      (tramp-postfix-hop-format, tramp-postfix-hop-regexp)
 +      (tramp-remote-file-name-spec-regexp): New defconst.
 +      (tramp-file-name-structure): Extend structure for hops.
 +      (tramp-get-method-parameter): Move up.
 +      (tramp-file-name-p, tramp-dissect-file-name)
 +      (with-parsed-tramp-file-name): Handle hops.
 +      (tramp-file-name-hop): New defun.
 +      (tramp-make-tramp-file-name): New optional arg HOP.
 +      (tramp-message-show-progress-reporter-message): New defvar.
 +      (tramp-with-progress-reporter): Use it.  We cannot use
 +      `tramp-message-show-message' here, because this suppresses also
 +      error buffers.
 +      (tramp-error-with-buffer): Suppress buffer view, if
 +      `tramp-message-show-message' is nil.
 +      Use `tramp-get-connection-buffer'.
 +      (tramp-cleanup): New defun.
 +      (tramp-rfn-eshadow-update-overlay): Let-bind `non-essential' to `t'.
 +      (tramp-file-name-handler): If `debug-on-error' is set, propagate
 +      an error unchanged.
 +      (tramp-completion-handle-file-name-all-completions): Handle hops.
 +      Fix an error when called from ido.
 +      (tramp-completion-dissect-file-name): Use better local variable
 +      name.  Add hop to the vector.
 +      (tramp-handle-insert-file-contents): Use progress-reporter for the
 +      whole scenario.
 +      (tramp-action-password): Let-bind `enable-recursive-minibuffers'
 +      to `t'.
 +      (tramp-check-for-regexp): Simplify search.
 +      (tramp-enter-password): Remove it.  Move implementation ...
 +      (tramp-action-password): ... here.
 +      (tramp-mode-string-to-int, tramp-local-host-p)
 +      (tramp-make-tramp-temp-file, tramp-read-passwd)
 +      (tramp-clear-passwd, tramp-time-less-p, tramp-time-diff):
 +      Set tramp-autoload cookie.
 +
 +      * net/trampver.el: Update release number.
 +
 +2012-06-11  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +          Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-set-completion-function): Fix docstring.
 +      (tramp-parse-group, tramp-parse-file)
 +      (tramp-parse-shostkeys-sknownhosts): New defuns.
 +      (tramp-parse-rhosts, tramp-parse-rhosts-group, tramp-parse-shosts)
 +      (tramp-parse-shosts-group, tramp-parse-sconfig)
 +      (tramp-parse-sconfig-group, tramp-parse-shostkeys)
 +      (tramp-parse-sknownhosts, tramp-parse-hosts)
 +      (tramp-parse-hosts-group, tramp-parse-passwd, tramp-parse-netrc):
 +      Use them.
 +      (tramp-parse-passwd-group, tramp-parse-netrc-group)
 +      (tramp-parse-putty-group): Don't narrow.
 +      (tramp-parse-putty): Make a loop.
 +      (tramp-file-name-handler): Catch the `suppress' signal.
 +
 +2012-06-11  Chong Yidong  <cyd@gnu.org>
 +
 +      * image.el (imagemagick-register-types): Put the ImageMagick entry
 +      at the end of image-type-file-name-regexps.
 +
 +2012-06-11  Johan BockgÃ¥rd  <bojohan@gnu.org>
 +
 +      * emacs-lisp/pcase.el (pcase-UPAT, pcase-QPAT): New edebug specs.
 +      (pcase, pcase-let*, pcase-dolist): Use them.
 +
 +2012-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase--let*): New function.
 +      (pcase-let*): Use it.  Use pcase--memoize to avoid repeated expansions.
 +      (pcase--expand): Use macroexp-let².
 +
 +2012-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/timer.el, emacs-lisp/syntax.el, emacs-lisp/smie.el:
 +      * emacs-lisp/ewoc.el, emacs-lisp/cconv.el, emacs-lisp/bytecomp.el:
 +      * emacs-lisp/byte-opt.el, emacs-lisp/autoload.el: Convert to cl-lib.
 +      * emacs-lisp/easymenu.el, emacs-lisp/easy-mmode.el:
 +      * emacs-lisp/derived.el: Use pcase instead of `cl'.
 +      * emacs-lisp/cl-lib.el: Get rid of special cl-macs auto load.
 +
 +2012-06-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * mail/rmail.el (rmail-yank-current-message): Leave point at
 +      correct position.  (Bug#11660)
 +
 +2012-06-10  Chong Yidong  <cyd@gnu.org>
 +
 +      * allout-widgets.el: Fix code header.
 +
 +2012-06-10  Chong Yidong  <cyd@gnu.org>
 +
 +      * cus-edit.el (customize-changed-options-previous-release):
 +      Bump to 24.1.
 +
 +2012-06-09  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (BIG_STACK_DEPTH): Enlarge to 2200.
 +
 +2012-06-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * ebuff-menu.el (electric-buffer-list): Preserve header line.
 +
 +2012-06-09  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (special-display-popup-frame): Don't use
 +      window--display-buffer (Bug#11651).
 +
 +2012-06-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix parallel builds: make sure loaddefs.el is not being written
 +      while Lisp files are compiled.
 +      (compile): Don't depend on 'mh-autoloads'.
 +      (compile-CMD, compile-SH): Depend on 'autoloads'.
 +      (bootstrap): Don't depend on 'autoloads' and 'mh-autoloads'.
 +
 +      * makefile.w32-in (BIG_STACK_DEPTH): Enlarge to 2200.  (Bug#11649)
 +
 +2012-06-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * face-remap.el (face-remap-add-relative, face-remap-set-base)
 +      (buffer-face-set, buffer-face-toggle, buffer-face-mode-invoke):
 +      Doc fixes (Bug#11225).
 +
 +2012-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexp--expand-all): Only autoload
 +      a function if there's a clear indication that it has a compiler-macro.
 +      * emacs-lisp/byte-run.el (defun-declarations-alist, defmacro, defun)
 +      (macro-declarations-alist): Add arglist to declaration functions.
 +      (defun-declarations-alist): Add `obsolete' and `compiler-macro'.
 +      * emacs-lisp/cl-seq.el (cl-member, cl-assoc):
 +      * emacs-lisp/cl-lib.el (cl-list*, cl-adjoin):
 +      * emacs-lisp/cl-extra.el (cl-get): Use the new `declare' statement.
 +      Also add autoload to find the compiler macro.
 +      * emacs-lisp/cl-macs.el (eql) [compiler-macro]: Remove.
 +      (cl--compiler-macro-member, cl--compiler-macro-assoc)
 +      (cl--compiler-macro-adjoin, cl--compiler-macro-list*)
 +      (cl--compiler-macro-get): New functions, replacing calls to
 +      cl-define-compiler-macro.
 +      (cl-typep) [compiler-macro]: Use macroexp-let².
 +
 +2012-06-08  Nick Dokos  <nicholas.dokos@hp.com>  (tiny change)
 +
 +      * calendar/icalendar.el (icalendar--parse-vtimezone): Import TZID
 +      string properly, fixes Bug#11473.
 +
 +2012-06-08  Chong Yidong  <cyd@gnu.org>
 +
 +      * faces.el (set-face-attribute): Doc fix.
 +      (modify-face): Don't use :bold and :italic.
 +      (error, warning, success): Tweak definitions.
 +
 +      * cus-edit.el (custom-modified, custom-invalid, custom-rogue)
 +      (custom-modified, custom-set, custom-changed, custom-themed)
 +      (custom-saved, custom-button, custom-button-mouse)
 +      (custom-button-pressed, custom-state, custom-comment-tag)
 +      (custom-variable-tag, custom-group-tag-1, custom-group-tag)
 +      (custom-group-subtitle): Use new-style face specs.
 +      (custom-invalid-face, custom-rogue-face, custom-modified-face)
 +      (custom-set-face, custom-changed-face, custom-saved-face)
 +      (custom-button-face, custom-button-pressed-face)
 +      (custom-documentation-face, custom-state-face)
 +      (custom-comment-face, custom-comment-tag-face)
 +      (custom-variable-tag-face, custom-variable-button-face)
 +      (custom-face-tag-face, custom-group-tag-face-1)
 +      (custom-group-tag-face): Remove obsolete face alias.
 +
 +      * epa.el (epa-validity-high, epa-validity-medium)
 +      (epa-validity-low, epa-mark, epa-field-name, epa-string)
 +      (epa-field-name, epa-field-body):
 +      * font-lock.el (font-lock-comment-face, font-lock-string-face)
 +      (font-lock-keyword-face, font-lock-builtin-face)
 +      (font-lock-function-name-face, font-lock-variable-name-face)
 +      (font-lock-type-face, font-lock-constant-face):
 +      * ido.el (ido-first-match, ido-only-match, ido-subdir)
 +      (ido-virtual, ido-indicator, ido-incomplete-regexp):
 +      * speedbar.el (speedbar-button-face, speedbar-file-face)
 +      (speedbar-directory-face, speedbar-tag-face)
 +      (speedbar-selected-face, speedbar-highlight-face)
 +      (speedbar-separator-face):
 +      * whitespace.el (whitespace-newline, whitespace-space)
 +      (whitespace-hspace, whitespace-tab, whitespace-trailing)
 +      (whitespace-line, whitespace-space-before-tab)
 +      (whitespace-space-after-tab, whitespace-indentation)
 +      (whitespace-empty):
 +      * emulation/cua-base.el (cua-global-mark):
 +      * eshell/em-prompt.el (eshell-prompt):
 +      * net/newst-plainview.el (newsticker-new-item-face)
 +      (newsticker-old-item-face, newsticker-immortal-item-face)
 +      (newsticker-obsolete-item-face, newsticker-date-face)
 +      (newsticker-statistics-face, newsticker-default-face):
 +      * net/newst-reader.el (newsticker-feed-face)
 +      (newsticker-extra-face, newsticker-enclosure-face):
 +      * net/newst-treeview.el (newsticker-treeview-face)
 +      (newsticker-treeview-new-face, newsticker-treeview-old-face)
 +      (newsticker-treeview-immortal-face)
 +      (newsticker-treeview-obsolete-face)
 +      (newsticker-treeview-selection-face):
 +      * net/rcirc.el (rcirc-my-nick, rcirc-other-nick)
 +      (rcirc-bright-nick, rcirc-server, rcirc-timestamp)
 +      (rcirc-nick-in-message, rcirc-nick-in-message-full-line)
 +      (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword):
 +      * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator)
 +      (nxml-outline-active-indicator, nxml-outline-ellipsis):
 +      * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial)
 +      (mpuz-text):
 +      * progmodes/vera-mode.el (vera-font-lock-number)
 +      (vera-font-lock-function, vera-font-lock-interface):
 +      * textmodes/table.el (table-cell): Use new-style face specs, and
 +      don't use the old :bold and :italic attributes.
 +
 +      * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class)
 +      (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name)
 +      (ebrowse-member-class, ebrowse-progress): Likewise.
 +      (ebrowse-tree-mark-face, ebrowse-root-class-face)
 +      (ebrowse-file-name-face, ebrowse-default-face)
 +      (ebrowse-member-attribute-face, ebrowse-member-class-face)
 +      (ebrowse-progress-face): Remove obsolete faces.
 +
 +      * progmodes/flymake.el (flymake-errline, flymake-warnline):
 +      Inherit from error and warning faces respectively.
 +
 +      * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
 +      Likewise.
 +      (flyspell-incorrect-face, flyspell-duplicate-face):
 +      Remove obsolete aliases.
 +
 +2012-06-08  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (tramp-compat-temporary-file-directory):
 +      Avoid infloop.
 +
 +2012-06-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * startup.el (argv, argi): Make lexically scoped.
 +      * emacs-lisp/float-sup.el (pi): Use internal-make-var-non-special.
 +      * emacs-lisp/cl-macs.el: Use lexical-binding.
 +      Rename cl-bind-* to cl--bind-*.
 +      * files.el: Don't require `cl' since it doesn't use it.
 +      * emacs-lisp/pcase.el, emacs-lisp/macroexp.el: Add coding cookie.
 +
 +2012-06-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * textmodes/texinfmt.el: Fix bug#11640 (reverts part of 2008-07-31T05:33:56Z!dann@ics.uci.edu).
 +      (texinfo-format-printindex): Use `texinfo-sort-region' in all platforms,
 +      instead of calling external sort utility.
 +      (texinfo-sort-region, texinfo-sort-startkeyfun): Restore functions.
 +
 +2012-06-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * descr-text.el (describe-char): Mention how to insert the
 +      character, if the current input method doesn't support it.
 +      See the discussion in this thread for the details:
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00533.html.
 +
 +2012-06-08  Sam Steingold  <sds@gnu.org>
 +
 +      * bindings.el (global-map): Bind XF86Forward to next-buffer and
 +      XF86Back to previous-buffer.
 +      (minibuffer-local-map): Bind them to next-history-element and
 +      previous-history-element respectively.
 +      * help-mode.el (help-mode-map): Bind them to help-go-forward and
 +      help-go-back respectively.
 +      * info.el (Info-mode-map): Bind them to Info-history-forward and
 +      Info-history-back respectively.
 +      These are the keys next to Up on the ThinkPad keyboard.
 +
 +2012-06-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Get rid of cl-lexical-let, keeping only lexical-let for compatibility.
 +      * emacs-lisp/cl-macs.el: Provide itself.
 +      (cl--labels-convert-cache): New var.
 +      (cl--labels-convert): New function.
 +      (cl-flet, cl-labels): New implementation with new semantics, relying on
 +      lexical-binding.
 +      * emacs-lisp/cl.el: Mark compatibility aliases as obsolete.
 +      (cl-closure-vars, cl--function-convert-cache)
 +      (cl--function-convert): Move from cl-macs.el.
 +      (lexical-let, lexical-let*, flet, labels): Move from cl-macs.el and
 +      rename by removing the "cl-" prefix.
 +      * emacs-lisp/macroexp.el (macroexp-unprogn): New function.
 +
 +2012-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl.el (cl-macroexpand, cl-macro-environment)
 +      (cl-macroexpand-all, cl-not-hash-table, cl-builtin-gethash)
 +      (cl-builtin-remhash, cl-builtin-clrhash, cl-builtin-maphash)
 +      (cl-map-keymap, cl-copy-tree, cl-gethash, cl-puthash, cl-remhash)
 +      (cl-clrhash, cl-maphash, cl-make-hash-table, cl-hash-table-p)
 +      (cl-hash-table-count): Add old compatibility aliases.
 +
 +      * emacs-lisp/cl-macs.el (cl-macro-environment): Remove var.
 +      Use macroexpand-all-environment instead.
 +      (cl--old-macroexpand): New var.
 +      (cl--sm-macroexpand): New function.
 +      (cl-symbol-macrolet): Use it during macro expansion.
 +      (cl--function-convert-cache): New var.
 +      (cl--function-convert): New function, extracted from
 +      cl-macroexpand-all.
 +      (cl-lexical-let): Use it.
 +
 +      * emacs-lisp/cl-lib.el (cl-macro-environment): Remove decl.
 +      (cl-macroexpand): Move to cl-macs.el and rename to cl--sm-macroexpand.
 +      (cl-member): Remove old alias.
 +
 +      * emacs-lisp/cl-extra.el (cl-map-keymap, cl-copy-tree)
 +      (cl-not-hash-table, cl-builtin-gethash, cl-builtin-remhash)
 +      (cl-builtin-clrhash, cl-builtin-maphash, cl-gethash, cl-puthash)
 +      (cl-remhash, cl-clrhash, cl-maphash, cl-make-hash-table)
 +      (cl-hash-table-p, cl-hash-table-count): Move to cl.el.
 +      (cl-macroexpand-cmacs): Remove var.
 +      (cl-macroexpand-all, cl-macroexpand-body): Remove funs.
 +      Use macroexpand-all instead.
 +
 +2012-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*, macroexp-if)
 +      (macroexp-let², macroexp--const-symbol-p, macroexp-const-p)
 +      (macroexp-copyable-p): New functions and macros.
 +      * emacs-lisp/edebug.el (edebug-unwrap):
 +      * emacs-lisp/disass.el (disassemble-internal): Use macroexp-progn.
 +      * emacs-lisp/pcase.el: Use macroexp-let*, macroexp-if, ...
 +      (pcase--let*): Remove.
 +      * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p)
 +      (byte-compile-constp): Remove.  Use macroexp--const-symbol-p and
 +      macroexp-const-p instead.
 +      * emacs-lisp/byte-opt.el: Use macroexp-const-p and macroexp-progn.
 +
 +      * emacs-lisp/cl-macs.el: Clean up the name space by using "cl--"
 +      instead of "cl-" for internal definitions.  Use macroexp-const-p.
 +      (cl-old-bc-file-form): Remove var.
 +      (cl-const-exprs-p): Remove fun.
 +      (cl-labels, cl-macrolet): Use backquote.
 +      (cl-lexical-let): Use cl-symbol-macrolet.  Don't use cl-defun-expander.
 +      (cl-defun-expander, cl-byte-compile-compiler-macro): Remove fun.
 +      (cl-define-setf-expander): Rename from cl-define-setf-method.
 +      * emacs-lisp/cl.el: Adjust alias for define-setf-method.
 +
 +      * international/mule-cmds.el: Don't require CL.
 +      (view-hello-file): Don't use `letf'.
 +
 +2012-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * tmm.el (tmm-prompt): Use string-prefix-p.
 +      (tmm-completion-delete-prompt): Don't affect current-buffer outside.
 +      (tmm-add-prompt): Use minibuffer-completion-help.
 +      (tmm-delete-map): Remove.
 +
 +      * subr.el (kbd): Make it its own function.
 +
 +2012-06-07  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el: Use `eval-when-compile' for requiring `cl.el'.
 +      Silence compiler warnings.  Fix versions.
 +      (rst-position-if, rst-position, rst-some, rst-signum): New functions.
 +      (rst-shift-region, rst-adornment-level, rst-compute-tabs)
 +      (rst-indent-line, rst-shift-region, rst-forward-line): Use them.
 +      (rst-package-emacs-version-alist): Correct Emacs version to
 +      represent major merge with upstream.
 +      (rst-transition, rst-adornment, rst-compile-toolsets): Fix versions.
 +
 +2012-06-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * mail/emacsbug.el (report-emacs-bug): Add relevant EMACS env-vars.
 +      Only print environment variables if set.
 +
 +2012-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el: Don't require CL since we don't use it.
 +      (macroexp--cons): Rename from maybe-cons.
 +      (macroexp--accumulate): Rename from macroexp-accumulate.
 +      (macroexp--all-forms): Rename from macroexpand-all-forms.
 +      (macroexp--all-clauses): Rename from macroexpand-all-clauses.
 +      (macroexp--expand-all): Rename from macroexpand-all-1.
 +
 +2012-06-06  Sam Steingold  <sds@gnu.org>
 +
 +      * calendar/calendar.el (calendar-in-read-only-buffer):
 +      Call `special-mode' to enable the standard read-only keybindings.
 +
 +2012-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Don't spam the output
 +      with "loading" messages (bug#11635).
 +
 +2012-06-06  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * files.el (enable-remote-dir-locals): New option.
 +      (hack-dir-local-variables): Use it.  (Bug#1933, Bug#6731)
 +
 +      * net/tramp-compat.el (tramp-compat-temporary-file-directory):
 +      Ensure, that the temp directory is local.
 +
 +      * net/tramp-sh.el (tramp-sh-handle-write-region): Let-bind
 +      `temporary-file-directory'.
 +
 +      * progmodes/python.el (python-send-region): Ensure, that the
 +      temporary file is created also in the remote case.
 +
 +2012-06-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
 +      (vc-rcs-update-changelog): Use it.
 +
 +      * emacs-lisp/authors.el (authors-fixed-entries): Remove vcdiff.
 +
 +      * vc/vc-sccs.el (vc-sccs-write-revision): New function.
 +      (vc-sccs-workfile-unchanged-p): Use vc-sccs-write-revision.
 +      (vc-sccs-diff): Replace use of the external vcdiff script.
 +
 +2012-06-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * ledit.el: Move to obsolete/.
 +
 +2012-06-05  Sam Steingold  <sds@gnu.org>
 +
 +      * calendar/calendar.el (calendar-exit): Reinstate the 2012-03-28
 +      patch (Bug#11140).
 +
 +2012-06-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cust-print.el: Move to obsolete.
 +
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during
 +      compiler-macro expansion.
 +
 +      Add native compiler-macro support.
 +      * emacs-lisp/macroexp.el (macroexpand-all-1):
 +      Support compiler-macros directly.  Properly follow aliases and apply
 +      the compiler macros more thoroughly.
 +      * emacs-lisp/cl.el: Don't copy compiler-macro properties any more since
 +      macroexpand now properly follows aliases.
 +      * emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro)
 +      (cl-compiler-macroexpand): Use new prop.
 +      * emacs-lisp/byte-opt.el (featurep): Optimize earlier.
 +
 +      * emacs-lisp/cl-lib.el (custom-print-functions): Add alias.
 +
 +2012-06-05  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (get-lru-window, get-mru-window, get-largest-window):
 +      New argument NOT-SELECTED to avoid picking the selected window.
 +      (window--display-buffer-1, window--display-buffer-2): Replace by
 +      new function window--display-buffer
 +      (display-buffer-same-window, display-buffer-reuse-window)
 +      (display-buffer-pop-up-frame, display-buffer-pop-up-window):
 +      Use window--display-buffer.
 +      (display-buffer-use-some-window): Remove temporary dedication
 +      hack by calling get-lru-window and get-largest-window with
 +      NOT-SELECTED argument non-nil.  Call window--display-buffer.
 +
 +2012-06-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc/vc-sccs.el (vc-sccs-workfile-unchanged-p):
 +      Replace external vcdiff script.
 +
 +2012-06-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el (cl-values, cl-values-list): Fix up last change.
 +
 +2012-06-04  Chong Yidong  <cyd@gnu.org>
 +
 +      * image.el (imagemagick-types-inhibit): Revert last change.
 +      Add INFO and M.
 +      (imagemagick-enabled-types): Remove CIN and EPS*.
 +
 +2012-06-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-lib.el: Rename from cl.el.
 +      * emacs-lisp/cl.el: New compatibility file.
 +      * emacs-lisp/cl-lib.el, emacs-lisp/cl-seq.el, emacs-lisp/cl-macs.el:
 +      * emacs-lisp/cl-extra.el: Rename all top-level functions and variables
 +      to obey the "cl-" prefix.
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Adjust to new name.
 +
 +2012-06-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/authors.el (authors-aliases): Addition.
 +
 +      * cus-start.el (tool-bar-style, tool-bar-max-label-size):
 +      Fix :version.
 +
 +2012-06-03  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el: Add comments.
 +      (rst-transition, rst-adornment): New faces.
 +      (rst-adornment-faces-alist): Make default safe to reevaluate.
 +      Fixes
 +      http://sourceforge.net/tracker/?func=detail&atid=422030&aid=3479603&group_id=38414.
 +      Improve customization tags.
 +      (rst-define-level-faces): Clarify meaning.
 +
 +2012-06-03  Chong Yidong  <cyd@gnu.org>
 +
 +      * progmodes/compile.el (compilation-mode-line-fail)
 +      (compilation-mode-line-run, compilation-mode-line-exit):
 +      New faces.
 +      (compilation-start, compilation-handle-exit): Use them (Bug#11032).
 +
 +2012-06-03  Jack Duthen  <duthen.mac.01@gmail.com>  (tiny change)
 +
 +      * progmodes/which-func.el (which-func-update-ediff-windows):
 +      New function.  Use it in ediff-select-hook (Bug#11478).
 +
 +2012-06-03  Chong Yidong  <cyd@gnu.org>
 +
 +      * bindings.el: Remove explicit help text from format-mode-line.
 +      It is now supplied by mode-line-default-help-echo.
 +      (mode-line-front-space, mode-line-end-spaces)
 +      (mode-line-misc-info): New variables.
 +      (mode-line-modes, mode-line-position): Move the default value to
 +      the variable definition.
 +      (mode-line-default-help-echo): New defcustom.
 +      (mode-line-mule-info-help-echo, mode-line-read-only-help-echo)
 +      (mode-line-modified-help-echo): New functions.
 +      (mode-line-mule-info, mode-line-modified): Use them.
 +      (mode-line-eol-desc, propertized-buffer-identification):
 +      Consistency fixes for help text.
 +      (mode-line-coding-system-map): Allow using mouse-3 to invoke
 +      set-buffer-file-coding-system (Bug#289).
 +      (mode-line-mule-info-help-echo): Update help text.
 +
 +2012-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (execute-extended-command): Set real-this-command
 +      (bug#11506).
 +
 +2012-06-02  Chong Yidong  <cyd@gnu.org>
 +
 +      Remove incorrect uses of "modeline" in comments, docstrings, and
 +      function/variable names (Bug#10329).
 +
 +      * cus-edit.el (mode-line):
 +      * dframe.el (dframe-mouse-hscroll):
 +      * emacs-lisp/re-builder.el:
 +      * emacs-lisp/easy-mmode.el (define-minor-mode):
 +      * frame.el (set-frame-name):
 +      * help.el (lookup-minor-mode-from-indicator):
 +      * net/rcirc.el (rcirc-activity-string, rcirc-short-buffer-name):
 +      * progmodes/cc-cmds.el (c-toggle-auto-newline)
 +      (c-toggle-hungry-state):
 +      * progmodes/antlr-mode.el (antlr-language-alist):
 +      * progmodes/idlw-shell.el (idlwave-shell-electric-stop-line-face):
 +      * progmodes/vhdl-mode.el (vhdl-mode):
 +      * progmodes/which-func.el (which-func, which-func-cleanup-function):
 +      * term/ns-win.el (ns-face-at-pos):
 +      * term/sup-mouse.el (sup-mouse-report):
 +      * textmodes/flyspell.el (flyspell-mode-line-string):
 +      * textmodes/ispell.el (ispell-highlight-face):
 +      * textmodes/reftex-global.el:
 +      * vc/vc-arch.el (vc-arch-mode-line-string):
 +      * vc/vc-cvs.el (vc-cvs-mode-line-string):
 +      * vc/vc-git.el (vc-git-mode-line-string):
 +      * vc/vc-hooks.el (vc-display-status)
 +      (vc-default-mode-line-string):
 +      * vc/vc-mtn.el (vc-mtn-mode-line-string): Doc fixes.
 +
 +      * ansi-color.el (ansi-color-faces-vector): Change default faces.
 +
 +      * dired.el (dired-sort-set-mode-line): Rename from
 +      dired-sort-set-modeline.  All callers changed.
 +
 +      * eshell/esh-mode.el (eshell-status-in-mode-line): Rename from
 +      eshell-status-in-modeline.
 +
 +      * foldout.el (foldout-mode-line-string): Rename from
 +      foldout-modeline-string.  All callers changed.
 +      (foldout-update-mode-line): Rename from foldout-update-modeline.
 +
 +      * subr.el (redraw-modeline): Make into obsolete alias.
 +
 +      * calendar/timeclock.el (timeclock-mode-line-display): Rename from
 +      timeclock-modeline-display.  Make old name an alias.
 +      (timeclock-update-mode-line): Likewise.  All callers changed.
 +      (timeclock-mode-line-display): No need to check before using
 +      add-hook.
 +      (timeclock-relative, timeclock-day-over-hook)
 +      (timeclock-use-elapsed, timeclock-mode-string)
 +      (timeclock-mode-line-display): Doc fix, "modeline" -> "mode line".
 +
 +      * emulation/crisp.el (crisp-mode-mode-line-string): Rename from
 +      crisp-mode-modeline-string.
 +
 +      * play/solitaire.el (solitaire-build-mode-line): Rename from
 +      solitaire-build-modeline.  All callers changed.
 +
 +      * play/zone.el (zone-hiding-mode-line): Rename from
 +      zone-hiding-modeline.  All callers changed.
 +      (zone): Remove unusued `modeline-hidden-level' property.
 +
 +      * progmodes/xscheme.el (xscheme-mode-line-initialize): Rename from
 +      xscheme-modeline-initialize.  All callers changed.
 +
 +      * strokes.el (strokes-lighter): Rename from
 +      strokes-modeline-string.
 +
 +      * textmodes/sgml-mode.el (html-face-tag-alist)
 +      (html-tag-face-alist): Use mode-line face instead of obsolete
 +      alias modeline.
 +
 +2012-06-02  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el: Always require `cl'.
 +      (rst-mode-map): Fix meaning of C-M-a / C-M-e.
 +
 +2012-06-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * image.el (imagemagick-enabled-types): Rename from
 +      imagemagick-types-enable.  Add many more types.
 +      (imagemagick-types-inhibit): Change default to nil.
 +      (imagemagick-filter-types): Caller changed.
 +
 +2012-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el: Use backquotes.
 +      (cl-transform-function-property): Use eval-and-compile rather than
 +      abusing `require'.
 +      (defstruct): Use declare-function instead of with-no-warnings.
 +
 +      * emacs-lisp/bytecomp.el: Fix last change (bug#11594).
 +      (byte-compile-output-docform): Re-add the print-circle bindings.
 +      (byte-compile-fix-header): Use #$ just because it's shorter.
 +      (byte-compile-output-file-form): Remove defun/defmacro.
 +
 +2012-06-01  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * simple.el (choose-completion): Remove now obsolete binding for
 +      owindow.
 +
 +2012-06-01  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-check-for-regexp): Search from buffer end,
 +      in order to avoid "Stack overflow in regexp matcher".
 +
 +2012-05-31  Glenn Morris  <rgm@gnu.org>
 +
 +      * image.el: For clarity, call imagemagick-register-types at
 +      top-level, rather than relying on a custom :initialize.
 +      (imagemagick-types-enable): New option.  (Bug#11557)
 +      (imagemagick-filter-types): New function.  (Bug#7406)
 +      (imagemagick-register-types): Use imagemagick-filter-types.
 +      If disabling support, remove elements altogether rather
 +      than using an impossible regexp.
 +      (imagemagick-types-inhibit): Give it the default init function.
 +
 +2012-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-fix-header):
 +      Handle arbitrary file name lengths (Bug#11585).
 +
 +2012-05-31  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * desktop.el (desktop-read): Clear previous and next buffers for
 +      all windows and bury *Messages* buffer (bug#11556).
 +
 +2012-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Add `declare' for `defun'.  Align `defmacro's with it.
 +      * emacs-lisp/easy-mmode.el (define-minor-mode)
 +      (define-globalized-minor-mode): Don't autoload the var definitions.
 +      * emacs-lisp/byte-run.el: Use lexical-binding.
 +      (defun-declarations-alist, macro-declarations-alist): New vars.
 +      (defmacro, defun): Use them.
 +      (make-obsolete, define-obsolete-function-alias)
 +      (make-obsolete-variable, define-obsolete-variable-alias):
 +      Use `declare'.
 +      (macro-declaration-function): Mark obsolete.
 +      * emacs-lisp/autoload.el: Use lexical-binding.
 +      (make-autoload): Add `expansion' arg.  Rely more on macro expansion.
 +
 +2012-05-30  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-with-no-warnings):
 +      Define as a macro.
 +      (ispell-kill-ispell, ispell-change-dictionary):
 +      Use `called-interactively-p' for Emacs instead of obsolete
 +      `interactive-p'.
 +
 +2012-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/byte-run.el (defmacro, defun): Move from C.
 +      (macro-declaration-function): Move var from C code.
 +      (macro-declaration-function): Define function with defalias.
 +      * emacs-lisp/macroexp.el (macroexpand-all-1):
 +      * emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
 +      * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't handle
 +      defun/defmacro any more.
 +      * emacs-lisp/bytecomp.el (byte-compile-arglist-signature):
 +      Provide fallback for unknown arglist.
 +      (byte-compile-arglist-warn): Change calling convention.
 +      (byte-compile-output-file-form): Move print-vars binding.
 +      (byte-compile-output-docform): Simplify accordingly.
 +      (byte-compile-file-form-defun, byte-compile-file-form-defmacro)
 +      (byte-compile-defmacro-declaration): Remove.
 +      (byte-compile-file-form-defmumble): Generalize to defalias.
 +      (byte-compile-output-as-comment): Return byte-positions.
 +      Simplify callers accordingly.
 +      (byte-compile-lambda): Use `assert'.
 +      (byte-compile-defun, byte-compile-defmacro): Remove.
 +      (byte-compile-file-form-defalias):
 +      Use byte-compile-file-form-defmumble.
 +      (byte-compile-defalias-warn): Remove.
 +
 +2012-05-29  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el: Silence `checkdoc-ispell' errors where
 +      possible.  Fix authors.  Improve comments.  Improve loading of `cl'.
 +
 +      (rst-mode-abbrev-table): Merge definition.
 +      (rst-mode): Make sure `font-lock-defaults' is buffer local.
 +      (rst-define-key, rst-deprecated-keys, rst-call-deprecated): Refactor.
 +
 +2012-05-29  Ulf Jasper  <ulf.jasper@web.de>
 +
 +      * calendar/icalendar.el
 +      (icalendar-export-region): Export UID properly.
 +
 +2012-05-29  Leo Liu  <sdl.web@gmail.com>
 +      * calendar/icalendar.el (icalendar-import-format):
 +      Add `icalendar-import-format-uid' (Bug#11525).
 +      (icalendar-import-format-uid): New.
 +      (icalendar--parse-summary-and-rest, icalendar--format-ical-event):
 +      Export UID.
 +
 +2012-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase--expand): Accept different sets of vars in
 +      different alternative patterns.
 +      (pcase-codegen): Be more careful to preserve identity.
 +      (pcase--u1): Don't forget to mark vars as used.
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-constp): Treat #'v as a constant.
 +      (byte-compile-close-variables): Bind byte-compile--outbuffer here...
 +      (byte-compile-from-buffer): ...rather than here.
 +
 +      * emacs-lisp/byte-opt.el (byte-compile-inline-expand): Don't re-preprocess
 +      functions from byte-compile-function-environment.
 +
 +2012-05-29  Troels Nielsen  <bn.troels@gmail.com>
 +
 +      * window.el (window-deletable-p): Avoid deleting the root window
 +      of a frame with an active minibuffer.
 +
 +2012-05-29  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * simple.el (choose-completion): Use quit-window (Bug#11567).
 +
 +2012-05-29  Chong Yidong  <cyd@gnu.org>
 +
 +      * whitespace.el (whitespace-cleanup): Fix usage of
 +      whitespace-empty-at-bob-regexp (Bug#11492).
 +
 +2012-05-29  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 +
 +      * vc/vc.el (vc-revert, vc-rollback): Dont kill vc-diff buffer on
 +      revert (Bug#11488).
 +
 +2012-05-29  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-mode-map): Bind `M-s _' to
 +      `isearch-toggle-symbol'.  Bind `M-s c' to
 +      `isearch-toggle-case-fold'.
 +      (search-map): Bind `M-s _' to `isearch-forward-symbol'.
 +      (isearch-forward): Add `M-s _' to the docstring.
 +      (isearch-forward-symbol, isearch-toggle-case-fold)
 +      (isearch-symbol-regexp): New functions.  (Bug#11381)
 +
 +2012-05-29  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-word): Add docstring.  (Bug#11381)
 +      (isearch-occur, isearch-search-and-update): If `isearch-word' is
 +      a function, call it to get the regexp.
 +      (isearch-message-prefix): If `isearch-word' holds a symbol, use its
 +      property `isearch-message-prefix' instead of the string "word ".
 +      (isearch-search-fun-default): For the case of `isearch-word',
 +      return a lambda that calls re-search-forward/re-search-backward
 +      with a regexp returned by `word-search-regexp' or by the function
 +      in `isearch-word'.
 +
 +2012-05-29  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-search-fun-default): New function.
 +      (isearch-search-fun): Move default part to the new function
 +      `isearch-search-fun-default'.
 +      (isearch-search-fun-function): Set the default value to
 +      `isearch-search-fun-default'.  (Bug#11381)
 +
 +      * comint.el (comint-history-isearch-end):
 +      Use `isearch-search-fun-default'.
 +      (comint-history-isearch-search): Use `isearch-search-fun-default'
 +      and remove spacial case for `isearch-word'.
 +      (comint-history-isearch-wrap): Remove spacial case for
 +      `isearch-word'.
 +
 +      * hexl.el (hexl-isearch-search-function):
 +      Use `isearch-search-fun-default'.
 +
 +      * info.el (Info-isearch-search): Use `isearch-search-fun-default'.
 +      Use `word-search-regexp' for `isearch-word'.
 +
 +      * misearch.el (multi-isearch-search-fun):
 +      Use `isearch-search-fun-default'.
 +
 +      * simple.el (minibuffer-history-isearch-search):
 +      Use `isearch-search-fun-default' and remove spacial case for
 +      `isearch-word'.
 +      (minibuffer-history-isearch-wrap): Remove spacial case for
 +      `isearch-word'.
 +
 +      * textmodes/reftex-global.el (reftex-isearch-wrap-function):
 +      Remove spacial case for `isearch-word'.
 +      (reftex-isearch-isearch-search): Use `isearch-search-fun-default'.
 +
 +2012-05-28  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      Decrease XEmacs incompatibilities.
 +      * textmodes/flyspell.el (flyspell-check-pre-word-p):
 +      Use `string-match'.
 +      (flyspell-delete-region-overlays): Use alternative definition for
 +      XEmacs.
 +      (flyspell-delete-all-overlays): Use `flyspell-delete-region-overlays'.
 +      (flyspell-word): Use `process-kill-without-query' if XEmacs.
 +      (flyspell-mode-on): Use `interactive-p' if XEmacs.
 +      (flyspell-incorrect-face, flyspell-duplicate-face): Do not use
 +      `define-obsolete-face-alias' under XEmacs, but old method.
 +
 +      * textmodes/ispell.el (ispell-with-no-warnings): XEmacs alternative
 +      `with-no-warnings' definition or Emacs alias.
 +      (ispell-command-loop, ispell-message): Use `ispell-with-no-warnings'.
 +      (ispell-word): Do not use `region-p' if XEmacs.
 +
 +2012-05-28  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-find-aspell-dictionaries):
 +      Check for `ispell-dictionary-base-alist' instead of full
 +      `ispell-dictionary-alist'.
 +      (ispell-init-process): Show spellchecker when starting new Ispell
 +      process.
 +
 +2012-05-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/vhdl-mode.el: Sync with upstream 3.33.28.
 +      http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html#release-notes-3.33
 +
 +2012-05-27  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * version.el (motif-version-string, gtk-version-string)
 +      (ns-version-string): Declare.
 +
 +2012-05-27  Juri Linkov  <juri@jurta.org>
 +
 +      * emacs-lisp/lisp-mode.el (eval-defun-2): Use `eval-sexp-add-defvars'
 +      after the `eval-defun-1' specialcaseing
 +      like in `edebug-eval-defun' (bug#10181).
 +
 +      * emacs-lisp/edebug.el (edebug-eval-defun): Set `face-documentation'
 +      like in `eval-defun-1'.
 +
 +2012-05-27  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * mail/sendmail.el (mail-yank-region):
 +      Recognize rmail-yank-current-message in addition to insert-buffer.
 +      Fixes mail-mode's "C-c C-r" that otherwise does nothing when invoked in
 +      a *mail* buffer created through rmail-start-mail with sendmail as
 +      mail-user-agent.
 +
 +2012-05-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * net/gnutls.el (gnutls-min-prime-bits): Improve docstring.
 +      Default to 256 (Bug#11267).
 +
 +      * help.el (describe-mode): Doc fix.
 +
 +2012-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * w32-fns.el (w32-init-info): Remove.
 +      * paths.el (Info-default-directory-list): Add w32-init-info equivalent.
 +
 +      * info.el (info-initialize): For self-contained NS builds, put the
 +      included info/ directory at the front.  (Bug#2791)
 +
 +      * paths.el (Info-default-directory-list): Make it a defcustom,
 +      mainly so that we can use custom-initialize-delay.
 +
 +2012-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (buffer-has-markers-at): Mark obsolete.
 +
 +      * subr.el (lambda): Use declare.
 +
 +      * emacs-lisp/lisp-mode.el (lambda):
 +      * emacs-lisp/edebug.el (lambda): Move properties to its definition.
 +
 +2012-05-26  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 +
 +      * thingatpt.el (forward-same-syntax): Handle no ARG case.  (Bug#11560)
 +
 +2012-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/cc-mode.el (auto-mode-alist): Fix typo.
 +
 +2012-05-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * paths.el: Remove no-byte-compile.
 +      * loadup.el: No need to load paths.el uncompiled.
 +
 +      * image.el (imagemagick-types-inhibit): Doc fix.
 +
 +      * version.el: Remove no-byte-compile and associated formatting.
 +      * loadup.el: No need to load version.el uncompiled.  AFAICS, this
 +      is ancient code from when there was an "inc-vers.el".
 +
 +2012-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/gdb-mi.el: Minor style changes.
 +      (gdb-enable-debug, gdb-speedbar-auto-raise, gdb-many-windows):
 +      Turn into minor modes.
 +      (gdb--if-arrow): Rename from gdb-if-arrow, make it hygienic.
 +      (gdb-mouse-until, gdb-mouse-jump): Adjust uses accordingly.
 +      (gdb-shell): Remove unneeded let-binding.
 +      (gdb-get-many-fields): Eliminate O(n²) behavior.
 +
 +2012-05-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * cus-start.el <vertical-centering-font-regexp>: Avoid warning on
 +      platforms that don't link in fontset.c.
 +
 +2012-05-25  Juri Linkov  <juri@jurta.org>
 +
 +      Use the same diff color scheme as in modern VCSes (bug#10181).
 +
 +      * vc/diff-mode.el (diff-header, diff-file-header): Remove "green"
 +      to avoid confusion with `diff-added' that now uses green colors.
 +      (diff-removed): Use shades of red.
 +      (diff-added): Use shades of green.
 +      (diff-changed): Leave just the yellow color.
 +      (diff-use-changed-face): New variable.
 +      (diff-font-lock-keywords): Use `diff-use-changed-face' to decide
 +      how to highlight context diff changes.
 +      (diff-refine-change): Use shades of yellow.
 +      (diff-refine-removed): New face that uses shades of red.
 +      (diff-refine-added): New face that uses shades of green.
 +      (diff-refine-hunk): Use `diff-refine-change', `diff-refine-added',
 +      `diff-refine-removed' in the call to `smerge-refine-subst'
 +      depending on the value of `diff-use-changed-face'.
 +
 +      * vc/smerge-mode.el (smerge-mine): Use shades of red.
 +      (smerge-other): Use shades of green.
 +      (smerge-base): Use shades of yellow.
 +      (smerge-refined-change): Empty face.
 +      (smerge-refined-removed): New face that uses shades of red.
 +      (smerge-refined-added): New face that uses shades of green.
 +      (smerge-refine-subst): Rename arg `props' to `props-c'.  Add new
 +      args `props-r' and `props-a', and use them.  Doc fix.
 +      (smerge-refine): Evaluate `smerge-use-changed-face' and depending
 +      on its value use different faces `smerge-refined-change',
 +      `smerge-refined-removed', `smerge-refined-added' in the call to
 +      `smerge-refine-subst'.
 +
 +      * vc/ediff-init.el (ediff-current-diff-A, ediff-fine-diff-A):
 +      Add face condition `min-colors 88' with shades of red.
 +      (ediff-current-diff-B, ediff-fine-diff-B): Add face condition
 +      `min-colors 88' with shades of green.
 +      (ediff-current-diff-C, ediff-fine-diff-C): Add face condition
 +      `min-colors 88' with shades of yellow.
 +
 +2012-05-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * paths.el (prune-directory-list, remote-shell-program): Move to...
 +      * files.el (prune-directory-list, remote-shell-program): ...here.
 +      For the latter, delay initialization, prefer ssh, just search PATH.
 +
 +      * paths.el (term-file-prefix): Move to faces.el (the only user).
 +      * faces.el (term-file-prefix): Move here, make it a defcustom.
 +
 +      * paths.el (news-directory, news-path, news-inews-program):
 +      Move to gnus/nnspool.el.
 +
 +      * paths.el (gnus-default-nntp-server): Remove (gnus.el defines it).
 +
 +      * paths.el (rmail-file-name, rmail-spool-directory): Move from here...
 +      * mail/rmail.el (rmail-file-name, rmail-spool-directory): ... to here.
 +      Make the latter a defcustom, with a delayed initialization.
 +
 +      * paths.el (gnus-nntp-service, gnus-local-organization): Remove.
 +      These were deleted from Gnus itself late 2010.
 +
 +2012-05-22  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/which-func.el (which-func-ff-hook):
 +      Check against user-error, not error.
 +
 +      * emacs-lisp/edebug.el (top): Do not load or set up loading of
 +      cl-specs.el, which no longer exists.
 +
 +2012-05-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * info.el (info-emacs-bug): New command.
 +      * menu-bar.el (menu-bar-help-menu): Add "How to Report a Bug" to Help.
 +      * mail/emacsbug.el (report-emacs-bug): Replace with info-emacs-bug.
 +
 +2012-05-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * makefile.w32-in (update-subdirs-SH):
 +      * Makefile.in (update-subdirs): Update for moved update-subdirs.
 +
 +2012-05-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * hi-lock.el (hi-lock-face-defaults): Move obsolete before definition.
 +
 +      * progmodes/compile.el (compilation-error-regexp-alist-alist):
 +      Simplify Maven regexp, and make sure the file can't start with a space
 +      (bug#11517).
 +
 +2012-05-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
 +      Scrap superfluous subshells.
 +
 +2012-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-root-dir): New var.
 +      (byte-compile-warning-prefix, batch-byte-compile-file): Use it.
 +
 +2012-05-19  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc.el (calc-ensure-consistent-units): New variable.
 +
 +      * calc/calc-units.el (math-consistent-units-p)
 +      (math-check-unit-consistency): New functions.
 +      (calc-quick-units, calc-convert-units):
 +      Use `math-check-unit-consistency' when `calc-ensure-consistent-units'
 +      is non-nil.
 +      (calc-extract-units): Fix typo.
 +
 +2012-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/vc-bzr.el (vc-bzr-state-heuristic): Save match-data around sha1.
 +
 +      * textmodes/flyspell.el: Commenting style, plus code simplifications.
 +      (flyspell-default-deplacement-commands): Don't spell check after
 +      repeated window/frame switches (e.g. triggered by mouse-movement).
 +      (flyspell-delay-commands, flyspell-deplacement-commands): Use mapc.
 +      (flyspell-debug-signal-word-checked): Simplify and fit in 80 cols.
 +      (flyspell-casechars-cache, flyspell-ispell-casechars-cache)
 +      (flyspell-not-casechars-cache, flyspell-ispell-not-casechars-cache):
 +      Remove unused vars.
 +      (flyspell-get-casechars, flyspell-get-not-casechars):
 +      Simplify; Don't bother removing a ] just to add it back.
 +      * textmodes/ispell.el (ispell-program-name): Use executable-find.
 +
 +2012-05-18  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
 +
 +      * calc/calc-lang.el (math-C-parse-bess, math-C-parse-fma):
 +      New functions.
 +      (math-function-table): Add support for more C functions.
 +
 +2012-05-18  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/flyspell.el (flyspell-check-pre-word-p)
 +      (flyspell-check-word-p, flyspell-debug-signal-word-checked):
 +      Protect delay handling for otherchars against empty otherchars.
 +
 +2012-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/lisp-mode.el (doc-string-elt): Move those properties to
 +      their respective macro declarations.
 +      * skeleton.el (define-skeleton):
 +      * progmodes/compile.el (define-compilation-mode):
 +      * ibuf-macs.el (define-ibuffer-sorter, define-ibuffer-op)
 +      (define-ibuffer-filter):
 +      * emacs-lisp/generic.el (define-generic-mode):
 +      * emacs-lisp/easy-mmode.el (define-minor-mode)
 +      (define-globalized-minor-mode):
 +      * emacs-lisp/cl-macs.el (defun*, defmacro*, defstruct, deftype):
 +      * emacs-lisp/byte-run.el (defsubst):
 +      * custom.el (deftheme): Add doc-string metadata.
 +
 +2012-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el, emacs-lisp/cl.el: Move indent info.
 +
 +2012-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase--u1): Avoid ((lambda ...) ...).
 +
 +      * emacs-lisp/cl.el: Add edebug specs from cl-specs.el.
 +      * emacs-lisp/cl-macs.el: Idem.
 +      * emacs-lisp/cl-specs.el: Remove.
 +
 +2012-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Minor renaming of internal CL functions and variables.
 +      * emacs-lisp/cl-seq.el (cl--adjoin): Rename from cl-adjoin.
 +      (cl--position): Rename from cl-position.
 +      (cl--delete-duplicates): Rename from cl-delete-duplicates.
 +      * emacs-lisp/cl.el (cl--gensym-counter): Rename from *gensym-counter*.
 +      (cl--random-state): Rename from *random-state*.
 +
 +2012-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious
 +      parens around the arg list (bug#11499).
 +
 +2012-05-17  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (word-search-regexp, word-search-backward)
 +      (word-search-forward, word-search-backward-lax)
 +      (word-search-forward-lax): Move functions from search.c
 +      (bug#10145, bug#11381).
 +
 +2012-05-16  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/flyspell.el (flyspell-check-pre-word-p)
 +      (flyspell-check-word-p, flyspell-debug-signal-word-checked):
 +      Delay for otherchars as for normal word components.
 +
 +2012-05-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion--sifn-requote): Fix last change.
 +      (minibuffer-local-must-match-filename-map):
 +      Move define-obsolete-variable-alias before its var.
 +
 +2012-05-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/pcase.el (pcase-let*, pcase-let): Fix edebug spec.
 +
 +      * minibuffer.el (completion--sifn-requote): Handle sifn's truncation
 +      behavior.
 +      (completion--string-equal-p): New function.
 +      (completion--twq-all): Use it to get better assertion failure data.
 +
 +      Only handle ".." and '..' quoting in shell-mode (bug#11466).
 +      * shell.el (shell--unquote&requote-argument, shell--unquote-argument)
 +      (shell--requote-argument): New functions.
 +      (shell-completion-vars): Use them.
 +      (shell--parse-pcomplete-arguments): Rename from
 +      shell-parse-pcomplete-arguments.
 +      * comint.el (comint-word): Obey comint-file-name-quote-list.  Simplify.
 +      (comint--unquote&requote-argument): Don't handle ".." and '..' quoting.
 +      Obey comint-file-name-quote-list.
 +
 +      * emacs-lisp/smie.el (smie-indent--bolp-1): New function.
 +      (smie-indent-keyword): Use it.
 +
 +2012-05-14  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462).
 +
 +2012-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * net/rlogin.el (rlogin-mode-map): Fix last change.
 +
 +2012-05-14  Jason L. Wright  <jason.wright@inl.gov>  (tiny change)
 +
 +      * mail/smtpmail.el (smtpmail-send-command): Send the command and
 +      the following \r\n using a single `process-send-string', since the
 +      Lotus SMTP server refuses to accept any commands if they are sent
 +      with two `process-send-string's (Bug#11444).
 +
 +2012-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * shell.el (shell-parse-pcomplete-arguments):
 +      Obey pcomplete-arg-quote-list inside double-quoted args (Bug#11348).
 +
 +2012-05-14  Wolfgang Jenkner  <wjenkner@inode.at>
 +
 +      * image-mode.el: Fit to width/height for rotated images (Bug#11431).
 +      (image-transform-scale, image-transform-right-angle-fudge): New vars.
 +      (image-transform-width, image-transform-fit-width): New functions.
 +      (image-transform-properties): Use them.
 +      (image-transform-check-size): New function.
 +      (image-toggle-display-image): Use it (for testing).
 +      (image-transform-set-rotation): Reduce angle mod 360.
 +      Delete obsolete comment.
 +
 +2012-05-14  Wolfgang Jenkner  <wjenkner@inode.at>
 +
 +      * image-mode.el: Fix scaling (bug#11399).
 +      (image-transform-resize): Doc fix.
 +      (image-transform-properties): Default scale is 1 and height should
 +      be an integer.
 +
 +2012-05-13  Johan BockgÃ¥rd  <bojohan@gnu.org>
 +
 +      * emacs-lisp/smie.el (smie-next-sexp): Use accessor `op-forw' rather
 +      than hard-coding `car', to fix misbehavior when moving forward.
 +
 +2012-05-13  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/tabulated-list.el (tabulated-list-format)
 +      (tabulated-list-entries, tabulated-list-padding)
 +      (tabulated-list-sort-key): Make permanent-local.
 +
 +      * ebuff-menu.el: Adapt to Buffer Menu changes (Bug#11455).
 +      (electric-buffer-list): Put electric buffer menu
 +      command descriptions in this docstring, instead of the docstring
 +      of electric-buffer-menu-mode.  Code cleanups.
 +      (electric-buffer-menu-mode): Use define-derived-mode.  Rename from
 +      Electric-buffer-menu-mode.
 +      (electric-buffer-update-highlight): Minor code cleanup.
 +
 +2012-05-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/dbus.el (dbus-call-method): Restore events not from D-Bus.
 +      (Bug#11447)
 +
 +2012-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Move define-obsolete-variable-alias before the var's definition.
 +      * vc/log-edit.el (vc-comment-ring, vc-comment-ring-index):
 +      * tooltip.el (tooltip-hook):
 +      * textmodes/reftex-toc.el (reftex-toc-map):
 +      * textmodes/reftex-sel.el (reftex-select-label-map)
 +      (reftex-select-bib-map):
 +      * textmodes/reftex-index.el (reftex-index-map)
 +      (reftex-index-phrases-map):
 +      * speedbar.el (speedbar-syntax-table, speedbar-key-map):
 +      * progmodes/meta-mode.el (meta-mode-map):
 +      * novice.el (disabled-command-hook):
 +      * loadhist.el (unload-hook-features-list):
 +      * frame.el (blink-cursor):
 +      * files.el (find-file-not-found-hooks, write-file-hooks)
 +      (write-contents-hooks):
 +      * emulation/tpu-edt.el (GOLD-map):
 +      * emacs-lock.el (emacs-lock-from-exiting):
 +      * emacs-lisp/generic.el (generic-font-lock-defaults):
 +      * emacs-lisp/chart.el (chart-map):
 +      * dos-fns.el (register-name-alist):
 +      * dired-x.el (dired-omit-files-p):
 +      * desktop.el (desktop-enable):
 +      * cus-edit.el (custom-mode-hook):
 +      * buff-menu.el (buffer-menu-mode-hook):
 +      * bookmark.el (bookmark-read-annotation-text-func)
 +      (bookmark-exit-hooks):
 +      * allout.el (allout-mode-deactivate-hook)
 +      (allout-exposure-change-hook, allout-structure-added-hook)
 +      (allout-structure-deleted-hook, allout-structure-shifted-hook):
 +      * dirtrack.el (dirtrack-toggle, dirtrackp, dirtrack-debug-toggle)
 +      (dirtrack-debug): Move call to define-obsolete-variable-alias so it
 +      comes before the corresponding variable's definition.
 +
 +2012-05-12  Chong Yidong  <cyd@gnu.org>
 +
 +      * buff-menu.el (Buffer-menu-buffer+size-width): Doc fix (Bug#11454).
 +      (Buffer-menu-mouse-select): Restore function (Bug#11459).
 +      (Buffer-menu-mode-map): Bind it.
 +      (Buffer-menu--pretty-name): Add a mouse-face property.
 +
 +2012-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/prolog.el: Use SMIE.  Cleanup regexp setup.
 +      (prolog-upper-case-string, prolog-lower-case-string)
 +      (prolog-atom-char-regexp, prolog-atom-regexp): Initialize in defconst.
 +      (prolog-use-smie, prolog-smie-grammar): New vars.
 +      (prolog-smie-forward-token, prolog-smie-backward-token)
 +      (prolog-smie-rules): New funs.
 +      (prolog-comment-indent): Remove.
 +      (prolog-mode-variables): Use default comment indentation instead.
 +      Setup SMIE.
 +      (prolog-build-case-strings, prolog-set-atom-regexps): Remove.
 +      (prolog-mode): Don't call them any more.
 +      (prolog-electric-colon, prolog-electric-dash)
 +      (prolog-edit-menu-insert-move): Use indent-according-to-mode.
 +
 +      * dabbrev.el (dabbrev-expand): Make "no expansion found" a user-error.
 +
 +      * minibuffer.el (completion--twq-all): Again, allow case differences.
 +
 +      * term.el: Move keymap initialization code to be more idiomatic.
 +      (term-signals-menu, term-mode-map, term-raw-map, term-raw-escape-map)
 +      (term-terminal-menu): Move initialization into declaration.
 +      (term-escape-char): Let the user set it in her .emacs.
 +
 +      * progmodes/sh-script.el: Use post-self-insert-hook&electric-pair-mode.
 +      Provide SMIE-based indentation (not enabled by default yet).
 +      (sh-mode-map): Don't bind electric keys.
 +      Use electric-pair-mode instead of skeleton-pair.
 +      (sh-assignment-regexp): Fit within 80 columns.
 +      (sh-indent-supported): Specify actual shell name instead of boolean.
 +      (sh--maybe-here-document): New fun, from sh-maybe-here-document.
 +      (sh-maybe-here-document): Use it.  Make obsolete.
 +      (sh-electric-here-document-mode) New minor mode.
 +      (sh-mode): Use it.  Don't set sh-indent-supported-here here.
 +      (sh-smie-sh-grammar, sh-smie--sh-operators, sh-smie--sh-operators-re)
 +      (sh-smie--sh-operators-back-re, sh-indent-after-continuation)
 +      (sh-smie-rc-grammar, sh-use-smie): New vars.
 +      (sh-smie--keyword-p, sh-smie--newline-semi-p, sh-smie--sh-keyword-p)
 +      (sh-smie-sh-forward-token, sh-smie--looking-back-at-continuation-p)
 +      (sh-smie-sh-backward-token, sh-smie--continuation-start-indent)
 +      (sh-smie-sh-rules, sh-smie-rc-rules, sh-smie--sh-keyword-in-p)
 +      (sh-smie--rc-after-special-arg-p, sh-smie-rc-backward-token)
 +      (sh-smie-sh-rules, sh-smie--rc-newline-semi-p): New functions.
 +      (sh-set-shell): Use smie-setup if requested.
 +
 +      * term.el (term-set-escape-char): Properly set term-escape-char.
 +      See http://stackoverflow.com/questions/10524656.
 +
 +2012-05-10  Chong Yidong  <cyd@gnu.org>
 +
 +      * ffap.el (ffap-url-unwrap-local): Make it work right (Bug#9131).
 +      Use url-generic-parse-url, and handle host names and Windows
 +      filenames properly.
 +      (ffap-url-unwrap-remote): Use url-generic-parse-url.
 +      (ffap-url-unwrap-remote): Accept list values, specifying a list of
 +      URL schemes to work on.
 +      (ffap--toggle-read-only): New function.
 +      (ffap-read-only, ffap-read-only-other-window)
 +      (ffap-read-only-other-frame): Use it.
 +      (ffap-fixup-url): Don't check ffap-ftp-regexp, since it is not
 +      necessary for ffap-url-unwrap-remote.
 +
 +2012-05-10  Dave Abrahams  <dave@boostpro.com>
 +
 +      * cus-start.el (create-lockfiles): Add it.
 +
 +2012-05-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * net/browse-url.el (browse-url-url-encode-chars): Use upper-case.
 +      (browse-url-encode-url): Encode spaces and quotes (Bug#6300).
 +
 +2012-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * shell.el (shell-completion-vars): Fix last change (bug#11348).
 +
 +2012-05-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * ansi-color.el (ansi-color-process-output): Check for validity of
 +      comint-last-output-start before using it.  This avoids a bad
 +      interaction with gdb-mi's input/output buffer.
 +
 +2012-05-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * files.el (dir-locals-read-from-file):
 +      Mention dir-locals in any error message.
 +
 +2012-05-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/package.el (package-built-in-p): Handle the `emacs'
 +      package (Bug#11410).
 +
 +      * emacs-lisp/package.el (package-buffer-info): Avoid putting local
 +      variables into description.
 +
 +2012-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list like
 +      shell-delimiter-argument-list (bug#11348).
 +      (shell-parse-pcomplete-arguments): Obey pcomplete-arg-quote-list.
 +
 +2012-05-09  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * textmodes/rst.el: Silence byte-compiler warnings.
 +      (rst-re-alist, rst-reset-section-caches): Move around.
 +      (rst-re): Use `characterp', not `char-valid-p'.
 +      (font-lock-beg, font-lock-end): Declare.
 +
 +      * progmodes/idlw-shell.el (specs): Remove reference to deleted
 +      variable `idlwave-shell-activate-alt-keybindings' and simplify.
 +
 +      * eshell/esh-cmd.el (eshell-debug-command): Fix typo in previous change.
 +
 +2012-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * files.el (auto-mode-alist): Treat ".make" like ".mk".
 +
 +2012-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/log-edit.el: Add GNU coding standards highlighting.
 +      (log-edit-font-lock-gnu-style)
 +      (log-edit-font-lock-gnu-keywords): New vars.
 +      (log-edit-font-lock-keywords): New fun.
 +      (log-edit-mode): Don't fold case in font-lock.
 +      (log-edit-font-lock-keywords): Do not assume case-folding.
 +
 +      * imenu.el: Misc cleanup.  Make docstrings out of comments.
 +      Use lexical-binding.
 +      (imenu--index-alist, imenu--last-menubar-index-alist)
 +      (imenu-menubar-modified-tick): Use defvar-local.
 +      (imenu--split-menu): Remove unused var.
 +      (imenu--cleanup-seen): Declare as global.
 +      (imenu--cleanup): Use dolist.
 +
 +      * subr.el (defvar-local): Add debug spec and doc-string position.
 +
 +2012-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * language/burmese.el, language/cham.el, language/czech.el:
 +      * language/english.el, language/georgian.el, language/greek.el:
 +      * language/japanese.el, language/khmer.el, language/korean.el:
 +      * language/lao.el, language/misc-lang.el, language/romanian.el:
 +      * language/sinhala.el, language/slovak.el, language/tai-viet.el:
 +      * language/thai.el, language/utf-8-lang.el:
 +      Remove no-byte-compile setting.
 +
 +      * play/zone.el (zone-pgm-stress): Don't pollute kill-ring.  (Bug#11388)
 +
 +2012-05-08  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 +
 +      * progmodes/make-mode.el (makefile-browse):
 +      Remove unnecessary interactive.  (Bug#11324)
 +
 +2012-05-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * forms-d2.el, forms-pass.el: Move to ../etc/forms directory.
 +
 +      * international/mule.el (find-auto-coding): Make "unibyte: t" obsolete.
 +
 +2012-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * loadup.el: Preload newcomment.el.
 +      * newcomment.el: Move autoload-only code to toplevel.
 +
 +      * buff-menu.el (list-buffers--refresh): Mark `size' as right-align.
 +      * emacs-lisp/tabulated-list.el (tabulated-list-init-header):
 +      Handle new :right-align column property.
 +      (tabulated-list-print-col): Idem, plus use `display' text-property to
 +      try and preserve alignment for variable pitch fonts.
 +
 +2012-05-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/tabulated-list.el: Add no-header-line alternative.
 +      (tabulated-list-use-header-line): New var.
 +      (tabulated-list-init-header): Use it.
 +      (tabulated-list-print-fake-header): New function.
 +      (tabulated-list-print): Use it.
 +      (tabulated-list-sort-button-map): Add non-header-line commands.
 +      (tabulated-list-init-header): Add column name property to basic
 +      labels as well.
 +      (tabulated-list-col-sort): Handle non-header-line button case.
 +      (tabulated-list--sort-by-column-name): Fix a corner case.
 +
 +      * buff-menu.el (list-buffers--refresh):
 +      Handle Buffer-menu-use-header-line.
 +
 +2012-05-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * buff-menu.el: Convert to Tabulated List mode.
 +      (Buffer-menu-buffer+size-width): Make obsolete.
 +      (Buffer-menu-name-width, Buffer-menu-size-width): New variables.
 +      (Buffer-menu-mode-map): Inherit from tabulated-list-mode-map.
 +      (Buffer-menu-mode): Derive from tabulated-list-mode.  Move command
 +      documentation into docstring of buffer-menu.
 +      (Buffer-menu-toggle-files-only): Add an informative message.
 +      (Buffer-menu-sort): Convert to alias for tabulated-list-sort.
 +      (Buffer-menu-buffer, Buffer-menu-beginning, Buffer-menu-mark)
 +      (Buffer-menu-unmark, Buffer-menu-backup-unmark)
 +      (Buffer-menu-delete, Buffer-menu-save, Buffer-menu-not-modified)
 +      (Buffer-menu-execute, Buffer-menu-select)
 +      (Buffer-menu-marked-buffers, Buffer-menu-toggle-read-only)
 +      (Buffer-menu-bury): Use Tabulated List machinery.
 +      (Buffer-menu-mouse-select, Buffer-menu-sort-by-column)
 +      (Buffer-menu-sort-button-map, Buffer-menu-make-sort-button):
 +      Delete.
 +      (list-buffers--refresh): New function.
 +      (list-buffers-noselect): Use it.
 +      (tabulated-list-entry-size->, Buffer-menu--pretty-name)
 +      (Buffer-menu--pretty-file-name): New helper functions.
 +
 +      * loadup.el: Preload tabulated-list.
 +
 +      * emacs-lisp/tabulated-list.el (tabulated-list-sort): Rename from
 +      tabulated-list-sort-column.
 +      (tabulated-list-init-header): Add the initial aligning space even
 +      if tabulated-list-padding is zero.
 +
 +2012-05-06  Christopher Schmidt  <christopher@ch.ristopher.com>
 +
 +      * emacs-lisp/cl-macs.el (cl-expr-contains): Handle cons cells
 +      whose cdr is not a cons cell correctly (bug#11038).
 +
 +2012-05-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/tabulated-list.el (tabulated-list-format):
 +      Accept additional plist in column descriptors.
 +      (tabulated-list-init-header): Obey it.
 +      (tabulated-list-get-entry): New function.
 +      (tabulated-list-put-tag): Use it.  Use string-width instead of
 +      length.
 +      (tabulated-list--column-number): New function.
 +      (tabulated-list-print): Use it.
 +      (tabulated-list-print-col): New function.
 +      Set `tabulated-list-column-name' property on each column's text.
 +      (tabulated-list-print-entry): Use it.
 +      (tabulated-list-delete-entry, tabulated-list-set-col):
 +      New functions.
 +      (tabulated-list-sort-column): New command (Bug#11337).
 +
 +      * buff-menu.el (list-buffers): Move C-x C-b binding from
 +      buff-menu.el to bindings.el.
 +
 +      * ebuff-menu.el (Electric-buffer-menu-undefined): Use the
 +      :advertised-binding feature.
 +
 +2012-05-06  Troels Nielsen  <bn.troels@gmail.com>  (tiny change)
 +
 +      * progmodes/compile.el (compilation-internal-error-properties):
 +      Calculate start position correctly when end-col is set but
 +      end-line is not (Bug#11382).
 +
 +2012-05-06  Wolfgang Jenkner  <wjenkner@inode.at>
 +
 +      * man.el (Man-unindent): Use text-property-default-nonsticky to
 +      prevent untabify from inheriting face properties (Bug#11408).
 +
 +2012-05-05  Stefan Merten  <smerten@oekonux.de>
 +
 +      * textmodes/rst.el: Major merge with upstream development up to
 +      Docutils SVN r7399 / rst.el V1.2.1.
 +
 +      Clarify maintainership and authors.
 +
 +      (rst-extract-version, rst-cvs-header, rst-cvs-rev)
 +      (rst-cvs-timestamp, rst-svn-rev, rst-svn-timestamp)
 +      (rst-official-version, rst-official-cvs-rev, rst-version)
 +      (rst-package-emacs-version-alist): New functions and variables
 +      for version information.
 +
 +      (rst-bullets, rst-uri-schemes, rst-adornment-chars)
 +      (rst-max-inline-length, rst-re-alist-def, rst-re-alist)
 +      (rst-mode-syntax-table, rst-mode): New and corrected functions
 +      and variables representing reStructuredText features.
 +
 +      (rst-re): New function for reStructuredText regexes.  Use in
 +      many places.
 +
 +      (rst-deprecated-keys, rst-call-deprecated, rst-define-key)
 +      (rst-mode-map): Rebind keys.
 +
 +      (rst-mode-lazy, rst-font-lock-keywords)
 +      (rst-font-lock-extend-region)
 +      (rst-font-lock-extend-region-internal)
 +      (rst-font-lock-extend-region-extend)
 +      (rst-font-lock-find-unindented-line-limit)
 +      (rst-font-lock-find-unindented-line-match)
 +      (rst-adornment-level, rst-font-lock-adornment-level)
 +      (rst-font-lock-adornment-match)
 +      (rst-font-lock-handle-adornment-pre-match-form)
 +      (rst-font-lock-handle-adornment-matcher): Major revision of
 +      font-locking.  Integrate with other code.  Use `jit-lock-mode'.
 +
 +      (rst-preferred-adornments, rst-adjust-hook)
 +      (rst-new-adornment-down, rst-preferred-bullets)
 +      (rst-preferred-bullets, rst-indent, rst-indent-width)
 +      (rst-indent-field, rst-indent-literal-normal)
 +      (rst-indent-literal-minimized, rst-indent-comment): Change,
 +      extend and improve customization.
 +
 +      (rst-line-homogeneous-p, rst-line-homogeneous-nodent-p)
 +      (rst-normalize-cursor-position, rst-get-decoration)
 +      (rst-straighten-deco-spacing, rst-re-bullets, rst-re-items)
 +      (rst-rstrip, rst-toc-insert-find-delete-contents)
 +      (rst-shift-fill-region, rst-compute-bullet-tabs)
 +      (rst-debug-print-tabs, rst-debug-mark-found)
 +      (rst-shift-region-guts, rst-shift-region-right)
 +      (rst-shift-region-left, rst-use-char-classes)
 +      (rst-font-lock-keywords-function)
 +      (rst-font-lock-indentation-point)
 +      (rst-font-lock-find-unindented-line-begin)
 +      (rst-font-lock-find-unindented-line-end)
 +      (rst-font-lock-find-unindented-line)
 +      (rst-font-lock-adornment-point, rst-font-lock-level)
 +      (rst-adornment-level-alist): Remove functions and variables.
 +
 +      (rst-compare-adornments, rst-get-adornment-match)
 +      (rst-suggest-new-adornment, rst-get-adornments-around)
 +      (rst-adornment-complete-p, rst-get-next-adornment)
 +      (rst-adjust-adornment, rst-display-adornments-hierarchy)
 +      (rst-straighten-adornments): Standardize function names to
 +      use "adornment" instead of "decoration".  Correct callers.
 +      Similar standardizing in many places.
 +
 +      (rst-update-section, rst-adjust, rst-promote-region)
 +      (rst-enumerate-region, rst-bullet-list-region)
 +      (rst-repeat-last-character): Correct use of `interactive'.
 +
 +      (rst-classify-adornment, rst-find-all-adornments)
 +      (rst-get-hierarchy, rst-adjust-adornment, rst-toc-update)
 +      (rst-find-leftmost-column, rst-repeat-last-character):
 +      Refactor functions.
 +
 +      (rst-find-title-line, rst-reset-section-caches)
 +      (rst-get-adornments-around, rst-adjust-adornment-work)
 +      (rst-arabic-to-roman, rst-roman-to-arabic)
 +      (rst-insert-list-pos, rst-insert-list-new-item)
 +      (rst-insert-list-continue, rst-insert-list, rst-forward-line):
 +      New functions.
 +
 +      (rst-all-sections, rst-section-hierarchy)
 +      (rst-arabic-to-roman, rst-initial-enums, rst-initial-items):
 +      New variables.
 +
 +      (rst-toc-return-wincfg, rst-toc-quit-window): Use window
 +      configuration instead of only buffer.  Change where necessary.
 +
 +      (rst-line-tabs, rst-compute-tabs, rst-indent-line)
 +      (rst-shift-region, rst-adaptive-fill): New functions for
 +      indentation and filling.
 +
 +      (rst-comment-line-break, rst-comment-indent)
 +      (rst-comment-insert-comment, rst-comment-region)
 +      (rst-uncomment-region): New functions for handling comments.
 +
 +      (rst-compile): Quote shell arguments.
 +
 +      (rst-compile-pdf-preview, rst-compile-slides-preview):
 +      Delete temporary files after use.
 +
 +2012-05-05  Glenn Morris  <rgm@gnu.org>
 +
 +      * calendar/cal-html.el: Optionally include holidays in the output.
 +      Suggested by Ed Reingold <reingold@emr.cs.iit.edu>.
 +      (cal-html-holidays): New option.
 +      (cal-html-css-default): Add holiday entry.
 +      (holiday-in-range): Autoload it.
 +      (cal-html-htmlify-entry): Add optional class argument.
 +      (cal-html-htmlify-list): Add optional holidays argument.
 +      (cal-html-insert-agenda-days): Include holidays in the output.
 +      (cal-html-one-month): Maybe include holidays.
 +
 +      * calendar/holidays.el (holiday-in-range):
 +      Move here from cal-tex-list-holidays.
 +      * calendar/cal-tex.el (cal-tex-list-holidays):
 +      Make it an obsolete alias for holiday-in-range.  Update all callers.
 +
 +2012-05-05  Chong Yidong  <cyd@gnu.org>
 +
 +      * select.el (xselect--encode-string): Always use utf-8 for TEXT on
 +      Nextstep.
 +
 +2012-05-05  Ransom Williams  <auvergnerw@gmail.com>  (tiny change)
 +
 +      * files.el (file-auto-mode-skip): New var.
 +      (set-auto-mode-1): Use it.
 +
 +2012-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * repeat.el: Use lexical-binding.
 +      (repeat-last-self-insert, repeat-num-input-keys-at-self-insert)
 +      (repeat-undo-count): Remove.
 +      (repeat):
 +      * progmodes/octave-mod.el (octave-abbrev-start):
 +      * progmodes/f90.el (f90-abbrev-start):
 +      * face-remap.el (text-scale-adjust):
 +      * kmacro.el (kmacro-call-macro): Use set-temporary-overlay-map.
 +
 +      * emacs-lisp/pcase.el (pcase--let*): New function.
 +      (pcase--expand, pcase-codegen, pcase--q1): Use it to reduce nesting
 +      a bit more.
 +      (pcase--split-pred): Be more clever about ruling out overlap between
 +      a predicate and some constant pattern.
 +      (pcase--q1): Use `null' instead of (eq foo nil).
 +
 +      * subr.el (setq-local, defvar-local): New macros.
 +      (kbd): Redefine as an alias.
 +      (with-selected-window): Leave unrelated frames alone.
 +      (set-temporary-overlay-map): New function.
 +
 +2012-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (user-error): New function.
 +      * window.el (switch-to-buffer):
 +      * vc/smerge-mode.el (smerge-resolve-function, smerge-resolve)
 +      (smerge-match-conflict):
 +      * simple.el (previous-matching-history-element)
 +      (next-matching-history-element, goto-history-element, undo-more)
 +      (undo-start):
 +      * progmodes/etags.el (visit-tags-table-buffer, find-tag-tag)
 +      (find-tag-noselect, find-tag-in-order, etags-goto-tag-location)
 +      (next-file, tags-loop-scan, list-tags, complete-tag):
 +      * progmodes/compile.el (compilation-loop):
 +      * mouse.el (mouse-minibuffer-check):
 +      * man.el (Man-bgproc-sentinel, Man-goto-page):
 +      * info.el (Info-find-node-2, Info-extract-pointer, Info-history-back)
 +      (Info-history-forward, Info-follow-reference, Info-menu)
 +      (Info-extract-menu-item, Info-extract-menu-counting)
 +      (Info-forward-node, Info-backward-node, Info-next-menu-item)
 +      (Info-last-menu-item, Info-next-preorder, Info-last-preorder)
 +      (Info-next-reference, Info-prev-reference, Info-index)
 +      (Info-index-next, Info-follow-nearest-node)
 +      (Info-copy-current-node-name):
 +      * imenu.el (imenu--make-index-alist)
 +      (imenu-default-create-index-function, imenu-add-to-menubar):
 +      * files.el (basic-save-buffer, recover-file):
 +      * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
 +      * emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
 +      (checkdoc-message-text, checkdoc-defun):
 +      * dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point):
 +      * cus-edit.el (customize-changed-options, customize-rogue)
 +      (customize-saved, custom-variable-set, custom-variable-mark-to-save)
 +      (custom-variable-mark-to-reset-standard)
 +      (custom-variable-reset-backup, custom-face-mark-to-reset-standard)
 +      (custom-file):
 +      * completion.el (check-completion-length):
 +      * comint.el (comint-search-arg)
 +      (comint-previous-matching-input-string-position)
 +      (comint-previous-matching-input)
 +      (comint-replace-by-expanded-history-before-point, comint-send-input)
 +      (comint-copy-old-input, comint-backward-matching-input)
 +      (comint-goto-process-mark, comint-set-process-mark):
 +      * calendar/calendar.el (calendar-cursor-to-date): Use it.
 +      * bindings.el (debug-ignored-errors): Remove regexps, add `user-error'.
 +
 +2012-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * dabbrev.el (dabbrev--ignore-case-p): New function.
 +      (dabbrev-completion, dabbrev-expand, dabbrev--substitute-expansion):
 +      Use it.
 +
 +      * files.el (automount-dir-prefix): Mark as obsolete.
 +
 +2012-05-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * patcomp.el, play/bruce.el: Move to obsolete/.
 +
 +2012-05-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix minor Y10k bugs.
 +      * arc-mode.el (archive-unixdate):
 +      * autoinsert.el (auto-insert-alist):
 +      * calc/calc-forms.el (math-this-year):
 +      * emacs-lisp/copyright.el (copyright-current-year)
 +      (copyright-update-year, copyright):
 +      * tar-mode.el (tar-clip-time-string):
 +      * time.el (display-time-update):
 +      Don't assume years have 4 digits.
 +
 +2012-05-04  Chong Yidong  <cyd@gnu.org>
 +
 +      * dos-w32.el (file-name-buffer-file-type-alist)
 +      (direct-print-region-use-command-dot-com):
 +      * ffap.el (ffap-menu-regexp):
 +      * find-file.el (ff-special-constructs):
 +      * follow.el (follow-debug):
 +      * forms.el (forms--debug):
 +      * iswitchb.el (iswitchb-all-frames):
 +      * ido.el (ido-all-frames):
 +      * emacs-lisp/timer.el (timer-max-repeats):
 +      * mail/feedmail.el (feedmail-mail-send-hook)
 +      (feedmail-mail-send-hook-queued):
 +      * mail/footnote.el (footnote-signature-separator):
 +      * mail/mailabbrev.el (mail-alias-separator-string)
 +      (mail-abbrev-mode-regexp):
 +      * mail/rmail.el (rmail-speedbar-match-folder-regexp):
 +      * progmodes/idlwave.el (idlwave-libinfo-file)
 +      (idlwave-default-completion-case-is-down)
 +      (idlwave-library-routines): Convert defvars to defcustoms.
 +
 +      * mail/rmail.el (rmail-decode-mime-charset):
 +      * progmodes/idlw-shell.el (idlwave-shell-print-expression-function)
 +      (idlwave-shell-fix-inserted-breaks)
 +      (idlwave-shell-activate-alt-keybindings)
 +      (idlwave-shell-use-breakpoint-glyph):
 +      * facemenu.el (facemenu-unlisted-faces): Delete obsolete vars.
 +
 +2012-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion--twq-all): Beware completion-ignore-case.
 +
 +2012-05-03  Wilson Snyder  <wsnyder@wsnyder.org>
 +
 +      * progmodes/verilog-mode.el (font-lock-keywords):
 +      Fix mis-highligting auto.  Reported by Craig Barner.
 +      (verilog-auto, verilog-auto-undef): Add AUTOUNDEF to remove
 +      defines from global name space.  Reported by Dan Dever.
 +      (verilog-auto-reset, verilog-auto-reset-widths)
 +      (verilog-auto-tieoff): Support using unbased numbers for
 +      AUTORESET and AUTOTIEOFF.
 +      (verilog-submit-bug-report): Update variable list.
 +      (verilog-read-auto-params): Fix AUTOINPUT regexps containing
 +      parenthesis from not matching.  Reported by Michael Rytting.
 +      (verilog-auto-template-lint): Fix hash error when linting modules
 +      with no used templates.
 +      (verilog-warn, verilog-warn-error)
 +      (verilog-warn-fatal): When non-interactive report multiple
 +      warnings before exiting.  Suggested by Brad Dobbie.
 +      (verilog-auto-template-lint, verilog-auto-template-warn-unused)
 +      (verilog-read-auto-template): Add `verilog-auto-template-warn-unused'
 +      to report unused template errors.  Reported by Brad Dobbie.
 +      (verilog-read-decls): Fix AUTOWIRE etc on supply0, supply1 type
 +      nets, bug438.  Reported by Vns Blore.
 +      (verilog-auto-inout-module, verilog-auto-reg)
 +      (verilog-read-decls, verilog-read-sub-decls-sig)
 +      (verilog-signals-edit-wire-reg, verilog-signals-with):
 +      Fix passing of Verilog data types in ANSI input/output ports
 +      such as "output logic" into the AUTOs.  Special case "wire" and
 +      "reg" for backwards compatibility presuming Verilog 2001.
 +      (verilog-auto-ascii-enum): Add "auto enum" as alias.
 +      (verilog-preprocess): Fix replication of preprocess output.
 +      Reported by Brad Dobbie.
 +      (verilog-auto-inst-interfaced-ports):
 +      Create verilog-auto-inst-interfaced-ports, bug429.
 +      Reported by Julian Gorfajn.
 +      (verilog-after-save-font-hook)
 +      (verilog-before-save-font-hook): New variable.
 +      (verilog-modi-cache-results, verilog-save-font-mod-hooked)
 +      (verilog-save-font-mods): Wrap disabling fontification, reported
 +      by David Rogoff.
 +      (verilog-do-indent, verilog-pretty-declarations-auto)
 +      (verilog-sk-def-reg): Fix obeying `verilog-auto-lineup', bug305.
 +      Reported by Pierre-David Pfister.
 +      (verilog-set-auto-endcomments): Fix endtask auto comments outside
 +      of class declarations, bug292.  Reported by Kevin Heilman.
 +      (verilog-read-decls): Fix 'parameter type' not appearing in
 +      AUTOINSTPARAM, bug340.  Reported by Jonathan Greenlaw.
 +      (verilog-auto-logic): Fix when AUTOLOGIC present to properly do
 +      AUTOINPUTs, bug411.  Reported by Jonathan Greenlaw.
 +      (verilog-read-auto-lisp): Avoid syntax-ppss warning on AUTOLISP.
 +      Reported by David Kravitz.
 +
 +2012-05-03  Michael McNamara  <mac@mail.brushroad.com>
 +
 +      * progmodes/verilog-mode.el (verilog-pretty-expr): Don't line up
 +      assignment with tests in ifs and for loops.
 +      (verilog-extended-complete-re, verilog-complete-reg): Change so
 +      that DPI inport functions don't look like fuction declarations.
 +      (verilog-pretty-expr): Don't line up assignment
 +      operations to the test and increment in if and for loops
 +      (verilog-extended-complete-re, verilog-complete-reg): Change so
 +      that DPI inport functions don't look like fuction declarations.
 +
 +2012-05-03  Kenichi Handa  <handa@m17n.org>
 +
 +      * mail/rmailmm.el (rmail-show-mime): Catch an error caused by text
 +      decoding, and show a warning message without signaling an error
 +      (Bug#11282).
 +
 +2012-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el
 +      (byte-compile-file-form-custom-declare-variable): Compile all elements,
 +      since cconv.el might have introduced :fun-body, internal-make-closure,
 +      and friends for bytecomp to handle (bug#11391).
 +      * custom.el (defcustom): Avoid ((λ ..) ..).
 +
 +2012-05-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (read-passwd): Better clean after ourselves (bug#11392).
 +
 +2012-05-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * notifications.el (dbus-debug):
 +      * term/linux.el (gpm-mouse-enable):
 +      * term/screen.el (xterm-register-default-colors): Declare.
 +
 +2012-05-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * cus-start.el (gc-cons-percentage, exec-suffixes)
 +      (dos-display-scancodes, dos-hyper-key, dos-super-key)
 +      (dos-keypad-mode, debug-on-signal, vertical-centering-font-regexp)
 +      (make-cursor-line-fully-visible, void-text-area-pointer)
 +      (font-list-limit): Add customization data.
 +
 +      * allout.el (allout-exposure-change-functions)
 +      (allout-structure-added-functions)
 +      (allout-structure-deleted-functions)
 +      (allout-structure-shifted-functions): Rename abnormal hooks from
 +      *-hook, and convert to defcustoms.
 +      (allout-after-copy-or-kill-hook, allout-post-undo-hook):
 +      Convert to defcustoms.
 +      (allout-mode-hook, allout-mode-deactivate-hook): Doc fix.
 +
 +      * allout-widgets.el: Hook callers changed.
 +
 +2012-05-02  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * mail/rmail.el (rmail-yank-current-message): Use the encoding of
 +      the yanked message in preference to the default value of
 +      buffer-file-coding-system.
 +
 +2012-05-02  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (display-buffer--action-function-custom-type):
 +      Fix entry.
 +
 +2012-05-02  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-defs.el (c-version): Update to 5.32.3.
 +
 +2012-05-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * cus-start.el (suggest-key-bindings): Remove, now it is in Lisp.
 +
 +      * eshell/esh-cmd.el (eshell-debug-command): Doc fix.  Add :set.
 +
 +      * cus-edit.el (custom-variable-documentation): Simplify with format.
 +
 +2012-05-01  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 +          Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (suggest-key-bindings, execute-extended-command):
 +      Move from keyboard.c.
 +
 +2012-05-01  Chong Yidong  <cyd@gnu.org>
 +
 +      * follow.el: Eliminate advice.
 +      (set-process-filter, process-filter, sit-for): Advice deleted.
 +      (follow-mode-off-hook): Obsolete hook removed.
 +      (follow-avoid-tail-recenter-p, follow-process-filter-alist):
 +      Vars deleted.
 +      (follow-auto): Use a :set function.
 +      (follow-mode): Rewritten.  Don't advise process filters.
 +      (follow-switch-to-current-buffer-all, follow-scroll-up)
 +      (follow-scroll-down): Assume follow-mode is bound.
 +      (follow-comint-scroll-to-bottom)
 +      (follow-align-compilation-windows): New functions.
 +      (follow--window-sorter): New function.
 +      (follow-all-followers): Use it to explicitly sort windows by their
 +      positions; don't make assumptions about next-window order.
 +      (follow-windows-start-end, follow-delete-other-windows-and-split)
 +      (follow-calc-win-start): Doc fix.
 +      (follow-windows-aligned-p, follow-select-if-visible): Don't call
 +      vertical-motion unnecessarily.
 +      (follow-adjust-window): New function.
 +      (follow-post-command-hook): Use it.
 +      (follow-call-set-process-filter, follow-call-process-filter)
 +      (follow-intercept-process-output, follow-tidy-process-filter-alist)
 +      (follow-stop-intercept-process-output, follow-generic-filter):
 +      Functions deleted.
 +      (follow-scroll-bar-toolkit-scroll, follow-scroll-bar-drag)
 +      (follow-scroll-bar-scroll-up, follow-scroll-bar-scroll-down):
 +      New functions, replacing advice on scroll-bar-* commands.
 +      (follow-mwheel-scroll): New function (Bug#4112).
 +
 +      * comint.el (comint-adjust-point): New function.
 +      (comint-postoutput-scroll-to-bottom): Use it.
 +      Call follow-comint-scroll-to-bottom for Follow mode buffers.
 +
 +2012-05-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * term/AT386.el, term/apollo.el, term/bobcat.el, term/cygwin.el:
 +      * term/iris-ansi.el, term/linux.el, term/lk201.el, term/news.el:
 +      * term/screen.el, term/vt102.el, term/vt125.el, term/vt200.el:
 +      * term/vt201.el, term/vt220.el, term/vt240.el, term/vt300.el:
 +      * term/vt320.el, term/vt400.el, term/vt420.el, term/wyse50.el:
 +      Remove no-byte-compile setting.
 +
 +2012-05-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-table-with-quoting): Fix compatibility
 +      all-completions code to not return a number in the last cdr.
 +
 +2012-04-30  Leo Liu  <sdl.web@gmail.com>
 +
 +      * ibuf-ext.el (ibuffer-diff-buffer-with-file-1): Avoid buffer
 +      read-only error.
 +
 +2012-04-29  Chong Yidong  <cyd@gnu.org>
 +
 +      * follow.el (follow-calc-win-end): Rewrite to handle partial
 +      screen lines correctly (Bug#8390).
 +      (follow-avoid-tail-recenter): Minor cleanup.
 +
 +2012-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Avoid the obsolete `assoc' package.
 +      * speedbar.el (speedbar-refresh): Avoid adelete.
 +      (speedbar-file-lists): Simplify and avoid aput.
 +      * man.el (Man--sections, Man--refpages): New vars, replacing
 +      Man-sections-alist and Man-refpages-alist.
 +      (Man-build-section-alist, Man-build-references-alist):
 +      Use them; avoid aput.
 +      (Man--last-section, Man--last-refpage): New vars.
 +      (Man-follow-manual-reference): Use them.
 +      Use the `default' arg of completing-read.
 +      (Man-goto-section): Idem.  Move prompt to the `interactive' spec.
 +
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * vc/diff.el (diff-sentinel): Go to bob (Bug#10259).
 +
 +      * startup.el (x-apply-session-resources): New function.
 +
 +      * term/ns-win.el (ns-initialize-window-system):
 +      * term/w32-win.el (w32-initialize-window-system):
 +      * term/x-win.el (x-initialize-window-system): Use it to properly
 +      set menu-bar-mode and other vars from X resources, even if the
 +      initial frame is not a window-system frame (Bug#2299).
 +
 +      * subr.el (read-key): Avoid running filter function when setting
 +      up temporary tool bar entries (Bug#9922).
 +
 +2012-04-27  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * vc/vc-git.el (vc-git-state): Fix regexp matching diff output.
 +      (Bug#11344)
 +
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * select.el (xselect--encode-string): New function, split from
 +      xselect-convert-to-string.
 +      (xselect-convert-to-string): Use it.
 +      (xselect-convert-to-filename, xselect-convert-to-os)
 +      (xselect-convert-to-host, xselect-convert-to-user): Ensure that
 +      returned strings are properly encoded (Bug#11315).
 +
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * simple.el (delete-active-region): Move to killing custom group.
 +
 +2012-04-27  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * progmodes/which-func.el (which-func-current): Quote %
 +      characters for mode-line processing.
 +
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * xml.el (xml-parse-region, xml-parse-tag): Avoid errors due to
 +      reaching eob (Bug#11286).
 +
 +2012-04-27  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * progmodes/gdb-mi.el (gdb-control-level): New variable.
 +      (gdb): Make it buffer-local and init to zero.
 +      (gdb-control-commands-regexp): New variable.
 +      (gdb-send): Don't wrap in "-interpreter-exec console" if
 +      gdb-control-level is positive.  Increment gdb-control-level
 +      whenever the command matches gdb-control-commands-regexp, and
 +      decrement it each time the command is "end".  (Bug#11279)
 +
 +2012-04-27  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (adjust-window-trailing-edge, enlarge-window)
 +      (shrink-window, window-resize):
 +      * mouse.el (mouse-drag-line): Fix resizing of minibuffer
 +      windows (Bug#11276).
 +
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * progmodes/pascal.el (pascal--extra-indent): Rename from ind, to
 +      fix "missing prefix" warning.  All callers changed.
 +
 +2012-04-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/assoc.el: Move to obsolete/.
 +
 +2012-04-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/assoc.el (aget): Fix dynamic-scoping issue (bug#11352).
 +
 +      * term/ns-win.el (ns-define-service):
 +      * progmodes/pascal.el (pascal-goto-defun):
 +      * progmodes/js.el (js--read-tab):
 +      * progmodes/etags.el (tags-lazy-completion-table):
 +      * emacs-lisp/syntax.el (syntax-propertize-via-font-lock):
 +      * emacs-lisp/ewoc.el (ewoc--wrap):
 +      * emacs-lisp/assoc.el (aput, adelete, amake):
 +      * doc-view.el (doc-view-convert-current-doc):
 +      * vc/diff.el (diff-no-select): Replace lexical-let by lexical-binding.
 +
 +2012-04-26  Chong Yidong  <cyd@gnu.org>
 +
 +      * image.el (image-type-from-buffer): Only return supported image
 +      type (Bug#9045).
 +
 +      * vc/diff-mode.el (diff-beginning-of-hunk): Return a meaningful
 +      value, for symmetry with diff-end-of-hunk.
 +      (diff-split-hunk, diff-find-source-location)
 +      (diff-ignore-whitespace-hunk, diff-refine-hunk): Use it.
 +      (diff-bounds-of-hunk, diff-bounds-of-file): New functions.
 +      (diff-restrict-view, diff-hunk-kill, diff-file-kill): Use them to
 +      compute the relevant hunk or file properly (Bug#6005).
 +      (diff-file-junk-re): Add bzr's "modified file" tag (Bug#6041).
 +
 +2012-04-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc/vc-mtn.el:
 +      * vc/vc-hg.el:
 +      * vc/vc-git.el:
 +      * vc/vc-dir.el:
 +      * vc/vc-cvs.el:
 +      * vc/vc-bzr.el:
 +      * vc/vc-arch.el:
 +      * vc/vc.el: Replace lexical-let by lexical-binding.
 +      * minibuffer.el (lazy-completion-table): Avoid ((λ ...) ...).
 +      * emacs-lisp/cl-macs.el (lexical-let): Fix use in lexical-binding.
 +      * emacs-lisp/cconv.el (cconv-analyse-form): Warn use of ((λ ...) ...).
 +
 +2012-04-26  Chong Yidong  <cyd@gnu.org>
 +
 +      * vc/diff-mode.el (diff-undo): New command (Bug#5302).
 +      (diff-mode-shared-map): Bind it to / and [remap undo].
 +
 +      * vc/ediff-wind.el (ediff-setup-windows-default): New function.
 +      (ediff-window-setup-function): Use it as the default, to set up
 +      windows based on whether the current frame is graphical (Bug#2138).
 +      (ediff-choose-window-setup-function-automatically): Make obsolete.
 +
 +      * vc/ediff-init.el: Always define ediff-pixel-width/height.
 +
 +2012-04-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * ffap.el: Remove old code for obsolete package.
 +      (ffap-complete-as-file-p): Remove.
 +
 +      Use completion-table-with-quoting for comint and pcomplete.
 +      * comint.el (comint--unquote&requote-argument)
 +      (comint--unquote-argument, comint--requote-argument): New functions.
 +      (comint--unquote&expand-filename, comint-unquote-filename): Obsolete.
 +      (comint-quote-filename): Use regexp-opt-charset.
 +      (comint--common-suffix, comint--common-quoted-suffix)
 +      (comint--table-subvert): Remove.
 +      (comint-unquote-function, comint-requote-function): New vars.
 +      (comint--complete-file-name-data): Use them with
 +      completion-table-with-quoting.
 +      * pcmpl-unix.el (pcomplete/scp): Use completion-table-subvert.
 +      * pcomplete.el (pcomplete-arg-quote-list)
 +      (pcomplete-quote-arg-hook, pcomplete-quote-argument): Obsolete.
 +      (pcomplete-unquote-argument-function): Default to non-nil.
 +      (pcomplete-unquote-argument): Simplify.
 +      (pcomplete--common-quoted-suffix): Remove.
 +      (pcomplete-requote-argument-function): New var.
 +      (pcomplete--common-suffix): New function.
 +      (pcomplete-completions-at-point): Use completion-table-with-quoting
 +      and completion-table-subvert.
 +
 +      * minibuffer.el: Use completion-table-with-quoting for read-file-name.
 +      (minibuffer--double-dollars): Preserve properties.
 +      (completion--sifn-requote): New function.
 +      (completion--file-name-table): Rewrite using it and c-t-with-quoting.
 +
 +      * minibuffer.el: Add support for completion of quoted/escaped data.
 +      (completion-table-with-quoting, completion-table-subvert): New funs.
 +      (completion--twq-try, completion--twq-all): New functions.
 +      (completion--nth-completion): New function.
 +      (completion-try-completion, completion-all-completions): Use it.
 +
 +2012-04-25  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/python.el (python-pdbtrack-get-source-buffer):
 +      Use compilation-message if available to find real filename.
 +
 +2012-04-25  Chong Yidong  <cyd@gnu.org>
 +
 +      * vc/diff-mode.el (diff-setup-whitespace): New function.
 +      (diff-mode): Use it.
 +
 +      * vc/diff.el (diff-sentinel):
 +      * vc/vc.el (vc-diff-finish): Call diff-setup-whitespace to assign
 +      Whitespace mode variables based on diff style (Bug#8612).
 +
 +2012-04-25  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/python.el (python-send-region): Add suffix .py to the
 +      temp file.
 +
 +      * files.el (auto-mode-alist): Use javascript-mode instead.
 +
 +2012-04-25  Alex Harsanyi  <AlexHarsanyi@gmail.com>
 +
 +      Sync with soap-client repository.  Support SOAP simpleType (Bug#10331).
 +
 +      * net/soap-client.el (soap-resolve-references-for-sequence-type)
 +      (soap-resolve-references-for-array-type): Hack to prevent self
 +      references, see Bug#9.
 +      (soap-parse-envelope): Report the contents of the 'detail' node
 +      when receiving a fault reply.
 +      (soap-parse-envelope): Report the contents of the entire 'detail' node.
 +
 +      * net/soap-inspect.el (soap-sample-value-for-simple-type)
 +      (soap-inspect-simple-type): New function.
 +
 +      * net/soap-client.el (soap-simple-type): New struct.
 +      (soap-default-xsd-types, soap-default-soapenc-types)
 +      (soap-decode-basic-type, soap-encode-basic-type):
 +      support unsignedInt and double basic types.
 +      (soap-resolve-references-for-simple-type)
 +      (soap-parse-simple-type, soap-encode-simple-type): New function.
 +      (soap-parse-schema): Parse xsd:simpleType declarations.
 +
 +      * net/soap-client.el (soap-default-xsd-types)
 +      (soap-default-soapenc-types): Add integer, byte and anyURI types.
 +      (soap-parse-complex-type-complex-content): Use `soap-wk2l' to find
 +      the local name of "soapenc:Array".
 +      (soap-decode-basic-type, soap-encode-basic-type): Support encoding
 +      decoding integer, byte and anyURI xsd types.
 +
 +2012-04-25  Chong Yidong  <cyd@gnu.org>
 +
 +      * cus-edit.el (custom-buffer-create-internal): Update header text.
 +
 +2012-04-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * progmodes/gdb-mi.el (gdb-init-1): Condition Windows-specific
 +      settings on 'system-type', not on 'window-system'.  On MS-Windows,
 +      set interactive-mode on in GDB.
 +
 +2012-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/ruby-mode.el: Simplify last change, and cleanup code.
 +      (ruby-syntax-propertize-regexp): Remove.
 +      (ruby-syntax-propertize-function): Split regexp into chunks.
 +      Match following code directly.
 +
 +2012-04-24  Dmitry Gutov  <dgutov@yandex.ru>
 +
 +      * progmodes/ruby-mode.el: Handle Cucumber defs (bug#6286).
 +      (ruby-syntax-propertize-regexp): New function.
 +      (ruby-syntax-propertize-function): Use it to handle regexp not preceded
 +      by a special keyword.
 +
 +      * progmodes/ruby-mode.el: Handle general delimited literals (bug#6286).
 +      (ruby-syntax-general-delimiters-goto-beg)
 +      (ruby-syntax-propertize-general-delimiters): New functions.
 +      (ruby-syntax-propertize-function): Use them to handle GDL.
 +      (ruby-font-lock-keywords): Move old handling of GDL...
 +      (ruby-font-lock-syntactic-keywords): .. to here.
 +      (ruby-calculate-indent): Adjust indentation for GDL.
 +
 +2012-04-24  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * notifications.el (top): Remove unneeded declarations.
 +      (notifications-specification-version): Change to "1.2".
 +      (notifications-interface, notifications-notify-method)
 +      (notifications-close-notification-method): Fix docstring.
 +      (notifications-get-capabilities-method): New defconst.
 +      (notifications-notify): Add :action-items, :resident and
 +      :transient hints.  Change "image_data" to "image-data" and
 +      "image_path" to "image-path".
 +      (notifications-get-capabilities): New defun.
 +
 +2012-04-24  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/python.el: Move hideshow setup to the end.
 +
 +2012-04-24  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (handle-select-window): Clear echo area since this is
 +      no more done by read_char (Bug#11304).
 +
 +2012-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * ibuffer.el (ibuffer-mode-map): Bind `/ m' to filter-used-mode
 +      and `/ M' to filter-derived-mode.
 +      * ibuf-ext.el (ibuffer-list-buffer-modes): Simplify; avoid add-to-list.
 +      (ibuffer-filter-by-mode, ibuffer-filter-by-used-mode)
 +      (ibuffer-mark-by-mode): Use default rather than initial-input.
 +      (ibuffer-filter-by-derived-mode): Autoload and require-match.
 +
 +2012-04-24  Ivan Andrus  <darthandrus@gmail.com>  (tiny change)
 +
 +      * ibuf-ext.el (ibuffer-list-buffer-modes): Add `include-parents' arg.
 +      (ibuffer-filter-by-derived-mode): New filter.
 +      * ibuffer.el (ibuffer-mode-map): Bind to `/ w'.
 +
 +2012-04-23  Andreas Politz  <politza@fh-trier.de>
 +
 +      * subr.el (accept-change-group): Fix arg usage (Bug#6095).
 +
 +2012-04-23  Chong Yidong  <cyd@gnu.org>
 +
 +      * cus-edit.el (customize-apropos, customize-apropos-options):
 +      Disable matching of non-option variables (Bug#11176).
 +      (customize-option, customize-option-other-window)
 +      (customize-changed-options): Doc fix.
 +      (customize-apropos-options, customize-apropos-faces)
 +      (customize-apropos-groups): Use apropos-read-pattern (Bug#11124).
 +
 +      * apropos.el (apropos-read-pattern): Make prompt less cryptic.
 +      Fix word list splitting (Bug#11132).
 +      (apropos-symbol, apropos-keybinding, apropos-label)
 +      (apropos-property, apropos-function-button)
 +      (apropos-variable-button, apropos-misc-button): New faces.
 +      (apropos-symbol-face, apropos-keybinding-face)
 +      (apropos-label-face, apropos-property-face, apropos-match-face):
 +      Variables removed (Bug#8396).
 +      (apropos-library-button, apropos-format-plist, apropos-print)
 +      (apropos-print-doc, apropos-describe-plist): Callers changed.
 +
 +2012-04-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/xesam.el (xesam-mode-map): Use let-bound map in
 +      initialization.  (Bug#11292)
 +
 +2012-04-23  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      Preserve ispell session localwords when switching back to
 +      original buffer.
 +
 +      * textmodes/ispell.el (ispell-buffer-session-localwords):
 +      New buffer-local variable to hold buffer session localwords.
 +      (ispell-kill-ispell): Add option 'clear to delete session
 +      localwords.
 +      (ispell-command-loop, ispell-change-dictionary)
 +      (ispell-buffer-local-words): Preserve session localwords when
 +      needed.
 +
 +      * textmodes/flyspell.el (flyspell-process-localwords)
 +      (flyspell-do-correct): Preserve session localwords when needed.
 +
 +2012-04-23  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 +
 +      * textmodes/ispell.el (ispell-insert-word) Remove unneeded function
 +      using obsolete `translation-table-for-input'.
 +      (ispell-word, ispell-process-line, ispell-complete-word):
 +      Use plain `insert' instead of removed `ispell-insert-word'.
 +
 +2012-04-22  Chong Yidong  <cyd@gnu.org>
 +
 +      * cus-edit.el (custom-variable-menu)
 +      (custom-variable-reset-saved, custom-face-menu)
 +      (custom-face-reset-saved): If there is no saved value, make the
 +      "reset-saved" operation bring back the default (Bug#9509).
 +      (custom-face-state): Properly detect themed faces.
 +
 +      * faces.el (face-spec-set): Stop supporting deprecated form of
 +      third arg.
 +
 +2012-04-22  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Move functions from C to Lisp.  Make non-blocking method calls
 +      the default.  Implement further D-Bus standard interfaces.
 +
 +      * net/dbus.el (dbus-message-internal): Declare function.
 +      Remove unneeded function declarations.
 +      (defvar dbus-message-type-invalid, dbus-message-type-method-call)
 +      (dbus-message-type-method-return, dbus-message-type-error)
 +      (dbus-message-type-signal): Declare variables.  Remove local
 +      definitions.
 +      (dbus-interface-dbus, dbus-interface-peer)
 +      (dbus-interface-introspectable, dbus-interface-properties)
 +      (dbus-path-emacs, dbus-interface-emacs, dbus-return-values-table):
 +      Adapt docstring.
 +      (dbus-interface-objectmanager): New defconst.
 +      (dbus-call-method, dbus-call-method-asynchronously)
 +      (dbus-send-signal, dbus-method-return-internal)
 +      (dbus-method-error-internal, dbus-register-service)
 +      (dbus-register-signal, dbus-register-method): New defuns, moved
 +      from dbusbind.c
 +      (dbus-call-method-handler, dbus-setenv)
 +      (dbus-get-all-managed-objects, dbus-managed-objects-handler):
 +      New defuns.
 +      (dbus-call-method-non-blocking): Make it an obsolete function.
 +      (dbus-unregister-object, dbus-unregister-service)
 +      (dbus-handle-event, dbus-register-property)
 +      (dbus-property-handler): Obey the new structure of
 +      `bus-registered-objects'.
 +      (dbus-introspect): Use `dbus-call-method'.  Use a timeout.
 +      (dbus-get-property, dbus-set-property, dbus-get-all-properties):
 +      Use `dbus-call-method'.
 +
 +2012-04-22  Chong Yidong  <cyd@gnu.org>
 +
 +      * cus-edit.el (custom-commands, custom-reset-menu)
 +      (Custom-reset-standard): Tweak labels.
 +      (custom-reset-button-menu): Change default to t.
 +      (custom-buffer-create-internal): For the custom-reset-button-menu
 +      case, put the revert button first.
 +      (custom-group-subtitle): New face.
 +      (custom-group-value-create): Align docstring to a specific column.
 +
 +      * wid-edit.el (widget-documentation-link-add): Don't handle
 +      indentation in this function.
 +      (widget-documentation-string-indent-to): New function.
 +      (widget-documentation-string-value-create): Use it.
 +
 +      * autorevert.el (auto-revert):
 +      * epg-config.el (epg):
 +      * ibuffer.el (ibuffer):
 +      * mpc.el (mpc):
 +      * ses.el (ses):
 +      * eshell/eshell.el (eshell):
 +      * net/ange-ftp.el (ange-ftp):
 +      * progmodes/ebnf2ps.el (postscript):
 +      * progmodes/flymake.el (flymake):
 +      * progmodes/prolog.el (prolog):
 +      * progmodes/verilog-mode.el (verilog-mode):
 +      * progmodes/which-func.el (which-func):
 +      * term/xterm.el (xterm):
 +      * textmodes/picture.el (picture):
 +      * textmodes/tildify.el (tildify):
 +      * vc/ediff.el (ediff): Tweak defgroups to improve presentation in
 +      customization buffers.
 +
 +2012-04-22  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache):
 +      Adding a ) can hide the resulting (..) from searches.  Fix it.
 +      Bound the backward search to the position of the existing (.
 +
 +2012-04-21  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/verilog-mode.el (verilog-mode): Check whether
 +      which-func-modes is t before adding verilog-mode.
 +      Reported by Andy Moreton <andrewjmoreton@gmail.com>.
 +
 +2012-04-21  Leo Liu  <sdl.web@gmail.com>
 +
 +      * net/rcirc.el (rcirc): Avoid error when process-contact returns t.
 +
 +2012-04-21  Michael Vehrs  <Michael.Burschik@gmx.de>
 +
 +      * woman.el: Add support for "T{ T}" tbl syntax, and fix the
 +      filling of the last column of a table (Bug#5635).
 +      (woman-find-next-control-line): New arg, specifying an additional
 +      regexp component for the control line.
 +      (woman2-roff-buffer): Use it.
 +      (woman-break-table): New function.
 +      (woman2-TS): Use it.
 +
 +2012-04-21  Chong Yidong  <cyd@gnu.org>
 +
 +      * woman.el (woman-set-buffer-display-table, woman-decode-region)
 +      (woman-horizontal-escapes, woman-negative-vertical-space)
 +      (woman-tab-to-tab-stop, woman2-fc, woman2-TS)
 +      (WoMan-warn-ignored): Use ?\s instead of ?\ .
 +
 +2012-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-file-name-table): Complete user names.
 +
 +2012-04-20  Leo Liu  <sdl.web@gmail.com>
 +
 +      * font-lock.el (lisp-font-lock-keywords-2): Add pcase, pcase-let
 +      and pcase-let*.
 +
 +2012-04-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * server.el (server-execute): Respect initial-buffer-choice if it
 +      is a string and there are no files to open (Bug#2825).
 +      (server-create-window-system-frame, server-create-tty-frame):
 +      Don't switch buffers here.
 +      (server-process-filter): Only try to open a window system frame if
 +      compiled with graphical support (Bug#8314).
 +
 +2012-04-20  Dan Nicolaescu  <dann@gnu.org>
 +
 +      * battery.el (battery-echo-area-format): Display remaining time
 +      for sysfs backend too (Bug#11269).
 +      (battery-linux-sysfs): Fix conditional for the charge.
 +
 +2012-04-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * progmodes/gdb-mi.el (gdb): Revert previous change.
 +      (gdb-inferior-io--init-proc): New function.
 +      (gdb-init-1): Use it.
 +      (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty,
 +      responsible for allocating a new pty and hooking it to gdb when
 +      the old pty gets an EIO due to process exit.
 +      (gdb-delchar-or-quit): New command.  Bind it in gdb-mi buffers.
 +      (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area.
 +      (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset.
 +
 +2012-04-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * window.el (window-min-size, window-sizable, window-min-delta)
 +      (window-max-delta, window--resizable, window-resizable)
 +      (window-total-size, window-full-height-p, window-full-width-p)
 +      (window-in-direction, window--resize-mini-window, window-resize)
 +      (window--resize-child-windows-normal)
 +      (window--resize-child-windows, window--resize-siblings)
 +      (window--resize-this-window, adjust-window-trailing-edge)
 +      (enlarge-window, shrink-window): Doc fixes.
 +
 +2012-04-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty):
 +      New function to call delete-process on the gdb-inferior buffer's pty.
 +      (gdb-reset): Use it, instead of relying on kill-buffer to kill the
 +      pty process (Bug#11273).
 +      (gdb-update): New arg to suppress talking to the gdb process.
 +      (gdb-done-or-error): Use it.
 +      (gdb-stopped-functions): Rename from gdb-stopped-hooks.
 +      (gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for
 +      sentinel not being called.
 +
 +      * comint.el (make-comint-in-buffer, comint-exec): Doc fix.
 +
 +      * progmodes/grep.el (grep, rgrep): Doc fix (Bug#11268).
 +
 +2012-04-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * net/network-stream.el (open-network-stream): Doc fix.
 +
 +2012-04-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos.
 +
 +2012-04-20  Alan Mackenzie  <acm@muc.de>
 +
 +      Ensure searching for keywords is case sensitive.
 +
 +      * progmodes/cc-cmds.el (c-electric-brace, c-electric-lt-gt)
 +      (c-electric-paren, c-beginning-of-defun, c-end-of-defun)
 +      (c-defun-name, c-mark-function, c-cpp-define-name)
 +      (c-comment-indent, c-scan-conditionals, c-indent-defun)
 +      (c-context-line-break): Bind case-fold-search to nil.
 +
 +      * progmodes/cc-mode.el (c-font-lock-fontify-region):
 +      Bind case-fold-search to nil.
 +
 +2012-04-20  Chong Yidong  <cyd@gnu.org>
 +
 +      * mail/sendmail.el (mail-bury): Call return action with the right
 +      Rmail buffer (Bug#11242).
 +
 +      * server.el (server-process-filter): Handle corner case where both
 +      tty and nowait options are present (Bug#11102).
 +
 +2012-04-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * version.el (emacs-bzr-version, emacs-bzr-get-version): Doc fixes.
 +      (top level): Put into the executable the ident-style '$Id:' tag on
 +      windows-nt as well.
 +
 +2012-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * electric.el (electric-indent-post-self-insert-function): Check that
 +      electric-indent-mode is enabled in current buffer.
 +
 +2012-04-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * imenu.el (imenu-progress-message): Restore; it is "used" in
 +      erc/erc-imenu.el and net/snmp-mode.el.
 +
 +2012-04-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * avoid.el (mouse-avoidance-mode): Mark unused arg.
 +      (mouse-avoidance-nudge-mouse): Remove unused binding.
 +
 +      * bs.el (bs-toggle-readonly): Call `toggle-read-only' interactively.
 +
 +      * descr-text.el (describe-char):
 +      * progmodes/python.el (python-describe-symbol):
 +      Don't call `toggle-read-only', set `buffer-read-only'.
 +
 +      * imenu.el (imenu-default-goto-function): Mark unused args.
 +      (imenu-progress-message): Remove obsolete macro; all callers changed.
 +
 +      * subr.el (keymap-canonicalize): Remove unused binding.
 +      (read-passwd): Mark unused arg.
 +
 +      * tutorial.el (tutorial--display-changes): Remove unused binding.
 +      (tutorial--save-tutorial-to): Remove unused variable.
 +
 +      * emacs-lisp/package.el (define-package, package-menu-mark-delete)
 +      (package-menu-mark-install, package-menu-mark-unmark): Mark unused args.
 +      (package-generate-autoloads, package-menu--generate)
 +      (package-menu--find-upgrades): Remove unused bindings.
 +
 +      * emulation/cua-rect.el (cua-restrict-regexp-rectangle)
 +      (cua-restrict-prefix-rectangle): Doc fixes.  Remove unused bindings.
 +      (cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle)
 +      (cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle)
 +      (cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle)
 +      (cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as)
 +      (cua--rectangle-aux-replace, cua--left-fill-rectangle)
 +      (cua-scroll-rectangle-up, cua-scroll-rectangle-down)
 +      (cua-delete-char-rectangle): Mark unused args.
 +      (cua-align-rectangle): Remove unused binding.
 +
 +      * mail/rmail.el (compilation--message->loc)
 +      (epa--find-coding-system-for-mime-charset): Declare.
 +
 +      * net/dbus.el (dbus-register-service): Declare.
 +      (dbus-name-owner-changed-handler): Remove unused binding.
 +
 +      * nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p)
 +      (nxml-compute-indent-from-matching-start-tag): Remove unused variables.
 +      (nxml-scan-backward-within): Mark unused arg.
 +      (nxml-dynamic-markup-word): Remove unused binding.
 +
 +      * mouse.el (mouse-menu-major-mode-map):
 +      * emacs-lisp/authors.el (authors-scan-change-log)
 +      (authors-add-to-author-list):
 +      * emacs-lisp/avl-tree.el (avl-tree--enter-balance):
 +      * emacs-lisp/smie.el (smie-auto-fill):
 +      * mail/sendmail.el (mail-bury):
 +      * mail/unrmail.el (unrmail):
 +      * net/tls.el (open-tls-stream):
 +      * textmodes/picture.el (picture-mouse-set-point):
 +      Remove unused bindings.
 +
 +2012-04-19  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-action-password): Let-bind
 +      `enable-recursive-minibuffers' to t.
 +
 +2012-04-18  Sam Steingold  <sds@gnu.org>
 +
 +      * progmodes/gud.el (gud-key-prefix): Use :type 'key-sequence
 +      instead of 'string to accommodate values like [f11].
 +      Always use `vconcat' instead of `concat' on it, like in `gud-def'.
 +      * progmodes/gdb-mi.el: Likewise.
 +
 +2012-04-18  Leo Liu  <sdl.web@gmail.com>
 +
 +      * abbrev.el (edit-abbrevs): Move point to the abbrev table of
 +      current buffer.
 +      (prepare-abbrev-list-buffer): Enter edit-abbrevs-mode only if
 +      LOCAL is nil.
 +
 +2012-04-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * simple.el (line-move): Use forward-line if in batch mode
 +      (Bug#11053).
 +
 +2012-04-18  Christopher Schmidt  <christopher@ch.ristopher.com>
 +
 +      * files.el (after-find-file): Do not try to add a final newline if
 +      the buffer is read-only (Bug#11156).
 +
 +2012-04-17  Richard Stallman  <rms@gnu.org>
 +
 +      * mail/rmail.el (rmail-start-mail):
 +      Pass (rmail-mail-return...) for the return-action.
 +      Pass (rmail-yank-current-message...) for the yank-action.
 +      (rmail-yank-current-message): New function.
 +      (rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer.
 +      (rmail-reply): Likewise.
 +      (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer.
 +
 +      * mail/sendmail.el (mail-bury): Choose the first rmail-mode
 +      buffer, not the last.  Reject temp buffers.  Use the rmail-mode
 +      buffer, not newbuf.
 +
 +2012-04-17  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * server.el (server-ensure-safe-dir): Simplify.
 +
 +2012-04-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el: Provide smarter auto-filling.
 +      (smie-auto-fill): New function.
 +      (smie-setup): Use it.
 +
 +      * newcomment.el (comment-choose-indent): Obey comment-inline-offset.
 +
 +2012-04-17  Philipp Haselwarter  <philipp.haselwarter@gmx.de>  (tiny change)
 +
 +      * newcomment.el (comment-inline-offset): New custom var (bug#11090).
 +      (comment-indent): Use it.
 +
 +2012-04-17  Vincent Belaïche  <vincentb1@users.sourceforge.net>
 +
 +      * ses.el: The overall change is to add cell renaming, that is
 +      setting fancy names for cell symbols other than name matching
 +      "\\`[A-Z]+[0-9]+\\'" regexp .
 +      (ses-localvars): Add ses--renamed-cell-symb-list.
 +      (ses-create-cell-variable): New defun.
 +      (ses-destroy-cell-variable-range): Respect ses--numrows, ses--numcols.
 +      (ses-relocate-formula): Relocate formulas only for cells the
 +      symbols of which are not renamed, i.e. symbols whose names do not
 +      match regexp "\\`[A-Z]+[0-9]+\\'".
 +      (ses-relocate-all): Relocate values only for cells the symbols of
 +      which are not renamed.
 +      (ses-load): Create cells variables as the (ses-cell ...) are read,
 +      in order to check row col consistency with cell symbol name only
 +      for cells that are not renamed.
 +      (ses-replace-name-in-formula): New defun.
 +      (ses-rename-cell): New defun.
 +
 +2012-04-17  Peter Oliver  <bzr@mavit.org.uk>  (tiny change)
 +
 +      * progmodes/perl-mode.el (perl-indent-parens-as-block):
 +      New option (bug#11118).
 +      (perl-calculate-indent): Respect it.
 +
 +2012-04-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * dired-aux.el (dired-mark-read-string): Doc fix.
 +
 +2012-04-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * dired-aux.el (dired-mark-read-string): Offer optional completion.
 +      (dired-do-chxxx): Complete chown, chgrp over users, groups.  (Bug#7900)
 +
 +2012-04-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * mouse.el (mouse-drag-track):
 +      * speedbar.el (speedbar-frame-mode):
 +      Use auto-hscroll-mode rather than the alias automatic-hscrolling.
 +
 +2012-04-16  Leo Liu  <sdl.web@gmail.com>
 +
 +      * progmodes/python.el: Trivial cleanup.
  
 -      * progmodes/cc-langs.el (c-symbol-start): Include char _ (bug#11986).
 +2012-04-16  Glenn Morris  <rgm@gnu.org>
  
 -2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * vc/vc.el (vc-string-prefix-p):
 +      * vc/pcvs-util.el (cvs-string-prefix-p):
 +      * textmodes/tex-mode.el (latex-string-prefix-p, tex-string-prefix-p):
 +      * mpc.el (mpc-string-prefix-p):
 +      Make all of these into obsolete aliases for string-prefix-p.
 +      Update callers.
 +      * vc/pcvs.el, vc/vc-dispatcher.el, vc/vc-dir.el: Update callers.
  
 -      * userlock.el, emacs-lisp/map-ynp.el: Declare part of `emacs' package.
 -      * progmodes/bug-reference.el, misearch.el: Provide themselves
 -      (bug#11915).
 +      * textmodes/two-column.el: Move custom options to the start.
 +      (frame-width): Remove compat definition.
 +      (2C-associate-buffer, 2C-dissociate):
 +      Use with-current-buffer rather than save-excursion.
 +      (2C-dissociate): Force a mode-line update.
 +      (2C-autoscroll): Use ignore-errors.
  
 -      * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
 -      of narrowed buffer (bug#11966).
 +      * emacs-lisp/eieio-opt.el (describe-class, describe-generic):
 +      Autoload trivia.
  
 -2012-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +      * emacs-lisp/cl-extra.el (*random-state*):
 +      Remove unnecessary declaration.
  
 -      * progmodes/cc-cmds.el (c-defun-name): Recognize Objective-C methods
 -      also (Bug#7879).
 +      * calendar/cal-tex.el (cal-tex-end-document): Trivial clarification.
  
 -2012-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * play/cookie1.el (cookie-snarf):
 +      Give an explicit error if input file cannot be read.
  
 -      * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last
 -      change (bug#11826).
 +      * play/yow.el (yow-file): Use expand-file-name rather than concat.
  
 -2012-07-02  Glenn Morris  <rgm@gnu.org>
 +      * progmodes/perl-mode.el (c-macro-expand):
 +      Remove unnecessary autoload (it is in loaddefs.el).
  
 -      * simple.el (kill-whole-line): Doc tweak.
 +      * textmodes/picture.el (picture-desired-column)
 +      (picture-update-desired-column): Convert comments to doc-strings.
 +      (picture-substitute): Remove function.
 +      (picture-mode-map): Initialize in the defvar.
  
 -2012-07-01  Eli Zaretskii  <eliz@gnu.org>
 +      * woman.el: Remove eval-after-load for tar-mode.
 +      * tar-mode.el (tar-mode-map): Add woman binding and menu entry.
 +      (woman-tar-extract-file): Autoload it.
  
 -      * files.el (file-relative-name): Compare file names
 -      case-insensitively if on MS-Windows or MS-DOS, or if
 -      read-file-name-completion-ignore-case is non-nil.  Don't use
 -      case-fold-search for this purpose.  (Bug#11827)
 +      * frame.el (automatic-hscrolling): Make this alias obsolete.
  
 -2012-06-28  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-04-12  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
  
 -      * calendar/cal-dst.el (calendar-current-time-zone):
 -      Return calendar-current-time-zone-cache if non-nil.
 +      * textmodes/ispell.el (ispell-set-spellchecker-params): Post-process
 +      `ispell-dictionary-alist' to use [:alpha:] and utf-8 if possible.
 +      (ispell-dictionary-base-alist): Revert to original XEmacs
 +      friendly version for default.  [:alpha:] will be added in
 +      `ispell-set-spellchecker-params' if needed.
  
 -2012-06-25  Masatake YAMATO  <yamato@redhat.com>
 +2012-04-16  Chong Yidong  <cyd@gnu.org>
  
 -      * progmodes/which-func.el (which-func-format):
 -      Add mouse-face.  (Bug#11698)
 +      * image.el (imagemagick--file-regexp): New variable.
 +      (imagemagick-register-types): Use it.
 +      (imagemagick-types-inhibit): Add :set function.  Allow new value
 +      of t to inhibit all types.
  
 -2012-06-24  Leo Liu  <sdl.web@gmail.com>
 +      * emacs-lisp/regexp-opt.el (regexp-opt-charset): Avoid cl macros,
 +      so we can preload it.
  
 -      * ibuf-ext.el (ibuffer-diff-buffer-with-file-1): Avoid buffer
 -      read-only error.
 +      * loadup.el (fboundp): Preload regexp-opt, needed by
 +      imagemagick-register-types.
  
 -      * net/rcirc.el (rcirc): Avoid error when process-contact returns t.
 +2012-04-15  Chong Yidong  <cyd@gnu.org>
  
 -      * vc/diff-mode.el (diff-file-prev/next): Fix typo.
 +      * frame.el (scrolling): Remove nearly unused customization group.
  
 -2012-06-23  Leo Liu  <sdl.web@gmail.com>
 +      * scroll-all.el (scroll-all-mode): Move to windows group.
  
 -      * textmodes/enriched.el (enriched-next-annotation):
 -      Use eq (Bug#11528).
 +2012-04-15  Chong Yidong  <cyd@gnu.org>
  
 -2012-06-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * bindings.el (goto-map): Bind goto-char to M-g c (Bug#11240).
  
 -      * minibuffer.el (minibuffer-confirm-exit-commands):
 -      Add completion-at-point (bug#11725).
 +2012-04-15  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2012-06-21  Glenn Morris  <rgm@gnu.org>
 +      Avoid the use of ((lambda ...) ...) in lexical-binding code.
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Use funcall (bug#11241).
  
 -      * progmodes/f90.el (f90-font-lock-keywords-2):
 -      Add some preprocessor elements.  (Bug#10499)
 +2012-04-15  Glenn Morris  <rgm@gnu.org>
  
 -2012-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * simple.el (process-file-side-effects): Doc fix.
  
 -      * progmodes/cperl-mode.el (cperl-update-syntaxification):
 -      Use syntax-propertize (bug#11739).
 +2012-04-15  Glenn Morris  <rgm@gnu.org>
  
 -2012-06-13  Glenn Morris  <rgm@gnu.org>
 +      * international/mule-cmds.el (set-language-environment): Doc fix.
  
 -      * international/mule-cmds.el (mule-menu-keymap)
 -      (set-language-environment, set-locale-environment): Doc tweaks.
 +2012-04-14  Juanma Barranquero  <lekktu@gmail.com>
  
 -2012-06-01  Chong Yidong  <cyd@gnu.org>
 +      * server.el (server-auth-key, server-generate-key): Doc fixes.
 +      (server-get-auth-key): Doc fix.  Use `string-match-p'.
 +      (server-start): Reflow docstring.
  
 -      * Version 24.1 released.
 +2012-04-14  Lars Ingebrigtsen  <larsi@gnus.org>
  
 -2012-06-01  Glenn Morris  <rgm@gnu.org>
 +      * server.el (server-generate-key): `called-interactively-p'
 +      requires a parameter.
  
 -      * mail/rmail.el (rmail-yank-current-message):
 -      Leave point at correct position.  (Bug#11660)
 +2012-04-14  Michal Nazarewicz  <mina86@mina86.com>
  
 -2012-06-01  Chong Yidong  <cyd@gnu.org>
 +      * server.el (server-auth-key): New variable.
 +      (server-generate-key, server-get-auth-key): New function.
 +      (server-start): Use the new variable and functions to allow
 +      setting a permanent server key (bug#9423).
  
 -      * allout-widgets.el: Fix code header
 +2012-04-14  Leo Liu  <sdl.web@gmail.com>
  
 -2012-06-01  Chong Yidong  <cyd@gnu.org>
 +      * vc/diff-mode.el (diff-file-prev/next): Fix typo.
  
 -      * cus-edit.el (customize-changed-options-previous-release):
 -      Bump to 23.4.
 +2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
  
 -2012-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      Spelling fixes.
 +      * hexl.el (hexl-rulerize): Rename from hexl-rulerise, since
 +      Emacs uses American spelling.
  
 -      * emacs-lisp/bytecomp.el (byte-compile-fix-header):
 -      Handle arbitrary file name lengths (Bug#11585).
 +2012-04-14  Juanma Barranquero  <lekktu@gmail.com>
  
 -2012-05-28  Martin Rudalics  <rudalics@gmx.at>
 +      * emacs-lock.el (emacs-lock-locked-buffer-functions): New hook.
 +      (emacs-lock--exit-locked-buffer): Return the locked buffer.  Doc fix.
 +      (emacs-lock--kill-emacs-hook, emacs-lock--kill-emacs-query-functions)
 +      (emacs-lock--kill-buffer-query-functions): Run new hook.  (Bug#11017)
  
 -      * desktop.el (desktop-read): Clear previous and next buffers for
 -      all windows and bury *Messages* buffer (bug#11556).
 +2012-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2012-05-18  Eli Zaretskii  <eliz@gnu.org>
 +      * progmodes/which-func.el (which-func-modes): Change default.
  
 -      * mail/sendmail.el (mail-yank-region):
 -      Recognize rmail-yank-current-message in addition to insert-buffer.
 -      Fixes mail-mode's "C-c C-r" that otherwise does nothing when invoked in
 -      a *mail* buffer created through rmail-start-mail with sendmail as
 -      mail-user-agent.
 +2012-04-14  Kim F. Storm  <storm@cua.dk>
  
 -2012-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * emulation/cua-base.el (cua-exchange-point-and-mark): Just call
 +      exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191).
  
 -      * emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious
 -      parens around the arg list (bug#11499).  Silly backport.
 +2012-04-14  Chong Yidong  <cyd@gnu.org>
  
 -2012-05-16  Chong Yidong  <cyd@gnu.org>
 +      * custom.el (custom-theme-set-variables): Doc fix.
  
 -      * net/gnutls.el (gnutls-min-prime-bits): Improve docstring.
 +2012-04-14  Glenn Morris  <rgm@gnu.org>
  
 -2012-05-15  Chong Yidong  <cyd@gnu.org>
 +      * international/mule.el (set-auto-coding-for-load): Doc fix.
  
 -      * help.el (describe-mode): Doc fix.
 +2012-04-14  Alan Mackenzie  <acm@muc.de>
  
 -      * net/gnutls.el (gnutls-min-prime-bits): Default to 256 (Bug#11267).
 +      * progmodes/cc-menus.el (cc-imenu-objc-generic-expression): Make
 +      imenu work again for Objective C Mode.  Correct the *-index values,
 +      these having been disturbed by a previous change in 2011-08.
  
 -2012-05-06  Troels Nielsen  <bn.troels@gmail.com>  (tiny change)
 +      * progmodes/cc-engine.el (c-before-change-check-<>-operators):
 +      Correct two search limits.
  
 -      * progmodes/compile.el (compilation-internal-error-properties):
 -      Calculate start position correctly when end-col is set but
 -      end-line is not (Bug#11382).
 +2012-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2012-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * startup.el (command-line-1): Inhibit splash from daemon (bug#10996).
  
 -      * net/rlogin.el (rlogin-mode-map): Fix last change.
 +2012-04-14  Andreas Schwab  <schwab@linux-m68k.org>
  
 -2012-05-09  Jason L. Wright  <jason.wright@inl.gov>  (tiny change)
 +      * international/characters.el: Fix sorting.
  
 -      * mail/smtpmail.el (smtpmail-send-command): Send the command and
 -      the following \r\n using a single `process-send-string', since the
 -      Lotus SMTP server refuses to accept any commands if they are sent
 -      with two `process-send-string's (bug#11444).
 +2012-04-14  Eli Zaretskii  <eliz@gnu.org>
  
 -2012-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * international/characters.el: Add more missing Latin case pairs.
  
 -      * shell.el (shell-parse-pcomplete-arguments): Obey
 -      pcomplete-arg-quote-list inside double-quoted args as well (bug#11348).
 +2012-04-14  Glenn Morris  <rgm@gnu.org>
  
 -2012-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * files.el (dir-locals-set-class-variables): Doc fix.
  
 -      * shell.el (shell-completion-vars): Fix last change (bug#11348).
 +2012-04-14  Eli Zaretskii  <eliz@gnu.org>
  
 -2012-05-07  Chong Yidong  <cyd@gnu.org>
 +      * international/characters.el: Add set-case-syntax-pair call for
 +      LATIN CAPITAL LETTER Y WITH DIAERESIS RET and its lower-case
 +      counterpart.  (Bug#11209)
  
 -      * ansi-color.el (ansi-color-process-output): Check for validity of
 -      comint-last-output-start before using it.  This avoids a bad
 -      interaction with gdb-mi's input/output buffer.
 +      * simple.el (shell-command-on-region): Doc fix.  (Bug#11208)
  
 -2012-05-06  Glenn Morris  <rgm@gnu.org>
 +2012-04-14  Glenn Morris  <rgm@gnu.org>
  
 -      * files.el (dir-locals-read-from-file):
 -      Mention dir-locals in any error message.
 +      * calendar/holidays.el (calendar-check-holidays): Doc fix.
  
 -2012-05-06  Chong Yidong  <cyd@gnu.org>
 +2012-04-14  Eli Zaretskii  <eliz@gnu.org>
  
 -      * emacs-lisp/package.el (package-built-in-p): Handle the `emacs'
 -      package (Bug#11410).
 +      * textmodes/ispell.el (ispell-dictionary-base-alist):
 +      Add data for Hebrew.
  
 -2012-05-05  Chong Yidong  <cyd@gnu.org>
 +2012-04-14  Chong Yidong  <cyd@gnu.org>
  
 -      * emacs-lisp/package.el (package-buffer-info): Avoid putting local
 -      variables into description.
 +      * net/rcirc.el (rcirc-cmd-quit):
 +      Revert 2012-03-18 change (Bug#11192).
  
 -2012-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-04-14  Glenn Morris  <rgm@gnu.org>
  
 -      * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list like
 -      shell-delimiter-argument-list (bug#11348).
 -      (shell-parse-pcomplete-arguments): Obey pcomplete-arg-quote-list.
 +      * pcmpl-rpm.el (pcomplete/rpm): Handle -qf.
  
 -2012-05-04  Chong Yidong  <cyd@gnu.org>
 +2012-04-14  Eli Zaretskii  <eliz@gnu.org>
  
 -      * select.el (xselect--encode-string): Always use utf-8 for TEXT on
 -      Nextstep.
 +      * minibuffer.el (completion-in-region-mode-map):
 +      Bind completion-help-at-point to M-? rather than ?.  (Bug#11182)
  
 -2012-05-03  Kenichi Handa  <handa@m17n.org>
 +2012-04-13  Vivek Dasmohapatra  <vivek@etla.org>
  
 -      * mail/rmailmm.el (rmail-show-mime): Catch an error caused by text
 -      decoding, and show a warning message without signalling an error
 -      (Bug#11282).
 +      * hexl.el (hexl-insert-char): Make display sizes other than 16 work.
  
 -2012-04-30  Eli Zaretskii  <eliz@gnu.org>
 +2012-04-13  Masatake YAMATO  <yamato@redhat.com>
  
 -      * mail/rmail.el (rmail-yank-current-message): Use the encoding of
 -      the yanked message in preference to the default value of
 -      buffer-file-coding-system.
 +      * minibuffer.el (minibuffer-local-filename-syntax): New variable
 +      to allow `C-M-f' and `C-M-b' to move to the nearest path
 +      separator (bug#9511).
  
 -2012-04-30  Martin Rudalics  <rudalics@gmx.at>
 +2012-04-13  Lars Ingebrigtsen  <larsi@gnus.org>
  
 -      * window.el (display-buffer--action-function-custom-type):
 -      Fix entry.
 +      * avoid.el: Require cl when compiling.  And also move the
 +      `provide' to the end.
  
 -2012-04-27  Alan Mackenzie  <acm@muc.de>
 +2012-04-13  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
  
 -      * progmodes/cc-defs.el (c-version): Update to 5.32.3.
 +      * avoid.el (mouse-avoidance-banish-position): New variable.
 +      (mouse-avoidance-banish-destination): Use it (bug#10165).
  
 -2012-04-27  Chong Yidong  <cyd@gnu.org>
 +2012-04-13  Leo Liu  <sdl.web@gmail.com>
  
 -      * subr.el (read-key): Avoid running filter function when setting
 -      up temporary tool bar entries (Bug#9922).
 +      * progmodes/which-func.el (which-func-modes): Add objc-mode.
  
 -2012-04-26  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-04-13  Ken Brown  <kbrown@cornell.edu>
  
 -      * vc/vc-git.el (vc-git-state): Fix regexp matching diff output.
 -      (Bug#11344)
 +      * net/browse-url.el (browse-url-file-url): Remove Cygwin hack;
 +      this is no longer needed now that cygstart understands file:// URLs.
 +      (browse-url-filename-alist): For the same reason, don't modify
 +      file:// URLs on Cygwin.
  
 -2012-04-24  Chong Yidong  <cyd@gnu.org>
 +2012-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * select.el (xselect--encode-string): New function, split from
 -      xselect-convert-to-string.
 -      (xselect-convert-to-string): Use it.
 -      (xselect-convert-to-filename, xselect-convert-to-os)
 -      (xselect-convert-to-host, xselect-convert-to-user): Ensure that
 -      returned strings are properly encoded (Bug#11315).
 +      * emulation/cua-base.el (cua--pre-command-handler-1): Don't activate
 +      the region on shift if the binding is already shifted (bug#11221).
  
 -2012-04-22  Chong Yidong  <cyd@gnu.org>
 +2012-04-12  Glenn Morris  <rgm@gnu.org>
  
 -      * simple.el (delete-active-region): Move to killing custom group.
 +      * mail/mailpost.el: Move to obsolete/.
  
 -2012-04-21  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-04-12  Drew Adams  <drew.adams@oracle.com>
  
 -      * progmodes/which-func.el (which-func-current): Quote %
 -      characters for mode-line processing.
 +      * imenu.el (imenu--generic-function): Ignore invisible definitions
 +      (bug#10123).
  
 -2012-04-21  Chong Yidong  <cyd@gnu.org>
 +2012-04-12  Vivek Dasmohapatra  <vivek@etla.org>
  
 -      * xml.el (xml-parse-region, xml-parse-tag): Avoid errors due to
 -      reaching eob (Bug#11286).
 +      * hexl.el (hexl-bits): New variable.
 +      (hexl-options): Mention the variable in the doc string.
 +      (hexl-rulerise, hexl-line-displen): New functions.
 +      (hexl-mode): Mention the new variable.
 +      (hexl-mode, hexl-current-address, hexl-current-address):
 +      Use the displen.
 +      (hexl-ascii-start-column): New function.
 +      (hexl-address-to-marker, hexl-beginning-of-line, hexl-options)
 +      (hexl-insert-char, hexl-mode-ruler): Use the displen (bug#4941).
  
 -2012-04-20  Richard Stallman  <rms@gnu.org>
 +2012-04-12  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
  
 -      Fix logic for returning to and yanking from Rmail buffer.
 +      * textmodes/flyspell.el (flyspell-large-region): For hunspell, use
 +      '("-i" ENCODING), in 2 separate command-line arguments, to specify
 +      the encoding, as expected by hunspell.
  
 -      * mail/rmail.el (rmail-start-mail):
 -      Pass (rmail-mail-return...) for the return-action.
 -      Pass (rmail-yank-current-message...) for the yank-action.
 -      (rmail-yank-current-message): New function.
 -      (rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer.
 -      (rmail-reply): Likewise.
 -      (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer.
 +2012-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * mail/sendmail.el (mail-bury): Choose the first rmail-mode
 -      buffer, not the last.  Reject temp buffers.  Use the rmail-mode
 -      buffer, not newbuf.
 +      * battery.el (battery--linux-sysfs-regexp): New const.
 +      (battery-status-function): Use it.  Remove yeeloong special case.
 +      (battery-yeeloong-sysfs): Remove.
 +      (battery-echo-area-format): Remove yeeloong special case.
  
 -2012-04-20  Eli Zaretskii  <eliz@gnu.org>
 +2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * progmodes/gdb-mi.el (gdb-control-level): New variable.
 -      (gdb): Make it buffer-local and init to zero.
 -      (gdb-control-commands-regexp): New variable.
 -      (gdb-send): Don't wrap in "-interpreter-exec console" if
 -      gdb-control-level is positive.  Increment gdb-control-level
 -      whenever the command matches gdb-control-commands-regexp, and
 -      decrement it each time the command is "end".  (Bug#11279)
 +      * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil.
 +      Reported by Noah Friedman.
  
 -2012-04-20  Martin Rudalics  <rudalics@gmx.at>
 +      * subr.el (read-passwd): Use read-string.
  
 -      * window.el (adjust-window-trailing-edge, enlarge-window)
 -      (shrink-window, window-resize):
 -      * mouse.el (mouse-drag-line): Fix resizing of minibuffer
 -      windows (Bug#11276).
 +2012-04-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
 -2012-04-20  Dan Nicolaescu  <dann@gnu.org>
 +      * vcursor.el (vcursor-move): Increase the priority of the overlay
 +      (bug#9663).
  
 -      * battery.el (battery-echo-area-format): Display remaining time
 -      for sysfs backend too (Bug#11269).
 -      (battery-linux-sysfs): Fix conditional for the charge.
 +2012-04-11  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
  
 -2012-04-20  Chong Yidong  <cyd@gnu.org>
 +      * net/rcirc.el (rcirc-kill-channel-buffers): New variable.
 +      (rcirc-kill-buffer-hook): Use it to kill channel buffers (bug#5128).
  
 -      * progmodes/gdb-mi.el (gdb): Revert 2012-04-19 change.
 -      (gdb-inferior-io--init-proc): New function.
 -      (gdb-init-1): Use it.
 -      (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty,
 -      responsible for allocating a new pty and hooking it to gdb when
 -      the old pty gets an EIO due to process exit.
 -      (gdb-delchar-or-quit): New command.  Bind it in gdb-mi buffers.
 -      (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area.
 -      (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset.
 +2012-04-11  William Stevenson  <yhvh2000@gmail.com>
  
 -2012-04-20  Eli Zaretskii  <eliz@gnu.org>
 +      * textmodes/artist.el (artist-mode): Convert artist-mode to use
 +      define-minor-mode (bug#10760).
  
 -      * window.el (window-min-size, window-sizable, window-min-delta)
 -      (window-max-delta, window--resizable, window-resizable)
 -      (window-total-size, window-full-height-p, window-full-width-p)
 -      (window-in-direction, window--resize-mini-window, window-resize)
 -      (window--resize-child-windows-normal)
 -      (window--resize-child-windows, window--resize-siblings)
 -      (window--resize-this-window, adjust-window-trailing-edge)
 -      (enlarge-window, shrink-window): Doc fixes.
 +2012-04-11  Wolfgang Jenkner  <wjenkner@inode.at>  (tiny change)
  
 -2012-04-19  Chong Yidong  <cyd@gnu.org>
 +      * progmodes/grep.el (rgrep): Tweak the find command line so
 +      that directories matching `grep-find-ignored-files' won't be
 +      pruned (bug#10351).
  
 -      * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty):
 -      New function to call delete-process on the gdb-inferior buffer's pty.
 -      (gdb-reset): Use it, instead of relying on kill-buffer to kill the
 -      pty process (Bug#11273).
 -      (gdb-update): New arg to suppress talking to the gdb process.
 -      (gdb-done-or-error): Use it.
 -      (gdb-stopped-functions): Rename from gdb-stopped-hooks.
 -      (gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for
 -      sentinel not being called.
 +2012-04-11  Chong Yidong  <cyd@gnu.org>
  
 -      * comint.el (make-comint-in-buffer, comint-exec): Doc fix.
 +      * startup.el (command-line): Remove support for long-obsolete
 +      variable font-lock-face-attributes.
  
 -2012-04-18  Chong Yidong  <cyd@gnu.org>
 +2012-04-11  Glenn Morris  <rgm@gnu.org>
  
 -      * progmodes/grep.el (grep, rgrep): Doc fix (Bug#11268).
 +      * vc/vc-bzr.el (vc-bzr-status): Avoid condition-case-unless-debug.
  
 -2012-04-18  Glenn Morris  <rgm@gnu.org>
 +2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * net/network-stream.el (open-network-stream): Doc fix.
 +      * window.el (window--state-get-1): Obey window-point-insertion-type.
  
 -2012-04-17  Chong Yidong  <cyd@gnu.org>
 +2012-04-11  Lennart Borgman  <lennart.borgman@gmail.com>
  
 -      * emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos.
 +      * emacs-lisp/lisp.el (narrow-to-defun): `beginning-of-defun' goes
 +      to previous function when point is on the first character of a
 +      function.  Take care of that in `narrow-to-defun' (bug#6157).
  
 -2012-04-16  Alan Mackenzie  <acm@muc.de>
 +2012-04-11  Glenn Morris  <rgm@gnu.org>
  
 -      Ensure searching for keywords is case sensitive.
 +      * vc/vc-bzr.el (vc-bzr-status): Handle all errors,
 +      not just file-errors.
  
 -      * progmodes/cc-cmds.el (c-electric-brace, c-electric-lt-gt)
 -      (c-electric-paren, c-beginning-of-defun, c-end-of-defun)
 -      (c-defun-name, c-mark-function, c-cpp-define-name)
 -      (c-comment-indent, c-scan-conditionals, c-indent-defun)
 -      (c-context-line-break): bind case-fold-search to nil.
 +      * vc/vc-bzr.el (vc-bzr-sha1-program, sha1-program): Remove.
 +      (vc-bzr-sha1): Use internal sha1.
  
 -      * progmodes/cc-mode.el (c-font-lock-fontify-region):
 -      bind case-fold-search to nil.
 +2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2012-04-16  Chong Yidong  <cyd@gnu.org>
 +      * progmodes/flymake.el (flymake-mode): Beware read-only dirs (bug#8954).
  
 -      * mail/sendmail.el (mail-bury): Call return action with the right
 -      Rmail buffer (Bug#11242).
 +2012-04-10  Sébastien Gross  <seb@chezwam.org>  (tiny change)
  
 -2012-04-15  Chong Yidong  <cyd@gnu.org>
 +      * progmodes/hideshow.el (hs-hide-all): Don't infloop on comments
 +      that start in the middle of the line (bug#10496).
  
 -      * server.el (server-process-filter): Handle corner case where both
 -      tty and nowait options are present (Bug#11102).
 +2012-04-10  Dan Nicolaescu  <dann@gnu.org>
  
 -2012-04-15  Glenn Morris  <rgm@gnu.org>
 +      * battery.el (battery-linux-proc-acpi): Only one battery is
 +      discharged at a time, but that seems to confuse battery.el when
 +      computing `rate-type' for the battery not being discharged
 +      (bug#10332).
  
 -      * simple.el (process-file-side-effects): Doc fix.
 +2012-04-10  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2012-04-14  Glenn Morris  <rgm@gnu.org>
 +      * emacs-lisp/autoload.el (autoload-make-program): Remove, unused.
  
 -      * international/mule-cmds.el (set-language-environment): Doc fix.
 +      * international/quail.el: Use dolist and simplify.
 +      (quail-define-package, quail-update-keyboard-layout)
 +      (quail-define-rules): Use dolist.
 +      (quail-insert-kbd-layout, quail-get-translation): CSE.
  
 -2012-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * tmm.el: Use dolist, remove left over hook.
 +      (tmm-prompt, tmm-define-keys, tmm-shortcut, tmm-get-keybind):
 +      Use dolist.
 +      (calendar-load-hook): Don't mess with it.
  
 -      Avoid the use of ((lambda ...) ...) in lexical-binding code.
 -      * emacs-lisp/easy-mmode.el (define-minor-mode):Use funcall (bug#11241).
 +      * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
 +      Use derived-mode-p.  Run the diff asynchronously.
  
 -2012-04-13  Kim F. Storm  <storm@cua.dk>
 +2012-04-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
 -      * emulation/cua-base.el (cua-exchange-point-and-mark): Just call
 -      exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191).
 +      * obsolete/mouse-sel.el: Add an Obsolete-since header.
  
 -2012-04-12  Chong Yidong  <cyd@gnu.org>
 +2012-04-10  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * custom.el (custom-theme-set-variables): Doc fix.
 +      * misc.el: Display absolute path of loaded DLLs (bug#10424).
 +      (list-dynamic-libraries--loaded): New function.
 +      (list-dynamic-libraries--refresh): Use it.
  
 -2012-04-12  Glenn Morris  <rgm@gnu.org>
 +2012-04-10  Nathan Weizenbaum  <nweiz@google.com>
  
 -      * international/mule.el (set-auto-coding-for-load): Doc fix.
 +      * progmodes/python.el (python-fill-paragraph):
 +      Make python-fill-region in a multiline string work when font-lock is
 +      disabled (bug#7018).
  
 -2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-04-10  Laimonas VÄ—bra  <laimonas.vebra@gmail.com>  (tiny change)
  
 -      * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil.
 -      Reported by Noah Friedman.  Backport from trunk.
 +      * language/european.el (cp775): Add oem/legacy (en)coding on
 +      DOS/MS Windows for the Baltic languages.  There are still plenty
 +      of texts written in this encoding/codepage (bug#6519).
  
 -2012-04-11  Alan Mackenzie  <acm@muc.de>
 +2012-04-10  Glenn Morris  <rgm@gnu.org>
  
 -      * progmodes/cc-menus.el (cc-imenu-objc-generic-expression):
 -      Make imenu work again for Objective C Mode.  Correct the *-index
 -      values, these having been disturbed by a previous change in 2011-08.
 +      * cus-start.el (eol-mnemonic-unix, eol-mnemonic-dos, eol-mnemonic-mac):
 +      Add :standard values, reducing "rogue" customs in emacs -Q a bit more.
  
 -      * progmodes/cc-engine.el (c-before-change-check-<>-operators):
 -      Correct two search limits.
 +2012-04-10  Florian Adamsky  <florian@adamsky.it>  (tiny change)
  
 -2012-04-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * recentf.el (recentf-dialog-mode-map): Add two keybindings for
 +      next-line "n" and previous-line "p" in order to make recentf more
 +      consistent with ibuffer, dired or org-mode (bug#9387).
  
 -      * startup.el (command-line-1): Inhibit splash from daemon (bug#10996).
 +2012-04-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
 -2012-04-10  Andreas Schwab  <schwab@linux-m68k.org>
 +      * image.el (put-image): Return the overlay created instead of the
 +      optional input string (bug#7834).  Note that this may break code
 +      that is (for some reason or other) depending on `put-image'
 +      returning the string.
  
 -      * international/characters.el: Fix sorting.
 +      * mouse-sel.el (mouse-sel-mode): Mark as obsolete (bug#6174).
  
 -2012-04-10  Eli Zaretskii  <eliz@gnu.org>
 +      * simple.el (zap-to-char): Allow zapping using input methods
 +      (bug#1580).
  
 -      * international/characters.el: Add more missing Latin case pairs.
 +      * textmodes/fill.el (fill-region): Leave point and mark where they
 +      were before filling (bug#5399).
  
 -2012-04-10  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-04-09  Glenn Morris  <rgm@gnu.org>
  
 -      * international/characters.el: Recover lost case pairs.
 +      * version.el (emacs-bzr-get-version):
 +      Handle lightweight checkouts of local branches.
  
 -2012-04-10  Glenn Morris  <rgm@gnu.org>
 +2012-04-09  Andreas Schwab  <schwab@linux-m68k.org>
  
 -      * files.el (dir-locals-set-class-variables): Doc fix.
 +      * international/characters.el: Recover lost case pairs.  (Bug#11209)
  
 -2012-04-09  Eli Zaretskii  <eliz@gnu.org>
 +2012-04-09  Chong Yidong  <cyd@gnu.org>
  
 -      * international/characters.el: Add set-case-syntax-pair call for
 -      LATIN CAPITAL LETTER Y WITH DIAERESIS RET and its lower-case
 -      counterpart.  (Bug#11209)
 +      * custom.el (custom-variable-p): Return nil for non-symbol
 +      arguments instead of signaling an error.
 +      (user-variable-p): Obsolete alias for custom-variable-p.
  
 -      * simple.el (shell-command-on-region): Doc fix.  (Bug#11208)
 +      * apropos.el (apropos-variable):
 +      * files-x.el (read-file-local-variable):
 +      * simple.el (set-variable):
 +      * woman.el (woman-mini-help):
 +      * emacs-lisp/byte-opt.el (side-effect-free-fns): Callers changed.
  
  2012-04-09  Glenn Morris  <rgm@gnu.org>
  
 -      * calendar/holidays.el (calendar-check-holidays): Doc fix.
 +      * startup.el (normal-top-level): Don't look for leim-list.el
 +      in places where it will not be found.  (Bug#910)
 +
 +      * international/mule-cmds.el (set-default-coding-systems):
 +      * files.el (normal-mode):
 +      Remove guarded calls to ucs-set-table-for-input.  (Bug#9821)
 +      This function was removed with ucs-tables.el in 2008.
  
  2012-04-08  Eli Zaretskii  <eliz@gnu.org>
  
 -      * textmodes/ispell.el (ispell-dictionary-base-alist): Add data for
 -      Hebrew.
 +      * textmodes/ispell.el (ispell-check-version): For hunspell, set
 +      ispell-encoding8-command to "-i", without a trailing space.
 +      (ispell-start-process): For hunspell, use '("-i" ENCODING), in 2
 +      separate command-line arguments, to specify the encoding, since
 +      that's how hunspell expects it.
  
 -2012-04-08  Chong Yidong  <cyd@gnu.org>
 +2012-04-08  Glenn Morris  <rgm@gnu.org>
  
 -      * net/rcirc.el (rcirc-cmd-quit): Revert 2012-03-18 change
 -      (Bug#11192).
 +      * loadup.el: Load bindings before cus-start.
 +      This reduces somewhat the number of "rogue" settings in emacs -Q.
  
  2012-04-07  Glenn Morris  <rgm@gnu.org>
  
 -      * pcmpl-rpm.el (pcomplete/rpm): Handle -qf.
 +      * version.el (emacs-bzr-get-version): New function.
 +      (emacs-bzr-version): New variable.
 +      * loadup.el (emacs-bzr-version): Set it.  (Bug#8054)
 +      * mail/emacsbug.el (report-emacs-bug): Include bzr version.
  
  2012-04-07  Eli Zaretskii  <eliz@gnu.org>
  
 -      * minibuffer.el (completion-in-region-mode-map):
 -      Bind completion-help-at-point to M-? rather than ?.  (Bug#11182)
 +      * international/uni-bidi.el, international/uni-category.el:
 +      * international/uni-combining.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-titlecase.el, international/uni-uppercase.el:
 +      Update for Unicode 6.1.
 +
 +2012-04-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * term/w32-win.el (dynamic-library-alist): Add libxml2 DLLs.
  
  2012-04-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
  
  
  2012-03-30  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
  
 -      * ispell.el (ispell-get-extended-character-mode): Disable
 -      extended-char-mode for hunspell. hunspell does not support it and
 -      treats ~word as ordinary words in pipe mode.
 +      * textmodes/ispell.el (ispell-get-extended-character-mode):
 +      Disable extended-char-mode for hunspell.  hunspell does not support it
 +      and treats ~word as ordinary words in pipe mode.
  
  2012-03-30  Glenn Morris  <rgm@gnu.org>
  
        (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'.
        (hfy-face-to-css): Re-defined to be a variable.
        (hfy-compile-stylesheet): Modify.  Allow stylesheet to be built
 -      over multiple runs. This is made possible by having the caller let
 +      over multiple runs.  This is made possible by having the caller let
        bind a special variable `hfy-user-sheet-assoc'.
        (htmlfontify-string): New defun.
        (hfy-compile-face-map): Make sure that the last char in the
  
  2012-03-09  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * net/dbus.el: (dbus-property-handler): Return empty array if
 +      * net/dbus.el (dbus-property-handler): Return empty array if
        there are no properties.
  
  2012-03-09  Leo Liu  <sdl.web@gmail.com>
        * term/x-win.el (x-initialize-window-system): Reduce default for
        x-selection-timeout to 5 seconds (Bug#8869).
  
 -2012-02-24  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 -
 -      * files.el (file-subdir-of-p): Fix typo.
 -
  2012-02-24  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
  
        * files.el (files-equal-p, file-subdir-of-p): New functions.
        files from Git, SVN, Bazaar, and Mercurial.
        (save-place-to-alist): Use it.
  
 -2012-02-17  Lawrence Mitchell <wence@gmx.li>
 -            Stefan Monnier  <monnier@iro.umontreal.ca>
 +2012-02-17  Lawrence Mitchell  <wence@gmx.li>
 +          Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * newcomment.el (uncomment-region-default): Don't leave extra space
        when an arg is provided (bug#8150).
  2012-02-12  Alan Mackenzie  <acm@muc.de>
  
        Fix infinite loop with long macros.
 -      * cc-engine.el (c-state-safe-place): Handle macros properly.
 +      * progmodes/cc-engine.el (c-state-safe-place): Handle macros properly.
  
  2012-02-12  Chong Yidong  <cyd@gnu.org>
  
  
  2012-02-06  Lars Ingebrigtsen  <larsi@gnus.org>
  
 -      * progmodes/cc-mode.el
 -      (c-standard-font-lock-fontify-region-function): Set the default at
 -      load time, too, so that `font-lock-fontify-buffer' can be called
 -      without setting up the entire mode first.  This fixes a bug in
 -      `mm-inline-text' with C MIME parts.
 +      * progmodes/cc-mode.el (c-standard-font-lock-fontify-region-function):
 +      Set the default at load time, too, so that `font-lock-fontify-buffer'
 +      can be called without setting up the entire mode first.  This fixes
 +      a bug in `mm-inline-text' with C MIME parts.
  
  2012-02-06  Chong Yidong  <cyd@gnu.org>
  
  
        * net/tramp.el (tramp-action-login): Set connection property "login-as".
  
 -      * net/tramp-cache.el (tramp-dump-connection-properties): Do not dump
 -      properties, when "login-as" is set.
 -
        * net/tramp-sh.el (tramp-methods): Add user spec to "pscp" and "psftp".
        (tramp-default-user-alist): Don't add "pscp".
        (tramp-do-copy-or-rename-file-out-of-band): Use connection
  
  2011-11-16  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * net/tramp-cache.el (tramp-flush-file-property): Flush also
 -      properties of linked files.  (Bug#9879)
 -
        * net/tramp-sh.el (tramp-sh-handle-file-truename): Cache only the
        local file name.
  
        (tramp-completion-file-name-regexp-unified)
        (tramp-completion-file-name-regexp-separate)
        (tramp-completion-file-name-regexp-url): Don't use leading volume
 -      letter on win32 systems.  (Bug#5303, Bug#9311)
 +      letter on w32 systems.  (Bug#5303, Bug#9311)
        (tramp-drop-volume-letter): Simplify definition.
        Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
  
        insecure exception for current topic.  Also note that auto-saves
        are handled differently.
  
 -      (allout-auto-save-temporarily-disabled), (allout-just-did-undo):
 +      (allout-auto-save-temporarily-disabledallout-just-did-undo):
        State variables for tracking auto-save inhibition situation.
  
        (allout-write-contents-hook-handler): Rename from
        (newsticker--plainview-tool-bar-map): Move tool-bar icons to
        etc/images/newsticker.
  
 -      * net/newst-backend.el (newsticker--do-run-auto-mark-filter),
 -      (newsticker--process-auto-mark-filter-match): Tell user about
 +      * net/newst-backend.el (newsticker--do-run-auto-mark-filter)
 +      (newsticker--process-auto-mark-filter-match): Tell user about
        auto-marking.
  
  2011-05-13  Didier Verna  <didier@xemacs.org>
        * textmodes/reftex-dcr.el (reftex-view-crossref): at at -> at a
  
  2011-05-10  Glenn Morris  <rgm@gnu.org>
 -            Stefan Monnier  <monnier@iro.umontreal.ca>
 +          Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * files.el (hack-one-local-variable-eval-safep):
        Consider "eval: (foo-mode)" to be safe.  (Bug#8613)
        * vc/log-view.el:
        * vc/smerge-mode.el:
        * textmodes/bibtex-style.el:
 -      * textmodes/css.el:
 +      * textmodes/css-mode.el:
        * startup.el:
        * uniquify.el:
        * minibuffer.el:
diff --combined lisp/ido.el
index 2100def1992ab4a409e7bb37e3a50794f43b05a5,a2712db804d0d5fafaf6eb20206248477e95db4b..d48e7ba858ba6209192b45fbb5b358ec637bac66
  ;; can be used by other packages to read a buffer name, a file name,
  ;; or a directory name in the `ido' way.
  
 -;;; Acknowledgements
 +;;; Acknowledgments
  
  ;; Infinite amounts of gratitude goes to Stephen Eglen <stephen@cns.ed.ac.uk>
  ;; who wrote iswitch-buffer mode - from which I ripped off 99% of the code
@@@ -493,6 -493,18 +493,18 @@@ as first char even if `ido-enable-prefi
    :type 'boolean
    :group 'ido)
  
+ ;; See http://debbugs.gnu.org/2042 for more info.
+ (defcustom ido-buffer-disable-smart-matches t
+   "Non-nil means not to re-order matches for buffer switching.
+ By default, ido aranges matches in the following order:
+   full-matches > suffix matches > prefix matches > remaining matches
+ which can get in the way for buffer switching."
+   :version "24.3"
+   :type 'boolean
+   :group 'ido)
  (defcustom ido-confirm-unique-completion nil
    "Non-nil means that even a unique completion must be confirmed.
  This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuffer]
@@@ -791,39 -803,44 +803,39 @@@ subdirs in the alternatives.
    :type 'boolean
    :group 'ido)
  
 -(defface ido-first-match  '((t (:bold t)))
 +(defface ido-first-match  '((t :weight bold))
    "Face used by ido for highlighting first match."
    :group 'ido)
  
  (defface ido-only-match  '((((class color))
 -                                 (:foreground "ForestGreen"))
 -                                (t (:italic t)))
 +                          :foreground "ForestGreen")
 +                         (t :slant italic))
    "Face used by ido for highlighting only match."
    :group 'ido)
  
  (defface ido-subdir  '((((min-colors 88) (class color))
 -                             (:foreground "red1"))
 -                          (((class color))
 -                             (:foreground "red"))
 -                            (t (:underline t)))
 +                      :foreground "red1")
 +                     (((class color))
 +                      :foreground "red")
 +                     (t :underline t))
    "Face used by ido for highlighting subdirs in the alternatives."
    :group 'ido)
  
 -(defface ido-virtual '((t (:inherit font-lock-builtin-face)))
 +(defface ido-virtual '((t :inherit font-lock-builtin-face))
    "Face used by ido for matching virtual buffer names."
    :version "24.1"
    :group 'ido)
  
 -(defface ido-indicator  '((((min-colors 88) (class color))
 -                              (:foreground "yellow1"
 -                               :background "red1"
 -                               :width condensed))
 -                             (((class color))
 -                              (:foreground "yellow"
 -                               :background "red"
 -                               :width condensed))
 -                             (t (:inverse-video t)))
 +(defface ido-indicator '((((min-colors 88) (class color))
 +                        :foreground "yellow1" :background "red1" :width condensed)
 +                       (((class color))
 +                        :foreground "yellow" :background "red" :width condensed)
 +                       (t :inverse-video t))
    "Face used by ido for highlighting its indicators."
    :group 'ido)
  
  (defface ido-incomplete-regexp
 -  '((t
 -     (:inherit font-lock-warning-face)))
 +  '((t :inherit font-lock-warning-face))
    "Ido face for indicating incomplete regexps."
    :group 'ido)
  
@@@ -867,7 -884,7 +879,7 @@@ The following variables are available, 
    :group 'ido)
  
  (defvar ido-rewrite-file-prompt-rules nil
 -  "*Alist of rewriting rules for directory names in ido prompts.
 +  "Alist of rewriting rules for directory names in ido prompts.
  A list of elements of the form (FROM . TO) or (FROM . FUNC), each
  meaning to rewrite the directory name if matched by FROM by either
  substituting the matched string by TO or calling the function FUNC
@@@ -888,14 -905,9 +900,14 @@@ Otherwise, only the current list of mat
    :type 'boolean
    :group 'ido)
  
 -(defvar ido-all-frames 'visible
 -  "*Argument to pass to `walk-windows' when finding visible files.
 -See documentation of `walk-windows' for useful values.")
 +(defcustom ido-all-frames 'visible
 +  "Argument to pass to `walk-windows' when Ido is finding buffers.
 +See documentation of `walk-windows' for useful values."
 +  :type '(choice (const :tag "Selected frame only" nil)
 +               (const :tag "All existing frames" t)
 +               (const :tag "All visible frames" visible)
 +               (const :tag "All frames on this terminal" 0))
 +  :group 'ido)
  
  (defcustom ido-minibuffer-setup-hook nil
    "Ido-specific customization of minibuffer setup.
@@@ -3688,10 -3700,17 +3700,17 @@@ This is to make them appear as if they 
         (rex0 (if ido-enable-regexp text (regexp-quote text)))
         (rexq (concat rex0 (if slash ".*/" "")))
         (re (if ido-enable-prefix (concat "\\`" rexq) rexq))
-        (full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" rex0))
+        (full-re (and do-full
+                      (and (eq ido-cur-item 'buffer)
+                           (not ido-buffer-disable-smart-matches))
+                      (not ido-enable-regexp)
+                      (not (string-match "\$\\'" rex0))
                       (concat "\\`" rex0 (if slash "/" "") "\\'")))
         (suffix-re (and do-full slash
-                        (not ido-enable-regexp) (not (string-match "\$\\'" rex0))
+                        (and (eq ido-cur-item 'buffer)
+                             (not ido-buffer-disable-smart-matches))
+                        (not ido-enable-regexp)
+                        (not (string-match "\$\\'" rex0))
                         (concat rex0 "/\\'")))
         (prefix-re (and full-re (not ido-enable-prefix)
                         (concat "\\`" rexq)))
@@@ -4046,7 -4065,8 +4065,7 @@@ their normal keybindings, except for th
  RET Select the buffer at the front of the list of matches.  If the
  list is empty, possibly prompt to create new buffer.
  
 -\\[ido-select-text] Select the current prompt as the buffer.
 -If no buffer is found, prompt for a new one.
 +\\[ido-select-text] Use the current input string verbatim.
  
  \\[ido-next-match] Put the first element at the end of the list.
  \\[ido-prev-match] Put the last element at the start of the list.
@@@ -4132,7 -4152,8 +4151,7 @@@ except for the following: \\<ido-file-c
  RET Select the file at the front of the list of matches.  If the
  list is empty, possibly prompt to create new file.
  
 -\\[ido-select-text] Select the current prompt as the buffer or file.
 -If no buffer or file is found, prompt for a new one.
 +\\[ido-select-text] Use the current input string verbatim.
  
  \\[ido-next-match] Put the first element at the end of the list.
  \\[ido-prev-match] Put the last element at the start of the list.
  matches all files.  If there is only one match, select that file.
  If there is no common suffix, show a list of all matching files
  in a separate window.
 +\\[ido-magic-delete-char] Open the specified directory in Dired mode.
  \\[ido-edit-input] Edit input string (including directory).
  \\[ido-prev-work-directory] or \\[ido-next-work-directory] go to previous/next directory in work directory history.
  \\[ido-merge-work-directories] search for file in the work directory history.
diff --combined lisp/mail/emacsbug.el
index 6ee3c7898c5e88327cf8bfa8079ac6bf3d417b9a,742c05bc8d5d85e7c267017bcad7fb5bb9ae5ef2..ca9bc6b867657b814cedd6b12a909cc8ef5d9fb1
@@@ -212,7 -212,7 +212,7 @@@ Prompts for bug subject.  Leaves you i
  
        (insert ".  Please check that
  the From: line contains a valid email address.  After a delay of up
 -to one day, you should receive an acknowledgement at that address.
 +to one day, you should receive an acknowledgment at that address.
  
  Please write in English if possible, as the Emacs maintainers
  usually do not have translators for other languages.\n\n")))
      (add-text-properties (1+ user-point) (point) prompt-properties)
  
      (insert "\n\nIn " (emacs-version) "\n")
 +    (if (stringp emacs-bzr-version)
 +      (insert "Bzr revision: " emacs-bzr-version "\n"))
      (if (fboundp 'x-server-vendor)
        (condition-case nil
              ;; This is used not only for X11 but also W32 and others.
      (insert "Important settings:\n")
      (mapc
       (lambda (var)
 -       (insert (format "  value of $%s: %s\n" var (getenv var))))
 -     '("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
 +       (let ((val (getenv var)))
 +       (if val (insert (format "  value of $%s: %s\n" var val)))))
 +     '("EMACSDATA" "EMACSDOC" "EMACSLOADPATH" "EMACSPATH"
 +       "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
         "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS"))
      (insert (format "  locale-coding-system: %s\n" locale-coding-system))
      (insert (format "  default enable-multibyte-characters: %s\n"
        (insert "\n"))
      (insert "\n")
      (insert "Load-path shadows:\n")
-     (message "Checking for load-path shadows...")
-     (let ((shadows (list-load-path-shadows t)))
-       (message "Checking for load-path shadows...done")
+     (let* ((msg "Checking for load-path shadows...")
+          (result "done")
+          (shadows (progn (message "%s" msg)
+                          (condition-case nil (list-load-path-shadows t)
+                            (error
+                             (setq result "error")
+                             "Error during checking")))))
+       (message "%s%s" msg result)
        (insert (if (zerop (length shadows))
                    "None found.\n"
                  shadows)))
      (fill-region (line-beginning-position 0) (point))
      ;; This is so the user has to type something in order to send easily.
      (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
 -    (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info)
 +    (define-key (current-local-map) "\C-c\C-i" 'info-emacs-bug)
      (if can-insert-mail
        (define-key (current-local-map) "\C-cm"
          'report-emacs-bug-insert-to-mailer))
                    "  Type \\[report-emacs-bug-insert-to-mailer] to copy text to your preferred mail program.\n")))
        (terpri)
        (princ (substitute-command-keys
 -              "  Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
 +              "  Type \\[info-emacs-bug] to visit in Info the Emacs Manual section
      about when and how to write a bug report, and what
      information you should include to help fix the bug.")))
        (shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*")))
            (buffer-substring-no-properties (point-min) (point)))
      (goto-char user-point)))
  
 -(defun report-emacs-bug-info ()
 -  "Go to the Info node on reporting Emacs bugs."
 -  (interactive)
 -  (info "(emacs)Bugs"))
 +(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3")
  
  ;; It's the default mail mode, so it seems OK to use its features.
  (autoload 'message-bogus-recipient-p "message")
index 08d1461c008b5599a94269be43a254f325973b17,12829b64eb049e60ec6a6b9477df943758c94f89..0abd4daf61b9279b526c0bfa506bfbc8f451f422
@@@ -48,7 -48,7 +48,7 @@@
  ;;
  ;; Follow the instructions in the INSTALL file of the distribution.
  ;; In short, put this file on your load path and add the following
 -;; lines to your .emacs file:
 +;; lines to your init file:
  ;;
  ;; (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t)
  ;;
    :group 'idlwave)
  
  (defcustom idlwave-shell-prompt-pattern "^\r? ?IDL> "
 -  "*Regexp to match IDL prompt at beginning of a line.
 +  "Regexp to match IDL prompt at beginning of a line.
  For example, \"^\r?IDL> \" or \"^\r?WAVE> \".
  The \"^\r?\" is needed, to indicate the beginning of the line, with
  optional return character (which IDL seems to output randomly).
  This variable is used to initialize `comint-prompt-regexp' in the
 -process buffer.
 -
 -This is a fine thing to set in your `.emacs' file."
 +process buffer."
    :group 'idlwave-shell-general-setup
    :type 'regexp)
  
  (defcustom idlwave-shell-process-name "idl"
 -  "*Name to be associated with the IDL process.  The buffer for the
 +  "Name to be associated with the IDL process.  The buffer for the
  process output is made by surrounding this name with `*'s."
    :group 'idlwave-shell-general-setup
    :type 'string)
  ;; (defcustom idlwave-shell-automatic-start...)  See idlwave.el
  
  (defcustom idlwave-shell-use-dedicated-window nil
 -  "*Non-nil means, never replace the shell frame with another buffer."
 +  "Non-nil means, never replace the shell frame with another buffer."
    :group 'idlwave-shell-general-setup
    :type 'boolean)
  
  (defcustom idlwave-shell-use-dedicated-frame nil
 -  "*Non-nil means, IDLWAVE should use a special frame to display shell buffer."
 +  "Non-nil means, IDLWAVE should use a special frame to display shell buffer."
    :group 'idlwave-shell-general-setup
    :type 'boolean)
  
@@@ -143,12 -145,12 +143,12 @@@ The default makes the frame splittable
          (cons symbol sexp)))
  
  (defcustom idlwave-shell-raise-frame t
 -  "*Non-nil means, `idlwave-shell' raises the frame showing the shell window."
 +  "Non-nil means, `idlwave-shell' raises the frame showing the shell window."
    :group 'idlwave-shell-general-setup
    :type 'boolean)
  
  (defcustom idlwave-shell-arrows-do-history t
 -  "*Non-nil means UP and DOWN arrows move through command history.
 +  "Non-nil means UP and DOWN arrows move through command history.
  This variable can have 3 values:
  nil        Arrows just move the cursor
  t          Arrows force the cursor back to the current command line and
  ;; FIXME: add comint-input-ring-size?
  
  (defcustom idlwave-shell-use-toolbar t
 -  "*Non-nil means, use the debugging toolbar in all IDL related buffers.
 +  "Non-nil means, use the debugging toolbar in all IDL related buffers.
  Starting the shell will then add the toolbar to all idlwave-mode buffers.
  Exiting the shell will removed everywhere.
  Available on XEmacs and on Emacs 21.x or later.
@@@ -174,15 -176,21 +174,15 @@@ At any time you can toggle the display 
    :type 'boolean)
  
  (defcustom idlwave-shell-temp-pro-prefix "/tmp/idltemp"
 -  "*The prefix for temporary IDL files used when compiling regions.
 +  "The prefix for temporary IDL files used when compiling regions.
  It should be an absolute pathname.
  The full temporary file name is obtained by using `make-temp-file'
  so that the name will be unique among multiple Emacs processes."
    :group 'idlwave-shell-general-setup
    :type 'string)
  
 -(defvar idlwave-shell-fix-inserted-breaks nil
 -  "*OBSOLETE VARIABLE, is no longer used.
 -
 -The documentation of this variable used to be:
 -If non-nil then run `idlwave-shell-remove-breaks' to clean up IDL messages.")
 -
  (defcustom idlwave-shell-prefix-key "\C-c\C-d"
 -  "*The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
 +  "The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
  This variable must already be set when idlwave-shell.el is loaded.
  Setting it in the mode-hook is too late."
    :group 'idlwave-shell-general-setup
@@@ -215,8 -223,11 +215,8 @@@ window, but is useful for stepping, etc
  
  ;; (defcustom idlwave-shell-debug-modifiers... See idlwave.el
  
 -(defvar idlwave-shell-activate-alt-keybindings nil
 -  "Obsolete variable.  See `idlwave-shell-debug-modifiers'.")
 -
  (defcustom idlwave-shell-use-truename nil
 -  "*Non-nil means, use `file-truename' when looking for buffers.
 +  "Non-nil means, use `file-truename' when looking for buffers.
  If this variable is non-nil, Emacs will use the function `file-truename' to
  resolve symbolic links in the file paths printed by e.g., STOP commands.
  This means, unvisited files will be loaded under their truename.
@@@ -236,7 -247,7 +236,7 @@@ because these are used as separators b
    :type 'string)
  
  (defcustom idlwave-shell-mode-hook '()
 -  "*Hook for customizing `idlwave-shell-mode'."
 +  "Hook for customizing `idlwave-shell-mode'."
    :group 'idlwave-shell-general-setup
    :type 'hook)
  
@@@ -281,7 -292,7 +281,7 @@@ is non-nil.
  
  (defcustom idlwave-shell-show-commands
    '(run misc breakpoint)
 -  "*A list of command types to show output from in the shell.
 +  "A list of command types to show output from in the shell.
  Possibilities are 'run, 'debug, 'breakpoint, and 'misc.  Unselected
  types are not displayed in the shell.  The type 'everything causes all
  the copious shell traffic to be displayed."
@@@ -324,8 -335,11 +324,8 @@@ expression being examined.
           (string :tag "Label  ")
           (string :tag "Command"))))
  
 -(defvar idlwave-shell-print-expression-function nil
 -  "*OBSOLETE VARIABLE, is no longer used.")
 -
  (defcustom idlwave-shell-separate-examine-output t
 -  "*Non-nil means, put output of examine commands in their own buffer."
 +  "Non-nil means, put output of examine commands in their own buffer."
    :group 'idlwave-shell-command-setup
    :type 'boolean)
  
@@@ -345,12 -359,12 +345,12 @@@ newly created.
          (cons variable sexp)))
  
  (defcustom idlwave-shell-query-for-class t
 -  "*Non-nil means query the shell for object class on object completions."
 +  "Non-nil means query the shell for object class on object completions."
    :group 'idlwave-shell-command-setup
    :type 'boolean)
  
  (defcustom idlwave-shell-use-input-mode-magic nil
 -  "*Non-nil means, IDLWAVE should check for input mode spells in output.
 +  "Non-nil means, IDLWAVE should check for input mode spells in output.
  The spells are strings printed by your IDL program and matched
  by the regular expressions in `idlwave-shell-input-mode-spells'.
  When these expressions match, IDLWAVE switches to character input mode and
@@@ -418,7 -432,7 +418,7 @@@ end
          (regexp :tag "Line-mode regexp")))
  
  (defcustom idlwave-shell-breakpoint-popup-menu t
 -  "*If non-nil, provide a menu on mouse-3 on breakpoint lines, and
 +  "If non-nil, provide a menu on mouse-3 on breakpoint lines, and
  popup help text on the line."
    :group 'idlwave-shell-command-setup
    :type 'boolean)
    :group 'idlwave)
  
  (defcustom idlwave-shell-mark-stop-line t
 -  "*Non-nil means, mark the source code line where IDL is currently stopped.
 +  "Non-nil means, mark the source code line where IDL is currently stopped.
  Value decides about the method which is used to mark the line.  Valid values
  are:
  
@@@ -457,7 -471,7 +457,7 @@@ hides any code, so setting this to 'arr
          (const :tag "Face or arrow." t)))
  
  (defcustom idlwave-shell-overlay-arrow ">"
 -  "*The overlay arrow to display at source lines where execution halts.
 +  "The overlay arrow to display at source lines where execution halts.
  We use a single character by default, since the main block of IDL procedures
  often has no indentation.  Where possible, IDLWAVE will use overlays to
  display the stop-lines.  The arrow is only used on character-based terminals.
@@@ -466,33 -480,33 +466,33 @@@ See also `idlwave-shell-use-overlay-arr
    :type 'string)
  
  (defcustom idlwave-shell-stop-line-face 'highlight
 -  "*The face for `idlwave-shell-stop-line-overlay'.
 +  "The face for `idlwave-shell-stop-line-overlay'.
  Allows you to choose the font, color and other properties for
  line where IDL is stopped.  See also `idlwave-shell-mark-stop-line'."
    :group 'idlwave-shell-highlighting-and-faces
    :type 'symbol)
  
  (defcustom idlwave-shell-electric-stop-color "Violet"
 -  "*The color for the default face or overlay arrow when stopped."
 +  "The color for the default face or overlay arrow when stopped."
    :group 'idlwave-shell-highlighting-and-faces
    :type 'string)
  
  (defcustom idlwave-shell-electric-stop-line-face
    (prog1
 -      (copy-face 'modeline 'idlwave-shell-electric-stop-line)
 +      (copy-face 'mode-line 'idlwave-shell-electric-stop-line)
      (set-face-background 'idlwave-shell-electric-stop-line
                         idlwave-shell-electric-stop-color)
      (condition-case nil
        (set-face-foreground 'idlwave-shell-electric-stop-line nil)
        (error nil)))
 -  "*The face for `idlwave-shell-stop-line-overlay' when in electric debug mode.
 +  "The face for `idlwave-shell-stop-line-overlay' when in electric debug mode.
  Allows you to choose the font, color and other properties for the line
  where IDL is stopped, when in Electric Debug Mode."
    :group 'idlwave-shell-highlighting-and-faces
    :type 'symbol)
  
  (defcustom idlwave-shell-mark-breakpoints t
 -  "*Non-nil means, mark breakpoints in the source files.
 +  "Non-nil means, mark breakpoints in the source files.
  Valid values are:
  nil        Do not mark breakpoints.
  'face      Highlight line with `idlwave-shell-breakpoint-face'.
@@@ -506,8 -520,11 +506,8 @@@ t          Glyph when possible, otherwi
          (const :tag "Display glyph (red dot)" glyph)
          (const :tag "Glyph or face." t)))
  
 -(defvar idlwave-shell-use-breakpoint-glyph t
 -  "Obsolete variable.  See `idlwave-shell-mark-breakpoints'.")
 -
  (defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
 -  "*The face for breakpoint lines in the source code.
 +  "The face for breakpoint lines in the source code.
  Allows you to choose the font, color and other properties for
  lines which have a breakpoint.  See also `idlwave-shell-mark-breakpoints'."
    :group 'idlwave-shell-highlighting-and-faces
  
  (defcustom idlwave-shell-disabled-breakpoint-face
    'idlwave-shell-disabled-bp
 -  "*The face for disabled breakpoint lines in the source code.
 +  "The face for disabled breakpoint lines in the source code.
  Allows you to choose the font, color and other properties for
  lines which have a breakpoint.  See also `idlwave-shell-mark-breakpoints'."
    :group 'idlwave-shell-highlighting-and-faces
  
  
  (defcustom idlwave-shell-expression-face 'secondary-selection
 -  "*The face for `idlwave-shell-expression-overlay'.
 +  "The face for `idlwave-shell-expression-overlay'.
  Allows you to choose the font, color and other properties for
  the expression printed by IDL."
    :group 'idlwave-shell-highlighting-and-faces
    :type 'symbol)
  
  (defcustom idlwave-shell-output-face 'secondary-selection
 -  "*The face for `idlwave-shell-output-overlay'.
 +  "The face for `idlwave-shell-output-overlay'.
  Allows you to choose the font, color and other properties for
  the expression output by IDL."
    :group 'idlwave-shell-highlighting-and-faces
@@@ -767,7 -784,7 +767,7 @@@ with `*'s.
      "^% Skipped to:"
      "^% Stop encountered:"
      )
 -  "*A list of regular expressions matching IDL messages.
 +  "A list of regular expressions matching IDL messages.
  These are the messages containing file and line information where
  IDL is currently stopped.")
  
  
  (defconst idlwave-shell-trace-message-re
    "^% At "    ;; First line of a trace message
 -  "*A regular expression matching IDL trace messages.  These are the
 +  "A regular expression matching IDL trace messages.  These are the
  messages containing file and line information of a current
  traceback.")
  
  (defconst idlwave-shell-step-messages
    '("^% Stepped to:"
      )
 -  "*A list of regular expressions matching stepped execution messages.
 +  "A list of regular expressions matching stepped execution messages.
  These are IDL messages containing file and line information where
  IDL has currently stepped.")
  
  (defvar idlwave-shell-break-message "^% Breakpoint at:"
 -  "*Regular expression matching an IDL breakpoint message line.")
 +  "Regular expression matching an IDL breakpoint message line.")
  
  (defconst idlwave-shell-electric-debug-help
    "   ==> IDLWAVE Electric Debug Mode Help <==
@@@ -1655,7 -1672,7 +1655,7 @@@ number."
     "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*"      ; continuation lines file name (6)
     "\\)"                                 ; end line number group (5)
     )
 -  "*A regular expression to parse out the file name and line number.
 +  "A regular expression to parse out the file name and line number.
  The 1st group should match the subroutine name.
  The 3rd group is the line number.
  The 5th group is the file name.
@@@ -2170,7 -2187,7 +2170,7 @@@ args of an executive .run, .rnew or .co
    ;; CWD might have changed, resync, to set default directory
    (idlwave-shell-resync-dirs)
    (let ((comint-file-name-chars idlwave-shell-file-name-chars))
-     (comint-filename-completion)))
+     (comint-dynamic-complete-filename)))
  
  (defun idlwave-shell-executive-command ()
    "Return the name of the current executive command, if any."
@@@ -4181,8 -4198,12 +4181,8 @@@ Otherwise, just expand the file name.
          ([(        ?[)]   ?[   idlwave-shell-goto-previous-bp t t)
          ([(        ?])]   ?]   idlwave-shell-goto-next-bp t t)
          ([(control ?f)]   ?f   idlwave-shell-window)))
 -       (mod (cond ((and idlwave-shell-debug-modifiers
 -                      (listp idlwave-shell-debug-modifiers)
 -                      (not (equal '() idlwave-shell-debug-modifiers)))
 -                 idlwave-shell-debug-modifiers)
 -                (idlwave-shell-activate-alt-keybindings
 -                 '(alt))))
 +       (mod (and (listp idlwave-shell-debug-modifiers)
 +               idlwave-shell-debug-modifiers))
         (shift (memq 'shift mod))
         (mod-noshift (delete 'shift (copy-sequence mod)))
         s k1 c2 k2 cmd electric only-buffer cannotshift)
diff --combined lisp/subr.el
index e9b85ff1f38b0c976a1adba48a365a437aef7e45,f6be21076c97f1ef646ee548e0e0002f3331244a..13516419b6ff1e7ab3d878cbca07e6b9e960ae00
@@@ -26,9 -26,6 +26,9 @@@
  
  ;;; Code:
  
 +;; Beware: while this file has tag `utf-8', before it's compiled, it gets
 +;; loaded as "raw-text", so non-ASCII chars won't work right during bootstrap.
 +
  (defvar custom-declare-variable-list nil
    "Record `defcustom' calls made before `custom.el' is loaded to handle them.
  Each element of this list holds the arguments to one call to `defcustom'.")
@@@ -80,7 -77,6 +80,7 @@@ For more information, see Info node `(e
  (defmacro noreturn (form)
    "Evaluate FORM, expecting it not to return.
  If FORM does return, signal an error."
 +  (declare (debug t))
    `(prog1 ,form
       (error "Form marked with `noreturn' did return")))
  
@@@ -88,7 -84,6 +88,7 @@@
    "Evaluate FORM, expecting a constant return value.
  This is the global do-nothing version.  There is also `testcover-1value'
  that complains if FORM ever does return differing values."
 +  (declare (debug t))
    form)
  
  (defmacro def-edebug-spec (symbol spec)
@@@ -117,29 -112,10 +117,29 @@@ It may also be omitted
  BODY should be a list of Lisp expressions.
  
  \(fn ARGS [DOCSTRING] [INTERACTIVE] BODY)"
 +  (declare (doc-string 2) (indent defun)
 +           (debug (&define lambda-list
 +                           [&optional stringp]
 +                           [&optional ("interactive" interactive)]
 +                           def-body)))
    ;; Note that this definition should not use backquotes; subr.el should not
    ;; depend on backquote.el.
    (list 'function (cons 'lambda cdr)))
  
 +(defmacro setq-local (var val)
 +  "Set variable VAR to value VAL in current buffer."
 +  ;; Can't use backquote here, it's too early in the bootstrap.
 +  (list 'set (list 'make-local-variable (list 'quote var)) val))
 +
 +(defmacro defvar-local (var val &optional docstring)
 +  "Define VAR as a buffer-local variable with default value VAL.
 +Like `defvar' but additionally marks the variable as being automatically
 +buffer-local wherever it is set."
 +  (declare (debug defvar) (doc-string 3))
 +  ;; Can't use backquote here, it's too early in the bootstrap.
 +  (list 'progn (list 'defvar var val docstring)
 +        (list 'make-variable-buffer-local (list 'quote var))))
 +
  (defun apply-partially (fun &rest args)
    "Return a function that is a partial application of FUN to ARGS.
  ARGS is a list of the first N arguments to pass to FUN.
@@@ -149,33 -125,29 +149,33 @@@ was called.
    `(closure (t) (&rest args)
              (apply ',fun ,@(mapcar (lambda (arg) `',arg) args) args)))
  
 -(if (null (featurep 'cl))
 -    (progn
 -  ;; If we reload subr.el after having loaded CL, be careful not to
 -  ;; overwrite CL's extended definition of `dolist', `dotimes',
 -  ;; `declare', `push' and `pop'.
 -(defmacro push (newelt listname)
 -  "Add NEWELT to the list stored in the symbol LISTNAME.
 -This is equivalent to (setq LISTNAME (cons NEWELT LISTNAME)).
 -LISTNAME must be a symbol."
 -  (declare (debug (form sexp)))
 -  (list 'setq listname
 -        (list 'cons newelt listname)))
 -
 -(defmacro pop (listname)
 -  "Return the first element of LISTNAME's value, and remove it from the list.
 -LISTNAME must be a symbol whose value is a list.
 +(defmacro push (newelt place)
 +  "Add NEWELT to the list stored in the generalized variable PLACE.
 +This is morally equivalent to (setf PLACE (cons NEWELT PLACE)),
 +except that PLACE is only evaluated once (after NEWELT)."
 +  (declare (debug (form gv-place)))
 +  (if (symbolp place)
 +      ;; Important special case, to avoid triggering GV too early in
 +      ;; the bootstrap.
 +      (list 'setq place
 +            (list 'cons newelt place))
 +    (require 'macroexp)
 +    (macroexp-let2 macroexp-copyable-p v newelt
 +      (gv-letplace (getter setter) place
 +        (funcall setter `(cons ,v ,getter))))))
 +
 +(defmacro pop (place)
 +  "Return the first element of PLACE's value, and remove it from the list.
 +PLACE must be a generalized variable whose value is a list.
  If the value is nil, `pop' returns nil but does not actually
  change the list."
 -  (declare (debug (sexp)))
 +  (declare (debug (gv-place)))
    (list 'car
 -        (list 'prog1 listname
 -              (list 'setq listname (list 'cdr listname)))))
 -))
 +        (if (symbolp place)
 +            ;; So we can use `pop' in the bootstrap before `gv' can be used.
 +            (list 'prog1 place (list 'setq place (list 'cdr place)))
 +          (gv-letplace (getter setter) place
 +            `(prog1 ,getter ,(funcall setter `(cdr ,getter)))))))
  
  (defmacro when (cond &rest body)
    "If COND yields non-nil, do BODY, else return nil.
@@@ -198,7 -170,8 +198,7 @@@ value of last one, or nil if there are 
  (if (null (featurep 'cl))
      (progn
    ;; If we reload subr.el after having loaded CL, be careful not to
 -  ;; overwrite CL's extended definition of `dolist', `dotimes',
 -  ;; `declare', `push' and `pop'.
 +  ;; overwrite CL's extended definition of `dolist', `dotimes', `declare'.
  
  (defmacro dolist (spec &rest body)
    "Loop over a list.
@@@ -274,13 -247,14 +274,15 @@@ the return value (nil if RESULT is omit
    "Do not evaluate any arguments and return nil.
  Treated as a declaration when used at the right place in a
  `defmacro' form.  \(See Info anchor `(elisp)Definition of declare'.)"
 +  ;; FIXME: edebug spec should pay attention to defun-declarations-alist.
    nil)
  ))
  
  (defmacro ignore-errors (&rest body)
    "Execute BODY; if an error occurs, return nil.
- Otherwise, return result of last form in BODY."
+ Otherwise, return result of last form in BODY.
+ See also `with-demoted-errors' that does something similar
+ without silencing all errors."
    (declare (debug t) (indent 0))
    `(condition-case nil (progn ,@body) (error nil)))
  \f
@@@ -302,17 -276,6 +304,17 @@@ for the sake of consistency.
      (signal 'error (list (apply 'format args)))))
  (set-advertised-calling-convention 'error '(string &rest args) "23.1")
  
 +(defun user-error (format &rest args)
 +  "Signal a pilot error, making error message by passing all args to `format'.
 +In Emacs, the convention is that error messages start with a capital
 +letter but *do not* end with a period.  Please follow this convention
 +for the sake of consistency.
 +This is just like `error' except that `user-error's are expected to be the
 +result of an incorrect manipulation on the part of the user, rather than the
 +result of an actual problem."
 +  (while t
 +    (signal 'user-error (list (apply #'format format args)))))
 +
  ;; We put this here instead of in frame.el so that it's defined even on
  ;; systems where frame.el isn't loaded.
  (defun frame-configuration-p (object)
@@@ -534,14 -497,11 +536,14 @@@ side-effects, and the argument LIST is 
  \f
  ;;;; Keymap support.
  
 -(defmacro kbd (keys)
 +(defun kbd (keys)
    "Convert KEYS to the internal Emacs key representation.
  KEYS should be a string constant in the format used for
  saving keyboard macros (see `edmacro-mode')."
 +  ;; Don't use a defalias, since the `pure' property is only true for
 +  ;; the calling convention of `kbd'.
    (read-kbd-macro keys))
 +(put 'kbd 'pure t)
  
  (defun undefined ()
    "Beep to tell the user this binding is undefined."
@@@ -720,6 -680,7 +722,6 @@@ Subkeymaps may be modified but are not 
      ;; Process the bindings starting from the end.
      (dolist (binding (prog1 bindings (setq bindings ())))
        (let* ((key (car binding))
 -             (item (cdr binding))
               (oldbind (assq key bindings)))
          (push (if (not oldbind)
                    ;; The normal case: no duplicate bindings.
  (put 'keyboard-translate-table 'char-table-extra-slots 0)
  
  (defun keyboard-translate (from to)
 -  "Translate character FROM to TO at a low level.
 +  "Translate character FROM to TO on the current terminal.
  This function creates a `keyboard-translate-table' if necessary
  and then modifies one entry in it."
    (or (char-table-p keyboard-translate-table)
@@@ -909,12 -870,18 +911,12 @@@ The normal global definition of the cha
                          c)))
            key)))
  
 -(defsubst eventp (obj)
 +(defun eventp (obj)
    "True if the argument is an event object."
 -  (or (and (integerp obj)
 -         ;; Filter out integers too large to be events.
 -         ;; M is the biggest modifier.
 -         (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1)))))
 -         (characterp (event-basic-type obj)))
 -      (and (symbolp obj)
 -         (get obj 'event-symbol-elements))
 -      (and (consp obj)
 -         (symbolp (car obj))
 -         (get (car obj) 'event-symbol-elements))))
 +  (when obj
 +    (or (integerp obj)
 +        (and (symbolp obj) obj (not (keywordp obj)))
 +        (and (consp obj) (symbolp (car obj))))))
  
  (defun event-modifiers (event)
    "Return a list of symbols representing the modifier keys in event EVENT.
@@@ -978,7 -945,7 +980,7 @@@ in the current Emacs session, then thi
    ;; is this really correct? maybe remove mouse-movement?
    (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement)))
  
 -(defsubst event-start (event)
 +(defun event-start (event)
    "Return the starting position of EVENT.
  EVENT should be a click, drag, or key press event.
  If it is a key press event, the return value has the form
@@@ -993,10 -960,9 +995,10 @@@ If EVENT is a mouse or key press or a m
  position of the event.  If EVENT is a drag, this is the starting
  position of the drag."
    (if (consp event) (nth 1 event)
 -    (list (selected-window) (point) '(0 . 0) 0)))
 +    (or (posn-at-point)
 +        (list (selected-window) (point) '(0 . 0) 0))))
  
 -(defsubst event-end (event)
 +(defun event-end (event)
    "Return the ending location of EVENT.
  EVENT should be a click, drag, or key press event.
  If EVENT is a key press event, the return value has the form
@@@ -1013,8 -979,7 +1015,8 @@@ If EVENT is a mouse or key press or a m
  position of the event.  If EVENT is a drag, this is the starting
  position of the drag."
    (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
 -    (list (selected-window) (point) '(0 . 0) 0)))
 +    (or (posn-at-point)
 +        (list (selected-window) (point) '(0 . 0) 0))))
  
  (defsubst event-click-count (event)
    "Return the multi-click count of EVENT, a click or drag event.
@@@ -1023,13 -988,6 +1025,13 @@@ The return value is a positive integer.
  \f
  ;;;; Extracting fields of the positions in an event.
  
 +(defun posnp (obj)
 +  "Return non-nil if OBJ appears to be a valid `posn' object."
 +  (and (windowp (car-safe obj))
 +       (atom (car-safe (setq obj (cdr obj))))                ;AREA-OR-POS.
 +       (integerp (car-safe (car-safe (setq obj (cdr obj))))) ;XOFFSET.
 +       (integerp (car-safe (cdr obj)))))                     ;TIMESTAMP.
 +
  (defsubst posn-window (position)
    "Return the window in POSITION.
  POSITION should be a list of the form returned by the `event-start'
@@@ -1171,7 -1129,6 +1173,7 @@@ be a list of the form returned by `even
  (define-obsolete-function-alias 'string-to-int 'string-to-number "22.1")
  
  (make-obsolete 'forward-point "use (+ (point) N) instead." "23.1")
 +(make-obsolete 'buffer-has-markers-at nil "24.3")
  
  (defun insert-string (&rest args)
    "Mocklisp-compatibility insert function.
@@@ -1196,7 -1153,6 +1198,7 @@@ is converted into a string by expressin
  (set-advertised-calling-convention
   'all-completions '(string collection &optional predicate) "23.1")
  (set-advertised-calling-convention 'unintern '(name obarray) "23.3")
 +(set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3")
  \f
  ;;;; Obsolescence declarations for variables, and aliases.
  
   'mode-line-inverse-video
   "use the appropriate faces instead."
   "21.1")
 -(make-obsolete-variable
 - 'unread-command-char
 - "use `unread-command-events' instead.  That variable is a list of events
 -to reread, so it now uses nil to mean `no event', instead of -1."
 - "before 19.15")
  
  ;; Lisp manual only updated in 22.1.
  (define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
  (make-obsolete-variable 'translation-table-for-input nil "23.1")
  
  (defvaralias 'messages-buffer-max-lines 'message-log-max)
 -
 -;; These aliases exist in Emacs 19.34, and probably before, but were
 -;; only marked as obsolete in 23.1.
 -;; The lisp manual (since at least Emacs 21) describes them as
 -;; existing "for compatibility with Emacs version 18".
 -(define-obsolete-variable-alias 'last-input-char 'last-input-event
 -  "at least 19.34")
 -(define-obsolete-variable-alias 'last-command-char 'last-command-event
 -  "at least 19.34")
 -
  \f
  ;;;; Alternate names for functions - these are not being phased out.
  
@@@ -1545,7 -1516,7 +1547,7 @@@ if it is empty or a duplicate.
               (or keep-all
                   (not (equal (car history) newelt))))
        (if history-delete-duplicates
 -        (delete newelt history))
 +        (setq history (delete newelt history)))
        (setq history (cons newelt history))
        (when (integerp maxelt)
        (if (= 0 maxelt)
@@@ -1698,23 -1669,6 +1700,23 @@@ If TOGGLE has a `:menu-tag', that is us
  \f
  ;;; Load history
  
 +(defsubst autoloadp (object)
 +  "Non-nil if OBJECT is an autoload."
 +  (eq 'autoload (car-safe object)))
 +
 +;; (defun autoload-type (object)
 +;;   "Returns the type of OBJECT or `function' or `command' if the type is nil.
 +;; OBJECT should be an autoload object."
 +;;   (when (autoloadp object)
 +;;     (let ((type (nth 3 object)))
 +;;       (cond ((null type) (if (nth 2 object) 'command 'function))
 +;;             ((eq 'keymap t) 'macro)
 +;;             (type)))))
 +
 +;; (defalias 'autoload-file #'cadr
 +;;   "Return the name of the file from which AUTOLOAD will be loaded.
 +;; \n\(fn AUTOLOAD)")
 +
  (defun symbol-file (symbol &optional type)
    "Return the name of the file that defined SYMBOL.
  The value is normally an absolute file name.  It can also be nil,
@@@ -1727,7 -1681,7 +1729,7 @@@ TYPE is `defun', `defvar', or `defface'
  definition, variable definition, or face definition only."
    (if (and (or (null type) (eq type 'defun))
           (symbolp symbol) (fboundp symbol)
 -         (eq 'autoload (car-safe (symbol-function symbol))))
 +         (autoloadp (symbol-function symbol)))
        (nth 1 (symbol-function symbol))
      (let ((files load-history)
          file)
@@@ -2015,7 -1969,7 +2017,7 @@@ It can be retrieved with `(process-get 
  ;;;; Input and display facilities.
  
  (defvar read-quoted-char-radix 8
 -  "*Radix for \\[quoted-insert] and other uses of `read-quoted-char'.
 +  "Radix for \\[quoted-insert] and other uses of `read-quoted-char'.
  Legitimate radix values are 8, 10 and 16.")
  
  (custom-declare-variable-early
@@@ -2036,10 -1990,6 +2038,10 @@@ obey the input decoding and translation
  So escape sequences and keyboard encoding are taken into account.
  When there's an ambiguity because the key looks like the prefix of
  some sort of escape sequence, the ambiguity is resolved via `read-key-delay'."
 +  ;; This overriding-terminal-local-map binding also happens to
 +  ;; disable quail's input methods, so although read-key-sequence
 +  ;; always inherits the input method, in practice read-key does not
 +  ;; inherit the input method (at least not if it's based on quail).
    (let ((overriding-terminal-local-map read-key-empty-map)
        (overriding-local-map nil)
          (echo-keystrokes 0)
@@@ -2147,76 -2097,100 +2149,76 @@@ Optional DEFAULT is a default password 
  
  This function echoes `.' for each character that the user types.
  
 -The user ends with RET, LFD, or ESC.  DEL or C-h rubs out.
 -C-y yanks the current kill.  C-u kills line.
 -C-g quits; if `inhibit-quit' was non-nil around this function,
 -then it returns nil if the user types C-g, but `quit-flag' remains set.
 -
  Once the caller uses the password, it can erase the password
  by doing (clear-string STRING)."
 -  (with-local-quit
 -    (if confirm
 -      (let (success)
 -        (while (not success)
 -          (let ((first (read-passwd prompt nil default))
 -                (second (read-passwd "Confirm password: " nil default)))
 -            (if (equal first second)
 -                (progn
 -                  (and (arrayp second) (clear-string second))
 -                  (setq success first))
 -              (and (arrayp first) (clear-string first))
 -              (and (arrayp second) (clear-string second))
 -              (message "Password not repeated accurately; please start over")
 -              (sit-for 1))))
 -        success)
 -      (let ((pass nil)
 -          ;; Copy it so that add-text-properties won't modify
 -          ;; the object that was passed in by the caller.
 -          (prompt (copy-sequence prompt))
 -          (c 0)
 -          (echo-keystrokes 0)
 -          (cursor-in-echo-area t)
 -          (message-log-max nil)
 -          (stop-keys (list 'return ?\r ?\n ?\e))
 -          (rubout-keys (list 'backspace ?\b ?\177)))
 -      (add-text-properties 0 (length prompt)
 -                           minibuffer-prompt-properties prompt)
 -      (while (progn (message "%s%s"
 -                             prompt
 -                             (make-string (length pass) ?.))
 -                    (setq c (read-key))
 -                    (not (memq c stop-keys)))
 -        (clear-this-command-keys)
 -        (cond ((memq c rubout-keys) ; rubout
 -               (when (> (length pass) 0)
 -                 (let ((new-pass (substring pass 0 -1)))
 -                   (and (arrayp pass) (clear-string pass))
 -                   (setq pass new-pass))))
 -                ((eq c ?\C-g) (keyboard-quit))
 -              ((not (numberp c)))
 -              ((= c ?\C-u) ; kill line
 -               (and (arrayp pass) (clear-string pass))
 -               (setq pass ""))
 -              ((= c ?\C-y) ; yank
 -               (let* ((str (condition-case nil
 -                               (current-kill 0)
 -                             (error nil)))
 -                      new-pass)
 -                 (when str
 -                   (setq new-pass
 -                         (concat pass
 -                                 (substring-no-properties str)))
 -                   (and (arrayp pass) (clear-string pass))
 -                   (setq c ?\0)
 -                   (setq pass new-pass))))
 -              ((characterp c) ; insert char
 -               (let* ((new-char (char-to-string c))
 -                      (new-pass (concat pass new-char)))
 -                 (and (arrayp pass) (clear-string pass))
 -                 (clear-string new-char)
 -                 (setq c ?\0)
 -                 (setq pass new-pass)))))
 -      (message nil)
 -      (or pass default "")))))
 +  (if confirm
 +      (let (success)
 +        (while (not success)
 +          (let ((first (read-passwd prompt nil default))
 +                (second (read-passwd "Confirm password: " nil default)))
 +            (if (equal first second)
 +                (progn
 +                  (and (arrayp second) (clear-string second))
 +                  (setq success first))
 +              (and (arrayp first) (clear-string first))
 +              (and (arrayp second) (clear-string second))
 +              (message "Password not repeated accurately; please start over")
 +              (sit-for 1))))
 +        success)
 +    (let ((hide-chars-fun
 +           (lambda (beg end _len)
 +             (clear-this-command-keys)
 +             (setq beg (min end (max (minibuffer-prompt-end)
 +                                     beg)))
 +             (dotimes (i (- end beg))
 +               (put-text-property (+ i beg) (+ 1 i beg)
 +                                  'display (string ?.)))))
 +          minibuf)
 +      (minibuffer-with-setup-hook
 +          (lambda ()
 +            (setq minibuf (current-buffer))
 +            ;; Turn off electricity.
 +            (set (make-local-variable 'post-self-insert-hook) nil)
 +            (add-hook 'after-change-functions hide-chars-fun nil 'local))
 +        (unwind-protect
 +            (let ((enable-recursive-minibuffers t))
 +              (read-string prompt nil t default)) ; t = "no history"
 +          (when (buffer-live-p minibuf)
 +            (with-current-buffer minibuf
 +              ;; Not sure why but it seems that there might be cases where the
 +              ;; minibuffer is not always properly reset later on, so undo
 +              ;; whatever we've done here (bug#11392).
 +              (remove-hook 'after-change-functions hide-chars-fun 'local)
 +              (kill-local-variable 'post-self-insert-hook)
 +              ;; And of course, don't keep the sensitive data around.
 +              (erase-buffer))))))))
  
  ;; This should be used by `call-interactively' for `n' specs.
  (defun read-number (prompt &optional default)
    "Read a numeric value in the minibuffer, prompting with PROMPT.
  DEFAULT specifies a default value to return if the user just types RET.
  The value of DEFAULT is inserted into PROMPT."
 -  (let ((n nil))
 -    (when default
 +  (let ((n nil)
 +      (default1 (if (consp default) (car default) default)))
 +    (when default1
        (setq prompt
            (if (string-match "\\(\\):[ \t]*\\'" prompt)
 -              (replace-match (format " (default %s)" default) t t prompt 1)
 +              (replace-match (format " (default %s)" default1) t t prompt 1)
              (replace-regexp-in-string "[ \t]*\\'"
 -                                      (format " (default %s) " default)
 +                                      (format " (default %s) " default1)
                                        prompt t t))))
      (while
        (progn
 -        (let ((str (read-from-minibuffer prompt nil nil nil nil
 -                                         (and default
 -                                              (number-to-string default)))))
 +        (let ((str (read-from-minibuffer
 +                    prompt nil nil nil nil
 +                    (when default
 +                      (if (consp default)
 +                          (mapcar 'number-to-string (delq nil default))
 +                        (number-to-string default))))))
            (condition-case nil
                (setq n (cond
 -                       ((zerop (length str)) default)
 -                       ((stringp str) (read str))))
 +                       ((zerop (length str)) default1)
 +                       ((stringp str) (string-to-number str))))
              (error nil)))
          (unless (numberp n)
            (message "Please enter a number.")
@@@ -2234,8 -2208,7 +2236,8 @@@ keyboard-quit events while waiting for 
      (error "Called `read-char-choice' without valid char choices"))
    (let (char done show-help (helpbuf " *Char Help*"))
      (let ((cursor-in-echo-area t)
 -          (executing-kbd-macro executing-kbd-macro))
 +          (executing-kbd-macro executing-kbd-macro)
 +        (esc-flag nil))
        (save-window-excursion        ; in case we call help-form-show
        (while (not done)
          (unless (get-text-property 0 'face prompt)
            ;; there are no more events in the macro.  Attempt to
            ;; get an event interactively.
            (setq executing-kbd-macro nil))
 -         ((and (not inhibit-keyboard-quit) (eq char ?\C-g))
 -          (keyboard-quit))))))
 +         ((not inhibit-keyboard-quit)
 +          (cond
 +           ((and (null esc-flag) (eq char ?\e))
 +            (setq esc-flag t))
 +           ((memq char '(?\C-g ?\e))
 +            (keyboard-quit))))))))
      ;; Display the question with the answer.  But without cursor-in-echo-area.
      (message "%s%s" prompt (char-to-string char))
      char))
@@@ -2316,19 -2285,11 +2318,19 @@@ floating point support.
  PROMPT is the string to display to ask the question.  It should
  end in a space; `y-or-n-p' adds \"(y or n) \" to it.
  
 -No confirmation of the answer is requested; a single character is enough.
 -Also accepts Space to mean yes, or Delete to mean no.  \(Actually, it uses
 -the bindings in `query-replace-map'; see the documentation of that variable
 -for more information.  In this case, the useful bindings are `act', `skip',
 -`recenter', and `quit'.\)
 +No confirmation of the answer is requested; a single character is
 +enough.  SPC also means yes, and DEL means no.
 +
 +To be precise, this function translates user input into responses
 +by consulting the bindings in `query-replace-map'; see the
 +documentation of that variable for more information.  In this
 +case, the useful bindings are `act', `skip', `recenter',
 +`scroll-up', `scroll-down', and `quit'.
 +An `act' response means yes, and a `skip' response means no.
 +A `quit' response means to invoke `keyboard-quit'.
 +If the user enters `recenter', `scroll-up', or `scroll-down'
 +responses, perform the requested window recentering or scrolling
 +and ask again.
  
  Under a windowing system a dialog box will be used if `last-nonmenu-event'
  is nil and `use-dialog-box' is non-nil."
                                 "" " ")
                             "(y or n) "))
        (while
 -          (let* ((key
 +          (let* ((scroll-actions '(recenter scroll-up scroll-down
 +                                 scroll-other-window scroll-other-window-down))
 +               (key
                    (let ((cursor-in-echo-area t))
                      (when minibuffer-auto-raise
                        (raise-frame (window-frame (minibuffer-window))))
 -                    (read-key (propertize (if (eq answer 'recenter)
 +                    (read-key (propertize (if (memq answer scroll-actions)
                                                prompt
                                              (concat "Please answer y or n.  "
                                                      prompt))
                                            'face 'minibuffer-prompt)))))
              (setq answer (lookup-key query-replace-map (vector key) t))
              (cond
 -             ((memq answer '(skip act)) nil)
 -             ((eq answer 'recenter) (recenter) t)
 -             ((memq answer '(exit-prefix quit)) (signal 'quit nil) t)
 -             (t t)))
 +           ((memq answer '(skip act)) nil)
 +           ((eq answer 'recenter)
 +            (recenter) t)
 +           ((eq answer 'scroll-up)
 +            (ignore-errors (scroll-up-command)) t)
 +           ((eq answer 'scroll-down)
 +            (ignore-errors (scroll-down-command)) t)
 +           ((eq answer 'scroll-other-window)
 +            (ignore-errors (scroll-other-window)) t)
 +           ((eq answer 'scroll-other-window-down)
 +            (ignore-errors (scroll-other-window-down)) t)
 +           ((or (memq answer '(exit-prefix quit)) (eq key ?\e))
 +            (signal 'quit nil) t)
 +           (t t)))
          (ding)
          (discard-input))))
      (let ((ret (eq answer 'act)))
@@@ -2475,7 -2424,7 +2477,7 @@@ to `accept-change-group' or `cancel-cha
  This finishes the change group by accepting its changes as final."
    (dolist (elt handle)
      (with-current-buffer (car elt)
 -      (if (eq elt t)
 +      (if (eq (cdr elt) t)
          (setq buffer-undo-list t)))))
  
  (defun cancel-change-group (handle)
@@@ -2512,8 -2461,7 +2514,8 @@@ This finishes the change group by rever
  ;;;; Display-related functions.
  
  ;; For compatibility.
 -(defalias 'redraw-modeline 'force-mode-line-update)
 +(define-obsolete-function-alias 'redraw-modeline
 +  'force-mode-line-update "24.3")
  
  (defun force-mode-line-update (&optional all)
    "Force redisplay of the current buffer's mode line and header line.
@@@ -2669,10 -2617,6 +2671,10 @@@ directory if it does not exist.
  \f
  ;;;; Misc. useful functions.
  
 +(defsubst buffer-narrowed-p ()
 +  "Return non-nil if the current buffer is narrowed."
 +  (/= (- (point-max) (point-min)) (buffer-size)))
 +
  (defun find-tag-default ()
    "Determine default tag to search for, based on text at point.
  If there is no plausible default, return nil."
@@@ -2810,45 -2754,38 +2812,45 @@@ computing the hash.  If BINARY is non-n
  form."
    (secure-hash 'sha1 object start end binary))
  
 +(defun function-get (f prop &optional autoload)
 +  "Return the value of property PROP of function F.
 +If AUTOLOAD is non-nil and F is autoloaded, try to autoload it
 +in the hope that it will set PROP.  If AUTOLOAD is `macro', only do it
 +if it's an autoloaded macro."
 +  (let ((val nil))
 +    (while (and (symbolp f)
 +                (null (setq val (get f prop)))
 +                (fboundp f))
 +      (let ((fundef (symbol-function f)))
 +        (if (and autoload (autoloadp fundef)
 +                 (not (equal fundef
 +                             (autoload-do-load fundef f
 +                                               (if (eq autoload 'macro)
 +                                                   'macro)))))
 +            nil                         ;Re-try `get' on the same `f'.
 +          (setq f fundef))))
 +    val))
  \f
  ;;;; Support for yanking and text properties.
  
 +(defvar yank-handled-properties)
  (defvar yank-excluded-properties)
  
  (defun remove-yank-excluded-properties (start end)
 -  "Remove `yank-excluded-properties' between START and END positions.
 -Replaces `category' properties with their defined properties."
 +  "Process text properties between START and END, inserted for a `yank'.
 +Perform the handling specified by `yank-handled-properties', then
 +remove properties specified by `yank-excluded-properties'."
    (let ((inhibit-read-only t))
 -    ;; Replace any `category' property with the properties it stands
 -    ;; for.  This is to remove `mouse-face' properties that are placed
 -    ;; on categories in *Help* buffers' buttons.  See
 -    ;; http://lists.gnu.org/archive/html/emacs-devel/2002-04/msg00648.html
 -    ;; for the details.
 -    (unless (memq yank-excluded-properties '(t nil))
 -      (save-excursion
 -      (goto-char start)
 -      (while (< (point) end)
 -        (let ((cat (get-text-property (point) 'category))
 -              run-end)
 -          (setq run-end
 -                (next-single-property-change (point) 'category nil end))
 -          (when cat
 -            (let (run-end2 original)
 -              (remove-list-of-text-properties (point) run-end '(category))
 -              (while (< (point) run-end)
 -                (setq run-end2 (next-property-change (point) nil run-end))
 -                (setq original (text-properties-at (point)))
 -                (set-text-properties (point) run-end2 (symbol-plist cat))
 -                (add-text-properties (point) run-end2 original)
 -                (goto-char run-end2))))
 -          (goto-char run-end)))))
 +    (dolist (handler yank-handled-properties)
 +      (let ((prop (car handler))
 +          (fun  (cdr handler))
 +          (run-start start))
 +      (while (< run-start end)
 +        (let ((value (get-text-property run-start prop))
 +              (run-end (next-single-property-change
 +                        run-start prop nil end)))
 +          (funcall fun value run-start run-end)
 +          (setq run-start run-end)))))
      (if (eq yank-excluded-properties t)
        (set-text-properties start end nil)
        (remove-list-of-text-properties start end yank-excluded-properties))))
@@@ -2866,31 -2803,29 +2868,31 @@@ See `insert-for-yank-1' for more detail
    (insert-for-yank-1 string))
  
  (defun insert-for-yank-1 (string)
 -  "Insert STRING at point, stripping some text properties.
 -
 -Strip text properties from the inserted text according to
 -`yank-excluded-properties'.  Otherwise just like (insert STRING).
 -
 -If STRING has a non-nil `yank-handler' property on the first character,
 -the normal insert behavior is modified in various ways.  The value of
 -the yank-handler property must be a list with one to four elements
 -with the following format:  (FUNCTION PARAM NOEXCLUDE UNDO).
 -When FUNCTION is present and non-nil, it is called instead of `insert'
 - to insert the string.  FUNCTION takes one argument--the object to insert.
 -If PARAM is present and non-nil, it replaces STRING as the object
 - passed to FUNCTION (or `insert'); for example, if FUNCTION is
 - `yank-rectangle', PARAM may be a list of strings to insert as a
 - rectangle.
 -If NOEXCLUDE is present and non-nil, the normal removal of the
 +  "Insert STRING at point for the `yank' command.
 +This function is like `insert', except it honors the variables
 +`yank-handled-properties' and `yank-excluded-properties', and the
 +`yank-handler' text property.
 +
 +Properties listed in `yank-handled-properties' are processed,
 +then those listed in `yank-excluded-properties' are discarded.
 +
 +If STRING has a non-nil `yank-handler' property on its first
 +character, the normal insert behavior is altered.  The value of
 +the `yank-handler' property must be a list of one to four
 +elements, of the form (FUNCTION PARAM NOEXCLUDE UNDO).
 +FUNCTION, if non-nil, should be a function of one argument, an
 + object to insert; it is called instead of `insert'.
 +PARAM, if present and non-nil, replaces STRING as the argument to
 + FUNCTION or `insert'; e.g. if FUNCTION is `yank-rectangle', PARAM
 + may be a list of strings to insert as a rectangle.
 +If NOEXCLUDE is present and non-nil, the normal removal of
   `yank-excluded-properties' is not performed; instead FUNCTION is
 - responsible for removing those properties.  This may be necessary
 - if FUNCTION adjusts point before or after inserting the object.
 -If UNDO is present and non-nil, it is a function that will be called
 + responsible for the removal.  This may be necessary if FUNCTION
 + adjusts point before or after inserting the object.
 +UNDO, if present and non-nil, should be a function to be called
   by `yank-pop' to undo the insertion of the current object.  It is
 - called with two arguments, the start and end of the current region.
 - FUNCTION may set `yank-undo-function' to override the UNDO value."
 + given two arguments, the start and end of the region.  FUNCTION
 + may set `yank-undo-function' to override UNDO."
    (let* ((handler (and (stringp string)
                       (get-text-property 0 'yank-handler string)))
         (param (or (nth 1 handler) string))
         end)
  
      (setq yank-undo-function t)
 -    (if (nth 0 handler) ;; FUNCTION
 +    (if (nth 0 handler) ; FUNCTION
        (funcall (car handler) param)
        (insert param))
      (setq end (point))
      ;; following text property changes.
      (setq inhibit-read-only t)
  
 -    ;; What should we do with `font-lock-face' properties?
 -    (if font-lock-defaults
 -      ;; No, just wipe them.
 -      (remove-list-of-text-properties opoint end '(font-lock-face))
 -      ;; Convert them to `face'.
 -      (save-excursion
 -      (goto-char opoint)
 -      (while (< (point) end)
 -        (let ((face (get-text-property (point) 'font-lock-face))
 -              run-end)
 -          (setq run-end
 -                (next-single-property-change (point) 'font-lock-face nil end))
 -          (when face
 -            (remove-text-properties (point) run-end '(font-lock-face nil))
 -            (put-text-property (point) run-end 'face face))
 -          (goto-char run-end)))))
 -
 -    (unless (nth 2 handler) ;; NOEXCLUDE
 -      (remove-yank-excluded-properties opoint (point)))
 +    (unless (nth 2 handler) ; NOEXCLUDE
 +      (remove-yank-excluded-properties opoint end))
  
      ;; If last inserted char has properties, mark them as rear-nonsticky.
      (if (and (> end opoint)
             (text-properties-at (1- end)))
        (put-text-property (1- end) end 'rear-nonsticky t))
  
 -    (if (eq yank-undo-function t)                ;; not set by FUNCTION
 -      (setq yank-undo-function (nth 3 handler))) ;; UNDO
 -    (if (nth 4 handler)                                  ;; COMMAND
 +    (if (eq yank-undo-function t)                ; not set by FUNCTION
 +      (setq yank-undo-function (nth 3 handler))) ; UNDO
 +    (if (nth 4 handler)                                  ; COMMAND
        (setq this-command (nth 4 handler)))))
  
  (defun insert-buffer-substring-no-properties (buffer &optional start end)
@@@ -2944,27 -2896,6 +2946,27 @@@ Strip text properties from the inserte
      (insert-buffer-substring buffer start end)
      (remove-yank-excluded-properties opoint (point))))
  
 +(defun yank-handle-font-lock-face-property (face start end)
 +  "If `font-lock-defaults' is nil, apply FACE as a `face' property.
 +START and END denote the start and end of the text to act on.
 +Do nothing if FACE is nil."
 +  (and face
 +       (null font-lock-defaults)
 +       (put-text-property start end 'face face)))
 +
 +;; This removes `mouse-face' properties in *Help* buffer buttons:
 +;; http://lists.gnu.org/archive/html/emacs-devel/2002-04/msg00648.html
 +(defun yank-handle-category-property (category start end)
 +  "Apply property category CATEGORY's properties between START and END."
 +  (when category
 +    (let ((start2 start))
 +      (while (< start2 end)
 +      (let ((end2     (next-property-change start2 nil end))
 +            (original (text-properties-at start2)))
 +        (set-text-properties start2 end2 (symbol-plist category))
 +        (add-text-properties start2 end2 original)
 +        (setq start2 end2))))))
 +
  \f
  ;;;; Synchronous shell commands.
  
@@@ -3049,30 -2980,6 +3051,30 @@@ also `with-temp-buffer'.
       (set-buffer ,buffer-or-name)
       ,@body))
  
 +(defun internal--before-with-selected-window (window)
 +  (let ((other-frame (window-frame window)))
 +    (list window (selected-window)
 +          ;; Selecting a window on another frame also changes that
 +          ;; frame's frame-selected-window.  We must save&restore it.
 +          (unless (eq (selected-frame) other-frame)
 +            (frame-selected-window other-frame))
 +          ;; Also remember the top-frame if on ttys.
 +          (unless (eq (selected-frame) other-frame)
 +            (tty-top-frame other-frame)))))
 +
 +(defun internal--after-with-selected-window (state)
 +  ;; First reset frame-selected-window.
 +  (when (window-live-p (nth 2 state))
 +    ;; We don't use set-frame-selected-window because it does not
 +    ;; pass the `norecord' argument to Fselect_window.
 +    (select-window (nth 2 state) 'norecord)
 +    (and (frame-live-p (nth 3 state))
 +         (not (eq (tty-top-frame) (nth 3 state)))
 +         (select-frame (nth 3 state) 'norecord)))
 +  ;; Then reset the actual selected-window.
 +  (when (window-live-p (nth 1 state))
 +    (select-window (nth 1 state) 'norecord)))
 +
  (defmacro with-selected-window (window &rest body)
    "Execute the forms in BODY with WINDOW as the selected window.
  The value returned is the value of the last form in BODY.
@@@ -3090,13 -2997,24 +3092,13 @@@ current buffer, since otherwise its nor
  potentially make a different buffer current.  It does not alter
  the buffer list ordering."
    (declare (indent 1) (debug t))
 -  ;; Most of this code is a copy of save-selected-window.
 -  `(let ((save-selected-window-window (selected-window))
 -       ;; It is necessary to save all of these, because calling
 -       ;; select-window changes frame-selected-window for whatever
 -       ;; frame that window is in.
 -       (save-selected-window-alist
 -        (mapcar (lambda (frame) (list frame (frame-selected-window frame)))
 -                (frame-list))))
 +  `(let ((save-selected-window--state
 +          (internal--before-with-selected-window ,window)))
       (save-current-buffer
         (unwind-protect
 -         (progn (select-window ,window 'norecord)
 +           (progn (select-window (car save-selected-window--state) 'norecord)
                  ,@body)
 -       (dolist (elt save-selected-window-alist)
 -         (and (frame-live-p (car elt))
 -              (window-live-p (cadr elt))
 -              (set-frame-selected-window (car elt) (cadr elt) 'norecord)))
 -       (when (window-live-p save-selected-window-window)
 -         (select-window save-selected-window-window 'norecord))))))
 +         (internal--after-with-selected-window save-selected-window--state)))))
  
  (defmacro with-selected-frame (frame &rest body)
    "Execute the forms in BODY with FRAME as the selected frame.
@@@ -3645,7 -3563,8 +3647,7 @@@ of STRING
  To replace only the first match (if any), make REGEXP match up to \\'
  and replace a sub-expression, e.g.
    (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
 -    => \" bar foo\"
 -"
 +    => \" bar foo\""
  
    ;; To avoid excessive consing from multiple matches in long strings,
    ;; don't just call `replace-match' continually.  Walk down the
@@@ -3754,7 -3673,7 +3756,7 @@@ from `standard-syntax-table' otherwise.
      table))
  
  (defun syntax-after (pos)
 -  "Return the raw syntax of the char after POS.
 +  "Return the raw syntax descriptor for the char after POS.
  If POS is outside the buffer's accessible portion, return nil."
    (unless (or (< pos (point-min)) (>= pos (point-max)))
      (let ((st (if parse-sexp-lookup-properties
        (aref (or st (syntax-table)) (char-after pos))))))
  
  (defun syntax-class (syntax)
 -  "Return the syntax class part of the syntax descriptor SYNTAX.
 +  "Return the code for the syntax class described by SYNTAX.
 +
 +SYNTAX should be a raw syntax descriptor; the return value is a
 +integer which encodes the corresponding syntax class.  See Info
 +node `(elisp)Syntax Table Internals' for a list of codes.
 +
  If SYNTAX is nil, return nil."
    (and syntax (logand (car syntax) 65535)))
  \f
@@@ -3907,35 -3821,6 +3909,35 @@@ The properties used on SYMBOL are `comp
    (put symbol 'abortfunc (or abortfunc 'kill-buffer))
    (put symbol 'hookvar (or hookvar 'mail-send-hook)))
  \f
 +(defun set-temporary-overlay-map (map &optional keep-pred)
 +  "Set MAP as a temporary overlay map.
 +When KEEP-PRED is `t', using a key from the temporary keymap
 +leaves this keymap activated.  KEEP-PRED can also be a function,
 +which will have the same effect when it returns `t'.
 +When KEEP-PRED is nil, the temporary keymap is used only once."
 +  (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map"))
 +         (overlaysym (make-symbol "t"))
 +         (alist (list (cons overlaysym map)))
 +         (clearfun
 +          ;; FIXME: Use lexical-binding.
 +          `(lambda ()
 +             (unless ,(cond ((null keep-pred) nil)
 +                            ((eq t keep-pred)
 +                             `(eq this-command
 +                                  (lookup-key ',map
 +                                              (this-command-keys-vector))))
 +                            (t `(funcall ',keep-pred)))
 +               (set ',overlaysym nil)   ;Just in case.
 +               (remove-hook 'pre-command-hook ',clearfunsym)
 +               (setq emulation-mode-map-alists
 +                     (delq ',alist emulation-mode-map-alists))))))
 +    (set overlaysym overlaysym)
 +    (fset clearfunsym clearfun)
 +    (add-hook 'pre-command-hook clearfunsym)
 +    ;; FIXME: That's the keymaps with highest precedence, except for
 +    ;; the `keymap' text-property ;-(
 +    (push alist emulation-mode-map-alists)))
 +
  ;;;; Progress reporters.
  
  ;; Progress reporter has the following structure:
diff --combined src/ChangeLog
index c3ce1ee1b0b3ef788d341d709f6f6b619d77da16,afaa7fd776ea26846f1d4d7ec5e5d48065e30b2d..f3b8b2108e1f27bc2f71f302b3d729926f92792d
 -2012-09-20  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
++2012-09-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+       * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
+       (print_load_command_name): Add case LC_DATA_IN_CODE.
+       (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
 -2012-09-18  Glenn Morris  <rgm@gnu.org>
++2012-09-21  Glenn Morris  <rgm@gnu.org>
+       * eval.c (Frun_hook_with_args_until_success)
+       (Frun_hook_with_args_until_failure): Doc fixes.  (Bug#12393)
 -2012-09-14  Andreas Schwab  <schwab@linux-m68k.org>
++2012-09-21  Andreas Schwab  <schwab@linux-m68k.org>
+       * fileio.c (Ffile_selinux_context): Only call freecon when
+       lgetfilecon succeeded.
+       (Fset_file_selinux_context): Likewise.  (Bug#12444)
 -2012-09-12  Eli Zaretskii  <eliz@gnu.org>
++2012-09-21  Eli Zaretskii  <eliz@gnu.org>
+       * xdisp.c (try_window_reusing_current_matrix): Under bidi
+       reordering, locate the cursor by calling set_cursor_from_row; if
+       that fails, clear the desired glyph matrix before returning a
+       failure indication to the caller.  Fixes leaving garbled display
+       when fast scrolling with a down-key.  (Bug#12403)
+       (compute_stop_pos_backwards): Fix a typo that caused crashes while
+       scrolling through multibyte text.
 -2012-09-12  Jan Djärv  <jan.h.d@swipnet.se>
 +2012-09-20  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
 -      does not become zero (Bug#12234).  Backport from trunk.
 +      * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
 +      calling mark_vectorlike since that's the one that marks the window.
 +      (mark_discard_killed_buffers): Mark the final cdr.
 +      * window.h (struct window): Move prev/next_buffers to the
 +      non-standard fields.
 +      * window.c (make_window): Initialize prev/next_buffers manually.
 +
 +2012-09-20  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Omit unused arg EXPECTED from socket hooks.
 +      * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
 +      * nsterm.m (ns_term_init):
 +      * termhooks.h (struct terminal.read_socket_hook):
 +      * w32inevt.c (w32_console_read_socket):
 +      * w32term.c (w32_read_socket):
 +      * xterm.c (XTread_socket):
 +      Omit unused arg EXPECTED.  All callers changed.
 +      (store_user_signal_events): Return void, not int, since callers no
 +      longer care about the return value.  All uses changed.
 +
 +2012-09-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32gui.h (XParseGeometry): Do not declare.
 +
 +2012-09-19  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
 +      Ignore 'expected'. See Eli Zaretskii in
 +      <http://bugs.gnu.org/12471#8> (last line).
 +
 +      * frame.c (read_integer): Remove.  All uses replaced by strtol/strtoul.
 +      (XParseGeometry): Now static.  Substitute extremal values for
 +      values that are out of range.
 +
 +2012-09-19  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
 +
 +      * nsfns.m (XParseGeometry): Remove.
 +      (Fx_create_frame): Call x_set_offset to correctly interpret
 +      top_pos in geometry.
 +
 +      * frame.c (read_integer, XParseGeometry): Moved from w32xfns.c.
 +      (Fx_parse_geometry): If there is a space in string, call
 +      Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
 +
 +2012-09-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * search.c (scan_buffer): Use character positions in calls to
 +      region_cache_forward and region_cache_backward, not byte
 +      positions.  (Bug#12196)
 +
 +      * w32term.c (w32_read_socket): Set pending_signals to 1, like
 +      xterm.c does.  Reported by Daniel Colascione <dancol@dancol.org>.
 +
 +      * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
 +      __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
 +      emacs_blocked_malloc, now deleted.
 +
 +2012-09-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove no-longer-needed Solaris 2.4 vfork bug workaround.
 +      The workaround was for improving performance on Solaris 2.4, but
 +      is getting in the way now.  Emacs will still work if someone is
 +      still running Solaris 2.4 in a museum somewhere; Sun dropped
 +      support for Solaris 2.4 in 2003.
 +      * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
 +      * process.c (create_process) [HAVE_WORKING_VFORK]:
 +      Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
 +      since Emacs no longer uses vfork on that platform.
 +
 +2012-09-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs.c: Use COPYRIGHT.
 +
 +2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove configure's --without-sync-input option (Bug#12450).
 +      When auditing signal-handling in preparation for cleaning it up,
 +      I found that SYNC_INPUT has race conditions and would be a real
 +      pain to fix.  Since it's an undocumented and deprecated
 +      configure-time option, now seems like a good time to remove it.
 +      Also see <http://bugs.gnu.org/11080#16>.
 +      * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
 +      (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
 +      (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
 +      (malloc_hysteresis):
 +      (check_depth) [XMALLOC_OVERRUN_CHECK]:
 +      (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
 +      (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
 +      (dont_register_blocks, bytes_used_when_reconsidered)
 +      (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
 +      (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
 +      [!SYSTEM_MALLOC && !SYNC_INPUT]:
 +      Remove. All uses removed.
 +      (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
 +      implementation, one that depends on whether the new macro
 +      XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
 +      is defined.
 +      * atimer.c (run_timers, handle_alarm_signal):
 +      * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
 +      (handle_async_input, process_pending_signals)
 +      (handle_input_available_signal, init_keyboard):
 +      * nsterm.m (ns_read_socket):
 +      * process.c (wait_reading_process_output):
 +      * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
 +      * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
 +      (emacs_write):
 +      * xterm.c (XTread_socket):
 +      Assume SYNC_INPUT.
 +      * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
 +      * eval.c (handling_signal): Remove.  All uses removed.
 +      * lisp.h (ELSE_PENDING_SIGNALS): Remove.
 +      All uses replaced with the SYNC_INPUT version.
 +      (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
 +      Remove decls.
 +      * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
 +      Now static.
 +
 +      * font.c (Ffont_shape_gstring): Remove unused local.
 +
 +2012-09-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (clean): No longer run nextstep's clean.
 +
 +      * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
 +      (ns_frag): Remove.
 +      (ns-app): Move here from ns.mk, and simplify.
 +      (clean): Simplify nextstep entry.
 +      * ns.mk: Remove file.
 +
 +2012-09-16  Kenichi Handa  <handa@gnu.org>
 +
 +      * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
 +      not covert the last few charactes.
 +
 +2012-09-16  Kenichi Handa  <handa@gnu.org>
 +
 +      * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
 +      here, but just check the validity of glyphs in the glyph-string.
 +
 +2012-09-16  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fwindow_parameter, Fset_window_parameter): Accept
 +      any window as argument (Bug#12452).
 +
 +2012-09-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
 +      to ns_term_init to avoid memory leak.
 +
 +      * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
 +      explicit retain/release.
 +      (ns_term_init): Only allow one display.  Initialize outerpool and
 +      ns_*_types.
 +
 +2012-09-15  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port _setjmp fix to POSIXish hosts as well as Microsoft.
 +      * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
 +      it's needed on POSIXish hosts that lack _setjmp.  Attempt to solve
 +      the Microsoft problem in a different way, by altering ../nt/config.nt.
 +
 +2012-09-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32xfns.c:
 +      * w32uniscribe.c:
 +      * w32term.c:
 +      * w32select.c:
 +      * w32reg.c:
 +      * w32proc.c:
 +      * w32menu.c:
 +      * w32inevt.c:
 +      * w32heap.c:
 +      * w32font.c:
 +      * w32fns.c:
 +      * w32console.c:
 +      * w32.c:
 +      * w16select.c: Remove inclusion of setjmp.h, as it is now included
 +      by lisp.h.  This completes removal of setjmp.h inclusion
 +      erroneously announced in the previous commit.  (Bug#12446)
 +
 +      * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
 +      more accurate.
 +
 +      * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
 +      not defined as a macro.  The latter happens on MS-Windows.
 +      (Bug#12446)
 +
 +2012-09-15  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port better to POSIX hosts lacking _setjmp (Bug#12446).
 +      * lisp.h: Include <setjmp.h> here, since we use its symbols here.
 +      Some instances of '#include <setjmp.h>' removed, if the
 +      only reason for the instance was because "lisp.h" was included.
 +      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
 +      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
 +      and _longjmp with the new symbols.  Emacs already uses _setjmp if
 +      available, so this change affects only POSIXish hosts that have
 +      sigsetjmp but not _setjmp, such as some versions of Solaris and
 +      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
 +      * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
 +      (png_load_body) [HAVE_PNG]:
 +      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
 +      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
 +      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
 +      since PNG requires jmp_buf.  This is the only exception to the
 +      general rule that we now use sys_setjmp and sys_longjmp.
 +      This exception is OK since this code does not change the signal
 +      mask or longjmp out of a signal handler.
 +
 +2012-09-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
 +      Include "syssignal.h", for 'main_thread'.
 +
 +2012-09-14  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid out-of-range marker position (Bug#12426).
 +      * insdel.c (replace_range, replace_range_2): Adjust
 +      markers before overlays, as suggested by comments.
 +      (insert_1_both, insert_from_buffer_1, adjust_after_replace):
 +      Remove redundant check before calling offset_intervals.
 +
 +2012-09-14  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * xdisp.c (Fformat_mode_line): Unconditionally save/restore
 +      current buffer (Bug#12387).
 +
 +2012-09-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
 +
 +2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use a more backwards-compatible timer format (Bug#12430).
 +      * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
 +      vector element, not from the 4th, since PSECS is now at the end.
 +      (Fcurrent_idle_time): Doc fix.
 +
 +2012-09-13  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Function to mark objects and remove killed buffers at once.
 +      * alloc.c (discard_killed_buffers): Rename to ...
 +      (mark_discard_killed buffers) ... new name.  Add marking
 +      of remaining objects.  Fix comment.  Adjust users.
 +      (mark_object): Do not touch frame buffer lists here.
 +      * frame.c (delete_frame): Reset frame buffer lists here.
 +
 +2012-09-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Better workaround for GNOME bug when --enable-gcc-warnings.
 +      * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
 +      Instead, disable -Wunused-local-typedefs.  See Dmitry Antipov in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
 +
 +      Simplify SIGIO usage (Bug#12408).
 +      The code that dealt with SIGIO was crufty and confusing, e.g., it
 +      played tricks like "#undef SIGIO" but these tricks were not used
 +      consistently.  Simplify mostly by not #undeffing standard symbols,
 +      e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
 +      or not as we please) rather than "defined SIGIO" (standard symbol
 +      that we probably shouldn't #undef).
 +      * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
 +      Modules that need it can include it.
 +      [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
 +      * dispextern.h (ignore_sigio): New decl.
 +      * emacs.c (shut_down_emacs): Invoke unrequest_sigio
 +      unconditionally, since it's now a no-op if !USABLE_SIGIO.
 +      * emacs.c (shut_down_emacs):
 +      * keyboard.c (kbd_buffer_store_event_hold):
 +      Use ignore_sigio rather than invoking 'signal' directly.
 +      * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
 +      for FIONREAD.
 +      (FIONREAD, SIGIO): Do not #undef.
 +      (tty_read_avail_input): Use #error rather than a syntax error.
 +      * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
 +      for I_PIPE, used by SETUP_SLAVE_PTY.
 +      (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
 +      * sysdep.c (croak): Remove; no longer needed.  This bit of
 +      temporary code, with Fred N. Fish's comment that it's temporary,
 +      has been in Emacs since at least 1992!
 +      (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
 +      Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
 +      * syssignal.h (croak): Remove decl.
 +      (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
 +      * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
 +      now that we're termios-only.
 +      (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
 +      * term.c (dissociate_if_controlling_tty): Use #error rather than
 +      a run-time error.
 +
 +      Work around GCC and GNOME bugs when --enable-gcc-warnings.
 +      * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
 +      to work around GNOME bug 683906.
 +      * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
 +      (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
 +      This works around GCC bug 54561.
 +
 +2012-09-12  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      More fixes for 'volatile' and setjmp/longjmp.
 +      * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
 +      * image.c (struct png_load_context) [HAVE_PNG]: New type.
 +      (png_load_body) [HAVE_PNG]:
 +      (jpeg_load_body) [HAVE_JPEG]:
 +      New function, with most of the old parent function's body.
 +      (png_load) [HAVE_PNG]:
 +      (jpeg_load) [HAVE_JPEG]:
 +      Invoke the new function, to avoid longjmp munging our locals.
 +      (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
 +      (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
 +      longjmp is passed 2, as the C standard doesn't guarantee this.
 +      Instead, store the failure code into mgr->failure_code.
 +
 +2012-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
 +      (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
 +      (syms_of_keyboard): Remove support for unread-command-char.
 +
 +2012-09-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32proc.c (sys_kill): If PID is our process ID and the signal is
 +      SIGABRT, call emacs_abort.  Avoids silently exiting upon assertion
 +      violation.  (Bug#12426)
 +
 +2012-09-12  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
 +
 +2012-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c: Add `inhibit-debugger'.
 +      (Qinhibit_debugger): New symbol.
 +      (call_debugger): Bind it instead of Qdebug_on_error.
 +      (maybe_call_debugger): Test Vinhibit_debugger.
 +      (syms_of_eval): Define inhibit-debugger.
 +      * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
 +      (syms_of_xdisp): Remove inhibit-debug-on-message.
 +
 +2012-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Avoid _setjmp/_longjmp problems with local nonvolatile variables.
 +      If a nonvolatile local variable is written before a _longjmp to
 +      the frame containing the variable, and is read after the _longjmp,
 +      the value read is indeterminate.  Some local variables of type
 +      'struct handler' and 'struct catchtag' are used in this way, so
 +      mark each of their slots as volatile if the slot can be set before
 +      _longjmp and read afterwards.
 +      * lisp.h (struct handler): var and chosen_clause are now volatile.
 +      (struct catchtag): val, next, and pdlcount are now volatile.
 +
 +      * bidi.c (bidi_push_it, bidi_pop_it):
 +      * fns.c (copy_hash_table):
 +      * image.c (define_image_type):
 +      * keyboard.c (kbd_buffer_store_event_hold):
 +      * process.c (Fprocess_send_eof):
 +      * xfaces.c (x_create_gc) [HAVE_NS]:
 +      * xgselect.c (xg_select):
 +      Prefer assignment to memcpy when either will do.
 +
 +      * alloc.c (discard_killed_buffers): Tune and simplify a bit.
 +      Use pointer-to-a-pointer to simplify and avoid a NILP check each
 +      time an item is removed.  No need to mark this function 'inline';
 +      the compiler knows better than we do.
 +
 +2012-09-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
 +      (updateFrameSize:): Add delay parameter to updateFrameSize, send it
 +      to change_frame_size (Bug#12388).
 +      (windowDidResize:): Pass YES to updateFrameSize.
 +
 +      * nsterm.h: Add delay parameter to updateFrameSize.
 +
 +2012-09-11  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Discard killed buffers from deleted window and frame objects.
 +      This reduces an amount of references to killed buffers and
 +      helps GC to reclaim them faster.
 +      * alloc.c (discard_killed_buffers): New function.
 +      (mark_object): Use it for deleted windows and frames.
 +      (mark_object): If symbol's value is set up for a killed buffer
 +      or deleted frame, restore it's global binding.
 +      * data.c (swap_in_global_binding): Add GC notice.
 +      (swap_in_symval_forwarding): Use convenient set_blv_where.
 +      * window.c (wset_next_buffers, wset_prev_buffers): Move ...
 +      * window.h: ... to here.
 +
 +2012-09-11  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Convenient macro to check whether the buffer is live.
 +      * buffer.h (BUFFER_LIVE_P): New macro.
 +      * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
 +      * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
 +
 +2012-09-11  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
 +      composition cases (Bug#12364).
 +
 +      * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
 +      overhang of succeeding glyphs overlapping box cursor.
 +
 +      * w32term.c (x_draw_glyph_string): Likewise.
 +
 +2012-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify, document, and port floating-point (Bug#12381).
 +      The porting part of this patch fixes bugs on non-IEEE platforms
 +      with frexp, ldexp, logb.
 +      * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
 +      Now static.
 +      * floatfns.c: Simplify discussion of functions that Emacs doesn't
 +      support, by removing commented-out code and briefly listing the
 +      C89 functions excluded.  The commented-out stuff was confusing
 +      maintenance, e.g., we thought we needed cbrt but it was commented out.
 +      (logb): Remove decl; no longer needed.
 +      (isfinite): New macro, if not already supplied.
 +      (isnan): Don't replace any existing macro.
 +      (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
 +      are present on all C89 platforms.
 +      (Ffrexp): Do not special-case zero, as frexp does the right thing
 +      for that case.
 +      (Flogb): Do not use logb, as it doesn't have the desired meaning
 +      on hosts that use non-base-2 floating point.  Instead, stick with
 +      frexp, which is C89 anyway.  Do not pass an infinity or a NaN to
 +      frexp, to avoid getting an unspecified result.
 +
 +      * xdisp.c (Qinhibit_debug_on_message): Now static.
 +
 +2012-09-10  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_update_begin): Set clip path to whole view by using
 +      NSBezierPath (Bug#12131).
 +
 +2012-09-10  Chong Yidong  <cyd@gnu.org>
 +
 +      * fns.c (Fdelq, Fdelete): Doc fix.
 +
 +2012-09-10  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
 +      (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
 +
 +2012-09-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lisp.h (make_lisp_ptr): New macro to replace XSET.
 +      (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
 +      Use it.
 +
 +2012-09-09  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
 +      left fringe if the window has a left margin.  This avoids leaving
 +      traces of the cursor because its leftmost pixel is not drawn over.
 +
 +      * dispnew.c (update_window_line): When the left margin area of a
 +      screen line is updated, set the redraw_fringe_bitmaps_p flag of
 +      that screen line.  (Bug#12277)
 +
 +2012-09-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume C89 or later for math functions (Bug#12381).
 +      This simplifies the code, and makes it a bit smaller and faster,
 +      and (most important) makes it easier to clean up signal handling
 +      since we can stop worring about floating-point exceptions in
 +      library code.  That was a problem before C89, but the problem
 +      went away many years ago on all practical Emacs targets.
 +      * data.c, image.c, lread.c, print.c:
 +      Don't include <math.h>; no longer needed.
 +      * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
 +      might be autoconfigured, as that never happens.
 +      * data.c (fmod):
 +      * doprnt.c (DBL_MAX_10_EXP):
 +      * print.c (DBL_DIG):
 +      Remove.  C89 or later always defines these.
 +      * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
 +      (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
 +      (arith_error, domain_error, domain_error2):
 +      Remove all this pre-C89 cruft.  Do not include <errno.h> as that's
 +      no longer needed -- we simply return what C returns.  All uses removed.
 +      (IN_FLOAT, IN_FLOAT2): Remove.  All uses replaced with
 +      the wrapped code.
 +      (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
 +      Remove.  All uses expanded, as these macros are no longer used
 +      more than once and are now more trouble than they're worth.
 +      (Ftan): Use tan, not sin / cos.
 +      (Flogb): Assume C89 frexp.
 +      (fmod_float): Assume C89 fmod.
 +      (matherr) [HAVE_MATHERR]: Remove; no longer needed.
 +      (init_floatfns): Remove.  All uses removed.
 +
 +2012-09-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
 +      compositeToPoint for OSX < 10.6 (Bug#12390).
 +
 +2012-09-08  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
 +      This produces more-accurate results.
 +
 +2012-09-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (updateFrameSize): Call setFrame: on the view when size
 +      changes (Bug#12088).
 +
 +2012-09-08  Chong Yidong  <cyd@gnu.org>
 +
 +      * syntax.c (Fstring_to_syntax): Doc fix.
 +
 +2012-09-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
 +      in the internal border.
 +      (x_set_window_size): Remove static variables and their usage.
 +      (ns_redraw_scroll_bars): Fix NSTRACE arg.
 +      (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
 +      fringe/internal border adjustment (Bug#11052).
 +      (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
 +      (ns_draw_window_cursor): Remove fringe/internal border adjustment.
 +      (ns_fix_rect_ibw): Remove.
 +      (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
 +      (ns_dumpglyphs_box_or_relief): Ditto.
 +      (ns_maybe_dumpglyphs_background): Remove fringe/internal border
 +      adjustment.
 +      (ns_dumpglyphs_image): Ditto.
 +      (ns_dumpglyphs_stretch): Fix coding style.  Remove fringe/internal
 +      border adjustment.
 +      (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
 +      their usage.  Add fringe_extended_p and its use as in other terms.
 +      (ns_judge_scroll_bars): Code style fix.  Call updateFrameSize if
 +      scroll bar was removed.
 +      (updateFrameSize): New function.
 +      (windowDidResize): Move code to updateFrameSize and call it.
 +
 +      * nsterm.h (EmacsView): Add updateFrameSize.
 +
 +2012-09-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
 +
 +      * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
 +
 +2012-09-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      More signal-handler cleanup (Bug#12327).
 +      * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
 +      Problem introduced when merging patches.  Noted by Eli Zaretskii in
 +      <http://bugs.gnu.org/12327#67>.
 +      * floatfns.c: Comment fix.
 +      * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
 +      SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
 +      and anyway the declaration is harmless even if SIGDANGER is not defined.
 +      * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
 +      defined BROKEN_FIONREAD).  systty.h formerly did this, but other
 +      source files not surprisingly expected syssignal.h to define, or
 +      not define, SIGIO, and it's cleaner to do it that way, for consistency.
 +      Include <sys/ioctl.h>, for FIONREAD.
 +      * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
 +      This eliminates a problem whereby other files mysteriously had
 +      to include "syssignal.h" before including "systty.h" if they
 +      wanted to use "#ifdef SIGIO".
 +
 +2012-09-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
 +
 +      * w32.c (sigemptyset): Empty the set.
 +      (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
 +
 +      * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
 +
 +2012-09-07  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (mark_buffer): Revert unsafe marking optimization.
 +      (mark_object): Likewise for frame objects.
 +
 +2012-09-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * syssignal.h (handle_on_main_thread): Always declare,
 +      even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
 +      This ports to platforms without HAVE_PTHREAD.
 +
 +2012-09-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Signal-handler cleanup (Bug#12327).
 +      Emacs's signal handlers were written in the old 4.2BSD style with
 +      sigblock and sigmask and so forth, and this led to some
 +      inefficiencies and confusion.  Rewrite these to use
 +      pthread_sigmask etc. without copying signal sets around.  Also,
 +      get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
 +      'signal', and instead use functions that do not attempt to take
 +      over the system name space.  This patch causes Emacs's text
 +      segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
 +      * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
 +      Do not include <signal.h> or "syssignal.h", as these
 +      modules do not use signals.
 +      * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
 +      * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
 +      Do not include <signal.h>, as "syssignal.h" does that for us now.
 +      * atimer.c (sigmask_atimers): New function.
 +      (block_atimers, unblock_atimers): New functions,
 +      replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
 +      All uses replaced.
 +      * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
 +      no longer needed here.
 +      * emacs.c (main): Inspect existing signal handler with sigaction,
 +      so that there's no need to block and unblock SIGHUP.
 +      * sysdep.c (struct save_signal): New member 'action', replacing
 +      old member 'handler'.
 +      (save_signal_handlers, restore_signal_handlers):
 +      Use sigaction instead of 'signal' to save and restore.
 +      (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
 +      New function.  All users of 'signal' modified to use set_sighandler
 +      if they're writeonly, and to use sys_signal if they're read+write.
 +      (emacs_sigaction_init, forwarded_signal): New functions.
 +      (sys_signal): Remove.  All uses replaced by calls to sigaction
 +      and emacs_sigaction_init, or by direct calls to 'signal'.
 +      (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
 +      (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
 +      all uses replaced by pthread_sigmask etc. calls.
 +      * syssignal.h: Include <signal.h>.
 +      (emacs_sigaction_init, forwarded_signal): New decls.
 +      (SIGMASKTYPE): Remove.  All uses replaced by its definiens, sigset_t.
 +      (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
 +      (sigmask, sys_sigmask): Remove; no longer needed.
 +      (sigpause): Remove.  All uses replaced by its definiens, sigsuspend.
 +      (sigblock, sigunblock, sigfree):
 +      (sigsetmask) [!defined sigsetmask]:
 +      Remove.  All uses replaced by pthread_sigmask.
 +      (signal): Remove.  Its remaining uses (with SIG_DFL and SIG_IGN)
 +      no longer need to be replaced, and its typical old uses
 +      are now done via emacs_sigaction_init and sigaction.
 +      (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
 +      (sys_sigdel): Remove; unused.
 +      (NSIG): Remove a FIXME; the code's fine.  Remove an unnecessary ifdef.
 +
 +2012-09-06  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
 +      SIGCHLD handling on systems that don't have WNOHANG.  (Bug#12327)
 +
 +2012-09-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Explicitly mark buffer_defaults and buffer_local_symbols.
 +      * alloc.c (Fgarbage_collect): Mark buffer_defaults and
 +      mark_local_symbols here.
 +      (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
 +      since special buffers aren't marked here any more.
 +      (allocate_buffer): Chain new buffer with all_buffers here...
 +      * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
 +      not here.
 +      (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
 +      (syms_of_buffer): Remove staticpro of the above.
 +      (init_buffer_once): Set names for buffer_defaults and
 +      buffer_local_symbols.
 +
 +2012-09-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use bool for booleans in font-related modules.
 +      * font.c (font_intern_prop, font_style_to_value)
 +      (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
 +      (generate_otf_features, font_check_otf_features, font_check_otf)
 +      (font_match_p, font_list_entities, font_at):
 +      * fontset.c (fontset_id_valid_p, reorder_font_vector
 +      (fontset_find_font, Fset_fontset_font)
 +      (face_suitable_for_char_p) [0]:
 +      * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
 +      (ftfont_open, ftfont_text_extents, ftfont_check_otf):
 +      (m17n_flt_initialized, ftfont_shape_by_flt):
 +      * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
 +      * nsfont.m (nsfont_draw):
 +      * w32font.c (w32font_draw):
 +      * w32term.c (x_draw_glyphless_glyph_string_foreground):
 +      Use bool for booleans.
 +      * font.h: Adjust to above API changes.
 +      (struct font, struct font_driver, struct font_driver_list):
 +      Use bool for booleans.
 +      (struct font): Remove useless member encoding_type.
 +      All users removed.
 +      * fontset.c, xftfont.c: Omit unnecessary static decls.
 +
 +2012-09-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (mark_object): Revert window marking code
 +      since it's unsafe for the Fset_window_configuration.
 +
 +2012-09-05  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix race conditions with signal handlers and errno (Bug#12327).
 +      Be more systematic about preserving errno whenever a signal
 +      handler returns, even if it's not in the main thread.  Do this by
 +      renaming signal handlers to distinguish between signal delivery
 +      and signal handling.  All uses changed.
 +      * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
 +      * data.c (deliver_arith_signal): Rename from arith_error.
 +      * dispnew.c (deliver_window_change_signal): Rename from
 +      window_change_signal.
 +      * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
 +      (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
 +      * keyboard.c (deliver_input_available_signal): Rename from
 +      input_available_signal.
 +      (deliver_user_signal): Rename from handle_user_signal.
 +      (deliver_interrupt_signal): Rename from interrupt_signal.
 +      * process.c (deliver_pipe_signal): Rename from send_process_trap.
 +      (deliver_child_signal): Rename from sigchld_handler.
 +      * atimer.c (handle_alarm_signal):
 +      * data.c (handle_arith_signal):
 +      * dispnew.c (handle_window_change_signal):
 +      * emacs.c (handle_fatal_signal, handle_danger_signal):
 +      * keyboard.c (handle_input_available_signal):
 +      * keyboard.c (handle_user_signal, handle_interrupt_signal):
 +      * process.c (handle_pipe_signal, handle_child_signal):
 +      New functions, with the actual signal-handling code taken from the
 +      original respective signal handlers, sans the sporadic attempts to
 +      preserve errno, since that's now done by handle_on_main_thread.
 +      * atimer.c (alarm_signal_handler): Remove unnecessary decl.
 +      * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
 +      * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
 +      Move to sysdep.c.
 +      (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
 +      Move initialization of main_thread to sysdep.c's init_signals.
 +      * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
 +      our usage, and simplifies the mainline code.
 +      (record_child_status_change): New static function, as a helper
 +      for handle_child_signal, and with most of the old child handler's
 +      contents.
 +      (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
 +      (handle_child_signal): Use the above.
 +      * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
 +      Moved here from emacs.c.
 +      (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
 +      code moved here from emacs.c's main function.
 +      * sysdep.c, syssignal.h (handle_on_main_thread): New function,
 +      replacing the old SIGNAL_THREAD_CHECK.  All uses changed.  This
 +      lets callers save and restore errno properly.
 +
 +2012-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Remove redundant or unused things here and there.
 +      * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
 +      * conf_post.h (RE_TRANSLATE): Use char_table_translate.
 +      * editfns.c (Fcompare_buffer_substrings): Likewise.
 +      * frame.h (struct terminal, struct font_driver_list):
 +      Remove redundant declarations.
 +      * window.h (Qleft, Qright): Likewise.
 +
 +2012-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Do not mark objects from deleted buffers, windows and frames.
 +      * alloc.c (mark_buffer): Mark just the buffer if it is dead.
 +      (mark_object): Likewise for windows and frames.
 +
 +2012-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (valid_lisp_object_p): Treat killed buffers,
 +      buffer_defaults and buffer_local_symbols as valid objects.
 +      Return special value to denote them.
 +
 +2012-09-05  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
 +      * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
 +      (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
 +      (file_name_absolute_p, Fsubstitute_in_file_name):
 +      (check_executable, check_writable, Ffile_accessible_directory_p)
 +      (Fset_file_selinux_context, Fdefault_file_modes)
 +      (Finsert_file_contents, choose_write_coding_system)
 +      (Fwrite_region, build_annotations, a_write, e_write)
 +      (Fdo_auto_save):
 +      * filelock.c (boot_time_initialized, get_boot_time)
 +      (get_boot_time_1, lock_file_1, within_one_second):
 +      * floatfns.c (in_float):
 +      * fns.c (concat, internal_equal, Frequire, base64_encode_1)
 +      (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
 +      (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
 +      * lisp.h (struct Lisp_Hash_Table.cmpfn):
 +      * window.c (compare_window_configurations):
 +      Use bool for booleans.
 +      * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
 +      (Fdefault_file_modes): Now mode_t, not int, for modes.
 +      (Fdo_auto_save): Set a boolean to 1 rather than using ++.
 +      (internal_delete_file): Now returns void, not a (boolean) int,
 +      since nobody was looking at the return value.
 +      * lisp.h, window.h: Adjust to above API changes.
 +
 +      * xdisp.c (set_message): Simplify and reindent last change.
 +
 +2012-09-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
 +
 +2012-09-04  Lars Ingebrigtsen  <larsi@gnus.org>
 +
 +      * eval.c (call_debugger): Make the function non-static so that we
 +      can call it from set_message.
 +
 +      * xdisp.c (set_message): Implement the new variable `debug-on-message'.
 +      (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
 +
 +2012-09-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Give more-useful info on a fatal error (Bug#12328).
 +      * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
 +      (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
 +      of doing the work ourselves.
 +      * emacs.c (fatal_error_signal): Let fatal_error_backtrace
 +      do most of the work.
 +      (fatal_error_backtrace): New function, taken from the guts
 +      of the old fatal_error_signal, but with a new option to output
 +      a backtrace.
 +      (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
 +      info about the signal than just its number.
 +      * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
 +      * sysdep.c: Include <execinfo.h>
 +      (emacs_backtrace): New function, taken partly from the previous
 +      code of the 'die' function.
 +      (emacs_abort): Call fatal_error_backtrace rather than abort.
 +
 +2012-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
 +      eager (load-time) macro-expansion.
 +      * lisp.mk (lisp): Add macroexp.
 +
 +2012-09-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify redefinition of 'abort' (Bug#12316).
 +      Do not try to redefine the 'abort' function.  Instead, redo
 +      the code so that it calls 'emacs_abort' rather than 'abort'.
 +      This removes the need for the NO_ABORT configure-time macro
 +      and makes it easier to change the abort code to do a backtrace.
 +      * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
 +      * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
 +      Remove; sysdep.c's emacs_abort now takes its place.
 +      * lisp.h (emacs_abort): New decl.  All calls from Emacs code to
 +      'abort' changed to use 'emacs_abort'.
 +      * msdos.c (dos_abort) [defined abort]: Remove; not used.
 +      (abort) [!defined abort]: Rename to ...
 +      (emacs_abort): ... new name.
 +      * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
 +      the place of the old 'abort' in emacs.c.
 +      * w32.c, w32fns.c (abort): Do not #undef.
 +      * w32.c (emacs_abort): Rename from w32_abort.
 +
 +2012-09-04  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32uniscribe.c (uniscribe_shape): Reverse the sign of
 +      offsets[j].dv, since the y axis of the screen coordinates points
 +      down, while the y axis of the font definition coordinates points
 +      up.  This fixes display of Arabic diacritics such as KASRA and
 +      KASRATAN.  (Bug#11860)
 +
 +2012-09-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Be more systematic about _setjmp vs setjmp.
 +      * alloc.c (test_setjmp, mark_stack):
 +      * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
 +      (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
 +      (png_load, my_error_exit, jpeg_load):
 +      * process.c (send_process_trap, send_process):
 +      Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
 +      The underscored versions are up to 30x faster on some hosts.
 +      Formerly, the code used setjmp+longjmp sometimes and
 +      _setjmp+_longjmp at other times, with no particular reason to
 +      prefer setjmp+longjmp.
 +
 +2012-09-03  Paul Eggert  <eggert@cs.ucla.edu>
  
 -2012-08-24  Chong Yidong  <cyd@gnu.org>
 +      Fix minor problem found by static checking.
 +      * buffer.c (Fdelete_all_overlays): Return nil.
 +
 +2012-09-03  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * buffer.c (Fdelete_all_overlays): New function.
 +
 +2012-09-03  Chong Yidong  <cyd@gnu.org>
 +
 +      * gtkutil.c: Add extern decl for Qxft.
 +
 +2012-09-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * emacs.c, eval.c: Use bool for boolean.
 +      * emacs.c (initialized, inhibit_window_system, running_asynch_code):
 +      (malloc_using_checking) [DOUG_LEA_MALLOC]:
 +      (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
 +      (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
 +      (main, decode_env_path, Fdaemon_initialized):
 +      * eval.c (call_debugger, Finteractive_p, interactive_p):
 +      (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
 +      (maybe_call_debugger, Fbacktrace):
 +      * process.c (read_process_output, exec_sentinel):
 +      Use bool for booleans.
 +      * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
 +      All callers changed.
 +      * eval.c (interactive_p): Omit always-true boolean argument
 +      EXCLUDE_SUBRS_P.  All callers changed.
 +      * dispextern.h, lisp.h: Reflect above API changes.
 +      * firstfile.c (dummy): Use the address of 'main', whose signature
 +      won't change, instead of the address of 'initialize', whose
 +      signature just changed from int to bool.
 +      * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
 +      * msdos.c (fatal_error_in_progress): ... from here.
 +      * xdisp.c (redisplaying_p): Now a boolean.  Set it to 1 instead
 +      of incrementing it.
 +      (redisplay_internal, unwind_redisplay): Simply clear
 +      REDISPLAYING_P when unwinding, instead of saving its previous,
 +      always-false value and then restoring it.
 +
 +      Clean up some extern decls.
 +      Mostly, this hoists extern decls out of .c files and into .h files.
 +      That way, we're more likely to catch errors if the interfaces change.
 +      * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
 +      declare xg_mark_data.
 +      * dispextern.h (x_frame_parm_handlers):
 +      * font.h (Qxft):
 +      * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
 +      (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
 +      (Qultra_bold, Qoblique, Qitalic):
 +      Move extern decl here from .c file.
 +      * alloc.c (xg_mark_data) [USE_GTK]:
 +      * doc.c (Qclosure):
 +      * eval.c (Qlexical_binding):
 +      * fns.c (time) [!HAVE_UNISTD_H]:
 +      * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
 +      (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
 +      * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
 +      * lread.c (Qinternal_interpreter_environment):
 +      * minibuf.c (Qbuffer):
 +      * process.c (QCfamily, QCfilter):
 +      * widget.c (free_frame_faces):
 +      * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
 +      * xfont.c (x_clear_errors):
 +      * xterm.c (x_frame_parm_handlers):
 +      Remove now-redundant extern decls.
 +      * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
 +      * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
 +      Now static.
 +      * xfaces.c: Remove unnecessary static decls.
 +      * xterm.c (updating_frame): Remove decl of nonexistent object.
 +
 +      * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
 +      when building globals.h, as the objects that are not built on
 +      this host are not needed to compile C files on this host.
 +
 +2012-09-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.h: Remove prototype for x_wm_set_size_hint.
 +
 +      * frame.h: Add missing prototype for x_wm_set_size_hint.
 +
 +2012-09-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
 +      * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
 +      (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
 +      (Fsubstitute_command_keys):
 +      * editfns.c (region_limit, find_field, Fconstrain_to_field)
 +      (save_excursion_save, save_excursion_restore)
 +      (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
 +      (format_time_string, general_insert_function)
 +      (make_buffer_string, make_buffer_string_both)
 +      (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
 +      * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
 +      (copy_text, insert_1, insert_1_both, insert_from_string)
 +      (insert_from_string_before_markers, insert_from_string_1)
 +      (insert_from_buffer, insert_from_buffer_1, replace_range)
 +      (replace_range_2, del_range_1, del_range_byte, del_range_both)
 +      (del_range_2, modify_region):
 +      * intervals.c (intervals_equal, balance_possible_root_interval)
 +      (adjust_intervals_for_insertion, merge_properties_sticky)
 +      (graft_intervals_into_buffer, lookup_char_property)
 +      (adjust_for_invis_intang, set_point_both)
 +      (get_property_and_range, compare_string_intervals)
 +      (set_intervals_multibyte_1, set_intervals_multibyte):
 +      * keyboard.c (decode_timer):
 +      Use bool for boolean.
 +      * intervals.h, lisp.h, systime.h: Reflect above API changes.
 +      * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
 +
 +2012-09-02  Chong Yidong  <cyd@gnu.org>
 +
 +      * keymap.c (push_key_description): Print M-TAB as C-M-i
 +      (Bug#11758).
 +
 +2012-09-02  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (CCL_H, W32FONT_H): New macros.
 +      (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
 +      ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
 +      ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
 +      ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
 +      ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
 +      ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
 +
 +2012-09-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
 +      more than one grapheme cluster passed to the shaper: compute the
 +      offset adjustment values separately for each cluster.  (Bug#11860)
 +
 +      * image.c: Restore mistakenly removed inclusion of w32.h.  Without
 +      it, GCC doesn't see prototypes of w32_delayed_load, and complains
 +      about implicit conversions from integer to pointer.
 +
 +2012-09-01  Daniel Colascione  <dancol@dancol.org>
 +
 +      * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
 +      system used too early.
 +
 +2012-09-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Better seed support for (random).
 +      * emacs.c (main): Call init_random.
 +      * fns.c (Frandom): Set the seed from a string argument, if given.
 +      Remove long-obsolete Gentzel cruft.
 +      * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
 +      (init_random): New function.
 +
 +2012-09-01  Daniel Colascione  <dancol@dancol.org>
 +
 +      * xterm.h: Add header guards.  Declare x_menubar_window_to_frame.
 +      Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
 +      x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
 +      x_wm_set_size_hint, x_query_colors, x_real_positions,
 +      x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
 +      x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
 +      all of which have been moved to common code.
 +
 +      * xfaces.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
 +
 +      * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
 +      to match header.
 +
 +      * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
 +      directly accessing frame internals.
 +
 +      * w32font.h: Include font.h.  Define syms_of_w32font and
 +      globals_of_w32font.
 +
 +      * process.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
 +
 +      * nsterm.h: Remove declarations now in frame.h.  Define
 +      FRAME_X_SCREEN, FRAME_X_VISUAL.
 +
 +      * menu.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
 +
 +      * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
 +      window system.
 +
 +      * keyboard.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
 +
 +      * image.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.  Declare Vlibrary_cache when compiling for
 +      Windows.
 +
 +      * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
 +      window system declarations.
 +
 +      * frame.h: Move common functions here: set_frame_menubar,
 +      x_set_window_size, 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_menu_bar_lines, x_set_tool_bar_lines,
 +      x_activate_menubar, x_real_positions, x_bitmap_icon,
 +      x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
 +      and x_query_colors.
 +
 +      * frame.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
 +
 +      * font.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
 +
 +      * emacs.c: Include TERM_HEADER.
 +
 +      * dispnew.c: Include TERM_HEADER instead of listing all possible
 +      window-system headers.
  
 -      * Version 24.2 released.
 +      * ccl.h: Include character.h.
  
 -2012-08-24  Eli Zaretskii  <eliz@gnu.org>
 +      * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
 +      the current window system; include in list of objects to link into
 +      Emacs.
 +
 +2012-08-31  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Remove mark_ttys function and fix tty_display_info initialization.
 +      * lisp.h (mark_ttys): Remove prototype.
 +      * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
 +      to mark_ttys because all possible values of 'top_frame' slot are
 +      the frames which are reachable from Vframe_list.
 +      * term.c (mark_ttys): Remove.
 +      (init_tty): Safely initialize 'top_frame' slot with Qnil.
 +
 +2012-08-31  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Change struct frame bitfields from unsigned char to unsigned.
 +      * frame.h (struct frame): Change type of 'display_preempted',
 +      'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
 +      'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
 +      'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
 +      bitfields from unsigned char to unsigned.
 +
 +2012-08-31  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Remove unused member of struct x_output and struct w32_output.
 +      * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
 +      * w32term.h (struct w32_output): Likewise.
 +
 +2012-08-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
 +      does not become zero (Bug#12234).
 +
 +2012-08-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
 +      for GCC 4.7.1 x86-64.
 +
 +2012-08-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * lread.c (init_lread): For out-of-tree builds, only add the
 +      source directory's site-lisp dir to the load-path if it exists,
 +      consistent with in-tree builds.  (Bug#12302)
 +
 +2012-08-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
 +      button_values to NULL.  Call setStykeMask so dialogs get a close button.
 +      (windowShouldClose:): Set window_closed.
 +      (dealloc): New member, free button_values.
 +      (process_dialog:): Make member function.  Remove window argument,
 +      replace window with self.  Count buttons and allocate and store values
 +      in button_values.
 +      (addButton:value:row:): value is int with the name tag.  Call setTag
 +      with tag.  Remove return self, declare return value as void.
 +      (addString:row:): Remove return self, declare return value as void.
 +      (addSplit): Remove return self, declare return value as void.
 +      (clicked:): Remove return self, declare return value as void.
 +      Set dialog_return to button_values[seltag].  Code formatting change.
 +      (initFromContents:isQuestion:): Adjust call to process_dialog.
 +      Code formatting change.
 +      (timeout_handler:): Set timer_fired to YES.
 +      (runDialogAt:): Set timer_fired to NO.
 +      Handle click on close button as quit.
 +
 +      * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
 +      Add window_closed and button_values.  Add void as return value for
 +      add(Button|String|Split).  addButton takes int instead of Lisp_Object.
 +      Add process_dialog as new member.
 +
 +2012-08-28  Eli Zaretskii  <eliz@gnu.org>
  
        * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
        is not one of the heaps we manage.  (Bug#12242)
  
 -2012-08-14  Glenn Morris  <rgm@gnu.org>
 +2012-08-28  Glenn Morris  <rgm@gnu.org>
  
        * eval.c (Fcalled_interactively_p): Doc fix.  (Bug#11747)
  
 -2012-08-14  Ulrich Mueller  <ulm@gentoo.org>
 +2012-08-28  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fset_window_configuration): Remove handling of
 +      auto-buffer-name window parameter.  Install revision of reverted
 +      fix.
 +
 +2012-08-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Do not allow to set major mode for a dead buffer.
 +      * buffer.c (Fset_buffer_major_mode): Signal an error
 +      if the buffer is dead.
 +      (Fother_buffer, other_buffer_safely): Remove redundant
 +      nested declaration.
 +
 +2012-08-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Always use set_buffer_if_live to restore original buffer at unwind.
 +      * buffer.h (record_unwind_current_buffer): New function.
 +      * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
 +      * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
 +      * undo.c, window.c: Adjust users.
 +      * buffer.c (set_buffer_if_live): Fix comment.
 +
 +2012-08-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix usage of set_buffer_internal.
 +      * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
 +      * buffer.c (set_buffer_if_live): Use set_buffer_internal.
 +      * coding.c (decode_coding): Omit redundant test.
 +      * fileio.c (decide_coding_unwind): Likewise.
 +      * fns.c (secure_hash): Likewise.
 +      * insdel.c (modify_region): Likewise.
 +      * keyboard.c (command_loop_1): Likewise.
 +      * print.c (PRINTFINISH): Likewise.
 +      * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
 +
 +2012-08-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * dispnew.c: Use bool for boolean.
 +      (frame_garbaged, display_completed, delayed_size_change)
 +      (fonts_changed_p, add_window_display_history)
 +      (add_frame_display_history, verify_row_hash)
 +      (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
 +      (row_equal_p, realloc_glyph_pool)
 +      (allocate_matrices_for_frame_redisplay)
 +      (showing_window_margins_p)
 +      (adjust_frame_glyphs_for_frame_redisplay)
 +      (build_frame_matrix_from_leaf_window, make_current)
 +      (mirrored_line_dance, mirror_line_dance, update_frame)
 +      (update_window_tree, update_single_window)
 +      (check_current_matrix_flags, update_window, update_text_area)
 +      (update_window_line, set_window_update_flags, scrolling_window)
 +      (update_frame_1, scrolling, buffer_posn_from_coords)
 +      (do_pending_window_change, change_frame_size)
 +      (change_frame_size_1, sit_for):
 +      Use bool for boolean.
 +      (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
 +      and remove last int (actually boolean) argument, which was always 0.
 +      All callers changed.
 +      * dispextern.h, frame.h, lisp.h: Reflect above API changes.
 +      * dispextern.h (struct composition_it): Use bool for boolean.
 +      (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
 +      (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
 +      * dired.c (file_name_completion):
 +      Use bool for boolean.  (This was missed in an earlier change.)
 +
 +2012-08-27  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fset_window_configuration): Revert first part of
 +      last change.
 +
 +2012-08-27  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.h (NSPanel): New class variable dialog_return.
 +
 +      * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
 +      dialog_return.
 +      (windowShouldClose:): Use stop instead of stopModalWithCode.
 +      (clicked:): Ditto, and also set dialog_return (Bug#12258).
 +      (timeout_handler:): Use stop instead of abortModal.  Send a dummy
 +      event.
 +      (runDialogAt:): Make ret Lisp_Object.  Set it from dialog_return when
 +      modal loop returns.
 +
 +2012-08-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
 +      * composite.c (find_composition, composition_gstring_p)
 +      (composition_reseat_it, find_automatic_composition):
 +      * data.c (let_shadows_buffer_binding_p)
 +      (let_shadows_global_binding_p, set_internal, make_blv)
 +      (Fmake_variable_buffer_local, Fmake_local_variable)
 +      (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
 +      (cons_to_signed, arith_driver):
 +      * dbusbind.c (xd_in_read_queued_messages):
 +      * dired.c (directory_files_internal, file_name_completion):
 +      Use bool for booleans.
 +      * dired.c (file_name_completion):
 +      * process.h (fd_callback):
 +      Omit int (actually boolean) argument.  It wasn't being used.
 +      All uses changed.
 +      * composite.h, lisp.h: Reflect above API changes.
 +
 +      * cmds.c, coding.c: Use bool for booleans.
 +      * cmds.c (move_point, Fself_insert_command):
 +      * coding.h (struct composition status, struct coding_system):
 +      * coding.c (detect_coding_utf_8, encode_coding_utf_8)
 +      (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
 +      (emacs_mule_char, decode_coding_emacs_mule)
 +      (encode_coding_emacs_mule, detect_coding_iso_2022)
 +      (decode_coding_iso_2022, encode_invocation_designation)
 +      (encode_designation_at_bol, encode_coding_iso_2022)
 +      (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
 +      (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
 +      (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
 +      (encode_coding_raw_text, detect_coding_charset)
 +      (decode_coding_charset, encode_coding_charset, detect_eol)
 +      (detect_coding, get_translation_table, produce_chars)
 +      (consume_chars, reused_workbuf_in_use)
 +      (make_conversion_work_buffer, code_conversion_save)
 +      (decode_coding_object, encode_coding_object)
 +      (detect_coding_system, char_encodable_p)
 +      (Funencodable_char_position, code_convert_region)
 +      (code_convert_string, code_convert_string_norecord)
 +      (Fset_coding_system_priority):
 +      * fileio.c (Finsert_file_contents):
 +      Use bool for booleans.
 +      * coding.h, lisp.h: Reflect above API changes.
 +      * coding.c: Remove unnecessary static function decls.
 +      (detect_coding): Use unsigned, not signed, to copy an unsigned field.
 +      (decode_coding, encode_coding, decode_coding_gap): Return 'void',
 +      not a boolean 'int', since callers never look at the return value.
 +      (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
 +      * coding.h (decoding_buffer_size, encoding_buffer_size)
 +      (emacs_mule_string_char): Remove unused extern decls.
 +      (struct iso_2022_spec, struct coding_system):
 +      Use 'unsigned int : 1' for boolean fields, since there's more than one.
 +      (struct emacs_mule_spec): Remove unused field 'full_support'.
 +      All initializations removed.
 +      * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
 +
 +2012-08-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix spare memory change (Bug#12286).
 +      * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
 +      (valid_lisp_object_p): Likewise.
 +
 +2012-08-27  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fset_window_configuration): Record any window's old
 +      buffer if it's replaced (see Bug#8789).  If the new current
 +      buffer doesn't appear in the selected window, go to its old
 +      point (Bug#12208).
 +
 +2012-08-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Special MEM_TYPE_SPARE to denote reserved memory.
 +      * alloc.c (enum mem_type): New memory type.
 +      (refill_memory_reserve): Use new type for spare memory.
 +      This prevents live_cons_p and live_string_p from incorrect
 +      detection of uninitialized objects from spare memory as live.
 +
 +2012-08-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Spelling fixes.
 +      * Makefile.in (.PHONY): versioclean -> versionclean.
 +
 +      Remove unused external symbols.
 +      * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
 +      * window.c (Qwindow_valid_p, decode_valid_window):
 +      Now static, not extern.
 +      * data.c (Qinterval): Remove; unused.
 +      (syms_of_data): Do not define 'interval'.
 +      * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
 +      * window.h (decode_valid_window):
 +      Remove decls.
 +
 +      * character.c, charset.c, chartab.c: Use bool for booleans.
 +      * character.c (lisp_string_width, string_count_byte8)
 +      (string_escape_byte8):
 +      * charset.c (charset_map_loaded, load_charset_map, read_hex):
 +      (load_charset_map_from_file, map_charset_chars)
 +      (Fdefine_charset_internal, define_charset_internal)
 +      (Fdeclare_equiv_charset, find_charsets_in_text)
 +      (Ffind_charset_region, char_charset, Fiso_charset):
 +      * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
 +      (sub_char_table_set, sub_char_table_set_range)
 +      (char_table_set_range, optimize_sub_char_table)
 +      (map_sub_char_table):
 +      Use bool for boolean.
 +      * character.c (str_to_unibyte): Omit last boolean argument; it was
 +      always 0.  All callers changed.
 +      * character.h, charset.h: Adjust to match previous changes.
 +      * character.h (char_printable_p): Remove decl of nonexistent function.
 +      * charset.h (struct charset): Members code_linear_p, iso_chars_96,
 +      ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
 +      are all boolean, so make them single-bit bitfields.
 +
 +      * lisp.h (ASET): Remove attempt to detect side effects.
 +      It was meant to be temporary and it often doesn't work,
 +      because when IDX has side effects the behavior of IDX==IDX
 +      is undefined.  See Stefan Monnier in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
 +
 +2012-08-26  Barry OReilly  <gundaetiapo@gmail.com>  (tiny change)
 +
 +      * lisp.h (functionp): New function (extracted from Ffunctionp).
 +      (FUNCTIONP): Use it.
 +      * eval.c (Ffunctionp): Use it.
 +
 +2012-08-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
 +      as that's faster and simpler than static storage.  Don't bother
 +      with the g_main_context_query overhead if g_main_context_pending
 +      says no events are pending.
 +      (gfds, gfds_size): Remove these static vars.
 +      (xgselect_initialize): Remove; no longer needed.
 +      All uses and decls removed.
 +
 +      * emacs.c (fatal_error_signal_hook): Remove.
 +      All uses removed.  This leftover from old code was always 0.
 +
 +      * casefiddle.c, casetab.c, category.c: Use bool for boolean.
 +      * casefiddle.c (casify_object, casify_region):
 +      * casetab.c (set_case_table):
 +      * category.c, category.h (word_boundary_p):
 +      * category.h (CHAR_HAS_CATEGORY):
 +      Use bool for booleans, instead of int.
 +
 +2012-08-25  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
 +
 +2012-08-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      On assertion failure, print backtrace if available.
 +      * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
 +      (die) [ENABLE_CHECKING]: Print a backtrace if available.
 +      * Makefile.in (LIB_EXECINFO): New macro.
 +      (LIBES): Use it.
  
 -      * systime.h (EMACS_TIME_CMP): Don't cast time_t values to long
 -      (Bug#11712).
 +      * bytecode.c, callint.c, callproc.c: Use bool for boolean.
 +      * bytecode.c (exec_byte_code):
 +      * callint.c (check_mark, Fcall_interactively):
 +      * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
 +      (getenv_internal, sync_process_alive, call_process_exited):
 +      * lisp.h (USE_SAFE_ALLOCA):
 +      Use bool for booleans, instead of int.
 +      * lisp.h, process.h: Adjust prototypes to match above changes.
 +      * callint.c (Fcall_interactively): Don't assume the mark's
 +      offset fits in 'int'.
 +
 +2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * buffer.c, buffer.h: Use bool for boolean.
 +      * buffer.c (reset_buffer_local_variables)
 +      (buffer_lisp_local_variables, Fset_buffer_modified_p)
 +      (Frestore_buffer_modified_p, Fset_buffer_multibyte):
 +      (overlays_at, overlays_in, mouse_face_overlay_overlaps)
 +      (overlay_touches_p, overlay_strings, Foverlay_put)
 +      (report_overlay_modification, call_overlay_mod_hooks):
 +      (mmap_enlarge, mmap_set_vars):
 +      * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
 +      Use bool for booleans, instead of int.
 +      * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
 +      since the 1-or-0 return value is always ignored anyway.
 +      (mmap_initialized_p):
 +      * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
 +      * buffer.h, lisp.h: Adjust prototypes to match above changes.
 +
 +2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * bidi.c: Use bool for boolean.
 +      This is a bit more readable, and makes the text segment of bidi.o
 +      0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
 +      Presumably it's faster too.
 +      (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
 +      Now bool.
 +      (bidi_cache_find_level_change, bidi_cache_iterator_state)
 +      (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
 +      (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
 +      (bidi_explicit_dir_char, bidi_level_of_next_char)
 +      (bidi_find_other_level_edge, bidi_move_to_visually_next):
 +      Use bool for booleans, instead of int.
 +      * dispextern.h (bidi_init_it, bidi_paragraph_init)
 +      (bidi_unshelve_cache): Adjust decls to match code.
  
 -2012-08-13  Eli Zaretskii  <eliz@gnu.org>
 +2012-08-23  Martin Rudalics  <rudalics@gmx.at>
  
 -      * w32menu.c: Include w32heap.h.
 -      (add_menu_item): If the call to AppendMenuW (via
 -      unicode_append_menu) fails, disable Unicode menus only if we are
 -      running on Windows 9X/Me.
 +      * keyboard.c (Fposn_at_x_y): Do not allow internal window as
 +      argument.
  
 -      * makefile.w32-in ($(BLD)/w32menu.$(O)): Depend on w32heap.h.
 +2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      * window.c (Fdelete_other_windows_internal)
 -      (Fdelete_window_internal): Don't access frame's mouse highlight
 -      info of the initial frame.  (Bug#11677)
 +      * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
 +      * atimer.h: Include <stdbool.h>.
 +
 +2012-08-22  Dan Nicolaescu  <dann@gnu.org>
 +
 +      * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
 +      compile time tests instead of run time tests on systems that do
 +      not use them.
 +      (FRAME_MAC_P): Remove leftover from deleted code.
 +      * frame.c (syms_of_frame): Remove leftover from deleted code.
 +
 +2012-08-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (insertText:): Don't clear modifiers if code is space.
 +
 +2012-08-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
 +      Otherwise, the compiler complains about (A?B:C) where B is void
 +      and C is Lisp_Object.  This fixes an incompatibility with Sun C 5.12.
 +      (fontset_add): Return void, for FONTSET_ADD.
 +
 +2012-08-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c: Use bool for booleans.
 +      (gc_in_progress, abort_on_gc)
 +      (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
 +      (dont_register_blocks) [GC_MALLOC_CHECK]:
 +      (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
 +      (check_string_bytes, make_specified_string, memory_full)
 +      (live_string_p, live_cons_p, live_symbol_p, live_float_p)
 +      (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
 +      (mark_stack, valid_pointer_p, make_pure_string)
 +      (Fgarbage_collect, survives_gc_p, gc_sweep):
 +      Use bool for booleans, instead of int.
 +      (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
 +      Remove unused local.
 +      * alloc.c (PURE_POINTER_P):
 +      * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
 +      * editfns.c (Fformat):
 +      * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
 +      (Fdo_auto_save):
 +      * fns.c (sweep_weak_table):
 +      * lisp.h (suppress_checking, push_message, survives_gc_p)
 +      (make_pure_string, gc_in_progress, abort_on_gc):
 +      * lread.c (readchar, read1):
 +      * print.c (Fprin1_to_string):
 +      * xdisp.c (push_message):
 +      Use bool for booleans affected directly or indirectly by
 +      alloc.c's changes.
 +
 +      Make recently-introduced setters macros.
 +      * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
 +      (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
 +      (set_fontset_default, set_fontset_fallback): Rename from their
 +      upper-case counterparts, and make them functions rather than macros.
 +      This is more consistent with the other recently-introduced setters.
 +      These don't need to be inline, since they're local.
 +
 +2012-08-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
 +      the loop (Bug#12247).
 +
 +2012-08-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h (vcopy): Use memcpy rather than our own loop.
 +      This fixes a performance regression introduced by the recent
 +      addition of vcopy.  This means 'vcopy' will need to be modified
 +      for a copying collector, but that's OK.  Also, tighten the
 +      checking in the assertion.
 +
 +2012-08-21  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32uniscribe.c (uniscribe_shape): Fix producing gstring
 +      components for RTL text (Bug#11860).  Adjust X-OFFSET of each
 +      non-base glyph for the width of the base character, according to
 +      what x_draw_composite_glyph_string_foreground expects.
 +      Generate WADJUST value according to composition_gstring_width's
 +      expectations, to produce correct width of the composed character.
 +      Reverse the sign of the DU offset produced by ScriptPlace.
 +
 +2012-08-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
 +
 +2012-08-21  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid direct writes to contents member of struct Lisp_Vector.
 +      * lisp.h (vcopy): New function to copy data into vector.
 +      * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
 +      * fns.c (Ffillarray): Use ASET.
 +      * keyboard.c (timer_check_2): Use AREF and ASET.
 +      (append_tool_bar_item, Frecent_keys): Use vcopy.
 +      * lread.c (read_vector): Use ASET.
 +      * msdos.c (Frecent_doskeys): Use vcopy.
 +      * xface.c (Finternal_copy_lisp_face): Use vcopy.
 +      (Finternal_merge_in_global_face): Use ASET and vcopy.
 +      * xfont.c (xfont_list_pattern): Likewise.
 +
 +2012-08-21  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fwindow_point): For the selected window always return
 +      the position of its buffer's point.
 +      (Fset_window_point): For the selected window always go in its
 +      buffer to the specified position.
 +
 +2012-08-21  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Setter macros for fontsets.
 +      * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
 +      (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
 +      (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
 +      Adjust users.
 +
 +2012-08-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
 +      Don't assume that `ln -f' works.
 +
 +2012-08-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
 +      and later about non-assignments with no effect.  See discussion at
 +      http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
 +      details.
 +
 +2012-08-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Inline setter functions for Lisp_Objects slots of struct specbinding.
 +      * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
 +      Adjust users.
 +
 +2012-08-20  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (select_window): Always make selected window's buffer
 +      current.
 +
 +2012-08-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use AREF and ASET for docstrings of category tables.
 +      * category.h (CATEGORY_DOCSTRING): Use AREF.
 +      (SET_CATEGORY_DOCSTRING): Use ASET.
 +      * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
 +
 +2012-08-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Inline setter functions for hash table members.
 +      * lisp.h (set_hash_key, set_hash_value, set_hash_next)
 +      (set_hash_hash, set_hash_index): Rename with _slot suffix.
 +      (set_hash_key_and_value, set_hash_index, set_hash_next)
 +      (set_hash_hash): New functions.
 +      * charset.c, fns.c: Adjust users.
 +
 +2012-08-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Inline getter and setter functions for per-buffer values.
 +      * buffer.h (per_buffer_default, set_per_buffer_default)
 +      (per_buffer_value, set_per_buffer_value): New functions.
 +      (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
 +      * buffer.c, data.c: Adjust users.
 +
 +2012-08-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
 +
 +2012-08-19  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Rely on <config.h> + <unistd.h> to declare 'environ',
 +      as gnulib does this if the system doesn't.
 +      * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
 +      Remove declaration.  MS-Windows declares it on stdlib.h which is
 +      included by conf_post.h.
 +      * emacs.c (environ) [DOUG_LEA_MALLOC]:
 +      * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
 +      * vm-limit.c: Include <unistd.h>, for 'environ'.
 +
 +      * unexaix.c, unexcoff.c: Include "mem-limits.h".
 +      (start_of_data): Remove decl; mem-limits.h provides it.
 +
 +      * xdisp.c (handle_invisible_prop): Make it a bit faster
 +      and avoid a gcc -Wmaybe-uninitialized diagnostic.
 +
 +2012-08-19  Chong Yidong  <cyd@gnu.org>
 +
 +      * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
 +      ends (Bug#3874).
 +
 +2012-08-19  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * .gdbinit: Use call instead of set when calling a function in the
 +      inferior.
 +
 +      * data.c (set_internal): Don't use set_blv_found.
 +      (Fkill_local_variable): Likewise.
 +
 +2012-08-18  Alp Aker  <alp.tekin.aker@gmail.com>
 +
 +      * nsfont.m (ns_ascii_average_width): Ensure the string
 +      ascii_printable is initialized with a null-terminated character
 +      array.  Otherwise, it can contain undesired extra characters.
 +
 +2012-08-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      port new setting code to Sun C 5.8 2005/10/13
 +      * chartab.c, lisp.h (char_table_set, char_table_set_range):
 +      Return void, not Lisp_Object.  Otherwise, the compiler
 +      complains about (A?B:C) where B is void and C is Lisp_Object
 +      when compiling CHAR_TABLE_SET, due to the recent change to
 +      the API of sub_char_table_set_contents.
 +
 +2012-08-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
 +      for the string case (Bug#3874).
 +
 +2012-08-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * buffer.h (BSET): Remove (Bug#12215).
 +      Replace all uses with calls to new setter functions.
 +      (bset_bidi_paragraph_direction, bset_case_canon_table)
 +      (bset_case_eqv_table, bset_directory, bset_display_count)
 +      (bset_display_time, bset_downcase_table)
 +      (bset_enable_multibyte_characters, bset_filename, bset_keymap)
 +      (bset_last_selected_window, bset_local_var_alist)
 +      (bset_mark_active, bset_point_before_scroll, bset_read_only)
 +      (bset_truncate_lines, bset_undo_list, bset_upcase_table)
 +      (bset_width_table):
 +      * buffer.c (bset_abbrev_mode, bset_abbrev_table)
 +      (bset_auto_fill_function, bset_auto_save_file_format)
 +      (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
 +      (bset_bidi_display_reordering, bset_buffer_file_coding_system)
 +      (bset_cache_long_line_scans, bset_case_fold_search)
 +      (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
 +      (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
 +      (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
 +      (bset_fringe_indicator_alist, bset_fringes_outside_margins)
 +      (bset_header_line_format, bset_indicate_buffer_boundaries)
 +      (bset_indicate_empty_lines, bset_invisibility_spec)
 +      (bset_left_fringe_width, bset_major_mode, bset_mark)
 +      (bset_minor_modes, bset_mode_line_format, bset_mode_name)
 +      (bset_name, bset_overwrite_mode, bset_pt_marker)
 +      (bset_right_fringe_width, bset_save_length)
 +      (bset_scroll_bar_width, bset_scroll_down_aggressively)
 +      (bset_scroll_up_aggressively, bset_selective_display)
 +      (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
 +      (bset_word_wrap, bset_zv_marker):
 +      * category.c (bset_category_table):
 +      * syntax.c (bset_syntax_table):
 +      New setter functions.
 +
 +      * process.h (PSET): Remove (Bug#12215).
 +      Replace all uses with calls to new setter functions.
 +      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
 +      (PROCESS_INLINE): New macro.
 +      (pset_childp): New setter function.
 +      (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
 +      * process.c (PROCESS_INLINE):
 +      Define to EXTERN_INLINE, so that the corresponding functions
 +      are compiled into code.
 +      (pset_buffer, pset_command, pset_decode_coding_system)
 +      (pset_decoding_buf, pset_encode_coding_system)
 +      (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
 +      (pset_plist, pset_sentinel, pset_status, pset_tty_name)
 +      (pset_type, pset_write_queue): New setter functions.
 +
 +      * window.h (WSET): Remove (Bug#12215).
 +      Replace all uses with calls to new setter functions.
 +      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
 +      (WINDOW_INLINE): New macro.
 +      (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
 +      (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
 +      (wset_total_lines, wset_vertical_scroll_bar)
 +      (wset_window_end_pos, wset_window_end_valid)
 +      (wset_window_end_vpos): New setter functions.
 +      * window.c (WINDOW_INLINE):
 +      Define to EXTERN_INLINE, so that the corresponding functions
 +      are compiled into code.
 +      (wset_combination_limit, wset_dedicated, wset_display_table)
 +      (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
 +      (wset_new_normal, wset_new_total, wset_next_buffers)
 +      (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
 +      (wset_prev_buffers, wset_right_fringe_width)
 +      (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
 +      (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
 +      (wset_window_parameters):
 +      * xdisp.c (wset_base_line_number, wset_base_line_pos)
 +      (wset_column_number_displayed, wset_region_showing):
 +      New setter functions.
 +
 +      * termhooks.h (TSET): Remove (Bug#12215).
 +      Replace all uses with calls to new setter functions.
 +      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
 +      (TERMHOOKS_INLINE): New macro.
 +      (tset_charset_list, tset_selection_alist): New setter functions.
 +      * terminal.c (TERMHOOKS_INLINE):
 +      Define to EXTERN_INLINE, so that the corresponding functions
 +      are compiled into code.
 +      (tset_param_alist): New setter function.
 +
 +2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * keyboard.h (KSET): Remove (Bug#12215).
 +      Replace all uses with calls to new setter functions.
 +      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
 +      (KEYBOARD_INLINE): New macro.
 +      (kset_default_minibuffer_frame, kset_defining_kbd_macro)
 +      (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
 +      (kset_prefix_arg, kset_system_key_alist, kset_window_system):
 +      New setter functions.
 +      * keyboard.c (KEYBOARD_INLINE):
 +      Define to EXTERN_INLINE, so that the corresponding functions
 +      are compiled into code.
 +      (kset_echo_string, kset_kbd_queue)
 +      (kset_keyboard_translate_table, kset_last_prefix_arg)
 +      (kset_last_repeatable_command, kset_local_function_key_map)
 +      (kset_overriding_terminal_local_map, kset_real_last_command)
 +      (kset_system_key_syms): New setter functions.
 +
 +      * frame.h (FSET): Remove (Bug#12215).
 +      Replace all uses with calls to new setter functions.
 +      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
 +      (FRAME_INLINE): New macro.
 +      (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
 +      (fset_current_tool_bar_string, fset_desired_tool_bar_string)
 +      (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
 +      (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
 +      (fset_param_alist, fset_root_window, fset_scroll_bars)
 +      (fset_selected_window, fset_title, fset_tool_bar_items)
 +      (fset_tool_bar_position, fset_tool_bar_window): New functions.
 +      * frame.c (FRAME_INLINE):
 +      Define to EXTERN_INLINE, so that the corresponding functions
 +      are compiled into code.
 +      (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
 +
 +      A few more naming-convention fixes for getters and setters.
 +      * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
 +      and rename from buffer_overlays_set_before.
 +      (set_buffer_overlays_after): Move here from buffer.h, and rename
 +      from buffer_overlays_set_after.
 +      * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
 +      All uses changed.
 +      (set_buffer_intervals): Rename from buffer_set_intervals.
 +      * intervals.c (set_interval_object): Move here from intervals.h,
 +      and rename from interval_set_object.
 +      (set_interval_left): Move here from intervals.h, and rename from
 +      interval_set_left.
 +      (set_interval_right): Move here from intervals.h, and rename from
 +      interval_set_right.
 +      (copy_interval_parent): Move here from intervals.h, and rename from
 +      interval_copy_parent.
 +      * intervals.h (set_interval_parent): Rename from interval_set_parent.
 +      (set_interval_plist): Rename from interval_set_plist.
 +      Return void, not Lisp_Object, since no caller uses the result.
 +      * lisp.h (string_intervals): Rename from string_get_intervals.
 +      (set_string_intervals): Rename from string_set_intervals.
 +
 +      * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
 +      (set_char_table_contents): Rename from char_table_set_contents.
 +      (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
 +      All uses changed.  See the end of
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
 +
 +      * lisp.h (CSET): Remove (Bug#12215).
 +      (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
 +      (set_char_table_purpose): New functions,
 +      replacing CSET.  All uses changed.  For example, replace
 +      "CSET (XCHAR_TABLE (char_table), parent, parent);" with
 +      "set_char_table_parent (char_table, parent);".
 +      The old version was confusing because it used the same name
 +      'parent' for two different things.
 +
 +2012-08-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Functions to get and set Lisp_Object fields of buffer-local variables.
 +      * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
 +      (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
 +      (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
 +      * data.c, eval.c, frame.c: Adjust users.
 +
 +2012-08-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * xfaces.c (merge_face_vectors): If the target font specfies a
 +      font spec, make the font's attributes take precedence over
 +      directly-specified attributes.
 +      (merge_face_ref): Recognize :font.
 +
 +2012-08-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Do not use memcpy for copying intervals.
 +      * intervals.c (reproduce_interval): New function.
 +      (reproduce_tree, reproduce_tree_obj): Use it.
 +      (reproduce_tree_obj): Remove prototype.
 +
 +2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h (duration_to_sec_usec): Remove unused decl.
 +
 +2012-08-17  Alp Aker  <alp.tekin.aker@gmail.com>
 +
 +      * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
 +      to an allocated instance of NSString, not to the class itself.
 +
 +2012-08-17  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (C_CTYPE_H): New macro.
 +      (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
 +      ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
 +      ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
 +
 +2012-08-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use ASCII tests for character types.
 +      * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
 +      * xfns.c, xterm.c:
 +      Don't include <ctype.h>; was not needed.
 +      * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
 +      * sysdep.c, xfaces.c:
 +      Include <c-ctype.h> instead of <ctype.h>.
 +      * nsterm.m: Include <c-ctype.h>.
 +      * charset.c (read_hex):
 +      * doc.c (Fsnarf_documentation):
 +      * fileio.c (IS_DRIVE) [WINDOWSNT]:
 +      (DRIVE_LETTER) [DOS_NT]:
 +      (Ffile_name_directory, Fexpand_file_name)
 +      (Fsubstitute_in_file_name):
 +      * font.c (font_parse_xlfd, font_parse_fcname):
 +      * frame.c (x_set_font_backend):
 +      * gtkutil.c (xg_get_font):
 +      * image.c (xbm_scan, xpm_scan, pbm_scan_number):
 +      * nsimage.m (hexchar):
 +      * nsterm.m (ns_xlfd_to_fontname):
 +      * sysdep.c (system_process_attributes):
 +      * xfaces.c (hash_string_case_insensitive):
 +      Use C-locale tests instead of locale-specific tests for character
 +      types, since we want the ASCII interpretation here, not the
 +      interpretation suitable for whatever happens to be the current locale.
 +
 +2012-08-16  Martin Rudalics  <rudalics@gmx.at>
 +
 +      Consistently check windows for validity/liveness
 +      (Bug#11984, Bug#12025, Bug#12026).
 +      * lisp.h (CHECK_VALID_WINDOW): New macro.
 +      * window.c (decode_window): Rename to decode_live_window.
 +      (decode_valid_window, Fwindow_valid_p): New functions.
 +      (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
 +      (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
 +      (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
 +      (Fwindow_prev_sibling, Fwindow_combination_limit)
 +      (Fset_window_combination_limit, Fwindow_use_time)
 +      (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
 +      (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
 +      (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
 +      (Fwindow_hscroll, Fset_window_hscroll)
 +      (Fwindow_redisplay_end_trigger)
 +      (Fset_window_redisplay_end_trigger, Fwindow_edges)
 +      (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
 +      (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
 +      (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
 +      (Fwindow_end, Fset_window_point, Fset_window_start)
 +      (Fpos_visible_in_window_p, Fwindow_line_height)
 +      (Fwindow_dedicated_p, Fset_window_dedicated_p)
 +      (Fwindow_prev_buffers, Fset_window_prev_buffers)
 +      (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
 +      (Fset_window_parameter, Fwindow_display_table)
 +      (Fset_window_display_table, Fdelete_other_windows_internal)
 +      (Fset_window_buffer, Fset_window_new_total)
 +      (Fset_window_new_normal, Fdelete_window_internal)
 +      (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
 +      (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
 +      (Fwindow_scroll_bars): Check whether argument window is a valid or
 +      live window.  Update doc-strings.
 +      (syms_of_window): New symbol Qwindow_valid_p.
 +      * keyboard.c (Fposn_at_x_y): Check whether argument
 +      frame_or_window denotes a valid window.
 +
 +2012-08-16  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix previous char table change.
 +      * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
 +      * chartab.c (optimize_sub_char_table): Likewise.
 +
 +2012-08-16  Chong Yidong  <cyd@gnu.org>
 +
 +      * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
 +
 +      * xfont.c (xfont_open):
 +      * xftfont.c (xftfont_open): Set the font's max_width field.
 +
 +      * nsfont.m (nsfont_open): Similar to the Xft backend, set
 +      min_width to space_width and average_width to the average over
 +      printable ASCII characters.
 +      (ns_char_width): Code cleanup.
 +      (ns_ascii_average_width): New utility function.
 +
 +      * font.h (struct font): Update comments.
 +
 +2012-08-16  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Simple interface to set Lisp_Object fields of character tables.
 +      * lisp.h (CSET): New macro.
 +      (char_table_set_extras, char_table_set_contents)
 +      (sub_char_table_set_contents): New function.
 +      * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
 +      * syntax.c: Adjust users.
 +
 +2012-08-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (eval_sub): Bind lexical-binding.
 +      * lread.c (Qlexical_binding): Make non-static.
 +
 +2012-08-15  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsmenu.m (popupSession): Remove.
 +      (pop_down_menu): Remove endModalSession.
 +      (timeout_handler:): New method.
 +      (runDialogAt:): Get next timeout.  Start a NSTimer with that timeout.
 +      Call runModalForWindow.  Check timer_fired when it returns.
 +      If not set, cancel timer and break out of loop.
 +      Otherwise loop again, with a new timeout.
 +
 +      * nsterm.m: Include fcntl.h if present.
 +      (fd_entry, t_readfds, inNsSelect): Remove.
 +      (select_writefds, select_valid, select_timeout, selfds)
 +      (select_mutex, apploopnr): Add.
 +      (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
 +      Otherwise call kbd_buffer_store_event.
 +      (ns_send_appdefined): Remove release of fd_entry.
 +      (ns_read_socket): Always send appdefined.  Remove inNsSelect check.
 +      Increment and decrement apploopnr.
 +      (ns_select): If no file descriptors, just do a NSTimer.
 +      Otherwise copy read/write masks and start select thread (fd_handler).
 +      Start main loop and wait for application defined event.
 +      Inform select thread to stop selecting after main loop is exited.
 +      (ns_term_init): Create selfds pipe and set non-blocking.
 +      Initialize select_mutex.  Start the select thread (fd_handler).
 +      (fd_handler:): Loop forever, wait for info from the main thread
 +      to either start or stop selecting.  When select returns, send
 +      and appdefined event.
 +      (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
 +      If not call kbd_buffer_store_event.
 +
 +      * nsterm.h (EmacsApp): fd_handler takes id argument.
 +      (EmacsDialogPanel): Add timer_fired and timeout_handler.
 +
 +      * gtkutil.c (xg_mark_data): Use FRAME_X_P.
 +
 +2012-08-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * region-cache.c (move_cache_gap): Update gap_len using the actual
 +      growth of the boundaries array.  Do not change cache_len.
 +      (Bug#12196)
 +
 +2012-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Generalize and cleanup font subsystem checks.
 +      * font.h (FONT_DEBUG, font_assert): Remove.
 +      * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
 +      Change font_assert to eassert.  Use eassert where appropriate.
 +
 +2012-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * gtkutil.c (xg_get_font): Use pango_units_to_double.
 +
 +2012-08-15  Chong Yidong  <cyd@gnu.org>
 +
 +      * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
 +      When using the new font chooser, use gtk_font_chooser_get_font_desc to
 +      extract the font descriptor instead of just the font name.
 +      In that case, return a font spec instead of a string.
 +      (x_last_font_name): Move to this file from xfns.c.
 +
 +      * xfns.c (Fx_select_font): The return value can also be a font
 +      spec.  Move x_last_font_name management to gtkutil.c.
 +
 +      * xfaces.c: Make font weight and style symbols non-static.
 +
 +2012-08-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
 +      (bug#12117).
 +
 +2012-08-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * alloc.c (Fgarbage_collect): Use plural form consistently.
 +
 +2012-08-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
 +      iteration through the command loop.  Fixes a problem whereby mouse
 +      movements are ignored until the first mouse click.
 +
 +2012-08-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use bool, not int, for Lisp booleans.
 +      This is more natural, and on my platform (GCC 4.7.1 x86-64) it
 +      makes Emacs a bit smaller and presumably a bit faster.
 +      * lisp.h: Include <stdbool.h>.
 +      (struct Lisp_Boolfwd, defvar_bool):
 +      * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
 +      * regex.c [!emacs]: Include <stdbool.h>.
 +      (false, true): Remove; <stdbool.h> does this for us now.
 +
 +2012-08-14  Chong Yidong  <cyd@gnu.org>
 +
 +      * character.c (Fcharacterp): Doc fix (Bug#12076).
 +
 +      * data.c (Findirect_variable): Doc fix (Bug#11040).
 +
 +      * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
 +
 +      * editfns.c (Fformat): Doc fix (Bug#12059).
 +      (Fsave_current_buffer): Doc fix (Bug#11542).
 +
 +2012-08-14  Barry OReilly  <gundaetiapo@gmail.com>  (tiny change)
 +
 +      * keyboard.c (access_keymap_keyremap): Accept anonymous functions
 +      (bug#12022).
 +
 +2012-08-14  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
 +      (delete_frame, Fmake_frame_invisible, Ficonify_frame):
 +      * minibuf.c (choose_minibuf_frame, read_minibuf):
 +      * w32fns.c (x_create_tip_frame):
 +      * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
 +      Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
 +
 +2012-08-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * intervals.c (offset_intervals): Remove obsolete comment.
 +
 +2012-08-14  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
 +
 +2012-08-14  Gergely Risko  <gergely@risko.hu>
 +
 +      * coding.c (decode_coding): Record buffer modification before
 +      disabling undo_list (Bug#11773).
 +
 +2012-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Revert and cleanup some recent overlay changes.
 +      * buffer.h (enum overlay_type): Remove.
 +      (buffer_get_overlays, buffer_set_overlays): Likewise.
 +      (buffer_set_overlays_before, buffer_set_overlays_after):
 +      New function.  Adjust users.
 +      (unchain_both): Add eassert.
 +
 +2012-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
 +
 +2012-08-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * gtkutil.c (xg_mark_data): Don't assume C99.
 +
 +2012-08-13  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_frame_tb_info): New struct.
 +      (TB_INFO_KEY): New define.
 +      (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
 +      (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
 +      (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
 +      if not present.
 +      (update_frame_tool_bar): Return early if data in xg_frame_tb_info
 +      is up to date.  Otherwise store new data.
 +      (free_frame_tool_bar): Free xg_frame_tb_info if present.
 +
 +2012-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use KSET for write access to Lisp_Object members of struct kboard.
 +      * keyboard.h (KSET): New macro.
 +      * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
 +      * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
 +      * xterm.c: Adjust users.
 +
 +2012-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use BSET for write access to Lisp_Object members of struct buffer.
 +      * buffer.h (BSET): New macro.
 +      * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
 +      * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
 +      * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
 +      * window.c, xdisp.c, xfns.c: Adjust users.
 +
 +2012-08-11  BT Templeton  <bpt@hcoop.net>  (tiny change)
 +
 +      * lread.c (syms_of_lread): Initialize Vlexical_binding.
 +
 +2012-08-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (not_in_argv): New function.
 +      (application:openFile, application:openTempFile:):
 +      (application:openFileWithoutUI:, application:openFiles:): Open file
 +      if not_in_argv returns non-zero (bug#12171).
 +
 +      * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
 +      (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
 +      Define for Gtk+ versions less than 3.2.
 +      (xg_get_font_name): Use those functions/macros here.
 +      Reported by Frans Oilinki <moilinki@gmail.com>.
 +
 +2012-08-11  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * unexmacosx.c (copy_data_segment): Copy initialized data in
 +      statically linked libraries from input file rather than memory.
 +
 +      * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
 +      LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
 +      (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
 +
 +2012-08-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
 +      * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
 +
 +2012-08-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix last change to allow compilation with low optimization levels.
 +      * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
 +      Reported by Jan Djärv <jan.h.d@swipnet.se>.
 +
 +2012-08-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use common inline syntax in intervals.h.
 +      * intervals.h (INTERVALS_INLINE): New macro.
 +      Change all users from LISP_INLINE.
 +
 +2012-08-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Define Qnone once for all platforms.
 +      * frame.c (Qnone): Define here.
 +      (syms_of_frame): DEFSYM it.
 +      * lisp.h (Qnone): New declaration.
 +      * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
 +      * xfns.c: Remove duplication.  Adjust users.
 +
 +2012-08-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Remove unused macros from intervals.h.
 +      * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
 +      * intervals.c: Adjust comment.
 +
 +2012-08-10  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c <w32_unicode_gui>: New static variable.
 +      (globals_of_w32fns): Initialize it according to os_subtype.
 +      (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
 +      testing os_subtype.
 +
 +2012-08-10  Joakim HÃ¥rsman  <joakim.harsman@gmail.com>  (tiny change)
 +          Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix bug #10299 with Unicode characters sent by customized
 +      keyboards created by MSKLC.
 +      * w32fns.c (INIT_WINDOW_CLASS): New macro.
 +      (w32_init_class): Use it to initialize the Emacs class with either
 +      ANSI or Unicode API calls.
 +      (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
 +      later.
 +      (w32_wnd_proc): If the character code sent by WM_CHAR or
 +      WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
 +      original message.  Call DefWindowProcW on NT and later.
 +
 +2012-08-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
 +
 +      * lisp.h (DIRECTORY_SEP): Let configure set it.
 +
 +2012-08-09  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use TSET for write access to Lisp_Object slots of struct terminal.
 +      * termhooks.h (TSET): New macro.
 +      * coding.c, terminal.c, xselect.c: Adjust users.
 +
 +2012-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * xdisp.c (safe_eval_handler): Remove prototype.  Receive args describing
 +      the failing expression, include them in the error message.
 +      * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
 +      * lisp.h (internal_condition_case_n): Update declaration.
 +
 +2012-08-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Inline functions to examine and change buffer overlays.
 +      * buffer.c (unchain_both): New function.
 +      * buffer.h (buffer_get_overlays, buffer_set_overlays):
 +      (buffer_has_overlays): New function.
 +      (enum overlay_type): New enum.
 +      * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
 +      * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
 +
 +2012-08-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Inline functions to examine and change buffer intervals.
 +      * alloc.c (mark_interval_tree): Remove.
 +      (MARK_INTERVAL_TREE): Simplify.
 +      (UNMARK_BALANCE_INTERVALS): Remove.  Adjust users.
 +      * intervals.c (buffer_balance_intervals): New function.
 +      (graft_intervals_into_buffer): Adjust indentation.
 +      (set_intervals_multibyte): Simplify.
 +      * buffer.h (BUF_INTERVALS): Remove.
 +      (buffer_get_intervals, buffer_set_intervals): New function.
 +      * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
 +      * intervals.c, textprop.c: Adjust users.
 +
 +2012-08-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Inline functions to examine and change string intervals.
 +      * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
 +      (string_get_intervals, string_set_intervals): New function.
 +      * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
 +      * lread.c, print.c, textprop.c: Adjust users.
 +
 +2012-08-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.mk (lisp): Remove language/persian.elc.
 +
 +2012-08-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup intervals.
 +      * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
 +      (NULL_INTERVAL_P): Likewise.  Adjust users.
 +      (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
 +      Adjust comment.  Move under #if 0.
 +      * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
 +      * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
 +
 +2012-08-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Check total length of intervals with eassert.
 +      * intervals.h (CHECK_TOTAL_LENGTH): Remove.
 +      * intervals.c: Change all users to eassert.
 +
 +2012-08-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
 +      Rename fields to match removal of FGET and WGET and disuse of
 +      INTERNAL_FIELD in Lisp_Cons.
 +
 +2012-08-07  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
 +      * lisp.h (struct Lisp_Symbol): Change xname to meaningful
 +      name since all xname users are fixed long time ago.  Do not
 +      use INTERNAL_FIELD.
 +      (set_symbol_name, set_symbol_function, set_symbol_plist):
 +      (set_symbol_next, set_overlay_plist): New function.
 +      (struct Lisp_Cons): Do not use INTERNAL_FIELD.
 +      (struct Lisp_Overlay): Likewise.
 +      (CVAR, MVAR, SVAR): Remove.
 +      * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
 +      * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
 +      * xterm.c: Adjust users.
 +      * .gdbinit: Change to use name field of struct Lisp_Symbol
 +      where appropriate.
 +
 +2012-08-07  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Basic functions to set Lisp_Object and pointer slots of intervals.
 +      * intervals.h (interval_set_parent, interval_set_object):
 +      (interval_set_left, interval_set_right, interval_set_plist):
 +      (interval_copy_parent): New function.
 +      (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
 +      (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
 +      Adjust indentation.
 +      (INTERVAL_SIZE): Remove.  Adjust users.
 +      * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
 +
 +2012-08-07  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
 +      * process.h (PGET): Remove.
 +      (struct Lisp_Process): Do not use INTERNAL_FIELD.
 +      * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
 +
 +2012-08-07  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Drop WGET and revert read access to Lisp_Objects slots of struct window.
 +      * window.h (WGET): Remove.
 +      (struct window): Do not use INTERNAL_FIELD.
 +      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
 +      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
 +      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
 +      * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
 +      * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
 +      Adjust users.
 +
 +2012-08-07  Chong Yidong  <cyd@gnu.org>
 +
 +      * window.c (Fwindow_edges, Fwindow_pixel_edges)
 +      (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
 +      (Fdelete_window_internal): Signal an error if the window is not on
 +      a live frame (Bug#12025).
 +
 +2012-08-07  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Drop FGET and revert read access to Lisp_Objects slots of struct frame.
 +      * frame.h (FGET): Remove.
 +      (struct frame): Do not use INTERNAL_FIELD.
 +      * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
 +      * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
 +      * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
 +      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
 +
 +2012-08-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32.c: Silence compiler warnings.
 +      (map_w32_filename): Remove unused variable `is_fat'.
 +      (chase_symlinks): Add parentheses around expression.
 +
 +2012-08-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * sysdep.c: Respect BROKEN_GETWD.
 +
 +      * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
 +      Let configure handle it.
 +      (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use GCALIGNMENT where appropriate.
 +      * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
 +      (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
 +      (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
 +
 +2012-08-06  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32menu.c (set_frame_menubar, initialize_frame_menubar):
 +      Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
 +
 +2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * buffer.h (struct buffer): Revert `indirections' to a simple int;
 +      that should be sufficient for everyone.
 +
 +2012-08-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * keyboard.c (timer_check_2): Add break so timer_check returns next
 +      timeout.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix Windows build errors introduced after converting to WGET and WSET.
 +      * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
 +      Reported by Andy Moreton <andrewjmoreton@gmail.com>.
 +
 +2012-08-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_frame_rehighlight): Use FSET.
 +
 +      * nsmenu.m (ns_update_menubar): Use FSET.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Separate read and write access to Lisp_Object slots of Lisp_Process.
 +      * process.h (PGET, PSET): New macros similar to AREF and ASET.
 +      * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Separate read and write access to Lisp_Object slots of struct window.
 +      * window.h (WGET, WSET): New macros similar to AREF and ASET.
 +      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
 +      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
 +      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
 +      * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
 +      * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
 +      Adjust users.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix Windows build errors introduced after converting to FGET and FSET.
 +      * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
 +      (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
 +      (w32_judge_scroll_bars): Change to use FSET.
 +      Reported by Andy Moreton <andrewjmoreton@gmail.com>.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix replacement typo.
 +      * window.c (replace_window): Set root_window instead of
 +      selected_window.  This fixes a total window subsystem
 +      malfunction reported by Bastien Guerry <bzg@gnu.org>.
 +
 +2012-08-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.mk (lisp): Add language/persian.elc.
 +
 +2012-08-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Separate read and write access to Lisp_Object slots of struct frame.
 +      * frame.h (FGET, FSET): New macros similar to AREF and ASET.
 +      * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
 +      * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
 +      * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
 +      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
 +
 +2012-08-05  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
 +
 +2012-08-05  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Generalize common compile-time constants.
 +      * lisp.h (header_size, bool_header_size, word_size): Now here.
 +      (struct Lisp_Vector): Add comment.
 +      (struct Lisp_Bool_Vector): Move up to define handy constants.
 +      (VECSIZE, PSEUDOVECSIZE): Simplify.
 +      (SAFE_ALLOCA_LISP): Use new constant.  Adjust indentation.
 +      * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
 +      * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
 +      * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
 +      * xfont.c, xmenu.c: Use word_size where appropriate.
 +
 +2012-08-05  Lawrence Mitchell  <wence@gmx.li>
 +
 +      * search.c (Freplace_match): Treat \? in the replacement text
 +      literally (Bug#8161).
 +
 +2012-08-05  Chong Yidong  <cyd@gnu.org>
 +
 +      * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
 +      * frame.c (Vdelete_frame_functions):
 +      * emacs.c (Vkill_emacs_hook): Doc fix.
 +
 +2012-08-04  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xfns.c (x_set_menu_bar_lines): Fix compilation error in
 +      --with-x-toolkit=no builds.
 +      Reported by Carsten Mattner <carstenmattner@gmail.com>.
 +
 +2012-08-04  Chong Yidong  <cyd@gnu.org>
 +
 +      * syntax.c (Fmodify_syntax_entry): Doc fix.
 +
 +2012-08-04  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix startup warnings about ../site-lisp on MS-Windows.  (Bug#11959)
 +      * w32.c (init_environment): Change the default values of many
 +      environment variables in dflt_envvars[] to NULL, to avoid pushing
 +      them into environment when they were not already defined.
 +      Remove the code that deletes site-lisp subdirectories from the default
 +      value of EMACSLOADPATH, as it is no longer needed.
 +      (check_windows_init_file): Now external, not static.
 +      Use Vload_path as is, without adding anything, as this function is now
 +      called when Vload_path is already set up.
 +
 +      * w32.h (check_windows_init_file): Add prototype.
 +
 +      * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
 +      directory, ignore the /*/i386/ tail in Vinvocation_directory, for
 +      compatibility with Posix platforms.
 +      (main): Move the call to check_windows_init_file to here from
 +      w32.c.
 +      (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
 +      any, in the DEFALT argument into the root of the Emacs build or
 +      installation tree, as appropriate.
 +
 +      * callproc.c (init_callproc_1): Call decode_env_path instead of
 +      doing its equivalent by hand.
 +      (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
 +      the code that sets Vexec_path run on MS-Windows.
 +
 +      * lread.c (init_lread): Add comments to #ifdef's.
 +
 +      * msdos.c (dos_set_window_size, IT_update_begin)
 +      (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
 +      instead of direct references.
 +
 +2012-08-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Export DEFAULT_REHASH_* to GDB.
 +      * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
 +      Now constants, not macros.
 +
 +2012-08-03  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove unnecessary casts involving pointers.
 +      These casts are no longer needed now that we assume C89 or later,
 +      since they involve casting to or from void *.
 +      * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
 +      (make_pure_float, make_pure_vector):
 +      * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
 +      * macros.c (Fstart_kbd_macro):
 +      * menu.c (find_and_return_menu_selection):
 +      * minibuf.c (read_minibuf_noninteractive):
 +      * sysdep.c (closedir):
 +      * xdisp.c (x_produce_glyphs):
 +      * xfaces.c (compare_fonts_by_sort_order):
 +      * xfns.c (x_real_positions, select_visual):
 +      * xselect.c (x_stop_queuing_selection_requests)
 +      (x_get_window_property, x_get_window_property_as_lisp_data):
 +      * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
 +      Remove unnecessary pointer casts.
 +      * alloc.c (record_xmalloc): New function.
 +      * lisp.h (record_xmalloc): New decl.
 +      (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
 +      more like a function.  This is because the pointer cast is not
 +      needed.  All uses changed.
 +      * print.c (print_string, print_error_message): Avoid length recalc.
 +
 +      Improve fix for macroexp crash with debugging (Bug#12118).
 +      * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
 +      ARRAY_MARK_FLAG when checking subscripts, because ASET is
 +      not supposed to be invoked from the garbage collector.
 +      See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
 +      (gc_aset): New function, which is like ASET but can be
 +      used in the garbage collector.
 +      (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
 +      (set_hash_index): Use it instead of ASET.
 +
 +2012-08-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Support symlinks on latest versions of MS-Windows.
 +      * w32.c: Include winioctl.h and aclapi.h.
 +      (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
 +      (revert_to_self): Forward declarations of static functions.
 +      <static BOOL g_b_init_get_security_info>:
 +      <g_b_init_create_symbolic_link>: New static flags.
 +      (globals_of_w32): Initialize them to zero.
 +      (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
 +      (map_w32_filename): Improve commentary.  Simplify switch.
 +      (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
 +      headers (most versions of MinGW w32api don't).
 +      (get_security_info, create_symbolic_link)
 +      (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
 +      New functions.
 +      (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
 +      in the argument file name.
 +      (sys_access): Call unc_volume_file_attributes only if
 +      GetFileAttributes fails with network-related error codes.
 +      (sys_rename): Diagnose renaming of a symlink when the user doesn't
 +      have the required privileges.
 +      (get_file_security_desc_by_name): Rename from
 +      get_file_security_desc.
 +      (stat_worker): New function, with most of the guts of 'stat', and
 +      with addition of handling of symlinks and support for 'lstat'.
 +      If possible, get file's attributes and security information by
 +      handle, not by name.  Produce S_IFLNK bit for symlinks, when
 +      called from 'lstat'.
 +      (stat, lstat): New functions, call 'stat_worker'.
 +      (symlink, readlink, careadlinkat): Rewritten to create and resolve
 +      symlinks when the underlying filesystem supports them.
 +
 +2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix macroexp crash on Windows with debugging (Bug#12118).
 +      * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
 +      checking subscripts; problem introduced with the recent
 +      "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
 +      (ARRAY_MARK_FLAG): Now a macro as well as a constant,
 +      since it's used in non-static inline functions now.
 +
 +      * xfaces.c (face_at_buffer_position, face_for_overlay_string):
 +      Don't assume buffer size fits in 'int'.  Remove unused local.
 +
 +      Use C99-style 'extern inline' if available.
 +      * buffer.h (BUFFER_INLINE):
 +      * category.h (CATEGORY_INLINE):
 +      * character.h (CHARACTER_INLINE):
 +      * charset.h (CHARSET_INLINE):
 +      * composite.h (COMPOSITE_INLINE):
 +      * dispextern.h (DISPEXTERN_INLINE):
 +      * lisp.h (LISP_INLINE):
 +      * systime.h (SYSTIME_INLINE):
 +      New macro, replacing 'static inline' in this header.
 +      * buffer.h, category.h, character.h, charset.h, composite.h:
 +      * dispextern.h, lisp.h, systime.h:
 +      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
 +      * alloc.c (LISP_INLINE):
 +      * buffer.c (BUFFER_INLINE):
 +      * category.c (CATEGORY_INLINE):
 +      * character.c (CHARACTER_INLINE):
 +      * charset.c (CHARSET_INLINE):
 +      * composite.c (COMPOSITE_INLINE):
 +      * dispnew.c (DISPEXTERN_INLINE):
 +      * sysdep.c (SYSTIME_INLINE):
 +      Define to EXTERN_INLINE, so that the corresponding functions
 +      are compiled into code.
 +      * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
 +      (INLINE_HEADER_END): New macros.
 +      * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
 +      since it's used in non-static inline functions now.
 +      (VALMASK) [!USE_LSB_TAG]: Likewise.
 +
 +2012-08-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/: Remove empty directory.
 +
 +      * s/ms-w32.h: Move to ../nt/inc.
 +      * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
 +      Update for new ms-w32.h location.
 +
 +2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port to Solaris 8.
 +      * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
 +
 +2012-08-02  Glenn Morris  <rgm@gnu.org>
 +
 +      * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
 +      hard-coding the path separator.
 +
 +2012-08-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
 +      This how ASET and AREF are supposed to work, and makes
 +      it easier to think about future improvements.  See
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
 +      * charset.h (set_charset_attr): New function.
 +      All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
 +      * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
 +      (aref_addr): New function.  All uses of &AREF(...) changed.
 +      (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
 +      (set_hash_index): New functions.  All lvalue-style uses of
 +      HASH_KEY etc. changed.
 +      * keyboard.c (set_prop): New function.  All lvalue-style uses
 +      of PROP changed.
 +
 +2012-08-01  Alp Aker  <alp.tekin.aker@gmail.com>
 +
 +      * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
 +      (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
 +      (EmacsScroller-dealloc):  Adjust to use WVAR.  (Bug#12114)
 +      * nsfns.m (ns_set_name_as_filename): Likewise.
 +      * nsmenu.m (ns_update_menubar): Likewise.
 +      * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
 +
 +2012-08-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
 +      Adapt to latest changes in field names of the corresponding Lisp
 +      objects.
 +
 +      * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
 +
 +2012-08-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/msdos.h: Remove file.
 +      * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
 +      * Makefile.in (S_FILE): Remove.
 +      (config_h): Remove S_FILE.
 +
 +2012-08-01  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
 +      Remove; moved to nt/config.nt.
 +
 +2012-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use INTERNAL_FIELD for conses and overlays.
 +      * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
 +      Remove obsolete comment.
 +      (MVAR): New macro.
 +      (struct Lisp_Overlay): Use INTERNAL_FIELD.
 +      * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
 +
 +2012-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use INTERNAL_FIELD for symbols.
 +      * lisp.h (SVAR): New macro.  Adjust users.
 +      * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
 +      * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
 +
 +2012-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use INTERNAL_FIELD for processes.
 +      * process.h (PVAR): New macro.  Adjust style.
 +      (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
 +      * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
 +
 +2012-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use INTERNAL_FIELD for windows.
 +      * window.h (WVAR): New macro.
 +      (struct window): Change Lisp_Object members to INTERNAL_FIELD.
 +      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
 +      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
 +      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
 +      * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
 +      * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
 +
 +2012-08-01  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
 +
 +2012-08-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
 +      Move to configure.ac.
 +
 +2012-08-01  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (CONFIG_H): Update dependencies.
 +      (CONF_POST_H): New macro.
 +
 +      * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
 +
 +2012-07-31  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (S_FILE): No longer set by configure.
 +
 +      * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
 +      is available.
 +      (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
 +
 +      * process.h (NULL_DEVICE):
 +      * emacs.c (SEPCHAR):
 +      * editfns.c (USER_FULL_NAME): Let configure set them.
 +
 +      * s/README, s/template.h: Remove files.
 +
 +      * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
 +
 +      * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
 +      Move to configure.ac.
 +
 +2012-07-31  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * .gdbinit (xframe): Adapt to introduction of FVAR and the
 +      resulting renaming of 'struct frame' members.
 +
 +      * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
 +
 +      * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
 +      after introduction of FVAR.
 +
 +2012-07-31  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
 +
 +      * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
 +      instead of compositeToPoint.
 +      (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
 +
 +      * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
 +
 +2012-07-31  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Generalize INTERNAL_FIELD between buffers, keyboards and frames.
 +      * lisp.h (INTERNAL_FIELD): New macro.
 +      * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
 +      (BVAR): Change to use INTERNAL_FIELD.
 +      * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
 +      (KVAR): Change to use INTERNAL_FIELD.
 +      * frame.h (FVAR): New macro.
 +      (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
 +      * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
 +      * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
 +      * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
 +      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
 +
 +2012-07-31  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Miscellaneous fixes for non-default X toolkits.
 +      * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
 +      * xterm.c (x_frame_of_widget): Remove redundant prototype.
 +      Move under #ifdef USE_LUCID.
 +      (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
 +      definition and usage to avoid warnings.
 +
 +2012-07-31  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (openFiles): Fix previous checkin.
 +
 +2012-07-31  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * indent.c (compute_motion): Remove unused local.
 +
 +2012-07-31  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
 +
 +      * conf_post.h [USG5_4]:
 +      Move remaining contents of s/usg5-4-common.h here.
 +      * s/usg5-4-common.h: Remove file.
 +
 +      * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
 +      * s/irix6-5.h: Remove file.
 +
 +      * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
 +      * s/darwin.h: Remove file.
 +
 +      * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
 +      * s/hpux10-20.h: Remove file, which is now empty.
 +
 +2012-07-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * conf_post.h: New, split from configure.ac's AH_BOTTOM.
 +      * Makefile.in (config_h): Add conf_post.h.
 +      * makefile.w32-in (CONFIG_H): Add conf_post.h.
 +
 +2012-07-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_do_open_file): New variable.
 +      (ns_term_init): Set ns_do_open_file to YES after run returns.
 +      (openFile, openTempFile, openFileWithoutUI, openFiles):
 +      Open files only if ns_do_open_file.
 +
 +2012-07-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h (SWITCH_ENUM_CAST): Remove.  All uses removed.
 +      This no-op macro hasn't been needed for many years.
 +      * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
 +
 +      Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
 +      * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
 +      * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
 +      gdb_make_enums_visible.
 +      (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
 +      (DIRECTORY_SEP): Now a constant, not a macro.
 +
 +2012-07-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
 +      w32_kbd_patch_key as the 2nd arg.  (Bug#12082)
 +
 +      * w32term.c <w32_keyboard_codepage>: Renamed from
 +      keyboard_codepage and now external.  All users changed.
 +
 +      * w32term.h: Add declaration of w32_keyboard_codepage.
 +
 +      * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
 +      the codepage to translate keys to Unicode.  If this argument is
 +      -1, use the value returned by GetConsoleCP.  All callers changed.
 +
 +2012-07-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Update .PHONY listings in makefiles.
 +      * Makefile.in (.PHONY): Add all, mostlyclean, clean,
 +      bootstrap-clean, distclean, maintainer-clean, versioclean,
 +      extraclean, frc.
 +
 +      * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
 +      This is a bit clearer.  Fix some commentary typos.
 +
 +2012-07-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/netbsd.h: Let configure include signal.h if needed.
 +      Remove file, which is now empty.
 +
 +      * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
 +      Let configure set them.
 +      * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
 +      No more need to undefine.
 +
 +2012-07-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * keymap.c (Fkey_description): Don't remove 0x80 bit from
 +      non-single-byte char when adding meta modifier.  (Bug#12090)
 +
 +2012-07-30  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Convert safe_call to use variable number of arguments.
 +      * xdisp.c (safe_call): Convert to use varargs.  Adjust users.
 +      (safe_call2): Fix comment.
 +      * lisp.h (safe_call): Adjust prototype.
 +      * coding.c (encode_coding_object): Change to use safe_call2.
 +      * xfaces.c (merge_face_heights): Change to use safe_call1.
 +
 +2012-07-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
 +      does that unconditionally.  Remove file, which is now empty.
 +
 +      * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
 +      Remove empty files.
 +
 +2012-07-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Export to GDB most of lisp.h's remaining object-like macros.
 +      * lisp.h (min, max): Move earlier, because they're used earlier now.
 +      (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
 +      (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
 +      (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
 +      (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
 +      (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
 +      (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
 +      (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
 +      (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
 +      Now constants, for GDB.  They need not be macros.
 +      (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
 +      Now constants, for GDB, as well as macros, for static initializers.
 +      (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
 +      Move to after the definition of struct Lisp_Char_Table,
 +      since the former now needs that type defined.
 +      (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
 +      (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
 +      (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
 +      New enums, for gdb_make_enums_visible.
 +      (GLYPH_MODE_LINE_FACE): Remove; unused.
 +      * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
 +      (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
 +      CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
 +      enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
 +      enum maxargs, enum MAX_ALLOCA.
 +      (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
 +      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
 +      no longer needed, now that they are done in lisp.h.
 +
 +2012-07-30  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup string bytes checking.
 +      * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove.  Convert
 +      all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
 +      (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
 +      (check_sblock, compact_small_strings): Simplify.
 +
 +2012-07-29  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
 +      These macros are confusing and no longer need to be defined, as
 +      the enum values now suffice.  All uses replaced with definiens.
 +      (Lisp_Int1, Lisp_String): Define directly; this is clearer.
 +
 +2012-07-29  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
 +      ($(BLD)/w32console.$(O)): Update dependencies.
 +
 +2012-07-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
 +      * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
 +      time.  Adjust users.
 +      (CHECK_CONS_LIST): Remove.  Convert all users to check_cons_list.
 +
 +2012-07-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
 +      setting sitelisp (Bug#12010).
 +
 +2012-07-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
 +
 +      * w32heap.c (cache_system_info):
 +      * w32.c (sys_rename):
 +      * w32proc.c (find_child_console, sys_kill): All users changed.
 +
 +2012-07-29  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
 +
 +2012-07-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
 +
 +2012-07-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup statistics calculation in Fgarbage_collect.
 +      * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
 +      Fix zombies percentage calculation.  Simplify elapsed time calculation.
 +
 +2012-07-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Generalize marker debugging code under MARKER_DEBUG and use eassert.
 +      * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
 +      (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
 +      (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
 +      (replace_range, replace_range_2, del_range_2): Change to eassert.
 +      * marker.c (byte_char_debug_check): Adjust style.
 +
 +2012-07-29  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Don't use the abbreviation "win" to refer to Windows (Bug#10421).
 +      * regex.c (MAX_BUF_SIZE): Remove some incorrect and
 +      long-ago-commented-out code that talks about "WIN32".
 +      * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
 +      All uses changed.
 +
 +2012-07-28  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use Gnulib stdalign module (Bug#9772, Bug#9960).
 +      * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
 +      Simplify by using alignof.
 +      (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
 +      * lisp.h: Include <stdalign.h>.
 +      (GCALIGNMENT): New macro and constant.
 +      (DECL_ALIGN): Remove.  All uses replaced by alignas (GCALIGNMENT).
 +      (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
 +      (stdalign): New macro, if not already defined.
 +
 +2012-07-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix non-ASCII input in non-GUI frames on MS-Windows.  (Bug#12055)
 +      * w32inevt.c: Include w32inevt.h.
 +      (w32_read_console_input): New inline function, calls either
 +      ReadConsoleInputA or ReadConsoleInputW, depending on the value of
 +      w32_console_unicode_input.
 +      (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
 +      (w32_kbd_patch_key, key_event): Use the codepage returned by
 +      GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
 +      (key_event): use uChar.UnicodeChar only if
 +      w32_console_unicode_input is non-zero.
 +
 +      * w32console.c: Include w32heap.h.
 +      <w32_console_unicode_input>: New global variable.
 +      (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
 +      family of Windows, zero otherwise.
 +
 +      * w32inevt.h: Declare w32_console_unicode_input.
 +
 +      * xdisp.c (init_iterator): Don't reference tip_frame in a build
 +      --without-x.  (Bug#11742)
 +
 +2012-07-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Adjust GDB to reflect pvec_type changes (Bug#12036).
 +      * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
 +      2012-07-04 changes to pseudovector representation.
 +      Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
 +
 +2012-07-27  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
 +      bus address.
 +      (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
 +
 +2012-07-27  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * alloc.c (listn): Fix the order the arguments are consed onto the
 +      list.
 +
 +      * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
 +      enumeration constants, as PURE and HEAP are too general, and clash
 +      with other headers and sources, such as gmalloc.c and the
 +      MS-Windows system headers.  All users changed.
 +
 +2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Revert last save_excursion_save and save_excursion_restore changes.
 +      * alloc.c, editfns.c, marker.c, lisp.h: Revert.
 +      Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
 +
 +2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix recently-introduced typos in Windows port.
 +      Reported by Martin Rudalics <rudalics@gmx.at>.
 +      * w32.c (init_environment): Replace comma with semicolon.
 +      * w32fns.c (syms_of_w32fns): Add missing parenthesis.
 +
 +2012-07-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Improve GDB symbol export (Bug#12036).
 +      * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
 +      arms of an 'if', not using conditional expressions; otherwise GDB
 +      complains about the types in the unevaluated arm when the argument
 +      is an integer literal.
 +      (xgetint): Simplify expression.
 +      * alloc.c (gdb_make_enums_visible): New constant.  This ports to
 +      GCC 3.4.2 the export of symbols to GDB.  Problem reported by Eli
 +      Zaretskii in <http://bugs.gnu.org/12036#13>.
 +      * lisp.h (PUBLISH_TO_GDB): Remove.  All uses removed.  No longer
 +      needed now that we have gdb_make_enums_visible.
 +      (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
 +      (enum enum_USE_LSB_TAG):
 +      New enum types, packaging up enums that need to be exported to GDB.
 +
 +2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Utility function to make a list from specified amount of objects.
 +      * lisp.h (enum constype): New datatype.
 +      (listn): New prototype.
 +      * alloc.c (listn): New function.
 +      (Fmemory_use_count, syms_of_alloc): Use it.
 +      * buffer.c (syms_of_buffer): Likewise.
 +      * callint.c (syms_of_callint): Likewise.
 +      * charset.c (define_charset_internal): Likewise.
 +      * coding.c (syms_of_coding): Likewise.
 +      * keymap.c (syms_of_keymap): Likewise.
 +      * search.c (syms_of_search): Likewise.
 +      * syntax.c (syms_of_syntax): Likewise.
 +      * w32.c (init_environment): Likewise.
 +      * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
 +      * xdisp.c (syms_of_xdisp): Likewise.
 +      * xfns.c (syms_of_xfns): Likewise.
 +
 +2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fast save_excursion_save and save_excursion_restore.
 +      * lisp.h (struct Lisp_Excursion): New data type.
 +      (PVEC_EXCURSION): New pseudovector type.
 +      (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
 +      to deal with it.  Adjust comments.
 +      (init_marker, attach_marker): New prototype.
 +      (unchain_marker): Adjust prototype.
 +      * marker.c (attach_marker): Change to global.
 +      (init_marker): New function.
 +      * alloc.c (Fmake_marker, build_marker): Use it.
 +      (build_marker): More easserts.
 +      (mark_object): Handle struct Lisp_Excursion.
 +      * editfns.c (save_excursion_save, save_excursion_restore):
 +      Reimplement to use struct Lisp_Excursion.  Add comments.
 +
 +2012-07-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix export of symbols to GDB (Bug#12036).
 +      * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
 +      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
 +      emacs.c, as this is a more-suitable home.  Had this been done earlier
 +      the fix for 12036 would have avoided some of the problems noted in
 +      <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
 +      would have been more obvious.
 +      * emacs.c: Do not include <verify.h>; no longer needed.
 +      (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
 +      (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
 +      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
 +      Remove; now done in lisp.h.
 +      * lisp.h (PUBLISH_TO_GDB): New macro.
 +      (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
 +      (DATA_SEG_BITS): Use it.
 +      (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
 +      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
 +      * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
 +      not be usable in #if.  This simplifies things.
 +
 +2012-07-26  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
 +
 +2012-07-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Simplify export of symbols to GDB (Bug#12036).
 +      * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
 +      $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
 +      (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
 +      Adjust to changes in lisp.h and emacs.c, by using
 +      CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
 +      of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
 +      INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
 +      gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
 +      instead of gdb_valbits.
 +      (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
 +      PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
 +      instead of gdb_array_mark_flag.
 +      (xboolvector): Get size from $->size, not $->header.size.
 +      Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
 +      (xreload, hook-run, hookpost-run): Remove.
 +      * emacs.c: Include <verify.h>.
 +      (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
 +      (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
 +      Remove.
 +      (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
 +      (gdb_USE_LSB_TAG): New enum constants.
 +      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
 +      Also define these as enum constants, so they're visible to GDB.
 +      (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
 +      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
 +      as constants, so they're visible to GDB.
 +      * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
 +      (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
 +      Now enum constants, not macros, so they're visible to GDB.
 +      (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
 +      more convenient now.  All uses changed.
 +      (VALMASK) [USE_LSB_TAG]: Also define in this case.
 +      * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
 +
 +2012-07-26  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Explicitly free restriction data that are not needed anymore.
 +      * editfns.c (save_restriction_restore): Free restriction data.
 +
 +2012-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
 +      add argument, tune behavior, and adjust all callers.
 +
 +2012-07-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use typedef for EMACS_INT, EMACS_UINT.
 +      * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
 +      than macros.  This simplifies debugging in the usual case, since
 +      it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
 +      and it allows expressions involving EMACS_INT casts.
 +      * .gdbinit (xreload): Simplify by using EMACS_INT cast.
 +
 +2012-07-25  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (ns_read_socket): Return early if there is a modal
 +      window (Bug#12043).
 +
 +2012-07-25  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * frame.c (Fredirect_frame_focus): In doc-string don't mention
 +      that FOCUS-FRAME can be omitted.
 +
 +2012-07-25  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Adjust buffer text indirection counters at the end of Fkill_buffer.
 +      * buffer.c (Fkill_buffer): Adjust indirection counters when the
 +      buffer is definitely dead.  This should really fix an issue reported
 +      by Christoph Scholtes again.  (Bug#12007).
 +      (init_buffer_once): Initialize indirection counters of
 +      buffer_defaults and buffer_local_symbols (for sanity and safety).
 +
 +2012-07-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (init_iterator): Don't compute dimensions of truncation
 +      and continuation glyphs on tooltip frames, leave them at zero.
 +      Avoids continued lines in tooltips.  (Bug#11832)
 +
 +2012-07-24  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Simplify copy_overlay.
 +      * buffer.c (copy_overlay): Simplify.  Use build_marker.
 +      * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
 +
 +2012-07-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * print.c (print_object): Don't crash when a frame's name is nil
 +      or invalid.  (Bug#12025)
 +
 +      * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
 +      it signals an error when a tooltip frame is being created.
 +
 +2012-07-23  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup miscellaneous objects allocation and initialization.
 +      * alloc.c (allocate_misc): Change to static.  Add argument to
 +      specify the subtype.  Adjust comment and users.
 +      (build_overlay): New function.
 +      * buffer.c (copy_overlays, Fmake_overlay): Use it.
 +      * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
 +      (allocate_misc): Remove prototype.
 +      (build_overlay): Add prototype.
 +
 +2012-07-23  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Swap buffer text indirection counters in Fbuffer_swap_text.
 +      * buffer.c (Fbuffer_swap_text): Swap indirections too.
 +      This avoids crash reported by Christoph Scholtes at
 +      http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
 +
 +2012-07-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsmenu.m (Popdown_data): New struct.
 +      (pop_down_menu): p->pointer is Popdown_data.  Release the pool and
 +      free Popdown_data.
 +      (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
 +      (initWithContentRect): Make imgView and contentView non-static
 +      and autorelease them.  Also autorelease img and matrix (Bug#12005).
 +      (dealloc): Remove (Bug#12005).
 +
 +2012-07-22  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Adjust consing_since_gc when objects are explicitly freed.
 +      * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
 +      (Fgarbage_collect): Use it.  Change minimum to 1/10 of default.
 +      (free_cons, free_misc): Subtract object size from consing_since_gc.
 +
 +2012-07-22  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Simplify and cleanup markers positioning code.
 +      * marker.c (attach_marker): More useful eassert.
 +      (live_buffer, set_marker_internal): New function.
 +      (Fset_marker, set_marker_restricted): Use set_marker_internal.
 +      (set_marker_both, set_marker_restricted_both): Use live_buffer.
 +
 +2012-07-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
 +      as it's limited by the amount of memory, not by INT_MAX.
 +
 +2012-07-21  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
 +      in special-event-map.  See the discussion at
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
 +      for the reasons.
 +
 +      * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
 +      info.dwItemData.  Fixes crashes on 64-bit Windows.
 +      Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
 +
 +2012-07-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (accessibilityAttributeValue): New function.  (Bug#11134).
 +      (conversationIdentifier): Return value is NSInteger.
 +      * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
 +
 +2012-07-21  Chong Yidong  <cyd@gnu.org>
 +
 +      * window.c (decode_any_window): Signal an error if the window is
 +      on a dead frame (Bug#11984).
 +
 +2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Add indirection counting to speed up Fkill_buffer.
 +      * buffer.h (struct buffer): New member.
 +      * buffer.c (Fget_buffer_create): Set indirection counter to 0.
 +      (Fmake_indirect_buffer): Set indirection counter to -1, increment
 +      base buffer indirection counter.
 +      (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
 +      (Fkill_buffer): Adjust indirection counters as needed, don't walk
 +      through buffer list if indirection counter is 0.
 +
 +2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Extend the value returned by Fgarbage_collect with heap statistics.
 +      * alloc.c (Qheap): New symbol.
 +      (syms_of_alloc): DEFSYM it.
 +      (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
 +      (Fmemory_free): Remove.
 +      (syms_of_alloc): Don't defsubr it.
 +      * buffer.c (Fcompact_buffer): Remove.
 +      (syms_of_buffer): Don't defsubr it.
 +
 +2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Make maybe_gc inline.
 +      Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
 +      * lisp.h (consing_since_gc, gc_relative_threshold)
 +      (memory_full_cons_threshold): Revert declaration.
 +      (maybe_gc): Remove prototype, define as inline.
 +      * alloc.c: Remove old commented-out code.
 +      (consing_since_gc, gc_relative_threshold)
 +      (memory_full_cons_threshold): Revert to global.
 +      (maybe_gc): Remove.
 +
 +2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Simple wrapper for make_unibyte_string, adjust font_open_by_name.
 +      * lisp.h (build_unibyte_string): New function.
 +      * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
 +      * sysdep.c, w32fns.c, xfns.c: Use it.
 +      * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
 +      of type Lisp_Object to avoid redundant calls to make_unibyte_string.
 +      Adjust users accordingly.
 +      * font.h (font_open_by_name): Adjust prototype.
 +
 +2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup calls to Fgarbage_collect.
 +      * lisp.h (maybe_gc): New prototype.
 +      (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
 +      Remove declarations.
 +      * alloc.c (maybe_gc): New function.
 +      (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
 +      Make them static.
 +      * bytecode.c (MAYBE_GC): Use maybe_gc.
 +      * eval.c (eval_sub, Ffuncall): Likewise.
 +      * keyboard.c (read_char): Likewise.  Adjust call to maybe_gc
 +      to avoid dependency from auto-save feature.
 +
 +2012-07-19  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
 +      (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
 +      'for_each_per_buffer_object_at'.
 +      All uses changed.  It's better to use upper-case for macros that
 +      cannot be implemented as functions, to give the reader a clue
 +      that they're special.
 +
 +2012-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * alloc.c (Fgarbage_collect): Tweak docstring.
 +
 +2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Tweak the value returned from Fgarbage_collect again.
 +      * alloc.c (Fgarbage_collect): New return value, as confirmed in
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
 +      Adjust documentation.
 +      (total_vector_bytes): Rename to total_vector_slots, adjust
 +      accounting.
 +      (total_free_vector_bytes): Rename to total_free_vector_slots,
 +      adjust accounting.
 +      (Qstring_bytes, Qvector_slots): New symbols.
 +      (syms_of_alloc): DEFSYM them.
 +
 +2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Buffer compaction primitive which may be used from Lisp.
 +      * buffer.c (compact_buffer, Fcompact_buffer): New function.
 +      (syms_of_buffer): Register Fcompact_buffer.
 +      * alloc.c (Fgarbage_collect): Use compact_buffer.
 +      * buffer.h (compact_buffer): New prototype.
 +      (struct buffer_text): New member.
 +
 +2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      New macro to iterate over all buffers, miscellaneous cleanups.
 +      * lisp.h (all_buffers): Remove declaration.
 +      * buffer.h (all_buffers): Add declaration, with comment.
 +      (for_each_buffer): New macro.
 +      * alloc.c (Fgarbage_collect, mark_object): Use it.
 +      * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
 +      (init_buffer): Likewise.
 +      * data.c (Fset_default): Likewise.
 +      * coding.c (code_conversion_restore): Remove redundant check
 +      for dead buffer.
 +      * buffer.c (Fkill_buffer): Likewise.  Remove obsolete comment.
 +
 +2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      Fix bug that created negative-length intervals.
 +      * intervals.c (merge_interval_right, merge_interval_left):
 +      Do not zero out this interval if it is absorbed by its children,
 +      as this interval's total length doesn't change in that case.  See
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
 +
 +2012-07-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
 +      when invoking (make-bool-vector N t) and N is a positive
 +      multiple of 8 -- the last 8 bits were mistakenly cleared.
 +
 +      Remove some struct layout assumptions in bool vectors.
 +      * alloc.c (bool_header_size): New constant.
 +      (header_size, word_size): Move earlier, as they're now used earlier.
 +      Use 'word_size' in a few more places, where it's appropriate.
 +      (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
 +      padding before the data member of a bool vector.
 +      (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
 +      than doing the check by hand with an abort ().
 +
 +2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fdefvar): Don't check constants since we only set the var if
 +      it's not yet defined anyway (bug#11904).
 +
 +      * lisp.h (last_undo_boundary): Declare new var.
 +      * keyboard.c (command_loop_1): Set it.
 +      * cmds.c (Fself_insert_command): Use it to only remove boundaries that
 +      were auto-added by the command loop (bug#11774).
 +
 +2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * w32font.c (Qsymbol): Remove local definition.
 +      (syms_of_w32font): Don't DEFSYM it.
 +
 +2012-07-18  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix sweep_vectors to handle large bool vectors correctly.
 +      * alloc.c (sweep_vectors): Account total_vector_bytes for
 +      bool vectors larger than VBLOCK_BYTES_MAX.
 +
 +2012-07-18  Chong Yidong  <cyd@gnu.org>
 +
 +      * frame.c (x_set_frame_parameters): Revert bogus change introduced
 +      in 2012-05-25 commit by Paul Eggert (Bug#11738).
 +
 +2012-07-18  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Return more descriptive data from Fgarbage_collect.
 +      Suggested by Stefan Monnier in
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
 +      * alloc.c (bounded_number): New function.
 +      (total_buffers, total_vectors): New variable.
 +      (total_string_size): Rename to total_string_bytes, adjust users.
 +      (total_vector_size): Rename to total_vector_bytes, adjust users.
 +      (sweep_vectors): Account total_vectors and total_vector_bytes.
 +      (Fgarbage_collect): New return value.  Adjust documentation.
 +      (gc_sweep): Account total_buffers.
 +      (Fmemory_free, Fmemory_use_counts): Use bounded_number.
 +      (VECTOR_SIZE): Remove.
 +      * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
 +      (Qinterval, Qmisc): New symbols.
 +      (syms_of_data): Initialize them.
 +      * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
 +      (Qcons, Qbuffer): New declarations.
 +
 +2012-07-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c (Fmemory_free): Account for memory-free's own storage.
 +      Round up, not down.  Improve doc.
 +
 +2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Restore old code in allocate_string_data to avoid Faset breakage.
 +      Reported by Julien Danjou <julien@danjou.info> in
 +      http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
 +      * alloc.c (allocate_string_data): Restore old code with minor
 +      adjustments, fix comment to explain this subtle issue.
 +
 +2012-07-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Remove FILE_SYSTEM_CASE.
 +      * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
 +
 +      * fileio.c (FILE_SYSTEM_CASE): Don't define.
 +      (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
 +      Fixes problems on MS-DOS with Vtemp_file_name_pattern when
 +      call-process-region passes it through expand-file-name.
 +
 +      * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
 +
 +2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      Fix crash when creating indirect buffer (Bug#11917)
 +      * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
 +      Don't handle unbound variables specially if non-zero.
 +      (Fbuffer_local_variables): Pass zero.
 +      (clone_per_buffer_values): Pass non-zero.
 +
 +2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * gnutls.c (emacs_gnutls_handshake): Revert last change.  Add QUIT
 +      to make the loop interruptible.
 +
 +2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * gnutls.c (emacs_gnutls_handshake): Only retry if
 +      GNUTLS_E_INTERRUPTED.
 +
 +2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup and convert miscellaneous checks to eassert.
 +      * alloc.c (mark_interval): Fix comment, partially rephrase
 +      old comment from intervals.h (see below).
 +      * intervals.c (find_interval, adjust_intervals_for_insertion)
 +      (delete_interval, adjust_intervals_for_deletion)
 +      (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
 +      Convert to eassert.
 +      (adjust_intervals_for_insertion, make_new_interval):
 +      Remove obsolete and unused code.
 +      * intervals.h (struct interval): Remove obsolete comment.
 +      * textprotp.c (erase_properties): Remove unused code.
 +      (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
 +      (Fremove_list_of_text_properties): Convert to eassert.
 +
 +2012-07-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * editfns.c (Finsert_char): Doc fix.
 +
 +2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix previous change to make Fmemory_free always accurate.
 +      * alloc.c (make_interval): Update total_free_intervals.
 +      (make_float): Likewise for total_free_floats.
 +      (free_cons, Fcons): Likewise for total_free_conses.
 +      (SETUP_ON_FREE_LIST, allocate_vector_from_block):
 +      Likewise for total_free_vector_bytes.
 +      (Fmake_symbol): Likewise for total_free_symbols.
 +      (bytes_free): Remove.
 +
 +2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Simple free memory accounting feature.
 +      * alloc.c (bytes_free, total_free_vector_bytes): New variable.
 +      (sweep_vectors): Accumulate size of free vectors.
 +      (Fgarbage_collect): Setup bytes_free.
 +      (Fmemory_free): New function.
 +      (syms_of_alloc): Register it.
 +
 +2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup overlays checking.
 +      * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
 +      * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
 +      eassert and OVERLAYP.
 +      (sort_overlays): Change to use OVERLAYP.
 +
 +2012-07-16  René Kyllingstad  <Rene@Kyllingstad.com>  (tiny change)
 +
 +      * editfns.c (Finsert_char): Make it interactive, and make the
 +      second arg optional.  Copy interactive spec and docstring from
 +      ucs-insert.
 +
 +2012-07-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
 +      Unlike the other wrapped functions, fabs has an unspecified
 +      effect on errno.
 +
 +2012-07-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (keyDown): Interpret flags without left/right bits
 +      as the left key (Bug#11670).
 +
 +2012-07-16  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Remove empty and useless init functions.
 +      * lisp.h (init_character_once, init_fns, init_image)
 +      (init_filelock, init_sound): Remove prototype.
 +      * character.c (init_character_once): Remove.
 +      * filelock.c (init_filelock): Likewise.
 +      * fns.c (init_fns): Likewise.
 +      * image.c (init_image): Likewise.
 +      * sound.c (init_sound): Likewise.
 +      * emacs.c (main): Adjust accordingly.
 +
 +2012-07-16  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * gtkutil.h: Tiny cleanups.
 +      (use_old_gtk_file_dialog): Remove useless declaration.
 +      (xg_uses_old_file_dialog): Add suggested const attribute.
 +
 +2012-07-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
 +      (bidi_paragraph_init): Use it to limit search forward for a strong
 +      directional character in abnormally large paragraphs full of
 +      neutral or weak characters.  (Bug#11943)
 +
 +2012-07-15  Stefano Facchini  <stefano.facchini@gmail.com>  (tiny change)
 +
 +      * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
 +      the toolbar (Bug#9451).
 +      (xg_make_tool_item): Give the widget event box a transparent
 +      background.
 +
 +2012-07-15  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup basic allocation variables and functions.
 +      * alloc.c (ignore_warnings, init_intervals, init_float)
 +      (init_cons, init_symbol, init_marker): Remove.
 +      (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
 +      (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
 +      (cons_block_index): Initialize to CONS_BLOCK_SIZE.
 +      (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
 +      (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
 +      (staticidx, init_alloc_once, init_strings, free_ablock):
 +      Remove redundant initialization.
 +      * fns.c (init_weak_hash_tables): Remove.
 +      * lisp.h (init_weak_hash_tables): Remove prototype.
 +
 +2012-07-15  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use zero_vector where appropriate.
 +      * alloc.c (zero_vector): Define as Lisp_Object.  Adjust users
 +      accordingly.
 +      * lisp.h (zero_vector): New declaration.
 +      * font.c (null_vector): Remove.
 +      (syms_of_font): Remove initialization and staticpro.
 +      (font_list_entities, font_find_for_lface): Change to use zero_vector.
 +      * keymap.c (Faccessible_keymaps): Likewise.
 +
 +2012-07-15  Leo Liu  <sdl.web@gmail.com>
 +
 +      * fringe.c: Fix typo in comments.
 +
 +2012-07-14  Leo Liu  <sdl.web@gmail.com>
 +
 +      * fringe.c: Add a new bitmap exclamation-mark.
 +
 +2012-07-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
 +
 +      * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
 +      (HAVE_MENUS): Don't define, defined by editing config.in with
 +      msdos/sed2v2.inp.
 +      (GMALLOC_INHIBIT_VALLOC): Don't define.
 +      (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
 +
 +2012-07-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
 +
 +2012-07-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
 +      * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
 +      Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
 +
 +2012-07-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
 +
 +      * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
 +      * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
 +
 +2012-07-13  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
 +      (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
 +      (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
 +      (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
 +      where appropriate.
 +      (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
 +      as boolean expression.
 +      (x_set_window_size): Remove unused variable toolbar.
 +      (ns_get_color_default, ns_mod_to_lisp): Remove.
 +      (ns_mouse_position): Remove unused variables xchar and ychar.
 +      (ns_compute_glyph_string_overhangs): Remove unused variable face.
 +      (ns_set_vertical_scroll_bar): Remove unused variable count.
 +      (ns_delete_terminal): Remove unused variable i.
 +      (ns_term_init): Remove unused variables r, g and b.
 +      (mouseDown): Remove unused variable window.
 +      (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
 +      (initFrameFromEmacs): Remove unused variable vbextra.
 +      (mouseEntered): Remove unused variables p and dpyinfo.
 +      (mouseExited): Remove unused variables p and r.
 +      (ns_define_frame_cursor, ns_clear_frame_area)
 +      (ns_draw_window_cursor, ns_initialize_display_info): Make static.
 +      (menuDown): Assign [sender tag] to variable and cast the variable.
 +
 +      * nsterm.h (menuDown): Add id as type to argument sender.
 +      (ns_display_info_for_name): Add Lisp_Object argument.
 +      (ns_term_init): Add Lisp_Object argument.
 +      (ns_map_event_to_object): Add void argument.
 +      (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
 +      prototype with arguments and only declare if __OBJC__.
 +      (nxatoms_of_nsselect): Add void argument.
 +      (ns_lisp_to_cursor_type): Add Lisp_Object argument.
 +      (ns_alloc_autorelease_pool): Add void argument.
 +      (ns_release_autorelease_pool): Add void* argument.
 +      (ns_get_defaults_value): Add const char* argument.
 +
 +      * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
 +      (initFromContents): Use SSDATA where appropriate.
 +      (ns_update_menubar): Add braces to ambigous if-else.
 +      (initWithTitle): Put () around assignment in if statement.
 +      (ns_menu_show): Remove unused variables window and keymap.
 +      (update_frame_tool_bar): Remove unused variable selected_p.
 +      (initWithContentRect): Remove unused variable this_cmd_name.
 +
 +      * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
 +      appropriate.
 +      (setXBMColor): Remove unused variable len.
 +      (setPixmapData): Put () around assignment in loop statement.
 +
 +      * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
 +      (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
 +      where appropriate.
 +      (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
 +      around assignment in loop statement.
 +      (nsfont_open): Remove unused variable i.
 +      (nsfont_open): Remove unused variable len.
 +      (nsfont_draw): Remove unused variable cs.
 +
 +      * nsfns.m (x_set_icon_name, ns_set_name_internal)
 +      (ns_set_name_as_filename, ns_implicitly_set_icon_type)
 +      (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
 +      (Fns_get_resource, Fns_set_resource, Fx_open_connection)
 +      (Fns_font_name, Fns_perform_service)
 +      (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
 +      (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
 +      (ns_set_name): Remove unused variable view.
 +      (x_set_menu_bar_lines): Remove unused variable olines.
 +      (x_set_tool_bar_lines): Remove unused variable root_window.
 +      (Fns_list_colors): Put () around assignment in while statement.
 +      (Fns_perform_service): Remove unused variable len.
 +      (Fns_display_usable_bounds): Remove unused variable top.
 +      (syms_of_nsfns): Remove unused variable i.
 +
 +      * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
 +      memcpy (Bug#11907).
 +
 +2012-07-13  Kalle Kankare  <kalle.kankare@iki.fi>  (tiny change)
 +
 +      * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
 +      and free it with DestroyExceptionInfo (Bug#11558).
 +
 +2012-07-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
 +      (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
 +      Set here, not in nt/config.nt.
 +
 +2012-07-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
 +      cursor overflow into the last glyph on display line when the right
 +      fringe is off.  (Bug#11832)
 +
 +2012-07-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * xdisp.c (produce_special_glyphs): Now static.
 +      * dispextern.h (produce_special_glyphs): Remove decl.
 +
 +2012-07-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/bsd-common.h, s/cygwin.h: Remove empty files.
 +      * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
 +
 +      * s/usg5-4-common.h (USG, USG5):
 +      * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
 +      * s/sol2-6.h (SOLARIS2):
 +      * s/irix6-5.h (IRIX6_5):
 +      * s/hpux10-20.h (USG, USG5, HPUX):
 +      * s/gnu-linux.h (USG, GNU_LINUX):
 +      * s/freebsd.h (BSD_SYSTEM):
 +      * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
 +      * s/cygwin.h (CYGWIN):
 +      * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
 +      * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
 +
 +2012-07-13  BT Templeton  <bpt@hcoop.net>  (tiny change)
 +
 +      * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
 +
 +2012-07-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
 +
 +      * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
 +
 +      * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
 +      * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
 +
 +2012-07-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
 +
 +      * process.c (init_process_emacs): Rename from init_process.
 +      The old name is also the name of a Mach system call.
 +      * lisp.h, emacs.c: Update for this name change.
 +      * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
 +      longer needed.
 +
 +2012-07-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
 +      memmove call that removes glyphs covered by the left truncation
 +      glyph.  Improve commentary.
 +      (display_line): Fix display of continuation glyphs on GUI frames
 +      when the right fringe is turned off and variable-size fonts are
 +      used in the window.  Move the code that appends a stretch glyph to
 +      produce_special_glyphs, so that it could be used for truncation
 +      and continuation glyphs alike.
 +      (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
 +      glyph of a suitably computed width, to align the special glyphs at
 +      the window margin.  Code moved from display_line.  (Bug#11832)
 +
 +2012-07-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
 +
 +      * s/gnu-linux.h, s/hpux10-20.h:
 +      Do not unconditionally define HAVE_XRMSETDATABASE.
 +
 +      * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
 +
 +2012-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix typos that broke OS X build.
 +      Reported by Randal L. Schwartz in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
 +      * nsterm.m (ns_timeout): Add missing local decl.
 +      (ns_get_color): snprintf -> sprintf, to fix typo.
 +
 +2012-07-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
 +      * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
 +      * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
 +      Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
 +
 +      * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
 +      Move PTY_OPEN to configure.
 +
 +      * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
 +      * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
 +      * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
 +
 +2012-07-12  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use empty_unibyte_string where applicable.
 +      * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
 +      * lread.c (read1): Likewise.
 +      * xsettings.c (syms_of_xsettings): Likewise.
 +
 +2012-07-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
 +      * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
 +      * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
 +      * s/hpux10-20.h (RUN_TIME_REMAP):
 +      * s/bsd-common.h (TABDLY): Move to configure.
 +
 +      * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
 +
 +      * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
 +
 +      * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
 +      (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
 +
 +      * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
 +
 +      * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
 +      * s/template.h: Move NARROWPROTO to configure.
 +
 +2012-07-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
 +      unused since 2011-01-17 change to systty.h.
 +
 +      * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
 +      * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
 +      Move HAVE_PTYS and HAVE_SOCKETS to configure.
 +
 +2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * s/sol2-6.h (HAVE_LIBKSTAT): Remove.  (Bug#11914)
 +
 +2012-07-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/darwin.h, s/gnu-linux.h, s/template.h:
 +      Move INTERRUPT_INPUT to configure.
 +
 +2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Minor adjustments to interning code.
 +      * lisp.h (intern, intern_c_string): Redefine as static inline
 +      wrappers for intern_1 and intern_c_string_1, respectively.
 +      (intern_1, intern_c_string_1): Rename prototypes.
 +      * lread.c (intern_1, intern_c_string_1, oblookup):
 +      Simplify Vobarray checking.
 +      * font.c (font_intern_prop): Likewise.  Adjust comment.
 +      * w32font.c (intern_font_name): Likewise.
 +
 +2012-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
 +
 +      * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
 +      of Fcar/Fcdr if possible.
 +      * font.c (check_otf_features): Likewise.
 +      * fontset.c (Fnew_fontset): Likewise.
 +      * gnutls.c (Fgnutls_boot): Likewise.
 +      * minibuf.c (read_minibuf): Likewise.
 +      * msdos.c (IT_set_frame_parameters): Likewise.
 +      * xmenu.c (Fx_popup_dialog): Likewise.
 +      * w32menu.c (Fx_popup_dialog): Likewise.
 +
 +2012-07-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
 +      since nothing has defined it on these platforms.
 +
 +      * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
 +      * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
 +
 +      * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
 +      * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
 +      Move CLASH_DETECTION to configure.
 +
 +      * s/gnu.h: Remove file, which is now empty.
 +
 +      * s/gnu.h, s/gnu-linux.h:
 +      Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
 +
 +2012-07-11  John Wiegley  <johnw@newartisans.com>
 +
 +      * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
 +      function attribute, so we only use it if it exists in the
 +      compiler.
 +
 +2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid call to strlen in fast_c_string_match_ignore_case.
 +      * search.c (fast_c_string_match_ignore_case): Change to use
 +      length argument.  Adjust users accordingly.
 +      * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
 +
 +2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume mkdir, rmdir.
 +      * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
 +      * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
 +
 +      Assume rename.
 +      * sysdep.c (rename) [!HAVE_RENAME]: Remove.
 +
 +      Assume perror.
 +      * s/hpux10-20.h (HAVE_PERROR): Remove.
 +      * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
 +      Remove dummy definition, as this problem was obsolete long ago.
 +
 +      Assume strerror.
 +      * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
 +
 +2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid calls to strlen in font processing functions.
 +      * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
 +      (font_open_by_name): Change to use length argument.
 +      Adjust users accordingly.
 +      * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
 +      Adjust prototypes.
 +      * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
 +      Change to return ptrdiff_t.
 +      (xfont_list_pattern, xfont_match): Use length returned by
 +      xfont_decode_coding_xlfd.
 +      * xfns.c (x_default_font_parameter): Omit useless xstrdup.
 +
 +2012-07-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/darwin.h, s/freebsd.h, s/netbsd.h:
 +      Move DONT_REOPEN_PTY to configure.
 +
 +      * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
 +      * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
 +
 +2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove "#define unix" that is no longer needed (Bug#11905).
 +      * s/aix4-2.h (unix): Remove; no longer needed.
 +
 +      EMACS_TIME simplification (Bug#11875).
 +      This replaces macros (which typically do not work in GDB)
 +      with functions, typedefs and enums, making the code easier to debug.
 +      The functional style also makes code easier to read and maintain.
 +      * systime.h: Include <sys/time.h> on all hosts, not just if
 +      WINDOWSNT, since 'struct timeval' is needed in general.
 +      (EMACS_TIME): Now a typedef, not a macro.
 +      (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
 +      not macros.
 +      (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
 +      (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
 +      (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
 +      (EMACS_TIME_LE): Now functions, not macros.
 +      (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
 +      (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
 +      which are not functions.  All uses rewritten to use:
 +      (make_emacs_time): New function.
 +      (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
 +      (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
 +      not functions.  All uses rewritten to use the following, respectively:
 +      (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
 +      (add_emacs_time, sub_emacs_time): New functions.
 +      * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
 +      * fileio.c (Fcopy_file):
 +      * xterm.c (XTflash): Get the current time closer to when it's used.
 +      * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
 +
 +      * bytecode.c (targets): Suppress -Woverride-init warnings.
 +
 +      Simplify by avoiding confusing use of strncpy etc.
 +      * doc.c (Fsnarf_documentation):
 +      * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
 +      * frame.c (Fmake_terminal_frame):
 +      * gtkutil.c (get_utf8_string):
 +      * lread.c (openp):
 +      * nsmenu.m (ns_update_menubar):
 +      * regex.c (regerror):
 +      Prefer memcpy to strncpy and strncat when either will do.
 +      * fileio.c (Fsubstitute_in_file_name):
 +      * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
 +      (menu_separator_name_p):
 +      * nsmenu.m (ns_update_menubar):
 +      Prefer memcmp to strncmp when either will do.
 +      * nsterm.m: Include <ftoastr.h>.
 +      (ns_get_color):
 +      * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
 +      Prefer snprintf to strncpy.
 +      * nsterm.m (ns_term_init):
 +      * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
 +      * nsterm.m (ns_term_init):
 +      Avoid the need for strncpy, by using build_string or
 +      make_unibyte_string directly.  Use dtoastr, not snprintf.
 +      * process.c (Fmake_network_process): Diagnose service names that
 +      are too long, rather than silently truncating them or creating
 +      non-null-terminated names.
 +      (Fnetwork_interface_info): Likewise, for interface names.
 +      * sysdep.c (system_process_attributes) [GNU_LINUX]:
 +      Prefer sprintf to strncat.
 +      * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
 +      Prefer vsnprintf to vsprintf + strncpy.
 +
 +2012-07-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
 +      Clarify fallback case.
 +
 +2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use XCAR and XCDR instead of Fcar and Fcdr where possible.
 +      * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
 +      * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
 +      * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
 +      where argument type is known to be a Lisp_Cons.
 +
 +2012-07-10  Tom Tromey  <tromey@redhat.com>
 +
 +      * bytecode.c (BYTE_CODE_THREADED): New macro.
 +      (BYTE_CODES): New macro.  Replaces all old byte-code defines.
 +      (enum byte_code_op): New type.
 +      (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
 +      (exec_byte_code): Use them.  Use token threading when applicable.
 +
 +2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Optimize pure C strings initialization.
 +      * lisp.h (make_pure_string): Fix prototype.
 +      (build_pure_c_string): New function, defined as static inline.  This
 +      provides a better opportunity to optimize away calls to strlen when
 +      the function is called with compile-time constant argument.
 +      * alloc.c (make_pure_c_string): Fix comment.  Change to add nchars
 +      argument, adjust users accordingly.  Use build_pure_c_string where
 +      appropriate.
 +      * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
 +      * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
 +      * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
 +
 +2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid calls to strlen in miscellaneous functions.
 +      * buffer.c (init_buffer): Use precalculated len, adjust if needed.
 +      * font.c (Ffont_xlfd_name): Likewise.  Change to call make_string.
 +      * lread.c (openp): Likewise.
 +
 +2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid calls to strlen in path processing functions.
 +      * fileio.c (file_name_as_directory): Add comment.  Change to add
 +      srclen argument and return the length of result.  Adjust users
 +      accordingly.
 +      (directory_file_name): Fix comment.  Change to add srclen argument,
 +      swap 1st and 2nd arguments to obey the common convention.
 +      Adjust users accordingly.
 +      * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
 +
 +2012-07-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
 +      Move PENDING_OUTPUT_COUNT definition to configure.
 +
 +      * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
 +      * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
 +      * s/gnu.h (DATA_START): Move definitions to configure.
 +
 +      * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
 +      We include usg5-4-common.h, which defines them both.
 +
 +      * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
 +      O_RDONLY already includes it).
 +
 +      Stop ns builds setting the EMACSLOADPATH environment variable.
 +      * nsterm.m (ns_load_path): Rename from ns_init_paths.
 +      Now it does not set EMACSLOADPATH, just returns the load-path string.
 +      * nsterm.h: Update accordingly.
 +      * lread.c [HAVE_NS]: Include nsterm.h.
 +      (init_lread) [HAVE_NS]: Use ns_load_path.
 +      * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
 +
 +2012-07-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
 +      since the included bsd-common.h does so.
 +
 +      Stop ns builds setting the EMACSPATH environment variable.
 +      * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
 +      (ns_init_paths): Do not set EMACSPATH.
 +      * nsterm.h (ns_exec_path): Add it.
 +      * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
 +      Use ns_exec_path.
 +
 +      * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
 +
 +2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * process.c (wait_reading_process_output): 'waitchannels' was unset
 +      when read_kbd || !NILP (wait_for_cell); fix this.
 +
 +      Add GCC-style 'const' attribute to functions that can use it.
 +      * character.h (char_resolve_modifier_mask):
 +      * keyboard.h (make_ctrl_char):
 +      * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
 +      (init_character_once, next_almost_prime, init_fns, init_image)
 +      (flush_pending_output, init_sound):
 +      * mem-limits.h (start_of_data):
 +      * menu.h (finish_menu_items):
 +      Add ATTRIBUTE_CONST.
 +      * emacs.c (DEFINE_DUMMY_FUNCTION):
 +      Declare the dummy function with ATTRIBUTE_CONST.
 +      * lisp.h (Fbyteorder, Fmax_char, Fidentity):
 +      Add decls with ATTRIBUTE_CONST.
 +
 +      Minor improvements to make_formatted_string.
 +      * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
 +      where int is good enough, as vsprintf returns an int.
 +      * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
 +
 +2012-07-09  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Use make_formatted_string to avoid double length calculation.
 +      * lisp.h (make_formatted_string): New prototype.
 +      * alloc.c (make_formatted_string): New function.
 +      * buffer.c (Fgenerate_new_buffer_name): Use it.
 +      * dbus.c (syms_of_dbusbind): Likewise.
 +      * editfns.c (Fcurrent_time_zone): Likewise.
 +      * filelock.c (get_boot_time): Likewise.
 +      * frame.c (make_terminal_frame, set_term_frame_name)
 +      (x_report_frame_params): Likewise.
 +      * image.c (gs_load): Likewise.
 +      * minibuf.c (get_minibuffer): Likewise.
 +      * msdos.c (dos_set_window_size): Likewise.
 +      * process.c (make_process): Likewise.
 +      * xdisp.c (ensure_echo_area_buffers): Likewise.
 +      * xsettings.c (apply_xft_settings): Likewise.
 +
 +2012-07-09  Glenn Morris  <rgm@gnu.org>
 +
 +      Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
 +      * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
 +      (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
 +      * nsterm.h (ns_etc_directory): Add it.
 +      * callproc.c [HAVE_NS]: Include nsterm.h.
 +      (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
 +
 +2012-07-09  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Move marker debugging code under MARKER_DEBUG.
 +      * marker.c (MARKER_DEBUG): Move marker debugging code under
 +      #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
 +      for bootstrap with --enable-checking (~3x slowdown reported
 +      by Juanma Barranquero <lekktu@gmail.com>).
 +      (verify_bytepos): Move under #ifdef MARKER_DEBUG.
 +
 +2012-07-08  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
 +      See <http://bugs.gnu.org/11825#29>.
 +
 +2012-07-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
 +      has no font, use the frame's font.  (Bug#11813)
 +      (display_line): Add commentary about displaying truncation glyphs
 +      on GUI frames.
 +      (produce_special_glyphs): Move here from term.c.
 +
 +      * term.c (produce_special_glyphs): Move to xdisp.c.
 +
 +      * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
 +      section.
 +
 +2012-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xdisp.c (display_line): Avoid warning about implicit declaration
 +      of FRAME_FONT.
 +
 +      * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
 +
 +      * lisp.h: Remove empty conditional.
 +
 +2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lread.c (load_path_check): Now static.
 +
 +      Fix some minor --with-ns problems found by static checking.
 +      * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
 +      (x_set_font) [!HAVE_X_WINDOWS]:
 +      * image.c (xpm_load_image) [HAVE_NS]:
 +      (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
 +      (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
 +      Remove unused local.
 +      (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
 +      (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
 +      * image.c (x_create_bitmap_from_file) [HAVE_NS]:
 +      (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
 +      * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
 +      * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
 +      Fix pointer signedness problem.
 +      * xfaces.c (FRAME_X_FONT_TABLE):
 +      * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
 +
 +2012-07-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * lread.c (load_path_check): New function, split from init_lread.
 +      (init_lread): Reorganize.  Motivation:
 +      If EMACSLOADPATH is set, check/warn about that rather than the
 +      defaults, which we are not going to use.  Hence we can remove
 +      the turn_off_warning and WINDOWSNT || HAVE_NS tests.
 +      Don't warn if site-lisp directories are missing.
 +      If not installed, start from a blank load-path, since
 +      PATH_LOADSEARCH refers to the eventual installation directories.
 +
 +2012-07-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Support truncation and continuation glyphs on GUI frames, when
 +      fringes are disabled.  (Bug#11832)
 +      * xdisp.c (init_iterator): Get dimensions of truncation and
 +      continuation glyphs even if on GUI frames.
 +      Adjust it->last_visible_x on GUI frames when the left or right fringes,
 +      or both, are absent.
 +      (start_display, move_it_in_display_line_to): Handle the case of a
 +      GUI frame without a fringe to display continuation or truncation
 +      glyphs.
 +      (insert_left_trunc_glyphs): Support GUI frames: make sure
 +      truncation glyphs overwrite enough glyphs from the current line to
 +      have sufficient space in pixels.
 +      (display_line): Support truncation and continuation glyphs on GUI
 +      frames.  If some spare pixels are left on the line after inserting
 +      the truncation glyphs, fill that space with a stretch glyph of a
 +      suitably computed width.
 +
 +      * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
 +      produce_glyphs, to support GUI sessions.
 +
 +2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
 +
 +      * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
 +
 +      Do not require float-time's arg to fit in time_t (Bug#11825).
 +      This works better on hosts where time_t is unsigned, and where
 +      float-time is applied to the (negative) difference between two times.
 +      * editfns.c (decode_time_components): Last arg is now double *,
 +      not int *, and means to store all the result as a double, without
 +      worrying about whether the seconds part fits in time_t.
 +      All callers changed.
 +      (lisp_time_argument): Remove last int * arg, as it's no longer needed.
 +      All callers changed.
 +      (Ffloat_time): Do not fail merely because the specified time falls
 +      outside of time_t range.
 +
 +2012-07-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
 +      * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
 +      * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
 +
 +2012-07-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
 +      Update dependencies.
 +
 +      * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
 +
 +2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
 +      * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
 +      * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
 +      * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
 +      * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
 +      * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
 +
 +      * xfont.c (compare_font_names): Redo to omit the need for casts.
 +
 +2012-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xfns.c (Fx_change_window_property): Doc fix.
 +      * w32fns.c (Fx_change_window_property): Doc fix.
 +
 +      * w32fns.c (Fx_window_property): Accept the same arguments as the
 +      X Windows version.  Doc fix.
 +      * xfns.c (Fx_window_property): Doc fix.  (Bug#11870)
 +
 +2012-07-06  Juanma Barranquero  <lekktu@gmail.com>
 +          Eli Zaretskii  <eliz@gnu.org>
 +
 +      * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
 +      Windows-specific code from nt/config.nt moved here.
 +      Obsolete settings removed.
 +
 +2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * process.c: Avoid unnecessary calls to gettime.
 +      (wait_reading_process_output): Don't get the time of day
 +      when gobbling data immediately and not waiting, as there's no need
 +      for it in that case.  This removes a FIXME.
 +
 +2012-07-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
 +      is defined (Bug#11768).
 +
 +2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix marker debugging code.
 +      * marker.c (byte_char_debug_check): Do not perform the check
 +      if buffer is not multibyte.
 +      (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
 +      Call byte_char_debug_check with correct arguments.
 +
 +2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Compile marker debugging code only if ENABLE_CHECKING is defined.
 +      * marker.c (byte_char_debug_check, count_markers):
 +      Use only if ENABLE_CHECKING is defined.
 +      (byte_debug_flag): Remove.
 +      (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
 +      Always call byte_char_debug_check if ENABLE_CHECKING is defined.
 +
 +2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Avoid code repetition in marker-related functions.
 +      * marker.c (attach_marker): New function.
 +      (Fset_marker, set_marker_restricted, set_marker_both)
 +      (set_marker_restricted_both): Use it.
 +      (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
 +      Consistently rename charno to charpos.
 +      (marker_position): Add eassert.
 +      (marker_byte_position): Convert to eassert.
 +
 +2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Simplify list operations in unchain_overlay and unchain_marker.
 +      * buffer.c (unchain_overlay): Simplify.  Add comment.
 +      * marker.c (unchain_marker): Simplify.  Fix comments.
 +
 +2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Introduce fast path for the widely used marker operation.
 +      * alloc.c (build_marker): New function.
 +      * lisp.h (build_marker): New prototype.
 +      * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
 +      * composite.c (autocmp_chars): Likewise.
 +      * editfns.c (buildmark): Remove.
 +      (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
 +      (save_restriction_save): Use build_marker.
 +      * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
 +      * window.c (save_window_save): Likewise.
 +
 +2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Do not use Fdelete_overlay in delete_all_overlays
 +      to avoid redundant calls to unchain_overlay.
 +      * buffer.c (drop_overlay): New function.
 +      (delete_all_overlays, Fdelete_overlay): Use it.
 +      * minibuf.c (get_minibuffer): Fix comment.
 +
 +2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port to OpenBSD 5.1 amd64.
 +      * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
 +      This is needed for OpenBSD, and should be harmless on all BSD systems.
 +      Also, include <sys/sysctl.h>, as it should be available on all
 +      BSD_SYSTEM hosts given that we're already calling sysctl in that case.
 +      (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
 +      use p_pid member, not kp_proc.pid.
 +
 +2012-07-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
 +
 +2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      More xmalloc and related cleanup.
 +      * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
 +      * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
 +      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
 +      * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
 +      * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
 +      * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
 +      * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
 +      * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
 +      * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
 +      * xterm.c:
 +      Omit needless casts involving void * pointers and allocation.
 +      Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
 +      as the former is more robust if P's type is changed.
 +      Prefer xzalloc to xmalloc + memset 0.
 +      Simplify malloc-or-realloc to realloc.
 +      Don't worry about xmalloc returning a null pointer.
 +      Prefer xstrdup to xmalloc + strcpy.
 +      * editfns.c (Fmessage_box): Grow message_text by at least 80 when
 +      growing it.
 +      * keyboard.c (apply_modifiers_uncached): Prefer local array to
 +      alloca of a constant.
 +
 +2012-07-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (display_line): Fix horizontal pixel coordinates when
 +      hscroll is larger than the line width.  Fixes long and futile
 +      looping inside extend_face_to_end_of_line (on a TTY) producing
 +      glyphs that are not needed and thrown away.
 +
 +2012-07-05  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * marker.c (set_marker_restricted_both): Simplify by using
 +      clip_to_bounds.
 +
 +2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * editfns.c (region_limit): Simplify by using clip_to_bounds.
 +
 +2012-07-05  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
 +      not defined (Bug#11768).
 +      (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
 +      (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
 +      (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
 +      followed by gtk_box_set_homogeneous (Bug#11768).
 +      (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
 +      (update_theme_scrollbar_width, xg_create_scroll_bar):
 +      Use gtk_scrollbar_new (Bug#11768).
 +      (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
 +      (is_box_type): New function (Bug#11768).
 +      (xg_tool_item_stale_p): Call is_box_type.
 +      (xg_initialize): Get settings by calling gtk_settings_get_for_screen
 +      with default display (Bug#11768).
 +
 +2012-07-05  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (window_hscroll_limited): New function.
 +      (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
 +      coordinates when window's hscroll is set to insanely large
 +      values.  (Bug#11857)
 +
 +2012-07-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
 +      ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
 +
 +2012-07-05  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup xmalloc.
 +      * lisp.h (xzalloc): New prototype.  Omit needless casts.
 +      * alloc.c (xzalloc): New function.  Omit needless casts.
 +      * charset.c: Omit needless casts.  Convert all calls to
 +      xmalloc with following memset to xzalloc.
 +      * dispnew.c: Likewise.
 +      * fringe.c: Likewise.
 +      * image.c: Likewise.
 +      * sound.c: Likewise.
 +      * term.c: Likewise.
 +      * w32fns.c: Likewise.
 +      * w32font.c: Likewise.
 +      * w32term.c: Likewise.
 +      * xfaces.c: Likewise.
 +      * xfns.c: Likewise.
 +      * xterm.c: Likewise.
 +      * atimer.c: Omit needless casts.
 +      * buffer.c: Likewise.
 +      * callproc.c: Likewise.
 +      * ccl.c: Likewise.
 +      * coding.c: Likewise.
 +      * composite.c: Likewise.
 +      * doc.c: Likewise.
 +      * doprnt.c: Likewise.
 +      * editfns.c: Likewise.
 +      * emacs.c: Likewise.
 +      * eval.c: Likewise.
 +      * filelock.c: Likewise.
 +      * fns.c: Likewise.
 +      * gtkutil.c: Likewise.
 +      * keyboard.c: Likewise.
 +      * lisp.h: Likewise.
 +      * lread.c: Likewise.
 +      * minibuf.c: Likewise.
 +      * msdos.c: Likewise.
 +      * print.c: Likewise.
 +      * process.c: Likewise.
 +      * region-cache.c: Likewise.
 +      * search.c: Likewise.
 +      * sysdep.c: Likewise.
 +      * termcap.c: Likewise.
 +      * terminal.c: Likewise.
 +      * tparam.c: Likewise.
 +      * w16select.c: Likewise.
 +      * w32.c: Likewise.
 +      * w32reg.c: Likewise.
 +      * w32select.c: Likewise.
 +      * w32uniscribe.c: Likewise.
 +      * widget.c: Likewise.
 +      * xdisp.c: Likewise.
 +      * xmenu.c: Likewise.
 +      * xrdb.c: Likewise.
 +      * xselect.c: Likewise.
 +
 +2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * fileio.c (time_error_value): Check the right error number.
 +      Problem reported by Troels Nielsen in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
 +
 +2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
 +      This should be fixed in a better way; see Eli Zaretskii in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
 +      (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
 +
 +      * fileio.c (time_error_value): Rename from special_mtime.
 +      The old name's problems were noted by Eli Zaretskii in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
 +
 +      * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
 +      This variable's comment says Emacs needs at least one GDB-visible
 +      symbol of type enum pvec_type, to work around GDB problems.
 +      The symbol's value doesn't matter.
 +
 +      * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
 +      that causes compilation to fail on pre-C99 compilers.
 +
 +2012-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
 +      (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
 +
 +2012-07-04  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * buffer.c (init_buffer_once): Fix initialization of
 +      headers for buffer_defaults and buffer_local_symbols.
 +      Reported by Juanma Barranquero <lekktu@gmail.com>.
 +
 +2012-07-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
 +      * lisp.h (enum pvec_type): Use fewer bits.
 +      (PSEUDOVECTOR_SIZE_BITS): New constant.
 +      (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
 +      (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
 +      change in pvec_type.
 +      (PSEUDOVECTOR_TYPEP): New macro.
 +      (TYPED_PSEUDOVECTORP): Use it.
 +      * fns.c (internal_equal): Adapt code to extract pvectype.
 +      * emacs.c (gdb_pvec_type): Update type.
 +      * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
 +      (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
 +      (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
 +      (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
 +      (sweep_vectors): Use it.  Use local var `total_bytes' instead of
 +      abusing vector->header.next.nbytes.
 +      (live_vector_p): Use PVEC_TYPE.
 +      (mark_object): Adapt code to extract pvectype.  Use switch.
 +
 +2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * doprnt.c (doprnt): Don't assume string length fits in 'int'.
 +      Tighten new eassert a bit.
 +
 +2012-07-04  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix compilation with --enable-gcc-warnings and -O1
 +      optimization level.
 +      * doprnt.c (doprnt): Change type of tem to int, initialize
 +      to avoid compiler warning.  Add eassert.
 +      * search.c (simple_search): Initialize match_byte to avoid
 +      compiler warning.  Add eassert.
 +
 +2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Avoid weird behavior with large horizontal scrolls.
 +      Without this change, for example, large hscroll values would
 +      mess up Emacs's display on Fedora 15 x86, presumably due to
 +      overflows in int calculations in the display code.
 +      Also, if buffers had long lines, Emacs would freeze.
 +      * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
 +      (set_window_hscroll): New function, containing the old guts of
 +      Fset_window_hscroll.  Return the clipped value.
 +      (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
 +      This avoids the need to check against PTRDIFF_MAX.
 +
 +      * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
 +
 +2012-07-04  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
 +
 +2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * regex.c: Suppress GCC warning on RHEL 6.  (Bug#11207)
 +      Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
 +      since GCC 4.4.6 issues a bogus warning for them.
 +
 +      Fix bugs in file timestamp newness comparisons.
 +      * fileio.c (Ffile_newer_than_file_p):
 +      * lread.c (Fload): Use full timestamp resolution of files,
 +      not just the 1-second resolution, so that files that are only
 +      slightly newer still count as newer.
 +      * fileio.c (Ffile_newer_than_file_p): Don't assume file
 +      timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
 +
 +2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * fileio.c: Improve handling of file time marker.  (Bug#11852)
 +      (special_mtime): New function.
 +      (Finsert_file_contents, Fverify_visited_file_modtime):
 +      Use it to set special mtime values consistently.
 +
 +2012-07-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * fileio.c (Finsert_file_contents): Properly handle st_mtime
 +      marker for non-existing file.  (Bug#11852)
 +
 +2012-07-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
 +      and did not make it into globals.h).
 +
 +2012-07-03  Tom Tromey  <tromey@redhat.com>
 +
 +      * window.c (Fset_window_margins, Fset_window_fringes)
 +      (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
 +      * textprop.c (Fprevious_property_change): No longer static.
 +      * syntax.c (Fsyntax_table_p): No longer static.
 +      * process.c (Fget_process, Fprocess_datagram_address): No longer
 +      static.
 +      * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
 +      * keyboard.c (Fcommand_execute): No longer static.
 +      Remove EXFUN.
 +      * insdel.c (Fcombine_after_change_execute): No longer static.
 +      * image.c (Finit_image_library): No longer static.
 +      * fileio.c (Fmake_symbolic_link): No longer static.
 +      * eval.c (Ffetch_bytecode): No longer static.
 +      * editfns.c (Fuser_full_name): No longer static.
 +      * doc.c (Fdocumentation_property, Fsnarf_documentation):
 +      No longer static.
 +      * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
 +      static.
 +      * dired.c (Ffile_attributes): No longer static.
 +      * composite.c (Fcomposition_get_gstring): No longer static.
 +      * callproc.c (Fgetenv_internal): No longer static.
 +
 +      * ccl.h: Remove EXFUNs.
 +      * buffer.h: Remove EXFUNs.
 +      * dispextern.h: Remove EXFUNs.
 +      * intervals.h: Remove EXFUNs.
 +      * fontset.h: Remove EXFUN.
 +      * font.h: Remove EXFUNs.
 +      * dosfns.c (system_process_attributes): Remove EXFUN.
 +      * keymap.h: Remove EXFUNs.
 +      * lisp.h: Remove EXFUNs.
 +      * w32term.h: Remove EXFUNs.
 +      * window.h: Remove EXFUNs.
 +      * xsettings.h: Remove EXFUN.
 +      * xterm.h: Remove EXFUN.
 +
 +2012-07-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.h (Frandom): Make it visible to C.
 +      * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
 +      buffer for invisible buffers.  (Bug#1229)
 +
 +2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
 +      values which aren't power of 2.
 +      * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
 +      Verify it's value and the value of VECTOR_BLOCK_SIZE.  Adjust users
 +      accordingly.
 +
 +2012-07-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
 +
 +      * alloc.c (mark_object): Revert part of last patch to use `switch'.
 +
 +2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (allocate_vector_block): Remove redundant
 +      calls to mallopt if DOUG_LEA_MALLOC is defined.
 +      (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
 +      avoid calls to mallopt if zero_vector is returned.
 +
 +2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
 +      is enabled, avoid dereferencing NULL current_sblock if
 +      running undumped.
 +
 +2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Cleanup basic buffer management.
 +      * buffer.h (struct buffer): Change layout to use generic vector
 +      marking code.  Fix some comments.  Change type of 'clip_changed'
 +      to bitfield.  Remove unused #ifndef old.
 +      (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
 +      (GET_OVERLAYS_AT): Fix indentation.
 +      (for_each_per_buffer_object_at): New macro.
 +      * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
 +      (Fbuffer_local_variables): Use it.
 +      (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
 +      * alloc.c (allocate_buffer): Adjust to match new layout of
 +      struct buffer.  Fix comment.
 +      (mark_overlay): New function.
 +      (mark_buffer): Use it.  Use mark_vectorlike to mark normal
 +      Lisp area of struct buffer.
 +      (mark_object): Use it.  Adjust marking of misc objects
 +      and related comments.
 +
 +2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
 +      wrapper that is not needed because the wrapped code is a no-op (zero
 +      machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
 +      This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
 +
 +2012-07-02  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (mark_buffer): Simplify.  Remove prototype.
 +      (mark_object): Add comment.  Reorganize marking of vector-like
 +      objects.  Use CHECK_LIVE for all vector-like objects except buffers
 +      and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
 +      Avoid redundant calls to mark_vectorlike for bool vectors.
 +
 +2012-06-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
 +
 +      * epaths.in (PATH_SITELOADSEARCH): New.
 +      * lread.c (init_lread): Use PATH_SITELOADSEARCH.
 +      This is rather than relying on --enable-locallisppath elements
 +      having "site-lisp" in their names.  (Bug#10208#25, 11658)
 +
 +2012-06-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32proc.c (sys_select): Accept and ignore one more argument.
 +
 +      * w32.c (emacs_gnutls_pull): Call select with one more argument.
 +
 +      * sysselect.h [DOS_NT]: Don't include sys/select.h.
 +      (pselect) [!MS_DOS]: Redirect to sys_select.
 +
 +      * sysdep.c: Don't include dos.h and dosfns.h.
 +
 +      * process.c (sys_select):
 +      * msdos.c (sys_select): Accept one more argument and ignore it.
 +
 +      * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
 +      adapt data types and code to that.
 +
 +      * dosfns.c:
 +      * msdos.c (gettime, settime): Define away the prototypes in dos.h,
 +      which clashes with the gnulib function of the same name.
 +
 +2012-06-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * font.c (font_style_to_value, font_style_symbolic)
 +      (font_prop_validate_style): Add type checks for values in
 +      font_style_table.
 +
 +      * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
 +      argument.
 +      * character.c, charset.c, menu.c, process.c, window.c: Adjust all
 +      uses.
 +
 +2012-06-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (try_window_id): Undo last change.
 +
 +      * w32.c (getwd): Adjust commentary about startup_dir.
 +      (init_environment): Always call sys_access, even in non-MSVC
 +      builds.  Don't chdir to the directory of the Emacs executable.
 +      This undoes code from 1997 which was justified by the need to
 +      "avoid conflicts when removing and renaming directories".  But its
 +      downside was that every relative file name was being interpreted
 +      relative to the directory of the Emacs executable, which can never
 +      be TRT.  In particular, it broke sys_access when called with
 +      relative file names.
 +      (sys_access): Map GetLastError to errno.
 +
 +2012-06-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * window.h (struct window): Change type of 'fringes_outside_margins'
 +      to bitfield.  Fix comment.  Adjust users accordingly.
 +      (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
 +      Adjust comment.
 +      * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
 +      to ptrdiff_t.
 +
 +2012-06-29  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * gnutls.c (emacs_gnutls_handshake):
 +      Add QUIT to make the loop interruptible.
 +
 +2012-06-29  Glenn Morris  <rgm@gnu.org>
 +
 +      * charset.c (init_charset): Make lack of etc/charsets fatal.
 +
 +2012-06-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * editfns.c (region_limit): Fix type mismatch.
 +
 +2012-06-29  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
 +      undefined.  Convert from xassert to eassert.
 +      * nsmenu.m: Convert from xassert to eassert.
 +      * nsterm.m: Likewise.
 +
 +2012-06-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * editfns.c (region_limit): Clip to narrowing (bug#11770).
 +
 +2012-06-28  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Avoid integer overflow on scroll-left and scroll-right.
 +      * window.c (HSCROLL_MAX): New macro.
 +      (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
 +      overflow when requested scroll falls outside ptrdiff_t range.
 +
 +2012-06-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * window.h (struct window): Change type of 'hscroll',
 +      'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
 +      'last_modified' and 'last_overlay_modified' to EMACS_INT.
 +      Adjust users accordingly.
 +      * xdisp.c (try_cursor_movement): Replace type check with eassert.
 +      * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
 +      from EMACS_INT to ptrdiff_t.
 +      (make_window): Omit redundant initialization.
 +
 +2012-06-28  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
 +
 +2012-06-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * window.h (struct window): Change type of 'use_time' and
 +      'sequence_number' from Lisp_Object to int.
 +      * frame.c (make_frame): Adjust users accordingly.
 +      * print.c (print_object): Likewise.
 +      * window.c (select_window, Fwindow_use_time, make_parent_window)
 +      (make_window): Likewise.
 +
 +2012-06-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
 +      enabled with --enable-checking=[all,glyphs] configure option.
 +      Fix GLYPH_DEBUG usage assuming that it may be undefined,
 +      adjust comments accordingly.
 +      * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
 +      undefined, adjust comments accordingly.
 +      * image.c: Likewise.
 +      * scroll.c: Likewise.
 +      * w32fns.c: Likewise.
 +      * w32term.c: Likewise.
 +      * xdisp.c: Likewise.
 +      * xfaces.c: Likewise.
 +      * xfns.c: Likewise.
 +      * xterm.c: Likewise.
 +
 +2012-06-28  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Generalize run-time debugging checks.
 +      * dispextern.h (XASSERTS): Remove.
 +      * fontset.c (xassert): Remove.
 +      Convert from xassert to eassert.
 +      * alloc.c: Convert from xassert to eassert.
 +      * bidi.c: Likewise.
 +      * dispnew.c: Likewise.
 +      * fns.c: Likewise.
 +      * fringe.c: Likewise.
 +      * ftfont.c: Likewise.
 +      * gtkutil.c: Likewise.
 +      * image.c: Likewise.
 +      * keyboard.c: Likewise.
 +      * menu.c: Likewise.
 +      * process.c: Likewise.
 +      * scroll.c: Likewise.
 +      * sound.c: Likewise.
 +      * term.c: Likewise.
 +      * w32console.c: Likewise.
 +      * w32fns.c: Likewise.
 +      * w32term.c: Likewise.
 +      * window.c: Likewise.
 +      * xdisp.c: Likewise.
 +      * xfaces.c: Likewise.
 +      * xfns.c: Likewise.
 +      * xselect.c: Likewise.
 +      * xterm.c: Likewise.
 +
 +2012-06-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * fns.c (maybe_resize_hash_table): Output message when growing the
 +      purify-hashtable.
 +
 +2012-06-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (allocate_string_data): Remove dead code.
 +      * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
 +      avoid GCC warning about unused macro.
 +
 +2012-06-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (allocate_string): Omit intervals initialization.
 +      * alloc.c (make_uninit_multibyte_string): Initialize intervals
 +      as in make_pure_string and make_pure_c_string.
 +
 +2012-06-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (allocate_string): Fix last change.
 +
 +2012-06-27  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (allocate_string): Remove two redundant calls
 +      to memset, add explicit initialization where appropriate.
 +
 +2012-06-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.mk (lisp): Remove paths.elc.
 +
 +2012-06-27  Chong Yidong  <cyd@gnu.org>
 +
 +      * doc.c (Fsubstitute_command_keys): Fix punctuation.
 +
 +2012-06-26  John Wiegley  <johnw@newartisans.com>
 +
 +      * unexmacosx.c (copy_data_segment): Add two section names used
 +      on Mac OS X Lion: __mod_init_func and __mod_term_func.
 +
 +      * alloc.c (mark_memory): Do not check with -faddress-sanitizer
 +      when building with Clang.
 +
 +2012-06-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fapply): Allow calling it with a single argument.
 +
 +2012-06-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
 +      _stricmp and _strnicmp.
 +      (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
 +
 +2012-06-26  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c (allocate_window): Zero out non-Lisp part of newly
 +      allocated window.
 +      (allocate_process): Likewise for new process.
 +      (allocate_terminal): Change to use offsetof.
 +      (allocate_frame): Likewise.
 +      * frame.c (make_frame): Omit redundant initialization.
 +      * window.c (make_parent_window): Use memset.
 +      (make_window): Omit redundant initialization.
 +      * process.c (make_process): Omit redundant initialization.
 +      * terminal.c (create_terminal): Likewise.
 +
 +2012-06-26  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * term.c (delete_tty): Remove redundant call to memset.
 +
 +2012-06-26  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c: Remove build_string.
 +      * lisp.h: Define build_string as static inline.  This provides
 +      a better opportunity to optimize away calls to strlen when the
 +      function is called with compile-time constant argument.
 +      * image.c (imagemagick_error): Convert to build_string.
 +      * w32proc.c (sys_spawnve): Likewise.
 +      * xterm.c (x_term_init): Likewise.
 +
 +2012-06-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Use sprintf return value instead of invoking strlen on result.
 +      In the old days this wasn't portable, since some sprintf
 +      implementations returned char *.  But they died out years ago and
 +      Emacs already assumes sprintf returns int.
 +      Similarly for float_to_string.
 +      This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
 +      * ccl.c (ccl_driver):
 +      * character.c (string_escape_byte8):
 +      * data.c (Fnumber_to_string):
 +      * doprnt.c (doprnt):
 +      * print.c (print_object):
 +      * xdisp.c (message_dolog):
 +      * xfns.c (syms_of_xfns):
 +      Use sprintf or float_to_string result to avoid need to call strlen.
 +      * data.c (Fnumber_to_string):
 +      Use make_unibyte_string, since the string must be ASCII.
 +      * lisp.h, print.c (float_to_string): Now returns int length.
 +      * term.c (produce_glyphless_glyph):
 +      Use sprintf result rather than recomputing it.
 +
 +      Clean out last vestiges of the old HAVE_CONFIG_H stuff.
 +      * Makefile.in (ALL_CFLAGS):
 +      * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
 +      * gmalloc.c, regex.c: Include <config.h> unconditionally.
 +
 +2012-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * dispextern.h (xstrcasecmp): Define to library function
 +      strcasecmp if available.
 +      * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
 +
 +2012-06-25  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
 +      Avoid comma operator.
 +      * menu.c (push_submenu_start, push_submenu_end)
 +      (push_left_right_boundary, push_menu_pane): Likewise.
 +      * msdos.c (dos_rawgetc): Likewise.
 +
 +2012-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * xfns.c (xic_create_fontsetname): Remove redundant calls
 +      to memset.
 +
 +2012-06-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * gtkutil.c (get_utf8_string): Remove redundant assignment.
 +      sprintf already null-terminates its output.
 +
 +      * xfns.c (x_window): Remove redundant cast.
 +
 +2012-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
 +      `const char *' to `char *' to avoid compiler warning.
 +
 +2012-06-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
 +      instead of truncating it to 63 (admittedly a generous limit).
 +
 +      * process.c: Fix spelling and caps in comments.
 +
 +2012-06-24  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * emacs.c (setpgrp): Remove definition, unused.
 +      * sysdep.c (setpgrp): Remove definition, not used in this file.
 +
 +2012-06-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in: Update dependencies.
 +
 +2012-06-24  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
 +      (SYSTIME_H): Add nt/inc/sys/time.h.
 +
 +      * systime.h [WINDOWSNT]: Include sys/time.h.
 +
 +      * s/ms-w32.h (struct timespec): Definition moved from
 +      nt/inc/sys/time.h.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
 +
 +2012-06-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
 +      * buffer.h (buffer_slot_type_mismatch):
 +      * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
 +      * eval.c (unwind_to_catch):
 +      * image.c (my_png_error, my_error_exit):
 +      * keyboard.c (quit_throw_to_read_char, user_error)
 +      (Fexit_recursive_edit, Fabort_recursive_edit):
 +      * lisp.h (die, args_out_of_range, args_out_of_range_3)
 +      (wrong_type_argument, buffer_overflow, __executable_start)
 +      (memory_full, buffer_memory_full, string_overflow, Fthrow)
 +      (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
 +      (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
 +      (fatal):
 +      (child_setup) [!DOS_NT]:
 +      * lread.c (end_of_file_error, invalid_syntax):
 +      * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
 +      * puresize.h (pure_write_error):
 +      * search.c (matcher_overflow):
 +      * sound.c (sound_perror, alsa_sound_perror):
 +      * sysdep.c, syssignal.h (croak):
 +      * term.c (maybe_fatal, vfatal):
 +      * textprop.c (text_read_only):
 +      * undo.c (user_error):
 +      * unexmacosx.c (unexec_error):
 +      * xterm.c (x_ins_del_lines, x_delete_glyphs):
 +      Use _Noreturn rather than NO_RETURN.
 +      No need for separate decl merely because of _Noreturn.
 +      * sound.c (sound_warning, parse_sound):
 +      Remove unnecessary forward decls.
 +
 +2012-06-24  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
 +      * lisp.h (WAIT_READING_MAX): New macro.
 +      * dispnew.c (Fsleep_for, sit_for):
 +      * keyboard.c (kbd_buffer_get_event):
 +      * process.c (Faccept_process_output):
 +      Use it to avoid bogus compiler warnings with obsolescent GCC versions.
 +      This improves on the previous patch, which introduced a bug
 +      when time_t is unsigned and as wide as intmax_t.
 +      See <http://bugs.gnu.org/9000#51>.
 +
 +2012-06-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispnew.c (sit_for, Fsleep_for):
 +      * keyboard.c (kbd_buffer_get_event):
 +      * process.c (Faccept_process_output): Avoid compiler warnings when
 +      comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
 +
 +2012-06-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in: Update dependencies.
 +
 +      * w32.c (ltime): Add return type and declare static.
 +      (w32_get_internal_run_time): Remove usused variable `time_100ns'.
 +
 +2012-06-23  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
 +      Privately reported by Herbert J. Skuhra.
 +      (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
 +      All uses changed.
 +      (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
 +      not make_lisp_timeval, when the argument is of type EMACS_TIME.
 +
 +2012-06-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
 +      last argument of make_unibyte_string.
 +
 +      * keyboard.c (kbd_buffer_get_event): Include the codepage and the
 +      language ID in the event parameters.
 +
 +      * w32term.c (w32_read_socket): Put the new keyboard codepage into
 +      event.code, not the obscure "character set ID".
 +
 +2012-06-23  Chong Yidong  <cyd@gnu.org>
 +
 +      * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
 +
 +2012-06-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
 +      * w32.c (fdutimens): New function.
 +
 +      * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
 +
 +      * s/ms-w32.h (pselect): Redirect to sys_select.
 +
 +      * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
 +
 +      * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
 +      in the logic of incrementing and decrementing the value of
 +      use_relocatable_buffers.
 +
 +2012-06-23  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
 +      Privately reported by Herbert J. Skuhra.
 +      [__FreeBSD__]: Remove "*/" typo after "#include".
 +      (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
 +      (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
 +      (TIMEVAL, system_process_attributes) [__FreeBSD__]:
 +      Don't assume EMACS_TIME and struct timeval are the same type.
 +
 +2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Support higher-resolution time stamps (Bug#9000).
 +      The time stamps are only nanosecond-resolution at the C level,
 +      since that's the best that any real-world system supports now.
 +      But they are picosecond-resolution at the Lisp level, as that's
 +      easy, and leaves room for future OS improvements.
 +
 +      * Makefile.in (LIB_CLOCK_GETTIME): New macro.
 +      (LIBES): Use it.
 +
 +      * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
 +      Don't get current time unless it's needed.
 +
 +      * atimer.c: Include <sys/time.h> unconditionally, since gnulib
 +      now provides it if it's absent.
 +      (start_atimer): Port to higher-res time stamps.
 +      Check for time stamp overflow.  Don't get current time more
 +      often than is needed.
 +
 +      * buffer.h (struct buffer): Buffer modtime now has high resolution.
 +      Include systime.h, not time.h.
 +      (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
 +
 +      * dired.c: Include stat-time.h.
 +      (Ffile-attributes): File times now have higher resolution.
 +
 +      * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
 +      (struct image): Timestamp now has higher resolution.
 +
 +      * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
 +      has at least microseconds now.  All uses removed.
 +      (update_frame, update_single_window, update_window, update_frame_1)
 +      (Fsleep_for, sit_for): Port to higher-resolution time stamps.
 +      (duration_to_sec_usec): Remove; no longer needed.
 +
 +      * editfns.c (time_overflow): Now extern.
 +      (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
 +      (float-time, Fformat_time_string, Fcurrent_time_string)
 +      (Fcurrent_time_zone): Accept and generate higher-resolution
 +      time stamps.
 +      (make_time_tail, make_lisp_time, dissassemble_lisp_time)
 +      (decode_time_components, lisp_seconds_argument): New functions.
 +      (make_time): Now static.
 +      (lisp_time_argument): Now returns EMACS_TIME.  New arg ppsec.
 +      Report an error if the time is invalid, rather than having the caller
 +      do that.
 +
 +      * fileio.c: Include <stat-time.h>
 +      (Fcopy_file): Copy higher-resolution time stamps.
 +      Prefer to set the time stamp via a file descriptor if that works.
 +      (Fset_file_times, Finsert_file_contents, Fwrite_region)
 +      (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
 +      (Fvisited_file_modtime, Fset_visited_file_modtime):
 +      Support higher-resolution time stamps.
 +
 +      * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
 +
 +      * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
 +
 +      * image.c (prepare_image_for_display, clear_image_cache)
 +      (lookup_image): Port to higer-resolution time stamps.
 +
 +      * keyboard.c (start_polling, bind_polling_period):
 +      Check for time stamp overflow.
 +      (read_char, kbd_buffer_get_event, timer_start_idle)
 +      (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
 +      (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
 +      Port to higher-resolution time stamps.  Do not assume time_t is signed.
 +      (decode_timer): New function.  Timers are now vectors of length 9,
 +      not 8, to accommodate the picosecond component.
 +      (timer_check_2): Use it.
 +
 +      * nsterm.m (select_timeout, timeval_subtract): Remove.
 +      (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
 +      as they're a bit more accurate and handle overflow better.
 +      (ns_select): Change prototype to be compatible with pselect.
 +      (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
 +      * nsterm.h (ns_select): Adjust prototype.
 +
 +      * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
 +      us-resolution time stamps.
 +      (sys_select): Use the new EMACS_TIME_SIGN macro instead.
 +
 +      * lread.c (read_filtered_event): Port to ns-resolution time stamps.
 +
 +      * lisp.h (time_overflow): New decl.
 +      (wait_reading_process_output): First arg is now intmax_t, not int,
 +      to accommodate larger waits.
 +
 +      * process.h (struct Lisp_Process.read_output_delay):
 +      Now counts nanoseconds, not microseconds.
 +      * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
 +      EMACS_HAS_USECS.
 +      (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
 +      (wait_reading_process_output):
 +      Port to ns-resolution time stamps.
 +      (Faccept_process_output, wait_reading_process_output):
 +      Check for time stamp overflow.  Do not assume time_t is signed.
 +      (select_wrapper): Remove; we now use pselect.
 +      (Fprocess_attributes): Now generates ns-resolution time stamps.
 +
 +      * sysdep.c: Include utimens.h.  Don't include utime.h
 +      or worry about struct utimbuf; gnulib does that for us now.
 +      (gettimeofday): Remove; gnulib provides a substitute.
 +      (make_timeval): New function.
 +      (set_file_times): Now sets ns-resolution time stamps.
 +      New arg FD; all uses changed.
 +      (time_from_jiffies, ltime_from_jiffies, get_up_time)
 +      (system_process_attributes):
 +      Now returns ns-resolution time stamp.  All uses changed.
 +      Check for time stamp overflow.
 +
 +      * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
 +      provides a substitute now.
 +
 +      * systime.h: Include timespec.h rather than sys/time.h and time.h,
 +      since it guarantees struct timespec.
 +      (EMACS_TIME): Now struct timespec, so that we can support
 +      ns-resolution time stamps.
 +      (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
 +      (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
 +      (EMACS_USECS): Remove.
 +      (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
 +      so multiply the arg by 1000 before storing it.
 +      (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
 +      New macros.
 +      (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
 +      Port to ns-resolution time stamps.
 +      (EMACS_TIME_NEG_P): Remove; replaced by....
 +      (EMACS_TIME_SIGN): New macro.
 +      (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
 +      (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
 +      (set_file_times, make_time, lisp_time_argument): Adjust signature.
 +      (make_timeval, make_lisp_time, decode_time_components): New decls.
 +      (EMACS_TIME_CMP): Remove; no longer used.  Plus, it was buggy, in
 +      that it mishandled time_t overflow.  You can't compare by subtracting!
 +      (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
 +      (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
 +
 +      * term.c: Include <sys/time.h>.
 +      (timeval_to_Time): New function, for proper overflow wraparound.
 +      (term_mouse_position, term_mouse_click): Use it.
 +
 +      * undo.c (record_first_change): Support higher-resolution time stamps
 +      in the undo buffer.
 +      (Fprimitive_undo): Use them when restoring time stamps.
 +
 +      * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
 +      (w32_get_internal_run_time):
 +      Port to higher-resolution Emacs time stamps.
 +      (ltime): Now accepts single 64-bit integer, as that's more convenient
 +      for callers.
 +
 +      * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
 +
 +      * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
 +      for compatibility with pselect.  Support ns-resolution time stamps.
 +
 +      * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
 +
 +      * xselect.c (wait_for_property_change, x_get_foreign_selection):
 +      Check for time stamp overflow, and support ns-resolution time stamps.
 +
 +      * xterm.c: Don't include sys/time.h; gnulib does that for us now.
 +      Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
 +      (timeval_subtract): Remove; no longer needed.
 +      (XTflash, XTring_bell, x_wait_for_event):
 +      Port to ns-resolution time stamps.  Don't assume time_t is signed.
 +
 +2012-06-22  Chong Yidong  <cyd@gnu.org>
 +
 +      * xdisp.c (x_consider_frame_title): Revert last change.
 +
 +2012-06-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * alloc.c (NSTATICS): Enlarge to 0x650.  Otherwise, Emacs compiled
 +      with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
 +      aborts in staticpro during startup.  (Without -DBYTE_CODE_METER,
 +      staticidx goes up to 1597 out of 1600 = 0x640.)
 +
 +2012-06-20  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
 +      Otherwise, the umask might be mistakenly 0 while handling input signals.
 +
 +2012-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuf.c (Fread_string): Bind minibuffer-completion-table.
 +
 +2012-06-19  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
 +      * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
 +      * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
 +      access to `contents' member of Lisp_Vector objects with AREF and ASET
 +      where appropriate.
 +
 +2012-06-19  Chong Yidong  <cyd@gnu.org>
 +
 +      * frame.c (delete_frame): When selecting a frame on a different
 +      text terminal, do not alter the terminal's top-frame.
 +
 +      * xdisp.c (format_mode_line_unwind_data): Record the target
 +      frame's selected window and its terminal's top-frame.
 +      (unwind_format_mode_line): Restore them.
 +      (x_consider_frame_title, display_mode_line, Fformat_mode_line):
 +      Callers changed.
 +      (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
 +      since tty frames can be explicitly named.
 +      (prepare_menu_bars): Likewise.
 +
 +      * term.c (Ftty_top_frame): New function.
 +
 +2012-06-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port byte-code-meter to modern targets.
 +      * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
 +      !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG.  Problem with
 +      CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
 +      (METER_1, METER_2): Simplify.
 +
 +2012-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * data.c (Fdefalias): Return `symbol' (bug#11686).
 +
 +2012-06-18  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * buffer.c (Fkill_buffer): Don't throw an error when the buffer
 +      gets killed during executing of this function (Bug#11665).
 +      Try to always return Qt when the buffer has been actually killed.
 +      (Vkill_buffer_query_functions): In doc-string say that functions
 +      run by this hook should not change the current buffer.
 +
 +2012-06-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix recently-introduced process.c problems found by static checking.
 +      * process.c (write_queue_push, write_queue_pop, send_process):
 +      Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
 +      (write_queue_pop): Fix pointer signedness problem.
 +      (send_process): Remove unused local.
 +
 +2012-06-17  Chong Yidong  <cyd@gnu.org>
 +
 +      * xdisp.c (redisplay_internal): No need to redisplay terminal
 +      frames that are not on top.
 +
 +2012-06-17  Troels Nielsen  <bn.troels@gmail.com>
 +
 +      * process.c (make_process): Initialize write_queue.
 +      (write_queue_push, write_queue_pop): New functions.
 +      (send_process): Use them to maintain correct ordering of process
 +      writes (Bug#10815).
 +
 +2012-06-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h (eassert): Assume C89 or later.
 +      This removes the need for CHECK.
 +      (CHECK): Remove.  Its comments about always evaluating its
 +      argument were confusing, as 'eassert' typically does not evaluate
 +      its argument.
 +
 +      * coding.c (produce_chars): Use ptrdiff_t, not int.
 +
 +      * xterm.c (x_draw_underwave): Check for integer overflow.
 +      This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
 +
 +2012-06-17  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
 +      referenced (Bug#11583).
 +
 +2012-06-16  Aurelien Aptel  <aurelien.aptel@gmail.com>
 +
 +      Implement wave-style variant of underlining.
 +      * dispextern.h (face_underline_type): New enum.
 +      (face): Add field for underline type.
 +      * nsterm.m (ns_draw_underwave): New function.
 +      (ns_draw_text_decoration): Use it.
 +      * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
 +      New functions.
 +      (x_draw_glyph_string): Use them.
 +      * xfaces.c (Qline, Qwave): New Lisp objects.
 +      (check_lface_attrs, merge_face_ref)
 +      (Finternal_set_lisp_face_attribute, realize_x_face):
 +      Handle wave-style underline face attributes.
 +      * xterm.c (x_draw_underwave): New function.
 +      (x_draw_glyph_string): Use it.
 +
 +2012-06-16  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
 +      ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
 +      ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
 +      ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
 +      ($(BLD)/w32select.$(O)): Update dependencies.
 +
 +2012-06-16  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
 +      (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
 +      * character.c (_fetch_multibyte_char_p): Remove.
 +      * alloc.c: Include "character.h" before "buffer.h".
 +      * bidi.c: Likewise.
 +      * buffer.c: Likewise.
 +      * bytecode.c: Likewise.
 +      * callint.c: Likewise.
 +      * callproc.c: Likewise.
 +      * casefiddle.c: Likewise.
 +      * casetab.c: Likewise.
 +      * category.c: Likewise.
 +      * cmds.c: Likewise.
 +      * coding.c: Likewise.
 +      * composite.c: Likewise.
 +      * dired.c: Likewise.
 +      * dispnew.c: Likewise.
 +      * doc.c: Likewise.
 +      * dosfns.c: Likewise.
 +      * editfns.c: Likewise.
 +      * emacs.c: Likewise.
 +      * fileio.c: Likewise.
 +      * filelock.c: Likewise.
 +      * font.c: Likewise.
 +      * fontset.c: Likewise.
 +      * fringe.c: Likewise.
 +      * indent.c: Likewise.
 +      * insdel.c: Likewise.
 +      * intervals.c: Likewise.
 +      * keyboard.c: Likewise.
 +      * keymap.c: Likewise.
 +      * lread.c: Likewise.
 +      * macros.c: Likewise.
 +      * marker.c: Likewise.
 +      * minibuf.c: Likewise.
 +      * nsfns.m: Likewise.
 +      * nsmenu.m: Likewise.
 +      * print.c: Likewise.
 +      * process.c: Likewise.
 +      * regex.c: Likewise.
 +      * region-cache.c: Likewise.
 +      * search.c: Likewise.
 +      * syntax.c: Likewise.
 +      * term.c: Likewise.
 +      * textprop.c: Likewise.
 +      * undo.c: Likewise.
 +      * unexsol.c: Likewise.
 +      * w16select.c: Likewise.
 +      * w32fns.c: Likewise.
 +      * w32menu.c: Likewise.
 +      * window.c: Likewise.
 +      * xdisp.c: Likewise.
 +      * xfns.c: Likewise.
 +      * xmenu.c: Likewise.
 +      * xml.c: Likewise.
 +      * xselect.c: Likewise.
 +
 +2012-06-16  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
 +      If all the glyphs of the glyph row came from strings, and we have no
 +      cursor positioning clues, put the cursor on the first glyph of the
 +      row.
 +      (handle_face_prop): Use chunk-relative overlay string index when
 +      indexing into it->string_overlays array.  (Bug#11653)
 +      (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
 +      the rightmost.  (Bug#11720)
 +
 +2012-06-16  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * category.h (CHAR_HAS_CATEGORY): Define as inline.
 +      (CATEGORY_MEMBER): Enforce 1/0 value.
 +      * category.c (_temp_category_set): Remove.
 +
 +2012-06-16  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * window.c (Fdelete_other_windows_internal)
 +      (Fdelete_window_internal): Don't access frame's mouse highlight
 +      info of the initial frame.  (Bug#11677)
 +
 +2012-06-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * .gdbinit (xgetint): Fix recently-introduced paren typo.
 +      Assume USE_2_TAGS_FOR_INTS.
 +      (xreload): Adjust $tagmask width to match recent lisp.h change.
 +
 +      Simplify lisp.h in minor ways that should not affect code.
 +      * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
 +      (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
 +      (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
 +      Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
 +      (INTTYPEBITS): New macro, for clarity.
 +      (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
 +      (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
 +      Simplify now that USE_LSB_TAG is always defined.
 +      (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
 +      (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
 +
 +2012-06-13  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
 +
 +2012-06-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/bsd-common.h (BSD4_3):
 +      * s/usg5-4-common.h (USG5_4): No longer define; unused.
 +
 +2012-06-13  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
 +      instead of union.
 +      (XLI, XIL): Define.
 +      (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
 +      Use them.
 +      * emacs.c (gdb_use_struct): Rename from gdb_use_union.
 +      * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
 +      * alloc.c (widen_to_Lisp_Object): Remove.
 +      (mark_memory): Use XIL instead of widen_to_Lisp_Object.
 +      * frame.c (delete_frame): Remove outdated comment.
 +      * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
 +      USE_LISP_UNION_TYPE.
 +      (Fw32_unregister_hot_key): Likewise.
 +      (Fw32_toggle_lock_key): Likewise.
 +      * w32menu.c (add_menu_item): Likewise.
 +      (w32_menu_display_help): Use XIL instead of checking
 +      USE_LISP_UNION_TYPE.
 +      * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
 +      (init_heap): Likewise.
 +      * w32term.c (w32_read_socket): Update comment.
 +
 +2012-06-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/usg5-4-common.h, src/s/unixware.h:
 +      Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
 +
 +      * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
 +
 +2012-06-13  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
 +      * alloc.c (make_number) [!defined make_number]:
 +      Remove, as lisp.h always defines this now.
 +      (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
 +      (roundup_size): Verify that it is a power of 2.
 +      * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
 +      * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
 +      * lisp.h (USE_LSB_TAG): Allow the builder to compile with
 +      -DUSE_LSB_TAG=0, to override the automatically-selected default.
 +      USE_LSB_TAG now is always defined to be either 0 or 1.
 +      All uses changed.
 +      (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
 +      code works fine either way, and efficiency is not a concern here,
 +      as the union type is for debugging, not for production.
 +      (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
 +      Use an inline function on all platforms when using the union type,
 +      since this is simpler and 'static inline' can be used portably
 +      within Emacs now.
 +      (LISP_INITIALLY_ZERO): New macro.
 +      (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
 +      (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
 +
 +2012-06-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
 +
 +      * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
 +
 +      * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
 +      Move BROKEN_SIGIO to configure.
 +
 +      * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
 +      Move NO_TERMIO to configure.
 +
 +2012-06-12  Chong Yidong  <cyd@gnu.org>
 +
 +      * image.c (imagemagick_load_image): Use MagickFlattenImage if
 +      MagickMergeImageLayers is undefined.  Use pixel pusher loop if
 +      MagickExportImagePixels is undefined.
 +
 +2012-06-12  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * image.c (imagemagick_load_image): Remove unused label.
 +
 +2012-06-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
 +      * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
 +      * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
 +      * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
 +
 +2012-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * alloc.c (make_byte_code): New function.
 +      (Fmake_byte_code): Use it.  Don't purify here.
 +      * lread.c (read1): Use it as well to avoid extra allocation.
 +
 +2012-06-11  Chong Yidong  <cyd@gnu.org>
 +
 +      * image.c (imagemagick_load_image): Implement transparency.
 +
 +2012-06-10  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
 +      account for preceding backslashes.  (Bug#11663)
 +
 +2012-06-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * term.c: Support italics in capable terminals (Bug#9652).
 +      (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
 +      (turn_on_face): Output using TS_enter_italic_mode if available.
 +      Don't handle unused blinking and alt-charset cases.
 +      (turn_off_face): Handle italic case; discard unused tty_blinking_p
 +      and tty_alt_charset_p cases.
 +      (tty_capable_p, init_tty): Support italics.
 +
 +      * termchar.h (struct tty_display_info): Add field for italics.
 +      Remove unused blink field.
 +
 +      * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
 +      Handle slant.
 +
 +      * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
 +      (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
 +      tty_alt_charset_p.  Add tty_italic_p.
 +
 +2012-06-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
 +      dbus_type_is_basic if available.
 +      (xd_extract_signed, xd_extract_unsigned): Rename from
 +      extract_signed and extract_unsigned, respectively.  Adapt callers.
 +
 +2012-06-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
 +
 +      * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
 +      case (Bug#9752).
 +
 +2012-06-08  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * xdisp.c (vmessage): Treat frame message as multibyte.
 +      Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
 +      would generate the diagnostic "Making \302\247 buffer-local while
 +      let-bound!".
 +
 +2012-06-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispnew.c (showing_window_margins_p): Undo last change, which
 +      was done due to an inadvertent commit.
 +      (adjust_frame_glyphs_for_frame_redisplay): Do call
 +      showing_window_margins_p.
 +
 +2012-06-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fmake_var_non_special): New primitive.
 +      (syms_of_eval): Defsubr it.
 +      * lread.c (syms_of_lread): Mark `values' as lexically scoped.
 +
 +2012-06-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
 +      function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
 +
 +2012-06-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * alloc.c (allocate_vectorlike): Fix last change.
 +
 +2012-06-08  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      Block-based vector allocation of small vectors.
 +      * lisp.h (struct vectorlike_header): New field `nbytes',
 +      adjust comment accordingly.
 +      * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
 +      to denote vector blocks.  Adjust users (live_vector_p,
 +      mark_maybe_pointer, valid_lisp_object_p) accordingly.
 +      (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
 +      (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
 +      (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
 +      (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
 +      (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
 +      (roundup_size): New constant.
 +      (struct vector_block): New data type.
 +      (vector_blocks, vector_free_lists, zero_vector): New variables.
 +      (all_vectors): Rename to `large_vectors'.
 +      (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
 +      (sweep_vectors): New functions.
 +      (allocate_vectorlike): Return `zero_vector' as the only vector of
 +      0 items.  Allocate new vector from block if vector size is less than
 +      or equal to VBLOCK_BYTES_MAX.
 +      (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
 +      (init_alloc_once): Add call to init_vectors.
 +
 +2012-06-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fmacroexpand): Stop if the macro returns the same form.
  
 -2012-08-12  Jan Djärv  <jan.h.d@swipnet.se>
 +2012-06-07  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      * nsterm.m (ns_read_socket): Return early if there is a modal
 -      window (Bug#12043).
 +      * doprnt.c (doprnt): Truncate multibyte char correctly.
 +      Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
 +      would mishandle a string argument "Xc" if X was a multibyte
 +      character of length 2: it would truncate after X's first byte
 +      rather than including all of X.
  
 -      * nsmenu.m (Popdown_data): New struct.
 -      (pop_down_menu): p->pointer is Popdown_data.  Release the pool and
 -      free Popdown_data.
 -      (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
 -      (initWithContentRect): Make imgView and contentView non-static
 -      and autorelease them.  Also autorelease img and matrix (Bug#12005).
 -      (dealloc): Remove (Bug#12005).
 +2012-06-06  Chong Yidong  <cyd@gnu.org>
  
 -      * nsterm.m (keyDown:): Interpret flags without left/right bits
 -      as the left key (Bug#11670).
 +      * buffer.c (word_wrap): Doc fix.
  
 -      * nsmenu.m (ns_update_menubar): Add braces to ambigous if-else.
 +2012-06-04  Paul Eggert  <eggert@cs.ucla.edu>
  
 -2012-08-08  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +      * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
  
 -      * unexmacosx.c (copy_data_segment): Copy initialized data in
 -      statically linked libraries from input file rather than memory.
 +2012-06-03  Glenn Morris  <rgm@gnu.org>
  
 -2012-08-07  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +      * xdisp.c (tool-bar-style): Doc fix.
  
 -      * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
 -      LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
 -      (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
 +2012-06-03  Ulrich Müller  <ulm@gentoo.org>
  
 -2012-07-19  Chong Yidong  <cyd@gnu.org>
 +      * Makefile.in (PAXCTL): Define.
 +      (temacs$(EXEEXT)): Disable memory randomization for the temacs
 +      binary via PaX flags if the paxctl utility is available.
 +      (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
 +      Restore PaX flags to their default.  (Bug#11398)
  
 -      * window.c (Fwindow_absolute_pixel_edges)
 -      (Fdelete_other_windows_internal): Signal an error if the window is
 -      on a dead frame (Bug#11984).
 +2012-06-03  Chong Yidong  <cyd@gnu.org>
  
 -2012-07-14  Eli Zaretskii  <eliz@gnu.org>
 +      * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
 +      buffer (Bug#11226).
  
 -      Remove FILE_SYSTEM_CASE.
 -      * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
 +2012-06-03  Chong Yidong  <cyd@gnu.org>
  
 -      * fileio.c (FILE_SYSTEM_CASE): Don't define.
 -      (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
 -      Fixes problems on MS-DOS with Vtemp_file_name_pattern when
 -      call-process-region passes it through expand-file-name.
 +      * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
 +      (note_mode_line_or_margin_highlight): If there is no help echo,
 +      use mode-line-default-help-echo.  Handle the case where the mouse
 +      position is past the end of the mode line string.
  
 -      * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
 +      * buffer.c (buffer_local_value_1): New function, split from
 +      Fbuffer_local_value; can return Qunbound.
 +      (Fbuffer_local_value): Use it.
 +      (Vmode_line_format): Docstring tweaks.
  
 -2012-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-06-02  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      Fix crash when creating indirect buffer (Bug#11917)
 -      * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
 -      Don't handle unbound variables specially if non-zero.
 -      (Fbuffer_local_variables): Pass zero.
 -      (clone_per_buffer_values): Pass non-zero.
 +      * sysdep.c (system_process_attributes): Improve comment.
  
 -2012-06-28  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * gnutls.c (emacs_gnutls_handshake): Revert last change.  Add QUIT
 -      to make the loop interruptible.
 +      * keyboard.c: Export real-this-command to Elisp.
 +      (syms_of_keyboard): Rename real_this_command to Vreal_this_command
 +      and DEFVAR it.  Update all users.
  
 -2012-06-26  Andreas Schwab  <schwab@linux-m68k.org>
 +2012-06-02  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      * gnutls.c (emacs_gnutls_handshake): Only retry if
 -      GNUTLS_E_INTERRUPTED.
 +      * minibuf.c (Fassoc_string): Remove duplicate declaration.
  
 -2012-06-23  Eli Zaretskii  <eliz@gnu.org>
 +      * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
 +      Convert pctcpu and pctmem to Lisp float properly.
 +      Let the compiler fold better, as 100.0/0x8000 is exact.
  
 -      * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
 -      in the logic of incrementing and decrementing the value of
 -      use_relocatable_buffers.
 +2012-06-02  Andreas Schwab  <schwab@linux-m68k.org>
  
 -2012-06-21  Glenn Morris  <rgm@gnu.org>
 +      * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
 +      cons_block.
  
 -      * charset.c (init_charset): Make lack of etc/charsets fatal.
 +2012-06-01  Paul Eggert  <eggert@cs.ucla.edu>
  
 -2012-06-11  Jan Djärv  <jan.h.d@swipnet.se>
 +      * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
  
 -      * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
 -      referenced (Bug#11583).
 +2012-06-01  Dmitry Antipov  <dmantipov@yandex.ru>
  
 -2012-06-01  Chong Yidong  <cyd@gnu.org>
 +      For a 'struct window', replace some Lisp_Object fields to
 +      bitfields where appropriate, remove unused fields.
 +      * window.h (struct window): Remove unused 'last_mark_x' and
 +      'last_mark_y' fields.  Rename 'mini_p' field to 'mini',
 +      change it's type from Lisp_Object to bitfield.
 +      Change type of 'force_start', 'optional_new_start',
 +      'last_had_star', 'update_mode_line' and 'start_at_line_beg'
 +      fields from Lisp_Object to bitfield.  Adjust users accordingly.
  
 -      * Version 24.1 released.
 +2012-05-31  Paul Eggert  <eggert@cs.ucla.edu>
  
 -2012-05-30  Eli Zaretskii  <eliz@gnu.org>
 +      Pacify gcc -Wdouble-precision when using Xaw.
 +      * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
 +      [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
 +      Use 'float' consistently, rather than 'float' in most places
 +      and 'double' in a couple of places.
 +
 +2012-05-31  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (handle_stop): Detect whether we have overlay strings
        loaded by testing it->current.overlay_string_index to be
        non-negative, instead of checking whether n_overlay_strings is
        positive.  (Bug#11587)
  
 -2012-05-30  Chong Yidong  <cyd@gnu.org>
 +2012-05-31  Chong Yidong  <cyd@gnu.org>
  
        * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
  
        * doc.c (Fsubstitute_command_keys): Doc fix.
  
 -2012-05-29  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-31  Eli Zaretskii  <eliz@gnu.org>
  
        * search.c (search_buffer): Remove calls to
        r_alloc_inhibit_buffer_relocation, as it is now called by
        maybe_unify_char, which was the cause of relocation of buffer text
        in bug#11519.
  
 -2012-05-23  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-31  Eli Zaretskii  <eliz@gnu.org>
  
        * charset.c (maybe_unify_char): Inhibit relocation of buffer text
        for the duration of call to load_charset, to avoid problems with
        decrement the inhibition flag, instead of just setting or
        resetting it.
  
 -2012-05-24  Ken Brown  <kbrown@cornell.edu>
 +2012-05-31  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove obsolete '#define static' cruft.
 +      * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
 +      This #undef was "temporary" in 2000; it is no longer needed
 +      now that '#define static' has gone away.
 +      * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
 +      (gray_bitmap_bits): Remove; no longer needed.
 +      All uses replaced with definiens.
 +      * xterm.c: Include "bitmaps/gray.xbm".
 +
 +2012-05-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Clean up __executable_start, monstartup when --enable-profiling.
 +      The following changes affect the code only when profiling.
 +      * dispnew.c (__executable_start): Rename from safe_bcopy.
 +      Define only on platforms that need it.
 +      * emacs.c: Include <sys/gmon.h> when profiling.
 +      (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
 +      (__executable_start): Remove decl, since lisp.h does it now.
 +      (safe_bcopy): Remove decl; no longer has that name.
 +      (main): Coalesce #if into single bit of code, for simplicity.
 +      Cast pointers to uintptr_t, since standard libraries want integers
 +      and not pointers.
 +      * lisp.h (__executable_start): New decl.
 +
 +2012-05-31  Glenn Morris  <rgm@gnu.org>
 +
 +      * image.c (Fimagemagick_types): Doc fix.
 +
 +2012-05-30  Jim Meyering  <meyering@redhat.com>
 +
 +      * callproc.c (Fcall_process_region): Include directory component
 +      in mkstemp error message (Bug#11586).
 +
 +2012-05-30  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * alloc.c, lisp.h (make_pure_vector): Now static.
 +
 +2012-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
 +      Move to byte-run.el.
 +      (Fautoload): Do the hash-doc more carefully.
 +      * data.c (Fdefalias): Purify definition, except for keymaps.
 +      (Qdefun): Move from eval.c.
 +      * lisp.h (Qdefun): Remove.
 +      * lread.c (read1): Tiny simplification.
 +
 +2012-05-29  Troels Nielsen  <bn.troels@gmail.com>
 +
 +      Do not create empty overlays with the evaporate property (Bug#9642).
 +      * buffer.c (Fmove_overlay): Reinstate the earlier fix for
 +      Bug#9642, but explicitly check that the buffer the overlay would
 +      be moved to is live and rearrange lines to make sure that errors
 +      will not put the overlay in an inconsistent state.
 +      (Fdelete_overlay): Cosmetics.
 +
 +2012-05-28  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32term.c (my_bring_window_to_top): New function.
 +      (x_raise_frame): Use handle returned by DeferWindowPos, which
 +      could be different from the original one.
 +      Call my_bring_window_to_top instead of my_set_foreground_window.
 +      (Bug#11513)
 +
 +      * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
 +      by calling BringWindowToTop.
 +
 +      * w32term.h (WM_EMACS_BRINGTOTOP): New message.
 +      (WM_EMACS_END): Increase by one.
 +
 +2012-05-28  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
 +      This avoids undefined behavior that might cause the eassert
 +      to not catch an out-of-range value.
 +
 +2012-05-28  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
 +      Update dependencies.
 +
 +2012-05-27  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_mirror_char): Fix last change.
 +
 +2012-05-27  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * unexmacosx.c (copy_data_segment): Truncate after 16 characters
 +      when referring to sectname field in printf format.
 +
 +2012-05-27  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
 +      Only r_alloc_inhibit_buffer_relocation needed to be added;
 +      the others were already declared.
 +
 +      * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
 +      before checking whether it's out of range.  Put the check inside
 +      eassert.  See
 +      <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
 +
 +2012-05-27  Ken Brown  <kbrown@cornell.edu>
  
        * callproc.c (Fcall_process): Restore a line that was accidentally
        commented out in the 2011-02-13 change (bug#11547).
  
 -2012-05-23  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-27  Eli Zaretskii  <eliz@gnu.org>
  
        * lisp.h [REL_ALLOC]: Add prototypes for external functions
        defined on ralloc.c.
        text while re_search_2 is doing its job, because re_search_2 is
        passed C pointers to buffer text.  (Bug#11519)
  
 -2012-05-21  Eli Zaretskii  <eliz@gnu.org>
 -
        * msdos.c (internal_terminal_init) <Vwindow_system_version>:
        Update value to 24.
  
 -2012-05-19  Eli Zaretskii  <eliz@gnu.org>
 -
        * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
        state after an additional call to move_it_in_display_line_to, keep
        the values of it->max_ascent and it->max_descent found for the
        was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
        (Bug#11464)
  
 -2012-05-15  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix coding-related core dumps with gcc -ftrapv.
 +      The code was computing A - B, where A and B are pointers, and B is
 +      random garbage.  This can lead to core dumps on platforms that
 +      have special pointer registers, and it also leads to core dumps on
 +      x86-64 when compiled with gcc -ftrapv.  The fix is to compute
 +      A - B only when B is initialized properly.
 +      * coding.c (coding_set_source, coding_set_destination): Return void.
 +      (coding_change_source, coding_change_destinations): New functions,
 +      with the old behaviors of coding_set_source and coding_set_destination.
 +      All callers that need an offset changed to use these new functions.
 +
 +2012-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * nsterm.m (ns_init_paths): Don't mess with INFOPATH.  (Bug#2791)
 +
 +2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Extend mouse support on W32 text-mode console.
 +      * xdisp.c (draw_row_with_mouse_face):
 +      Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
 +
 +      * w32console.c: Include window.h.
 +      (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
 +      New functions.
 +      (initialize_w32_display): Initialize mouse-highlight data.
 +
 +      * w32inevt.c: Include termchar.h and window.h.
 +      (do_mouse_event): Support mouse-autoselect-window.  When the mouse
 +      moves, call note_mouse_highlight.  If help_echo changed, call
 +      gen_help_event to produce help-echo message in the echo area.
 +      Call clear_mouse_face if mouse_face_hidden is set in the mouse
 +      highlight info.
 +
 +2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * lread.c (read1): Simplify slightly to avoid an overflow warning
 +      with GCC 4.7.0 on x86-64.
 +
 +2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_mirror_char): Revert last change: an int is
 +      definitely wide enough here.
 +
 +2012-05-25  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix integer width and related bugs (Bug#9874).
 +      * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
 +      (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
 +      (string_bytes, check_sblock, allocate_string_data):
 +      (compact_small_strings, Fmake_bool_vector, make_string)
 +      (make_unibyte_string, make_multibyte_string)
 +      (make_string_from_bytes, make_specified_string)
 +      (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
 +      (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
 +      (mark_vectorlike):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (allocate_pseudovector):
 +      Use int, not EMACS_INT, where int is wide enough.
 +      (inhibit_garbage_collection, Fgarbage_collect):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
 +      int might not be wide enough.
 +      (bidi_cache_search, bidi_cache_find, bidi_init_it)
 +      (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
 +      (bidi_at_paragraph_end, bidi_find_paragraph_start)
 +      (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
 +      (bidi_level_of_next_char, bidi_move_to_visually_next):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
 +      (Fkill_buffer, Fset_buffer_major_mode)
 +      (advance_to_char_boundary, Fbuffer_swap_text)
 +      (Fset_buffer_multibyte, overlays_at, overlays_in)
 +      (overlay_touches_p, struct sortvec, record_overlay_string)
 +      (overlay_strings, recenter_overlay_lists)
 +      (adjust_overlays_for_insert, adjust_overlays_for_delete)
 +      (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
 +      (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
 +      (Foverlay_recenter, last_overlay_modification_hooks_used)
 +      (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (validate_region): Omit unnecessary test for b <= e,
 +      since that's guaranteed by the previous test.
 +      (adjust_overlays_for_delete): Avoid pos + length overflow.
 +      (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
 +      (report_overlay_modification):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
 +      Omit pointer cast, which isn't needed anyway, and doesn't work
 +      after the EMACS_INT -> ptrdiff_t change.
 +      (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
 +      * buffer.h: Adjust decls to match defn changes elsewhere.
 +      (struct buffer_text, struct buffer):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      Use EMACS_INT, not int, where int might not be wide enough.
 +      * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
 +      not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (exec_byte_code): Use tighter memory-full test, one that checks
 +      for alloca overflow.  Don't compute the address of the object just
 +      before an array, as that's not portable.  Use EMACS_INT, not
 +      ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
 +      * callint.c (Fcall_interactively):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * callproc.c (call_process_kill, Fcall_process):
 +      Don't assume pid_t fits into an Emacs fixnum.
 +      (call_process_cleanup, Fcall_process, child_setup):
 +      Don't assume pid_t fits into int.
 +      (call_process_cleanup, Fcall_process, delete_temp_file)
 +      (Fcall_process_region):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fcall_process): Simplify handling of volatile integers.
 +      Use int, not EMACS_INT, where int will do.
 +      * casefiddle.c (casify_object, casify_region, operate_on_word)
 +      (Fupcase_word, Fdowncase_word, Fcapitalize_word):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (casify_object): Avoid integer overflow when overallocating buffer.
 +      * casetab.c (set_identity, shuffle): Prefer int to unsigned when
 +      either works.  Use lint_assume to convince GCC 4.6.1 that it's OK.
 +      * category.c (Fchar_category_set): Don't assume fixnum fits in int.
 +      * category.h (CATEGORYP): Don't assume arg is nonnegative.
 +      * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
 +      integers are now checked earlier.  All uses replaced with XINT.
 +      (ccl_driver):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      For CCL_MapSingle, check that content and value are in int range.
 +      (ccl_driver, Fregister_code_conversion_map):
 +      Check that Vcode_version_map_vector is a vector.
 +      (resolve_symbol_ccl_program): Check that vector header is in range.
 +      Always copy the vector, so that we can check its contents reliably
 +      now rather than having to recheck each instruction as it's being
 +      executed.  Check that vector words fit in 'int'.
 +      (ccl_get_compiled_code, Fregister_ccl_program)
 +      (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
 +      program indexes, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fccl_execute, Fccl_execute_on_string): Check that initial reg
 +      contents are in range.
 +      (Fccl_execute_on_string): Check that status is in range.
 +      * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
 +      * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
 +      Accept and return EMACS_INT, not int, because callers can pass values
 +      out of 'int' range.
 +      (c_string_width, strwidth, lisp_string_width, chars_in_text)
 +      (multibyte_chars_in_text, parse_str_as_multibyte)
 +      (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
 +      (str_as_unibyte, str_to_unibyte, string_count_byte8)
 +      (string_escape_byte8, Fget_byte):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
 +      avoid mishandling large integers.
 +      * character.h: Adjust decls to match defn changes elsewhere.
 +      * charset.c (load_charset_map_from_file, find_charsets_in_text)
 +      (Ffind_charset_region):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (load_charset_map_from_file): Redo idx calculation to avoid overflow.
 +      (load_charset_map_from_vector, Fdefine_charset_internal):
 +      Don't assume fixnum fits in int.
 +      (load_charset_map_from_vector, Fmap_charset_chars):
 +      Remove now-unnecessary CHECK_NATNUMs.
 +      (Fdefine_charset_internal): Check ranges here, more carefully.
 +      Don't rely on undefined behavior with signed left shift overflow.
 +      Don't assume unsigned int fits into fixnum, or that fixnum fits
 +      into unsigned int.  Don't require max_code to be a valid fixnum;
 +      that's not true for gb10830 4-byte on a 32-bit host.  Allow
 +      invalid_code to be a cons, for the same reason.  Require code_offset
 +      to be a character.  Avoid int overflow if max_char is close
 +      to INT_MAX.
 +      (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
 +      this is intended anyway and avoids some undefined behavior.
 +      (load_charset_map): Pass unsigned, not int, as 2nd arg of
 +      INDEX_TO_CODE_POINT, as that's what it expects.
 +      (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
 +      * charset.h (DECODE_CHAR): Return int, not unsigned;
 +      this is what was intended anyway, and it avoids undefined behavior.
 +      (CHARSET_OFFSET): Remove unused macro, instead of fixing its
 +      integer-overflow issues.
 +      (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
 +      Formerly, it returned EMACS_INT on 64-bit hosts in the common case
 +      where the argument is EMACS_INT, and this behavior is not intended.
 +      * chartab.c (Fmake_char_table, Fset_char_table_range)
 +      (uniprop_get_decoder, uniprop_get_encoder):
 +      Don't assume fixnum fits in int.
 +      * cmds.c (move_point): New function, that does the gist of
 +      Fforward_char and Fbackward_char, but does so while checking
 +      for integer overflow more accurately.
 +      (Fforward_char, Fbackward_char): Use it.
 +      (Fforward_line, Fend_of_line, internal_self_insert)
 +      (internal_self_insert):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      Fix a FIXME, by checking for integer overflow when calculating
 +      target_clm and actual_clm.
 +      * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
 +      (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
 +      (ASSURE_DESTINATION, coding_alloc_by_realloc)
 +      (coding_alloc_by_making_gap, alloc_destination)
 +      (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
 +      (encode_coding_utf_16, detect_coding_emacs_mule)
 +      (decode_coding_emacs_mule, encode_coding_emacs_mule)
 +      (detect_coding_iso_2022, decode_coding_iso_2022)
 +      (encode_invocation_designation, encode_designation_at_bol)
 +      (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
 +      (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
 +      (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
 +      (encode_coding_ccl, encode_coding_raw_text)
 +      (detect_coding_charset, decode_coding_charset)
 +      (encode_coding_charset, detect_eol, decode_eol, produce_chars)
 +      (produce_composition, produce_charset, produce_annotation)
 +      (decode_coding, handle_composition_annotation)
 +      (handle_charset_annotation, consume_chars, decode_coding_gap)
 +      (decode_coding_object, encode_coding_object, detect_coding_system)
 +      (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
 +      (code_convert_region, code_convert_string)
 +      (Fdefine_coding_system_internal)
 +      (coding_set_source, coding_set_destination):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
 +      (Fdefine_coding_system_internal):
 +      Don't assume fixnums fit in int.
 +      (decode_coding_gap, decode_coding_object, encode_coding_object)
 +      (Fread_coding_system, Fdetect_coding_region)
 +      (Funencodable_char_position, Fcheck_coding_systems_region)
 +      (get_translation, handle_composition_annotation, consume_chars):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (consume_chars): Rewrite to not calculate an address outside buffer.
 +      (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
 +      Don't access memory outside of the args array.
 +      (Fdefine_coding_system_internal): Check for charset-id overflow.
 +      (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
 +      result of ENCODE_CHAR.
 +      * coding.h: Adjust decls to match defn changes elsewhere.
 +      (struct coding_system):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * composite.c (get_composition_id, find_composition)
 +      (run_composition_function, update_compositions)
 +      (compose_text, composition_gstring_put_cache)
 +      (composition_gstring_p, composition_gstring_width)
 +      (fill_gstring_header, fill_gstring_body, autocmp_chars)
 +      (composition_compute_stop_pos, composition_reseat_it)
 +      (composition_update_it, struct position_record)
 +      (find_automatic_composition, composition_adjust_point)
 +      (Fcomposition_get_gstring, Ffind_composition_internal):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (update_compositions):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * composite.h: Adjust decls to match defn changes elsewhere.
 +      (struct composition):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
 +      Do not attempt to compute the address of the object just before a
 +      buffer; this is not portable.
 +      (Faref, Faset):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Faset): Use int, not EMACS_INT, where int is wide enough.
 +      (Fstring_to_number): Don't assume fixnums fit in int.
 +      (Frem): Don't assume arg is nonnegative.
 +      * dbusbind.c (xd_append_arg): Check for integers out of range.
 +      (Fdbus_call_method): Don't overflow the timeout int.
 +      (extract_signed, extract_unsigned): New functions.
 +      (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
 +      (xd_get_connection_references): Return ptrdiff_t, not int.
 +      All uses changed.
 +      (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
 +      (xd_read_message_1):
 +      Use int, not unsigned, where the dbus API uses int.
 +      (Fdbus_message_internal): Don't overflow mtype.
 +      (syms_of_dbusbind): Allocate right-sized buffer for integers.
 +      * dired.c (directory_files_internal, file_name_completion, scmp)
 +      (file_name_completion_stat):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (file_name_completion): Don't overflow matchcount.
 +      (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
 +      * dispextern.h: Adjust decls to match defn changes elsewhere.
 +      (struct text_pos, struct glyph, struct bidi_saved_info)
 +      (struct bidi_string_data, struct bidi_it, struct composition_it)
 +      (struct it):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (struct display_pos, struct composition_it, struct it):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * dispnew.c (increment_matrix_positions)
 +      (increment_row_positions, mode_line_string)
 +      (marginal_area_string):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (duration_to_sec_usec): New function, to check for overflow better.
 +      (Fsleep_for, sit_for): Use it.
 +      * doc.c (get_doc_string, store_function_docstring):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (get_doc_string, Fsnarf_documentation):
 +      Use int, not EMACS_INT, where int is wide enough.
 +      (get_doc_string):
 +      Use SAFE_ALLOCA, not alloca.
 +      Check for overflow when converting EMACS_INT to off_t.
 +      * doprnt.c (doprnt):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
 +      Don't assume uid_t fits into fixnum.
 +      (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
 +      (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
 +      (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
 +      (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
 +      (general_insert_function)
 +      (Finsert_char, make_buffer_string, make_buffer_string_both)
 +      (update_buffer_properties, Fbuffer_substring)
 +      (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
 +      (Fsubst_char_in_region, check_translation)
 +      (Ftranslate_region_internal, save_restriction_restore, Fformat)
 +      (transpose_markers, Ftranspose_regions):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (clip_to_bounds): Move to lisp.h as an inline function).
 +      (Fconstrain_to_field): Don't assume integers are nonnegative.
 +      (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
 +      (Fsubst_char_in_region, Fsave_restriction):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Femacs_pid): Don't assume pid_t fits into fixnum.
 +      (lo_time): Use int, not EMACS_INT, when int suffices.
 +      (lisp_time_argument): Check for usec out of range.
 +      (Fencode_time): Don't assume fixnum fits in int.
 +      (Fuser_login_name, Fuser_full_name): Signal an error
 +      if a uid argument is out of range, rather than relying on
 +      undefined behavior.
 +      (Fformat_time_string): Remove now-unnecessary check.
 +      lisp_time_argument checks for out-of-range usec now.
 +      Use ptrdiff_t, not size_t, where ptrdiff_t will do.
 +      * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
 +      (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
 +      (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
 +      (init_cmdargs, Fdump_emacs):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
 +      the bottom (typically) 32 bits of the fixnum.
 +      * eval.c (specpdl_size, call_debugger):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (when_entered_debugger, Fbacktrace_debug):
 +      Don't assume fixnum can fit in int.
 +      (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
 +      the object just before a buffer; this is not portable.
 +      (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
 +      (grow_specpdl, unbind_to):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
 +      (grow_specpdl): Simplify allocation by using xpalloc.
 +      (Fprog1, Fprog2): Don't assume list length fits in int.  Simplify.
 +      * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
 +      (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
 +      (a_write, e_write):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fcopy_file, non_regular_nbytes, read_non_regular)
 +      (Finsert_file_contents):
 +      Use int, not EMACS_INT, where int is wide enough.
 +      (READ_BUF_SIZE): Verify that it fits in int.
 +      (Finsert_file_contents): Check that counts are in proper range,
 +      rather than assuming fixnums fit into ptrdiff_t etc.
 +      Don't assume fixnums fit into int.
 +      * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
 +      * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
 +      (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
 +      (string_char_to_byte, string_byte_to_char)
 +      (string_make_multibyte, string_to_multibyte)
 +      (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
 +      (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
 +      (substring_both, Fdelete, internal_equal, Ffillarray)
 +      (Fclear_string, mapcar1)
 +      (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
 +      (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
 +      (larger_vector, make_hash_table, maybe_resize_hash_table)
 +      (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
 +      (Fmaphash, secure_hash):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (concat): Check for string index and length overflow.
 +      (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
 +      (Frequire):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (larger_vector): New API (vec, incr_min, size_max) replaces old
 +      one (vec, new_size, init).  This catches size overflow.
 +      INIT was removed because it was always Qnil.
 +      All callers changed.
 +      (INDEX_SIZE_BOUND): New macro, which calculates more precisely
 +      the upper bound on a hash table index size.
 +      (make_hash_table, maybe_resize_hash_table): Use it.
 +      (secure_hash): Computer start_byte and end_byte only after
 +      they're known to be in ptrdiff_t range.
 +      * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
 +      (Ffont_get_glyphs, Ffont_at):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
 +      (Flist_fonts, Fopen_font):
 +      Don't assume fixnum can fit in int.
 +      (check_gstring): Don't assume index can fit in int.
 +      (font_match_p): Check that fixnum is a character, not a nonnegative
 +      fixnum, since the later code needs to stuff it into an int.
 +      (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
 +      (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
 +      conversion overflow issues.
 +      (Fopen_font): Check for integer out of  range.
 +      (Ffont_get_glyphs): Don't assume index can fit in int.
 +      * font.h: Adjust decls to match defn changes elsewhere.
 +      * fontset.c (reorder_font_vector): Redo score calculation to avoid
 +      integer overflow.
 +      (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
 +      printmax_t, where ptrdiff_t is wide enough.
 +      (Finternal_char_font):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
 +      (Fset_frame_height, Fset_frame_width, Fset_frame_size)
 +      (Fset_frame_position, x_set_frame_parameters)
 +      (x_set_line_spacing, x_set_border_width)
 +      (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
 +      Check that fixnums are in proper range for system types.
 +      (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fmodify_frame_parameters): Don't assume fixnum fits in int.
 +      Use SAFE_ALLOCA_LISP, not alloca.
 +      * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
 +      intptr_t is wide enough.
 +      * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
 +      (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
 +      (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
 +      Check for fixnum out of range.
 +      * ftfont.c (ftfont_list): Don't assume index fits in int.
 +      Check that fixnums are in proper range for system types.
 +      (ftfont_shape_by_flt):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
 +      Check that fixnums are in proper range for system types.
 +      * gnutls.h: Adjust decls to match defn changes elsewhere.
 +      * gtkutil.c (xg_dialog_run):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (update_frame_tool_bar):
 +      Check that fixnums are in proper range for system types.
 +      * image.c (parse_image_spec): Redo count calculation to avoid overflow.
 +      (lookup_image): Check that fixnums are in range for system types.
 +      * indent.c (last_known_column, last_known_column_point):
 +      (current_column_bol_cache):
 +      (skip_invisible, current_column, check_display_width):
 +      (check_display_width, scan_for_column, current_column_1)
 +      (Findent_to, Fcurrent_indentation, position_indentation)
 +      (indented_beyond_p, Fmove_to_column, compute_motion):
 +      (Fcompute_motion, Fvertical_motion):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (last_known_column_modified): Use EMACS_INT, not int.
 +      (check_display_width):
 +      (Fcompute_motion):
 +      Check that fixnums and floats are in proper range for system types.
 +      (compute_motion): Don't assume index or fixnum fits in int.
 +      (compute_motion, Fcompute_motion):
 +      Use int, not EMACS_INT, when it is wide enough.
 +      (vmotion): Omit local var start_hpos that is always 0; that way
 +      we don't need to worry about overflow in expressions involving it.
 +      * indent.h: Adjust decls to match defn changes elsewhere.
 +      (struct position):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      Use int, not EMACS_INT, where int is wide enough.
 +      Remove unused members ovstring_chars_done and tab_offset;
 +      all uses removed.
 +      * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
 +      (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
 +      (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
 +      (make_gap, copy_text, insert, insert_and_inherit)
 +      (insert_before_markers, insert_before_markers_and_inherit)
 +      (insert_1, count_combining_before, count_combining_after)
 +      (insert_1_both, insert_from_string)
 +      (insert_from_string_before_markers, insert_from_string_1)
 +      (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
 +      (adjust_after_replace, adjust_after_insert, replace_range)
 +      (replace_range_2, del_range, del_range_1, del_range_byte)
 +      (del_range_both, del_range_2, modify_region)
 +      (prepare_to_modify_buffer, signal_before_change)
 +      (signal_after_change, Fcombine_after_change_execute):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * 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)
 +      (static_offset_intervals, offset_intervals)
 +      (merge_interval_right, merge_interval_left, make_new_interval)
 +      (graft_intervals_into_buffer, temp_set_point_both)
 +      (temp_set_point, set_point, adjust_for_invis_intang)
 +      (set_point_both, move_if_not_intangible, get_property_and_range)
 +      (get_local_map, copy_intervals, copy_intervals_to_string)
 +      (compare_string_intervals, set_intervals_multibyte_1):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * intervals.h: Adjust decls to match defn changes elsewhere.
 +      (struct interval):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * keyboard.c (this_command_key_count, this_single_command_key_start)
 +      (before_command_key_count, before_command_echo_length, echo_now)
 +      (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
 +      (command_loop_1, safe_run_hooks, read_char, timer_check_2)
 +      (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
 +      (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (last_non_minibuf_size, last_point_position, echo_truncate)
 +      (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
 +      (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
 +      (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
 +      (stuff_buffered_input):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (last_auto_save, command_loop_1, read_char):
 +      Use EMACS_INT, not int, to avoid integer overflow.
 +      (record_char): Avoid overflow in total_keys computation.
 +      (parse_modifiers_uncached): Redo index calculation to avoid overflow.
 +      * keyboard.h: Adjust decls to match defn changes elsewhere.
 +      * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
 +      (Fkey_description, Fdescribe_vector, Flookup_key):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (click_position): New function, to check that positions are in range.
 +      (Fcurrent_active_maps):
 +      (describe_command):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Faccessible_keymaps, Fkey_description):
 +      (preferred_sequence_p):
 +      Don't assume fixnum can fit into int.
 +      (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
 +      Check for integer overflow in size calculations.
 +      (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
 +      avoid mishandling large integers.
 +      * lisp.h: Adjust decls to match defn changes elsewhere.
 +      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
 +      (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
 +      (struct Lisp_Marker):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (clip_to_bounds): Now an inline function, moved here from editfns.c.
 +      (GLYPH_CODE_P): Check for overflow in system types, subsuming the
 +      need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
 +      All callers changed.
 +      (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
 +      Assume the arg has valid form, since it always does.
 +      (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
 +      unsigned integer system type.
 +      (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
 +      (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
 +      (duration_to_sec_usec): New decl.
 +      * lread.c (read_from_string_index, read_from_string_index_byte)
 +      (read_from_string_limit, readchar, unreadchar, openp)
 +      (read_internal_start, read1, oblookup):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fload, readevalloop, Feval_buffer, Feval_region):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (openp): Check for out-of-range argument to 'access'.
 +      (read1): Use int, not EMACS_INT, where int is wide enough.
 +      Don't assume fixnum fits into int.
 +      Fix off-by-one error that can read outside a buffer.
 +      (read_filtered_event): Use duration_to_sec_usec
 +      to do proper overflow checking on durations.
 +      * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
 +      in size calculation.
 +      (Fexecute_kbd_macro):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * marker.c (cached_charpos, cached_bytepos, CONSIDER)
 +      (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
 +      (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
 +      (set_marker_both, set_marker_restricted_both, marker_position)
 +      (marker_byte_position, Fbuffer_has_markers_at):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
 +      * menu.c (ensure_menu_items): Rename from grow_menu_items.
 +      It now merely ensures that the menu is large enough, without
 +      necessarily growing it, as this avoids some integer overflow issues.
 +      All callers changed.
 +      (keymap_panes, parse_single_submenu, Fx_popup_menu):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
 +      Use SAFE_ALLOCA_LISP, not alloca.
 +      (find_and_return_menu_selection): Avoid unnecessary casts of pointers
 +      to EMACS_INT.  Check that fixnums are in proper range for system types.
 +      * minibuf.c (minibuf_prompt_width, string_to_object)
 +      (Fminibuffer_contents, Fminibuffer_contents_no_properties)
 +      (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (get_minibuffer, read_minibuf_unwind):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
 +      this simplifies overflow checking.  All callers changed.
 +      (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
 +      (Ftest_completion):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
 +      (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
 +      Check that fixnums are in proper range for system types.
 +      (Fx_create_frame, Fx_show_tip):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * nsfont.m (ns_findfonts, nsfont_list_family):
 +      Don't assume fixnum fits in long.
 +      * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
 +      wide enough.
 +      * nsselect.m (ns_get_local_selection, clean_local_selection_data):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
 +      (PRINTDECLARE, PRINTPREPARE):
 +      (strout, print_string):
 +      (print, print_preprocess, print_check_string_charset_prop)
 +      (print_object):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (PRINTDECLARE):
 +      (temp_output_buffer_setup, Fprin1_to_string, print_object):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
 +      (printchar, strout): Use xpalloc to catch size calculation overflow.
 +      (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
 +      (print_error_message): Use SAFE_ALLOCA, not alloca.
 +      (print_object): Use int, not EMACS_INT, where int is wide enough.
 +      (print_depth, new_backquote_output, print_number_index):
 +      Use ptrdiff_t, not int, where int might not be wide enough.
 +      * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
 +      (Fset_process_window_size, Fformat_network_address)
 +      (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
 +      (sigchld_handler):
 +      Check that fixnums are in proper range for system types.
 +      (Fsignal_process): Simplify by avoiding a goto.
 +      Check for process-ids out of pid_t range rather than relying on
 +      undefined behavior.
 +      (process_tick, update_tick): Use EMACS_INT, not int.
 +      (Fformat_network_address, read_process_output, send_process)
 +      (Fprocess_send_region, status_notify):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
 +      (wait_reading_process_output, read_process_output, exec_sentinel):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
 +      (Faccept_process_output): Use duration_to_sec_usec to do proper
 +      overflow checking on durations.
 +      (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
 +      Don't assume pid_t fits in int.
 +      * process.h (struct Lisp_Process): Members tick and update_tick
 +      are now of type EMACS_INT, not int.
 +      * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
 +      configured --with-wide-int.
 +      * scroll.c (calculate_scrolling, calculate_direct_scrolling)
 +      (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
 +      * search.c (looking_at_1, string_match_1):
 +      (fast_string_match, fast_c_string_match_ignore_case)
 +      (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
 +      (scan_newline, find_before_next_newline, search_command)
 +      (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
 +      (set_search_regs, wordify):
 +      (Freplace_match):
 +      (Fmatch_data):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (string_match_1, search_buffer, set_search_regs):
 +      (Fmatch_data):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (wordify): Check for overflow in size calculation.
 +      (Freplace_match): Avoid potential buffer overflow in search_regs.start.
 +      (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
 +      Check that fixnums are in proper range for system types.
 +      * sound.c (struct sound_device)
 +      (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fplay_sound_internal):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * syntax.c (struct lisp_parse_state, find_start_modiff)
 +      (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
 +      (Fparse_partial_sexp):
 +      Don't assume fixnums can fit in int.
 +      (struct lisp_parse_state, find_start_pos, find_start_value)
 +      (find_start_value_byte, find_start_begv)
 +      (update_syntax_table, char_quoted, dec_bytepos)
 +      (find_defun_start, prev_char_comend_first, back_comment):
 +      (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
 +      (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Finternal_describe_syntax_value): Check that match_lisp is a
 +      character, not an integer, since the code stuffs it into int.
 +      (scan_words, scan_sexps_forward):
 +      Check that fixnums are in proper range for system types.
 +      (Fforward_word):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (scan_sexps_forward):
 +      Use CHARACTERP, not INTEGERP, since the value must fit into int.
 +      (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
 +      * syntax.h: Adjust decls to match defn changes elsewhere.
 +      (struct gl_state_s):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
 +      MOST_POSITIVE_FIXNUM.
 +      * sysdep.c (wait_for_termination_1, wait_for_termination)
 +      (interruptible_wait_for_termination, mkdir):
 +      Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
 +      (emacs_read, emacs_write):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
 +      and double all fit in int.
 +      * term.c (set_tty_color_mode):
 +      Check that fixnums are in proper range for system types.
 +      * termhooks.h (struct input_event):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * textprop.c (validate_interval_range, interval_of)
 +      (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 ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fnext_single_char_property_change)
 +      (Fprevious_single_char_property_change):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (copy_text_properties):
 +      Check for integer overflow in index calculation.
 +      * undo.c (last_boundary_position, record_point, record_insert)
 +      (record_delete, record_marker_adjustment, record_change)
 +      (record_property_change):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
 +      (Fx_hide_tip, Fx_file_dialog):
 +      * w32menu.c (set_frame_menubar):
 +      Use ptrdiff_t, not int, for consistency with rest of code.
 +      * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
 +      (select_window, Fdelete_other_windows_internal)
 +      (window_scroll_pixel_based, window_scroll_line_based)
 +      (Frecenter, Fset_window_configuration):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (Fset_window_hscroll, run_window_configuration_change_hook)
 +      (set_window_buffer, temp_output_buffer_show, scroll_command)
 +      (Fscroll_other_window, Frecenter):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
 +      Don't assume fixnum fits in int.
 +      (Fset_window_scroll_bars):
 +      Check that fixnums are in proper range for system types.
 +      * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
 +      (string_pos, c_string_pos, number_of_chars, init_iterator)
 +      (in_ellipses_for_invisible_text_p, init_from_display_pos)
 +      (compute_stop_pos, next_overlay_change, compute_display_string_pos)
 +      (compute_display_string_end, handle_face_prop)
 +      (face_before_or_after_it_pos, handle_invisible_prop)
 +      (handle_display_prop, handle_display_spec, handle_single_display_spec)
 +      (display_prop_intangible_p, string_buffer_position_lim)
 +      (string_buffer_position, handle_composition_prop, load_overlay_strings)
 +      (get_overlay_strings_1, get_overlay_strings)
 +      (iterate_out_of_display_property, forward_to_next_line_start)
 +      (back_to_previous_visible_line_start, reseat, reseat_to_string)
 +      (get_next_display_element, set_iterator_to_next)
 +      (get_visually_first_element, compute_stop_pos_backwards)
 +      (handle_stop_backwards, next_element_from_buffer)
 +      (move_it_in_display_line_to, move_it_in_display_line)
 +      (move_it_to, move_it_vertically_backward, move_it_by_lines)
 +      (add_to_log, message_dolog, message_log_check_duplicate)
 +      (message2, message2_nolog, message3, message3_nolog
 +      (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
 +      (current_message_1, truncate_echo_area, truncate_message_1)
 +      (set_message, set_message_1, store_mode_line_noprop)
 +      (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
 +      (text_outside_line_unchanged_p, check_point_in_composition)
 +      (reconsider_clip_changes)
 +      (redisplay_internal, set_cursor_from_row, try_scrolling)
 +      (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
 +      (redisplay_window, find_last_unchanged_at_beg_row)
 +      (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
 +      (trailing_whitespace_p, find_row_edges, display_line)
 +      (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
 +      (display_mode_element, store_mode_line_string)
 +      (pint2str, pint2hrstr, decode_mode_spec)
 +      (display_count_lines, display_string, draw_glyphs)
 +      (x_produce_glyphs, x_insert_glyphs)
 +      (rows_from_pos_range, mouse_face_from_buffer_pos)
 +      (fast_find_string_pos, mouse_face_from_string_pos)
 +      (note_mode_line_or_margin_highlight, note_mouse_highlight):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (safe_call, init_from_display_pos, handle_fontified_prop)
 +      (handle_single_display_spec, load_overlay_strings)
 +      (with_echo_area_buffer, setup_echo_area_for_printing)
 +      (display_echo_area, echo_area_display)
 +      (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
 +      (update_tool_bar, hscroll_window_tree, redisplay_internal)
 +      (redisplay_window, dump_glyph_row, display_mode_line)
 +      (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
 +      (handle_display_spec, display_prop_string_p):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (handle_single_display_spec, build_desired_tool_bar_string)
 +      (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
 +      (get_specified_cursor_type):
 +      Check that fixnums are in proper range for system types.
 +      (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
 +      (Flookup_image_map):
 +      Don't assume fixnums fit in int.
 +      (compare_overlay_entries):
 +      Avoid mishandling comparisons due to subtraction overflow.
 +      (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
 +      (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
 +      (handle_tool_bar_click):
 +      Use int, not unsigned, since we prefer signed and the signedness
 +      doesn't matter here.
 +      (get_next_display_element, next_element_from_display_vector):
 +      Use int, not EMACS_INT, when int is wide enough.
 +      (start_hourglass): Use duration_to_sec_usec to do proper
 +      overflow checking on durations.
 +      * xfaces.c (Fbitmap_spec_p):
 +      Check that fixnums are in proper range for system types.
 +      (compare_fonts_by_sort_order):
 +      Avoid mishandling comparisons due to subtraction overflow.
 +      (Fx_family_fonts, realize_basic_faces):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fx_family_fonts):
 +      Don't assume fixnum fits in int.
 +      Use SAFE_ALLOCA_LISP, not alloca.
 +      (merge_face_heights): Remove unnecessary cast to EMACS_INT.
 +      (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
 +      (face_at_buffer_position, face_for_overlay_string)
 +      (face_at_string_position):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      (merge_faces): Use int, not EMACS_INT, where int is wide enough.
 +      * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
 +      (Fx_show_tip):
 +      Check that fixnums are in proper range for system types.
 +      (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
 +      (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (Fx_change_window_property): Don't assume fixnums fit in int.
 +      * xfont.c (xfont_chars_supported):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * xmenu.c (Fx_popup_dialog, set_frame_menubar)
 +      (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * xml.c (parse_region):
 +      * xrdb.c (magic_file_p):
 +      Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
 +      * xselect.c (TRACE1): Don't assume pid_t promotes to int.
 +      (x_get_local_selection, x_reply_selection_request)
 +      (x_handle_selection_request, wait_for_property_change):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      (selection_data_to_lisp_data): Use short, not EMACS_INT, where
 +      short is wide enough.
 +      (x_send_client_event): Don't assume fixnum fits in int.
 +      * xterm.c (x_x_to_emacs_modifiers):
 +      Don't assume EMACS_INT overflows nicely into int.
 +      (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
 +      may come from Lisp.
 +      (handle_one_xevent): NATNUMP can eval its arg twice.
 +      (x_connection_closed):
 +      Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
 +      * xterm.h: Adjust decls to match defn changes elsewhere.
 +      (struct scroll_bar): Use struct vectorlike_header
 +      rather than rolling our own approximation.
 +      (SCROLL_BAR_VEC_SIZE): Remove; not used.
 +
 +2012-05-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * lisp.mk (lisp): Update for more files being compiled now.
 +
 +2012-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c: Remove `read_pure' which makes no difference.
 +      (read_pure): Remove var.
 +      (unreadpure): Remove function.
 +      (readevalloop): Don't call read_list with -1 flag.
 +      (read1, read_vector): Don't test read_pure any more.
 +      (read_list): Simplify.
 +
 +      * fileio.c, character.h: Minor style tweaks.
 +
 +2012-05-24  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * window.h (clip_changed): Remove useless declaration.
 +
 +2012-05-22  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
 +      (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
 +
 +2012-05-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove src/m/*.
 +      This directory predates autoconf and is no longer needed nowadays.
 +      Move its few remaining bits of functionality to where they're needed.
 +      * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
 +      * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
 +      * m/template.h: Remove.
 +      * Makefile.in (M_FILE): Remove.  All uses removed.
 +      * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
 +      * lisp.h (USE_LSB_TAG):
 +      * mem-limits.h (EXCEEDS_LISP_PTR):
 +      Use VAL_MAX, not VALBITS, in #if.
 +      * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
 +      (EMACS_UINT): Define unconditionally now.
 +      (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
 +      (BITS_PER_EMACS_INT): New constants, replacing
 +      what used to be in config.h, but not useful in #if.
 +      (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
 +      define them any more.
 +      (VAL_MAX): New macro.
 +      (VALMASK): Use it.
 +      * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
 +      BITS_PER_EMACS_INT, in #if.
 +      * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
 +      (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
 +      * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
 +      * s/ms-w32.h (DATA_START):
 +      Move here from removed file m/intel386.h.
 +      * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
 +      * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
 +
 +2012-05-21  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume C89 or later.
 +      * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
 +      * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
 +      (xrealloc):
 +      * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
 +      * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
 +      * textprop.c, tparam.c (NULL): Remove.
 +      * ralloc.c, vm-limit.c (POINTER): Assume void * works.
 +      * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
 +      * regex.h (_RE_ARGS): Remove.  All uses rewritten to use prototypes.
 +      * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
 +      * xterm.c (input_signal_count): Assume volatile works.
 +
 +2012-05-21  Ken Brown  <kbrown@cornell.edu>
 +
 +      * xgselect.c (xg_select): Fix first argument in call to 'select'
 +      (bug#11508).
 +
 +2012-05-20  Ken Brown  <kbrown@cornell.edu>
 +
 +      * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
 +      [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
 +
 +2012-05-19  Ken Brown  <kbrown@cornell.edu>
 +
 +      * xfns.c (x_in_use): Remove `static' qualifier.
 +      * xterm.h (x_in_use): Declare.
 +      * xgselect.c: Include xterm.h.
 +      (xg_select): Test `x_in_use' instead of `inhibit_window_system'
 +      and `display_arg' (bug#9754).
 +
 +2012-05-19  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
  
 -      * xdisp.c (pos_visible_p): Fix last change.  (Bug#11464)
 +      * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
 +      * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
  
 -2012-05-13  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-18  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
 +
 +      * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
 +      (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
 +
 +      * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
 +      reference to image_cache->refcount.
 +      (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
 +
 +2012-05-17  Juri Linkov  <juri@jurta.org>
 +
 +      * search.c (Fword_search_regexp, Fword_search_backward)
 +      (Fword_search_forward, Fword_search_backward_lax)
 +      (Fword_search_forward_lax): Move functions to isearch.el
 +      (bug#10145, bug#11381).
 +
 +2012-05-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
 +
 +2012-05-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (init_obarray): Declare Qt and Qnil as special.
 +
 +2012-05-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
 +      Put "libexec" before "bin", for the sake of init_callproc_1.
 +
 +2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
 +
 +      * unexaix.c: Port to more-recent AIX compilers.
 +      (report_error, report_error_1, make_hdr, copy_sym)
 +      (mark_x, adjust_lnnoptrs, unrelocate_symbols):
 +      Make arguments const char *, not char *, to avoid violations of C
 +      standard and to fix some AIX warnings reported by Gilles Pion.
 +
 +2012-05-14  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
        already have overlays loaded.
        stopped at the last line of window, which happens to be scanned
        backwards by the bidi iteration.  (Bug#11464)
  
 -2012-05-11  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-14  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (handle_single_display_spec): Return 1 for left-margin
        and right-margin display specs even if the spec is invalid or we
 -      are on a TTY, and thus unable to display on the fringes.  That's
 -      because the text with the property will not be displayed anyway,
 +      are on a TTY, and thus unable to display on the fringes.
 +      That's because the text with the property will not be displayed anyway,
        so we need to signal to the caller that this is a "replacing"
        display spec.  This fixes display when the spec is invalid or we
        are on a TTY.
  
 -2012-05-09  Paul Eggert  <eggert@cs.ucla.edu>
 +2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
  
        * unexaix.c (make_hdr): Fix typo in prototype.
        This bug broke the build on AIX.  Problem reported by Gilles Pion.
  
 -2012-05-05  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-14  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * keyboard.c (kbd_buffer_get_event): Read special events also in
 +      batch mode.  (Bug#11415)
 +
 +2012-05-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * ns.mk: Update for ns_appbindir no longer having trailing "/".
 +
 +2012-05-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * lisp.mk (lisp): Add newcomment.elc.
 +
 +2012-05-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (MKDIR_P): New, set by configure.
 +      * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
 +
 +2012-05-11  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Remove unused function hourglass_started.
 +      * dispextern.h (hourglass_started):
 +      * w32fns.c (hourglass_started):
 +      * xdisp.c (hourglass_started): Remove.
 +
 +2012-05-10  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
 +      Update dependencies.
 +
 +2012-05-10  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * xgselect.c (xg_select): Put maxfds+1 into a var.
 +      This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
 +
 +      * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
 +
 +2012-05-10  Dave Abrahams  <dave@boostpro.com>
 +
 +      * filelock.c (syms_of_filelock): New boolean create-lockfiles.
 +      (lock_file): If create_lockfiles is 0, do nothing.  (Bug#11227)
 +
 +2012-05-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (xd_registered_buses): New internal Lisp object.
 +      Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
 +      (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
 +      Initialize xd_registered_buses.
 +
 +2012-05-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Untag more efficiently if USE_LSB_TAG.
 +      This is based on a proposal by YAMAMOTO Mitsuharu in
 +      <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
 +      For an admittedly artificial (nth 8000 longlist) benchmark on
 +      Fedora 15 x86-64, this yields a 25% CPU speedup.  Also, it shrinks
 +      Emacs's overall text size by 1%.
 +      * lisp.h (XUNTAG): New macro.
 +      (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
 +      (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
 +      (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
 +      * eval.c (Fautoload):
 +      * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
 +      * frame.h (XFRAME): Use XUNTAG.
 +
 +      Port recent dbusbind.c changes to 32-bit --with-wide-int.
 +      * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
 +      Remove unportable assumptions about print widths of types like
 +      dbus_uint32_t.
 +      (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
 +      intptr_t when converting between pointer and integer, to avoid GCC
 +      warnings about wrong width.
 +
 +2012-05-09  Eli Zaretskii  <eliz@gnu.org>
  
        * w32proc.c (new_child): Force Windows to reserve only 64KB of
        stack for each reader_thread, instead of defaulting to 8MB
        subprocesses on Windows 7, see the discussion in this thread:
        http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
  
 -2012-05-02  Jim Meyering  <meyering@redhat.com>
 +2012-05-07  Jérémy Compostella  <jeremy.compostella@gmail.com>
 +
 +      Fix up display of the *Minibuf-0* buffer in the mini window.
 +      * keyboard.c (read_char): Don't clear the echo area if there's no
 +      message to clear.
 +      * xdisp.c (redisplay_internal): Redisplay the mini window (with the
 +      contents of *Minibuf-0*) if there's no message displayed in its stead.
 +
 +2012-05-07  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
 +      batch mode.
 +
 +2012-05-06  Chong Yidong  <cyd@gnu.org>
 +
 +      * lisp.mk (lisp): Update.
 +
 +2012-05-05  Jim Meyering  <meyering@redhat.com>
  
        * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
  
 -2012-04-29  Eli Zaretskii  <eliz@gnu.org>
 +2012-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * data.c (PUT_ERROR): New macro.
 +      (syms_of_data): Use it.  Add new error type `user-error'.
 +      * undo.c (user_error): New function.
 +      (Fprimitive_undo): Use it.
 +      * print.c (print_error_message): Adjust print style for `user-error'.
 +      * keyboard.c (user_error): New function.
 +      (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
 +
 +2012-05-03  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Do not limit current-time-string to years 1000..9999.
 +      * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
 +      (Fcurrent_time_string): Support any year that is supported by the
 +      underlying localtime representation.  Don't use asctime, as it
 +      has undefined behavior for years outside the range -999..9999.
 +
 +2012-05-02  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix race conditions involving setenv, gmtime, localtime, asctime.
 +      Without this fix, interrupts could mess up code that uses these
 +      nonreentrant functions, since setting TZ invalidates existing
 +      tm_zone or tzname values, and since most of these functions return
 +      pointers to static storage.
 +      * editfns.c (format_time_string, Fdecode_time, Fencode_time)
 +      (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
 +      Grow the critical sections to include not just invoking
 +      localtime/gmtime, but also accessing these functions' results
 +      including their tm_zone values if any, and any related TZ setting.
 +      (format_time_string): Last arg is now struct tm *, not struct tm **,
 +      so that the struct tm is saved in the critical section.
 +      All callers changed.  Simplify allocation of initial buffer, partly
 +      motivated by the fact that memory allocation needs to be outside
 +      the critical section.
 +
 +2012-05-02  Dmitry Antipov  <dmantipov@yandex.ru>
 +
 +      * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
 +      with RESET_INTERVAL.
 +
 +      * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
 +      Remove duplicated buffer name initialization.
 +
 +2012-05-02  Jim Meyering  <jim@meyering.net>
 +
 +      * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
 +
 +      * xfns.c (x_window): Use xstrdup (Bug#11375).
 +
 +2012-05-02  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (pos_visible_p): If already at a newline from the
        display string before the 'while' loop, don't walk back the glyphs
        from it3.glyph_row.  Solves assertion violation when the display
        string begins with a newline (egg.el).  (Bug#11367)
  
 -2012-04-24  Chong Yidong  <cyd@gnu.org>
 +2012-05-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
 +      Move to simple.el.
 +
 +2012-05-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
 +      s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
 +      and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
 +      All were removed before 23.1.
 +
 +      * dispnew.c: Remove HAVE_LIBNCURSES test;
 +      it is always true on relevant platforms.
 +
 +      * Makefile.in (LD_SWITCH_X_SITE_RPATH):
 +      Rename from LD_SWITCH_X_SITE_AUX_RPATH.
 +
 +      * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
 +
 +2012-04-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * .gdbinit (xpr): Remove checks for no longer existing misc types.
 +      (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
 +      Remove.
 +
 +2012-04-28  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Do not avoid creating empty evaporating overlays (Bug#9642).
 +      * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
 +      That is, do not delete an evaporating overlay if it becomes
 +      empty after its bounds are adjusted to fit within its buffer.
 +      This fix caused other problems, and I'm reverting it until we get
 +      to the bottom of them.
 +
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
  
        * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
  
 -2012-04-23  Eli Zaretskii  <eliz@gnu.org>
 +2012-04-27  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (pos_visible_p): If the window start position is beyond
        ZV, start the display from buffer beginning.  Prevents assertion
  
        * window.c (window_scroll_pixel_based): Likewise.
  
 -2012-04-23  Chong Yidong  <cyd@gnu.org>
 +2012-04-27  Chong Yidong  <cyd@gnu.org>
  
        * keymap.c (where_is_internal): Doc fix (Bug#10872).
  
 -2012-04-20  Glenn Morris  <rgm@gnu.org>
 +2012-04-27  Glenn Morris  <rgm@gnu.org>
  
        * fileio.c (Fcopy_file, Fset_file_selinux_context):
        Ignore ENOTSUP failures from setfilecon functions.  (Bug#11245)
  
 -2012-04-20  Eli Zaretskii  <eliz@gnu.org>
 +2012-04-27  Eli Zaretskii  <eliz@gnu.org>
  
 -      * dispnew.c (swap_glyph_pointers, copy_row_except_pointers): Don't
 -      overrun array limits of glyph row's used[] array.  (Bug#11288)
 +      * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
 +      Don't overrun array limits of glyph row's used[] array.  (Bug#11288)
 +
 +2012-04-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
 +      display element, check also the underlying string or buffer
 +      character.  (Bug#11341)
 +
 +      * w32menu.c: Include w32heap.h.
 +      (add_menu_item): If the call to AppendMenuW (via
 +      unicode_append_menu) fails, disable Unicode menus only if we are
 +      running on Windows 9X/Me.
 +
 +2012-04-24  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
 +      (xgetint): Add missing shift for LSB tags.
 +
 +2012-04-24  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * keyboard.c (read_char): Don't wipe echo area for select window
 +      events: These might get delayed via `mouse-autoselect-window'
 +      (Bug#11304).
 +
 +2012-04-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * gnutls.c (init_gnutls_functions): Protect against (unlikely)
 +      manipulation of :loaded-from data.
 +
 +2012-04-23  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * gnutls.c (init_gnutls_functions): The value of :loaded-from is
 +      now a cons (bug#11311).
 +
 +2012-04-23  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Do not create empty overlays with the evaporate property (Bug#9642).
 +      * buffer.c (Fmove_overlay): Delete an evaporating overlay
 +      if it becomes empty after its bounds are adjusted to fit within
 +      its buffer.  Without this fix, in a nonempty buffer (let ((o
 +      (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
 +      yields an empty overlay that has the evaporate property, which is
 +      not supposed to happen.
 +
 +      Fix minor GTK3 problems found by static checking.
 +      * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
 +      (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
 +      (struct _EmacsFixedClass, emacs_fixed_get_type):
 +      Move decls here from emacsgtkfixed.h, since they needn't be public.
 +      (emacs_fixed_get_type): Now static.
 +      (emacs_fixed_class_init): Omit unused local.
 +      (emacs_fixed_child_type): Remove; unused.
 +      * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
 +      (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
 +      (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
 +      (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
 +      (EMACS_FIXED_GET_CLASS): Remove; unused.
 +      * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
 +
 +      * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
 +      Problem reported by Juanma Barranquero for Windows -Wunused-function.
 +
 +2012-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
 +      * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
 +      (__malloc_size_t, __malloc_ptrdiff_t):
 +      Remove.  All uses removed, replaced by the definiens if needed,
 +      since we can assume C89 or better now.
 +      Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
 +      (protect_malloc_state, align, get_contiguous_space)
 +      (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
 +      (malloc_atfork_handler_child, malloc_enable_thread)
 +      (malloc_initialize_1, __malloc_initialize, morecore_nolock)
 +      (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
 +      (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
 +      (special_realloc, _realloc_internal_nolock, _realloc_internal)
 +      (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
 +      (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
 +      Define using prototypes, not old style.
 +      (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
 +      Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
 +      (align): Don't assume that signed integer overflow wraps around.
 +      Omit unused local var.
 +      (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
 +      (_free_internal_nolock, memalign, mallochook, reallochook):
 +      Omit no-longer-needed casts.
 +      (valloc): Use getpagesize, not __getpagesize.
 +      (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
 +      (struct hdr): The 'magic' member is now size_t, not unsigned long.
 +
 +      * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
 +
 +2012-04-22  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Move functions from C to Lisp.  Make non-blocking method calls
 +      the default.  Implement further D-Bus standard interfaces.
 +
 +      * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
 +      (QCdbus_request_name_allow_replacement)
 +      (QCdbus_request_name_replace_existing)
 +      (QCdbus_request_name_do_not_queue)
 +      (QCdbus_request_name_reply_primary_owner)
 +      (QCdbus_request_name_reply_in_queue)
 +      (QCdbus_request_name_reply_exists)
 +      (QCdbus_request_name_reply_already_owner): Move to dbus.el.
 +      (QCdbus_registered_serial, QCdbus_registered_method)
 +      (QCdbus_registered_signal): New Lisp objects.
 +      (XD_DEBUG_MESSAGE): Use sizeof.
 +      (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
 +      (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
 +      (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
 +      (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
 +      (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
 +      (xd_signature, xd_append_arg): Allow float for integer types.
 +      (xd_get_connection_references): New function.
 +      (xd_get_connection_address): Rename from xd_initialize.
 +      Return cached address.
 +      (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
 +      (xd_close_bus): Rename from Fdbus_close_bus.  Not needed on Lisp
 +      level.
 +      (Fdbus_init_bus): New optional arg PRIVATE.  Cache address.
 +      Return number of refcounts.
 +      (Fdbus_get_unique_name): Make stronger parameter check.
 +      (Fdbus_message_internal): New defun.
 +      (Fdbus_call_method, Fdbus_call_method_asynchronously)
 +      (Fdbus_method_return_internal, Fdbus_method_error_internal)
 +      (Fdbus_send_signal, Fdbus_register_service)
 +      (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
 +      (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
 +      (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
 +      (Vdbus_compiled_version, Vdbus_runtime_version)
 +      (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
 +      (Vdbus_message_type_method_return, Vdbus_message_type_error)
 +      (Vdbus_message_type_signal): New defvars.
 +      (Vdbus_registered_buses, Vdbus_registered_objects_table):
 +      Adapt docstring.
 +
 +2012-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
 +      * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
 +      Do not assume ptrdiff_t is the same width as 'int'.
 +
 +      * alloc.c: Handle unusual debugging option combinations.
 +      (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
 +      since the two debugging options are incompatible.
 +      (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
 +      is defined.
 +      (mem_init, mem_insert, mem_insert_fixup):
 +      Define if GC_MARK_STACK || GC_MALLOC_CHECK.
 +      (NEED_MEM_INSERT): Remove; no longer needed.
 +
 +2012-04-22  Leo Liu  <sdl.web@gmail.com>
 +
 +      * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
 +
 +2012-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * sysdep.c [__FreeBSD__]: Minor cleanups.
 +      (list_system_processes, system_process_attributes) [__FreeBSD__]:
 +      Use Emacs indenting style more consistently.  Avoid some casts.
 +      Use 'double' consistently rather than mixing 'float' and 'double'.
 +
 +2012-04-21  Eduard Wiebe  <usenet@pusto.de>
 +
 +      * sysdep.c (list_system_processes, system_process_attributes):
 +      Add implementation for FreeBSD (Bug#5243).
 +
 +2012-04-21  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lisp.mk (lisp): Update.
 +
 +2012-04-20  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
 +      It is never used otherwise.
 +
 +2012-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * print.c (print_preprocess): Only check print_depth if print-circle
 +      is nil.
 +      (print_object): Check for cycles even when print-circle is nil and
 +      print-gensym is t, but only check print_depth if print-circle is nil.
  
  2012-04-20  Chong Yidong  <cyd@gnu.org>
  
        * process.c (wait_reading_process_output): If EIO occurs on a pty,
        set the status to "failed" and ensure that sentinel is run.
  
 -2012-04-18  Glenn Morris  <rgm@gnu.org>
 +2012-04-20  Glenn Morris  <rgm@gnu.org>
  
        * process.c (Fset_process_inherit_coding_system_flag)
        (Fset_process_query_on_exit_flag): Doc fix (mention return value).
        (Fmake_network_process, Fmake_serial_process): Doc fix.
  
 -2012-04-17  Eli Zaretskii  <eliz@gnu.org>
 +2012-04-20  Eli Zaretskii  <eliz@gnu.org>
  
        * xdisp.c (string_buffer_position_lim): Limit starting position to
        BEGV.
        (set_cursor_from_row): If called for a mode-line or header-line
        row, return zero immediately.
        (try_cursor_movement): If inside continuation line, don't back up
 -      farther than the first row after the header line, if any.  Don't
 -      consider the header-line row as "partially visible", even if
 +      farther than the first row after the header line, if any.
 +      Don't consider the header-line row as "partially visible", even if
        MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero.  (Bug#11261)
  
 -2012-04-13  Atsuo Ohki  <ohki@gssm.otsuka.tsukuba.ac.jp>  (tiny change)
 +2012-04-20  Atsuo Ohki  <ohki@gssm.otsuka.tsukuba.ac.jp>  (tiny change)
 +
 +      * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
 +      (bug#11238).
 +
 +2012-04-20  Teodor Zlatanov  <tzz@lifelogs.com>
 +2012-04-18  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      configure: new option --enable-gcc-warnings (Bug#11207)
 +      * Makefile.in (C_WARNINGS_SWITCH): Remove.
 +      (WARN_CFLAGS, WERROR_CFLAGS): New macros.
 +      (ALL_CFLAGS): Use new macros rather than old.
 +      * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
 +      * regex.c: Ignore -Wstrict-overflow.  If !emacs, also ignore
 +      -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
 +      -Wunused-result, -Wunused-variable.  This should go away once
 +      the Emacs and Gnulib regex code is merged.
 +      (xmalloc, xrealloc): Now static.
 +
 +2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * dired.c (Fsystem_groups): Remove unused local.
 +
 +2012-04-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * dired.c (Fsystem_users): Doc fix.
 +
 +2012-04-17  Dmitry Antipov  <dmantipov@yandex.ru>
  
 -      * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n" (bug#11238).
 +      * dired.c (Fsystem_users, Fsystem_groups): New functions.  (Bug#7900)
 +      (syms_of_dired): Add them.
  
 -2012-04-10  Teodor Zlatanov  <tzz@lifelogs.com>
 +2012-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix minor alloc.c problems found by static checking.
 +      * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
 +      New extern decls, to avoid calling undeclared functions.
 +      (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
 +      && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
 +      GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
 +      (NEED_MEM_INSERT): New macro.
 +      (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
 +      Remove one incorrect comment and fix another.
 +
 +      Fix minor ralloc.c problems found by static checking.
 +      See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
 +      * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
 +      (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
 +      (r_alloc_sbrk): Now static.
 +
 +      Improve ralloc.c interface checking.
 +      See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
 +      * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
 +      (r_alloc_free) [REL_ALLOC]: Move decls from here ...
 +      * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
 +      [REL_ALLOC]: ... to here, to check interface.
 +      * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
 +      Remove decls.  This fixes an "It stinks!".
 +
 +      * alloc.c (which_symbols): Fix alignment issue / type clash.
 +
 +2012-04-15  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lisp.h (struct Lisp_Symbol): Remove explicit padding.
 +      (struct Lisp_Misc_Any): Likewise.
 +      (struct Lisp_Free): Likewise.
 +      * alloc.c (union aligned_Lisp_Symbol): Define.
 +      (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
 +      aligned_Lisp_Symbol instead of struct Lisp_Symbol.
 +      (union aligned_Lisp_Misc): Define.
 +      (MARKER_BLOCK_SIZE, struct marker_block): Use union
 +      aligned_Lisp_Misc instead of union Lisp_Misc.
 +      (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
 +
 +2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
 +      * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
 +      * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
 +      * s/netbsd.h, s/sol2-6.h:
 +      Remove definition of GC_MARK_STACK, since the default now works.
 +      * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
 +      Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
 +      no longer the default.
 +      * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
 +
 +2012-04-14  Atsuo Ohki  <ohki@gssm.otsuka.tsukuba.ac.jp>  (tiny change)
 +
 +      * lread.c (lisp_file_lexically_bound_p):
 +      Fix hang at ";-*-\n" (bug#11238).
 +
 +2012-04-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
 +      "unchanged" if its end.pos is beyond ZV.  (Bug#11199)
 +
 +2012-04-14  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsterm.m (constrainFrameRect): Always constrain when there is only
 +      one screen (Bug#10962).
 +
 +2012-04-13  Ken Brown  <kbrown@cornell.edu>
 +
 +      * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
 +
 +2012-04-13  Reuben Thomas  <rrt@sc3d.org>
 +
 +      * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
 +
 +2012-04-11  Daniel Colascione  <dancol@dancol.org>
 +
 +      * s/cygwin.h: The vfork the #define in cygwin.h was protecting
 +      against is gone.  It's better to use vfork now so that when Cygwin
 +      gains a new, working vfork, we use it automatically (bug#10398).
 +
 +2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * window.c (save_window_save): Obey window-point-insertion-type.
 +
 +2012-04-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
 +
 +2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * alloc.c (lisp_align_malloc): Remove unneeded prototype.
 +
 +2012-04-10  Jason S. Cornez  <jcornez@ravenpack.com>  (tiny change)
 +
 +      * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
 +      (force_quit_count): New var.
 +      (handle_interrupt): Use it.
 +
 +2012-04-10  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32.c (w32_delayed_load): Record the full path of the library
 +      being loaded (bug#10424).
 +
 +2012-04-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * doc.c (Fsnarf_documentation): Check variables, functions are bound,
 +      not just in the obarray, before snarfing them.  (Bug#11036)
 +
 +      * Makefile.in ($(leimdir)/leim-list.el):
 +      Pass EMACS rather than BUILT_EMACS.
 +
 +2012-04-09  Teodor Zlatanov  <tzz@lifelogs.com>
  
        * process.c (make_process):
        * process.h: Add integer `gnutls_handshakes_tried' member to
        `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
        attempts per process (connection).
  
 +2012-04-09  Chong Yidong  <cyd@gnu.org>
 +
 +      * eval.c (Fuser_variable_p, user_variable_p_eh)
 +      (lisp_indirect_variable): Functions deleted.
 +      (Fdefvar): Caller changed.
 +
 +      * callint.c (Finteractive, Fcall_interactively):
 +      * minibuf.c (Fread_variable): Callers changed.
 +
  2012-04-09  Eli Zaretskii  <eliz@gnu.org>
  
 -      * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
 -      "unchanged" if its end.pos is beyond ZV.  (Bug#11199)
 +      * xdisp.c (set_cursor_from_row): If the display string appears in
 +      the buffer at position that is closer to point than the position
 +      after the display string, display the cursor on the first glyph of
 +      the display string.  Fixes cursor display when a 'display' text
 +      property immediately follows invisible text.  (Bug#11094)
  
 -2012-04-09  Jan Djärv  <jan.h.d@swipnet.se>
 +2012-04-09  Paul Eggert  <eggert@cs.ucla.edu>
  
 -      * nsterm.m (constrainFrameRect): Always constrain when there is only
 -      one screen (Bug#10962).
 +      composite.c: use 'double' consistently
 +      * composite.c (get_composition_id): Use 'double' consistently
 +      instead of converting 'float' to 'double' and vice versa; this is
 +      easier to understand and avoids a GCC warning.
 +
 +2012-04-09  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in: Generate leim-list with bootstrap-emacs, in
 +      preparation for dumping it with emacs.  (Bug#4789)
 +      (leimdir): New variable.
 +      ($(leimdir)/leim-list.el): New rule.
 +      (emacs$(EXEEXT)): Depend on leim-list.el.
 +
 +      * buffer.c (Qucs_set_table_for_input): Remove.  (Bug#9821)
 +      (Fget_buffer_create): Don't call Qucs_set_table_for_input.
 +      (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
 +
 +2012-04-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
 +      proper alignment.
 +
 +2012-04-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * xml.c (init_libxml2_functions) [WINDOWSNT]:
 +      Remove unused local variable.
 +
 +2012-04-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
 +      * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
 +      (mark_memory): Mark Lisp_Objects only if pointers might hide in
 +      objects, as mark_maybe_pointer will catch them otherwise.
 +      (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
 +      * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
 +
 +2012-04-07  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Fix typo that broke non-Windows builds.
 +      * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
 +
 +2012-04-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Support building on MS-Windows with libxml2.
 +
 +      * makefile.w32-in (OBJ2): Add xml.$(O).
 +      (GLOBAL_SOURCES): Add xml.c.
 +      ($(BLD)/xml.$(O)): New dependency list.
 +
 +      * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
 +      (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
 +      (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
 +      [!WINDOWSNT]: New macros.
 +      (init_libxml2_functions, libxml2_loaded_p): New functions.
 +      (parse_region): Call fn_xmlCheckVersion instead of using the macro
 +      LIBXML_TEST_VERSION.  Call libxml2 functions via the fn_* macros.
 +      (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
 +      Calls xmlCleanupParser only if libxml2 was loaded (or statically
 +      linked in).
 +      (Flibxml_parse_html_region, Flibxml_parse_xml_region):
 +      Call init_libxml2_functions before calling libxml2 functions.
 +      (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
 +
 +      * emacs.c: Don't include libxml/parser.h.
 +      (shut_down_emacs): Call xml_cleanup_parser, instead of calling
 +      xmlCleanupParser directly.
 +
 +      * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
 +
 +2012-04-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * indent.c (Fvertical_motion): If there is a display string at
 +      point, use it.vpos to compute how many lines to backtrack after
 +      move_it_to point.  (Bug#11133)
  
  2012-04-06  Eli Zaretskii  <eliz@gnu.org>
  
        * xfns.c (unwind_create_frame): Fix comment.
        (Fx_create_frame, x_create_tip_frame):
        Move terminal->reference_count++ just before making the frame
 -      official. Move initialization of image_cache_refcount and
 +      official.  Move initialization of image_cache_refcount and
        dpyinfo_refcount before calling init_frame_faces (Bug#9943).
  
  2011-11-05  Eli Zaretskii  <eliz@gnu.org>
        (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
  
        * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
 -      cString and lossyCString on OSX >= 10.4
 +      cString and lossyCString on OSX >= 10.4.
  
        * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
        sizeToFit on OSX >= 10.2.
  
        * Makefile.in (SETTINGS_LIBS): Fix typo.
  
 -2011-07-01  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>  (tiny patch)
 +2011-07-01  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>  (tiny change)
  
        * coding.c (Fencode_coding_string): Record the last coding system
        used, as the function doc string says (bug#8738).
        * xfaces.c <Qunspecified>: Make extern again.
  
        * syntax.c: Include sys/types.h before including regex.h, as
 -      required by Posix.
 +      required by POSIX.
  
        * doc.c (get_doc_string): Improve the format passed to `error'.
  
@@@ -17442,7 -9955,7 +17469,7 @@@ See ChangeLog.11 for earlier changes
  ;; coding: utf-8
  ;; End:
  
 -  Copyright (C) 2011-2012  Free Software Foundation, Inc.
 +  Copyright (C) 2011-2012 Free Software Foundation, Inc.
  
    This file is part of GNU Emacs.
  
diff --combined src/eval.c
index 1c565e233c6aa13efc70efe216d6f711210e79e0,332c3326fce1bd5ca38df2c1bbaf55d86a07ac85..e47478bb1f139f8b8de834a460854fed304791d4
@@@ -19,6 -19,7 +19,6 @@@ along with GNU Emacs.  If not, see <htt
  
  #include <config.h>
  #include <limits.h>
 -#include <setjmp.h>
  #include <stdio.h>
  #include "lisp.h"
  #include "blockinput.h"
@@@ -64,11 -65,11 +64,11 @@@ struct handler *handlerlist
  int gcpro_level;
  #endif
  
 -Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun;
 +Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp;
  Lisp_Object Qinhibit_quit;
  Lisp_Object Qand_rest;
  static Lisp_Object Qand_optional;
 -static Lisp_Object Qdebug_on_error;
 +static Lisp_Object Qinhibit_debugger;
  static Lisp_Object Qdeclare;
  Lisp_Object Qinternal_interpreter_environment, Qclosure;
  
@@@ -89,7 -90,7 +89,7 @@@ Lisp_Object Vautoload_queue
  
  /* Current number of specbindings allocated in specpdl.  */
  
 -EMACS_INT specpdl_size;
 +ptrdiff_t specpdl_size;
  
  /* Pointer to beginning of specpdl.  */
  
@@@ -110,13 -111,19 +110,13 @@@ static EMACS_INT lisp_eval_depth
     signal the error instead of entering an infinite loop of debugger
     invocations.  */
  
 -static int when_entered_debugger;
 +static EMACS_INT when_entered_debugger;
  
  /* The function from which the last `signal' was called.  Set in
     Fsignal.  */
  
  Lisp_Object Vsignaling_function;
  
 -/* Set to non-zero while processing X events.  Checked in Feval to
 -   make sure the Lisp interpreter isn't called from a signal handler,
 -   which is unsafe because the interpreter isn't reentrant.  */
 -
 -int handling_signal;
 -
  /* If non-nil, Lisp code must not be run since some part of Emacs is
     in an inconsistent state.  Currently, x-create-frame uses this to
     avoid triggering window-configuration-change-hook while the new
  Lisp_Object inhibit_lisp_code;
  
  static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
 -static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
 -static int interactive_p (int);
 +static bool interactive_p (void);
  static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args);
 -static Lisp_Object Ffetch_bytecode (Lisp_Object);
 -\f
 +
 +/* Functions to set Lisp_Object slots of struct specbinding.  */
 +
 +static inline void
 +set_specpdl_symbol (Lisp_Object symbol)
 +{
 +  specpdl_ptr->symbol = symbol;
 +}
 +
 +static inline void
 +set_specpdl_old_value (Lisp_Object oldval)
 +{
 +  specpdl_ptr->old_value = oldval;
 +}
 +
  void
  init_eval_once (void)
  {
    enum { size = 50 };
 -  specpdl = (struct specbinding *) xmalloc (size * sizeof (struct specbinding));
 +  specpdl = xmalloc (size * sizeof *specpdl);
    specpdl_size = size;
    specpdl_ptr = specpdl;
    /* Don't forget to update docs (lispref node "Local Variables").  */
@@@ -184,11 -179,11 +184,11 @@@ restore_stack_limits (Lisp_Object data
  
  /* Call the Lisp debugger, giving it argument ARG.  */
  
 -static Lisp_Object
 +Lisp_Object
  call_debugger (Lisp_Object arg)
  {
 -  int debug_while_redisplaying;
 -  int count = SPECPDL_INDEX ();
 +  bool debug_while_redisplaying;
 +  ptrdiff_t count = SPECPDL_INDEX ();
    Lisp_Object val;
    EMACS_INT old_max = max_specpdl_size;
  
    specbind (intern ("debugger-may-continue"),
            debug_while_redisplaying ? Qnil : Qt);
    specbind (Qinhibit_redisplay, Qnil);
 -  specbind (Qdebug_on_error, Qnil);
 +  specbind (Qinhibit_debugger, Qt);
  
  #if 0 /* Binding this prevents execution of Lisp code during
         redisplay, which necessarily leads to display problems.  */
@@@ -384,14 -379,23 +384,14 @@@ usage: (prog1 FIRST BODY...)  */
    Lisp_Object val;
    register Lisp_Object args_left;
    struct gcpro gcpro1, gcpro2;
 -  register int argnum = 0;
 -
 -  if (NILP (args))
 -    return Qnil;
  
    args_left = args;
    val = Qnil;
    GCPRO2 (args, val);
  
 -  do
 -    {
 -      Lisp_Object tem = eval_sub (XCAR (args_left));
 -      if (!(argnum++))
 -      val = tem;
 -      args_left = XCDR (args_left);
 -    }
 -  while (CONSP (args_left));
 +  val = eval_sub (XCAR (args_left));
 +  while (CONSP (args_left = XCDR (args_left)))
 +    eval_sub (XCAR (args_left));
  
    UNGCPRO;
    return val;
@@@ -404,12 -408,31 +404,12 @@@ remaining args, whose values are discar
  usage: (prog2 FORM1 FORM2 BODY...)  */)
    (Lisp_Object args)
  {
 -  Lisp_Object val;
 -  register Lisp_Object args_left;
 -  struct gcpro gcpro1, gcpro2;
 -  register int argnum = -1;
 -
 -  val = Qnil;
 -
 -  if (NILP (args))
 -    return Qnil;
 -
 -  args_left = args;
 -  val = Qnil;
 -  GCPRO2 (args, val);
 -
 -  do
 -    {
 -      Lisp_Object tem = eval_sub (XCAR (args_left));
 -      if (!(argnum++))
 -      val = tem;
 -      args_left = XCDR (args_left);
 -    }
 -  while (CONSP (args_left));
 +  struct gcpro gcpro1;
  
 +  GCPRO1 (args);
 +  eval_sub (XCAR (args));
    UNGCPRO;
 -  return val;
 +  return Fprog1 (XCDR (args));
  }
  
  DEFUN ("setq", Fsetq, Ssetq, 0, UNEVALLED, 0,
@@@ -518,7 -541,7 +518,7 @@@ spec that specifies non-nil uncondition
  use `called-interactively-p'.  */)
    (void)
  {
 -  return interactive_p (1) ? Qt : Qnil;
 +  return interactive_p () ? Qt : Qnil;
  }
  
  
@@@ -543,17 -566,19 +543,17 @@@ non-nil unconditionally (\"p\" is a goo
  \(not (or executing-kbd-macro noninteractive)).  */)
    (Lisp_Object kind)
  {
 -  return ((INTERACTIVE || !EQ (kind, intern ("interactive")))
 -        && interactive_p (1)) ? Qt : Qnil;
 +  return (((INTERACTIVE || !EQ (kind, intern ("interactive")))
 +         && interactive_p ())
 +        ? Qt : Qnil);
  }
  
  
 -/*  Return 1 if function in which this appears was called using
 -    call-interactively.
 +/* Return true if function in which this appears was called using
 +   call-interactively and is not a built-in.  */
  
 -    EXCLUDE_SUBRS_P non-zero means always return 0 if the function
 -    called is a built-in.  */
 -
 -static int
 -interactive_p (int exclude_subrs_p)
 +static bool
 +interactive_p (void)
  {
    struct backtrace *btp;
    Lisp_Object fun;
    /* `btp' now points at the frame of the innermost function that isn't
       a special form, ignoring frames for Finteractive_p and/or
       Fbytecode at the top.  If this frame is for a built-in function
 -     (such as load or eval-region) return nil.  */
 +     (such as load or eval-region) return false.  */
    fun = Findirect_function (*btp->function, Qnil);
 -  if (exclude_subrs_p && SUBRP (fun))
 +  if (SUBRP (fun))
      return 0;
  
    /* `btp' points to the frame of a Lisp function that called interactive-p.
  }
  
  
 -DEFUN ("defun", Fdefun, Sdefun, 2, UNEVALLED, 0,
 -       doc: /* Define NAME as a function.
 -The definition is (lambda ARGLIST [DOCSTRING] BODY...).
 -See also the function `interactive'.
 -usage: (defun NAME ARGLIST [DOCSTRING] BODY...)  */)
 -  (Lisp_Object args)
 -{
 -  register Lisp_Object fn_name;
 -  register Lisp_Object defn;
 -
 -  fn_name = Fcar (args);
 -  CHECK_SYMBOL (fn_name);
 -  defn = Fcons (Qlambda, Fcdr (args));
 -  if (!NILP (Vinternal_interpreter_environment)) /* Mere optimization!  */
 -    defn = Ffunction (Fcons (defn, Qnil));
 -  if (!NILP (Vpurify_flag))
 -    defn = Fpurecopy (defn);
 -  if (CONSP (XSYMBOL (fn_name)->function)
 -      && EQ (XCAR (XSYMBOL (fn_name)->function), Qautoload))
 -    LOADHIST_ATTACH (Fcons (Qt, fn_name));
 -  Ffset (fn_name, defn);
 -  LOADHIST_ATTACH (Fcons (Qdefun, fn_name));
 -  return fn_name;
 -}
 -
 -DEFUN ("defmacro", Fdefmacro, Sdefmacro, 2, UNEVALLED, 0,
 -       doc: /* Define NAME as a macro.
 -The actual definition looks like
 - (macro lambda ARGLIST [DOCSTRING] [DECL] BODY...).
 -When the macro is called, as in (NAME ARGS...),
 -the function (lambda ARGLIST BODY...) is applied to
 -the list ARGS... as it appears in the expression,
 -and the result should be a form to be evaluated instead of the original.
 -
 -DECL is a declaration, optional, which can specify how to indent
 -calls to this macro, how Edebug should handle it, and which argument
 -should be treated as documentation.  It looks like this:
 -  (declare SPECS...)
 -The elements can look like this:
 -  (indent INDENT)
 -      Set NAME's `lisp-indent-function' property to INDENT.
 -
 -  (debug DEBUG)
 -      Set NAME's `edebug-form-spec' property to DEBUG.  (This is
 -      equivalent to writing a `def-edebug-spec' for the macro.)
 -
 -  (doc-string ELT)
 -      Set NAME's `doc-string-elt' property to ELT.
 -
 -usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...)  */)
 -  (Lisp_Object args)
 -{
 -  register Lisp_Object fn_name;
 -  register Lisp_Object defn;
 -  Lisp_Object lambda_list, doc, tail;
 -
 -  fn_name = Fcar (args);
 -  CHECK_SYMBOL (fn_name);
 -  lambda_list = Fcar (Fcdr (args));
 -  tail = Fcdr (Fcdr (args));
 -
 -  doc = Qnil;
 -  if (STRINGP (Fcar (tail)))
 -    {
 -      doc = XCAR (tail);
 -      tail = XCDR (tail);
 -    }
 -
 -  if (CONSP (Fcar (tail))
 -      && EQ (Fcar (Fcar (tail)), Qdeclare))
 -    {
 -      if (!NILP (Vmacro_declaration_function))
 -      {
 -        struct gcpro gcpro1;
 -        GCPRO1 (args);
 -        call2 (Vmacro_declaration_function, fn_name, Fcar (tail));
 -        UNGCPRO;
 -      }
 -
 -      tail = Fcdr (tail);
 -    }
 -
 -  if (NILP (doc))
 -    tail = Fcons (lambda_list, tail);
 -  else
 -    tail = Fcons (lambda_list, Fcons (doc, tail));
 -
 -  defn = Fcons (Qlambda, tail);
 -  if (!NILP (Vinternal_interpreter_environment)) /* Mere optimization!  */
 -    defn = Ffunction (Fcons (defn, Qnil));
 -  defn = Fcons (Qmacro, defn);
 -
 -  if (!NILP (Vpurify_flag))
 -    defn = Fpurecopy (defn);
 -  if (CONSP (XSYMBOL (fn_name)->function)
 -      && EQ (XCAR (XSYMBOL (fn_name)->function), Qautoload))
 -    LOADHIST_ATTACH (Fcons (Qt, fn_name));
 -  Ffset (fn_name, defn);
 -  LOADHIST_ATTACH (Fcons (Qdefun, fn_name));
 -  return fn_name;
 -}
 -
 -
  DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0,
         doc: /* Make NEW-ALIAS a variable alias for symbol BASE-VARIABLE.
  Aliased variables always have the same value; setting one sets the other.
@@@ -635,8 -763,8 +635,8 @@@ The return value is BASE-VARIABLE.  */
    {
      struct specbinding *p;
  
 -    for (p = specpdl_ptr - 1; p >= specpdl; p--)
 -      if (p->func == NULL
 +    for (p = specpdl_ptr; p > specpdl; )
 +      if ((--p)->func == NULL
          && (EQ (new_alias,
                  CONSP (p->symbol) ? XCAR (p->symbol) : p->symbol)))
        error ("Don't know how to make a let-bound variable an alias");
@@@ -679,6 -807,8 +679,6 @@@ The optional argument DOCSTRING is a do
  variable.
  
  To define a user option, use `defcustom' instead of `defvar'.
 -The function `user-variable-p' also identifies a variable as a user
 -option if its DOCSTRING starts with *, but this behavior is obsolete.
  usage: (defvar SYMBOL &optional INITVALUE DOCSTRING)  */)
    (Lisp_Object args)
  {
        /* Do it before evaluating the initial value, for self-references.  */
        XSYMBOL (sym)->declared_special = 1;
  
 -      if (SYMBOL_CONSTANT_P (sym))
 -      {
 -        /* For upward compatibility, allow (defvar :foo (quote :foo)).  */
 -        Lisp_Object tem1 = Fcar (tail);
 -        if (! (CONSP (tem1)
 -               && EQ (XCAR (tem1), Qquote)
 -               && CONSP (XCDR (tem1))
 -               && EQ (XCAR (XCDR (tem1)), sym)))
 -          error ("Constant symbol `%s' specified in defvar",
 -                 SDATA (SYMBOL_NAME (sym)));
 -      }
 -
        if (NILP (tem))
        Fset_default (sym, eval_sub (Fcar (tail)));
        else
        { /* Check if there is really a global binding rather than just a let
             binding that shadows the global unboundness of the var.  */
 -        volatile struct specbinding *pdl = specpdl_ptr;
 -        while (--pdl >= specpdl)
 +        struct specbinding *pdl = specpdl_ptr;
 +        while (pdl > specpdl)
            {
 -            if (EQ (pdl->symbol, sym) && !pdl->func
 +            if (EQ ((--pdl)->symbol, sym) && !pdl->func
                  && EQ (pdl->old_value, Qunbound))
                {
                  message_with_string ("Warning: defvar ignored because %s is let-bound",
@@@ -780,17 -922,71 +780,17 @@@ usage: (defconst SYMBOL INITVALUE [DOCS
    return sym;
  }
  
 -/* Error handler used in Fuser_variable_p.  */
 -static Lisp_Object
 -user_variable_p_eh (Lisp_Object ignore)
 +/* Make SYMBOL lexically scoped.  */
 +DEFUN ("internal-make-var-non-special", Fmake_var_non_special,
 +       Smake_var_non_special, 1, 1, 0,
 +       doc: /* Internal function.  */)
 +     (Lisp_Object symbol)
  {
 +  CHECK_SYMBOL (symbol);
 +  XSYMBOL (symbol)->declared_special = 0;
    return Qnil;
  }
  
 -static Lisp_Object
 -lisp_indirect_variable (Lisp_Object sym)
 -{
 -  struct Lisp_Symbol *s = indirect_variable (XSYMBOL (sym));
 -  XSETSYMBOL (sym, s);
 -  return sym;
 -}
 -
 -DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0,
 -       doc: /* Return t if VARIABLE is intended to be set and modified by users.
 -\(The alternative is a variable used internally in a Lisp program.)
 -
 -This function returns t if (i) the first character of its
 -documentation is `*', or (ii) it is customizable (its property list
 -contains a non-nil value of `standard-value' or `custom-autoload'), or
 -\(iii) it is an alias for a user variable.
 -
 -But condition (i) is considered obsolete, so for most purposes this is
 -equivalent to `custom-variable-p'.  */)
 -  (Lisp_Object variable)
 -{
 -  Lisp_Object documentation;
 -
 -  if (!SYMBOLP (variable))
 -      return Qnil;
 -
 -  /* If indirect and there's an alias loop, don't check anything else.  */
 -  if (XSYMBOL (variable)->redirect == SYMBOL_VARALIAS
 -      && NILP (internal_condition_case_1 (lisp_indirect_variable, variable,
 -                                        Qt, user_variable_p_eh)))
 -    return Qnil;
 -
 -  while (1)
 -    {
 -      documentation = Fget (variable, Qvariable_documentation);
 -      if (INTEGERP (documentation) && XINT (documentation) < 0)
 -      return Qt;
 -      if (STRINGP (documentation)
 -        && ((unsigned char) SREF (documentation, 0) == '*'))
 -      return Qt;
 -      /* If it is (STRING . INTEGER), a negative integer means a user variable.  */
 -      if (CONSP (documentation)
 -        && STRINGP (XCAR (documentation))
 -        && INTEGERP (XCDR (documentation))
 -        && XINT (XCDR (documentation)) < 0)
 -      return Qt;
 -      /* Customizable?  See `custom-variable-p'.  */
 -      if ((!NILP (Fget (variable, intern ("standard-value"))))
 -        || (!NILP (Fget (variable, intern ("custom-autoload")))))
 -      return Qt;
 -
 -      if (!(XSYMBOL (variable)->redirect == SYMBOL_VARALIAS))
 -      return Qnil;
 -
 -      /* An indirect variable?  Let's follow the chain.  */
 -      XSETSYMBOL (variable, SYMBOL_ALIAS (XSYMBOL (variable)));
 -    }
 -}
  \f
  DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0,
         doc: /* Bind variables according to VARLIST then eval BODY.
@@@ -802,7 -998,7 +802,7 @@@ usage: (let* VARLIST BODY...)  */
    (Lisp_Object args)
  {
    Lisp_Object varlist, var, val, elt, lexenv;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    struct gcpro gcpro1, gcpro2, gcpro3;
  
    GCPRO3 (args, elt, varlist);
@@@ -865,7 -1061,7 +865,7 @@@ usage: (let VARLIST BODY...)  */
  {
    Lisp_Object *temps, tem, lexenv;
    register Lisp_Object elt, varlist;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    ptrdiff_t argnum;
    struct gcpro gcpro1, gcpro2;
    USE_SAFE_ALLOCA;
@@@ -992,14 -1188,26 +992,14 @@@ definitions to shadow the loaded ones f
        {
          /* SYM is not mentioned in ENVIRONMENT.
             Look at its function definition.  */
 +        struct gcpro gcpro1;
 +        GCPRO1 (form);
 +        def = Fautoload_do_load (def, sym, Qmacro);
 +        UNGCPRO;
          if (EQ (def, Qunbound) || !CONSP (def))
            /* Not defined or definition not suitable.  */
            break;
 -        if (EQ (XCAR (def), Qautoload))
 -          {
 -            /* Autoloading function: will it be a macro when loaded?  */
 -            tem = Fnth (make_number (4), def);
 -            if (EQ (tem, Qt) || EQ (tem, Qmacro))
 -              /* Yes, load it and try again.  */
 -              {
 -                struct gcpro gcpro1;
 -                GCPRO1 (form);
 -                do_autoload (def, sym);
 -                UNGCPRO;
 -                continue;
 -              }
 -            else
 -              break;
 -          }
 -        else if (!EQ (XCAR (def), Qmacro))
 +        if (!EQ (XCAR (def), Qmacro))
            break;
          else expander = XCDR (def);
        }
          if (NILP (expander))
            break;
        }
 -      form = apply1 (expander, XCDR (form));
 +      {
 +      Lisp_Object newform = apply1 (expander, XCDR (form));
 +      if (EQ (form, newform))
 +        break;
 +      else
 +        form = newform;
 +      }
      }
    return form;
  }
@@@ -1065,7 -1267,7 +1065,7 @@@ internal_catch (Lisp_Object tag, Lisp_O
    catchlist = &c;
  
    /* Call FUNC.  */
 -  if (! _setjmp (c.jmp))
 +  if (! sys_setjmp (c.jmp))
      c.val = (*func) (arg);
  
    /* Throw works by a longjmp that comes right here.  */
  
     This is used for correct unwinding in Fthrow and Fsignal.  */
  
 -static void
 +static _Noreturn void
  unwind_to_catch (struct catchtag *catch, Lisp_Object value)
  {
 -  register int last_time;
 +  bool last_time;
  
    /* Save the value in the tag.  */
    catch->val = value;
    /* Restore certain special C variables.  */
    set_poll_suppress_count (catch->poll_suppress_count);
    UNBLOCK_INPUT_TO (catch->interrupt_input_blocked);
 -  handling_signal = 0;
    immediate_quit = 0;
  
    do
    backtrace_list = catch->backlist;
    lisp_eval_depth = catch->lisp_eval_depth;
  
 -  _longjmp (catch->jmp, 1);
 +  sys_longjmp (catch->jmp, 1);
  }
  
  DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0,
@@@ -1161,7 -1364,7 +1161,7 @@@ usage: (unwind-protect BODYFORM UNWINDF
    (Lisp_Object args)
  {
    Lisp_Object val;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
  
    record_unwind_protect (Fprogn, Fcdr (args));
    val = eval_sub (Fcar (args));
@@@ -1196,9 -1399,12 +1196,9 @@@ See also the function `signal' for mor
  usage: (condition-case VAR BODYFORM &rest HANDLERS)  */)
    (Lisp_Object args)
  {
 -  register Lisp_Object bodyform, handlers;
 -  volatile Lisp_Object var;
 -
 -  var      = Fcar (args);
 -  bodyform = Fcar (Fcdr (args));
 -  handlers = Fcdr (Fcdr (args));
 +  Lisp_Object var = Fcar (args);
 +  Lisp_Object bodyform = Fcar (Fcdr (args));
 +  Lisp_Object handlers = Fcdr (Fcdr (args));
  
    return internal_lisp_condition_case (var, bodyform, handlers);
  }
@@@ -1238,7 -1444,7 +1238,7 @@@ internal_lisp_condition_case (volatile 
    c.interrupt_input_blocked = interrupt_input_blocked;
    c.gcpro = gcprolist;
    c.byte_stack = byte_stack_list;
 -  if (_setjmp (c.jmp))
 +  if (sys_setjmp (c.jmp))
      {
        if (!NILP (h.var))
        specbind (h.var, c.val);
@@@ -1293,7 -1499,7 +1293,7 @@@ internal_condition_case (Lisp_Object (*
    c.interrupt_input_blocked = interrupt_input_blocked;
    c.gcpro = gcprolist;
    c.byte_stack = byte_stack_list;
 -  if (_setjmp (c.jmp))
 +  if (sys_setjmp (c.jmp))
      {
        return (*hfun) (c.val);
      }
@@@ -1331,7 -1537,7 +1331,7 @@@ internal_condition_case_1 (Lisp_Object 
    c.interrupt_input_blocked = interrupt_input_blocked;
    c.gcpro = gcprolist;
    c.byte_stack = byte_stack_list;
 -  if (_setjmp (c.jmp))
 +  if (sys_setjmp (c.jmp))
      {
        return (*hfun) (c.val);
      }
@@@ -1373,7 -1579,7 +1373,7 @@@ internal_condition_case_2 (Lisp_Object 
    c.interrupt_input_blocked = interrupt_input_blocked;
    c.gcpro = gcprolist;
    c.byte_stack = byte_stack_list;
 -  if (_setjmp (c.jmp))
 +  if (sys_setjmp (c.jmp))
      {
        return (*hfun) (c.val);
      }
@@@ -1399,9 -1605,7 +1399,9 @@@ internal_condition_case_n (Lisp_Object 
                           ptrdiff_t nargs,
                           Lisp_Object *args,
                           Lisp_Object handlers,
 -                         Lisp_Object (*hfun) (Lisp_Object))
 +                         Lisp_Object (*hfun) (Lisp_Object err,
 +                                              ptrdiff_t nargs,
 +                                              Lisp_Object *args))
  {
    Lisp_Object val;
    struct catchtag c;
    c.interrupt_input_blocked = interrupt_input_blocked;
    c.gcpro = gcprolist;
    c.byte_stack = byte_stack_list;
 -  if (_setjmp (c.jmp))
 +  if (sys_setjmp (c.jmp))
      {
 -      return (*hfun) (c.val);
 +      return (*hfun) (c.val, nargs, args);
      }
    c.next = catchlist;
    catchlist = &c;
  
  \f
  static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object);
 -static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig,
 -                              Lisp_Object data);
 +static bool maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig,
 +                               Lisp_Object data);
  
  void
  process_quit_flag (void)
@@@ -1479,10 -1683,10 +1479,10 @@@ See also the function `condition-case'
    struct handler *h;
    struct backtrace *bp;
  
 -  immediate_quit = handling_signal = 0;
 +  immediate_quit = 0;
    abort_on_gc = 0;
    if (gc_in_progress || waiting_for_input)
 -    abort ();
 +    emacs_abort ();
  
  #if 0 /* rms: I don't know why this was here,
         but it is surely wrong for an error that is handled.  */
             if requested".  */
          || EQ (h->handler, Qerror)))
      {
 -      int debugger_called
 +      bool debugger_called
        = maybe_call_debugger (conditions, error_symbol, data);
        /* We can't return values to code which signaled an error, but we
         can continue code which has signaled a quit.  */
@@@ -1579,7 -1783,7 +1579,7 @@@ voi
  xsignal (Lisp_Object error_symbol, Lisp_Object data)
  {
    Fsignal (error_symbol, data);
 -  abort ();
 +  emacs_abort ();
  }
  
  /* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list.  */
@@@ -1637,10 -1841,10 +1637,10 @@@ signal_error (const char *s, Lisp_Objec
  }
  
  
 -/* Return nonzero if LIST is a non-nil atom or
 +/* Return true if LIST is a non-nil atom or
     a list containing one of CONDITIONS.  */
  
 -static int
 +static bool
  wants_debugger (Lisp_Object list, Lisp_Object conditions)
  {
    if (NILP (list))
    return 0;
  }
  
 -/* Return 1 if an error with condition-symbols CONDITIONS,
 +/* Return true if an error with condition-symbols CONDITIONS,
     and described by SIGNAL-DATA, should skip the debugger
     according to debugger-ignored-errors.  */
  
 -static int
 +static bool
  skip_debugger (Lisp_Object conditions, Lisp_Object data)
  {
    Lisp_Object tail;
 -  int first_string = 1;
 +  bool first_string = 1;
    Lisp_Object error_message;
  
    error_message = Qnil;
      = SIG is the error symbol, and DATA is the rest of the data.
      = SIG is nil, and DATA is (SYMBOL . REST-OF-DATA).
        This is for memory-full errors only.  */
 -static int
 +static bool
  maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data)
  {
    Lisp_Object combined_data;
        /* Don't try to run the debugger with interrupts blocked.
         The editing loop would return anyway.  */
        ! INPUT_BLOCKED_P
 +      && NILP (Vinhibit_debugger)
        /* Does user want to enter debugger for this kind of error?  */
        && (EQ (sig, Qquit)
          ? debug_on_quit
@@@ -1905,12 -2108,13 +1905,12 @@@ this does nothing and returns nil.  */
      /* Only add entries after dumping, because the ones before are
         not useful and else we get loads of them from the loaddefs.el.  */
      LOADHIST_ATTACH (Fcons (Qautoload, function));
 -  else
 -    /* We don't want the docstring in purespace (instead,
 -       Snarf-documentation should (hopefully) overwrite it).
 -       We used to use 0 here, but that leads to accidental sharing in
 -       purecopy's hash-consing, so we use a (hopefully) unique integer
 -       instead.  */
 -    docstring = make_number (XPNTR (function));
 +  else if (EQ (docstring, make_number (0)))
 +    /* `read1' in lread.c has found the docstring starting with "\
 +       and assumed the docstring will be provided by Snarf-documentation, so it
 +       passed us 0 instead.  But that leads to accidental sharing in purecopy's
 +       hash-consing, so we use a (hopefully) unique integer instead.  */
 +    docstring = make_number (XUNTAG (function, Lisp_Symbol));
    return Ffset (function,
                Fpurecopy (list5 (Qautoload, file, docstring,
                                  interactive, type)));
@@@ -1943,35 -2147,22 +1943,35 @@@ un_autoload (Lisp_Object oldqueue
     FUNNAME is the symbol which is the function's name.
     FUNDEF is the autoload definition (a list).  */
  
 -void
 -do_autoload (Lisp_Object fundef, Lisp_Object funname)
 +DEFUN ("autoload-do-load", Fautoload_do_load, Sautoload_do_load, 1, 3, 0,
 +       doc: /* Load FUNDEF which should be an autoload.
 +If non-nil, FUNNAME should be the symbol whose function value is FUNDEF,
 +in which case the function returns the new autoloaded function value.
 +If equal to `macro', MACRO-ONLY specifies that FUNDEF should only be loaded if
 +it is defines a macro.  */)
 +  (Lisp_Object fundef, Lisp_Object funname, Lisp_Object macro_only)
  {
 -  int count = SPECPDL_INDEX ();
 -  Lisp_Object fun;
 +  ptrdiff_t count = SPECPDL_INDEX ();
    struct gcpro gcpro1, gcpro2, gcpro3;
  
 +  if (!CONSP (fundef) || !EQ (Qautoload, XCAR (fundef)))
 +    return fundef;
 +
 +  if (EQ (macro_only, Qmacro))
 +    {
 +      Lisp_Object kind = Fnth (make_number (4), fundef);
 +      if (! (EQ (kind, Qt) || EQ (kind, Qmacro)))
 +      return fundef;
 +    }
 +
    /* This is to make sure that loadup.el gives a clear picture
       of what files are preloaded and when.  */
    if (! NILP (Vpurify_flag))
      error ("Attempt to autoload %s while preparing to dump",
           SDATA (SYMBOL_NAME (funname)));
  
 -  fun = funname;
    CHECK_SYMBOL (funname);
 -  GCPRO3 (fun, funname, fundef);
 +  GCPRO3 (funname, fundef, macro_only);
  
    /* Preserve the match data.  */
    record_unwind_save_match_data ();
       The value saved here is to be restored into Vautoload_queue.  */
    record_unwind_protect (un_autoload, Vautoload_queue);
    Vautoload_queue = Qt;
 -  Fload (Fcar (Fcdr (fundef)), Qnil, Qt, Qnil, Qt);
 +  /* If `macro_only', assume this autoload to be a "best-effort",
 +     so don't signal an error if autoloading fails.  */
 +  Fload (Fcar (Fcdr (fundef)), macro_only, Qt, Qnil, Qt);
  
    /* Once loading finishes, don't undo it.  */
    Vautoload_queue = Qt;
    unbind_to (count, Qnil);
  
 -  fun = Findirect_function (fun, Qnil);
 -
 -  if (!NILP (Fequal (fun, fundef)))
 -    error ("Autoloading failed to define function %s",
 -         SDATA (SYMBOL_NAME (funname)));
    UNGCPRO;
 +
 +  if (NILP (funname))
 +    return Qnil;
 +  else
 +    {
 +      Lisp_Object fun = Findirect_function (funname, Qnil);
 +
 +      if (!NILP (Fequal (fun, fundef)))
 +      error ("Autoloading failed to define function %s",
 +             SDATA (SYMBOL_NAME (funname)));
 +      else
 +      return fun;
 +    }
  }
  
  \f
@@@ -2016,7 -2197,7 +2016,7 @@@ DEFUN ("eval", Feval, Seval, 1, 2, 0
  If LEXICAL is t, evaluate using lexical scoping.  */)
    (Lisp_Object form, Lisp_Object lexical)
  {
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    specbind (Qinternal_interpreter_environment,
            NILP (lexical) ? Qnil : Fcons (Qt, Qnil));
    return unbind_to (count, eval_sub (form));
@@@ -2032,6 -2213,9 +2032,6 @@@ eval_sub (Lisp_Object form
    struct backtrace backtrace;
    struct gcpro gcpro1, gcpro2, gcpro3;
  
 -  if (handling_signal)
 -    abort ();
 -
    if (SYMBOLP (form))
      {
        /* Look up its binding in the lexical environment.
      return form;
  
    QUIT;
 -  if ((consing_since_gc > gc_cons_threshold
 -       && consing_since_gc > gc_relative_threshold)
 -      ||
 -      (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
 -    {
 -      GCPRO1 (form);
 -      Fgarbage_collect ();
 -      UNGCPRO;
 -    }
 +  maybe_gc ();
  
    if (++lisp_eval_depth > max_lisp_eval_depth)
      {
        error ("Lisp nesting exceeds `max-lisp-eval-depth'");
      }
  
 -  original_fun = Fcar (form);
 -  original_args = Fcdr (form);
 +  original_fun = XCAR (form);
 +  original_args = XCDR (form);
  
    backtrace.next = backtrace_list;
    backtrace_list = &backtrace;
        args_left = original_args;
        numargs = Flength (args_left);
  
 -      CHECK_CONS_LIST ();
 +      check_cons_list ();
  
        if (XINT (numargs) < XSUBR (fun)->min_args
          || (XSUBR (fun)->max_args >= 0
                 is supported by this code.  We need to either rewrite the
                 subr to use a different argument protocol, or add more
                 cases to this switch.  */
 -            abort ();
 +            emacs_abort ();
            }
        }
      }
        xsignal1 (Qinvalid_function, original_fun);
        if (EQ (funcar, Qautoload))
        {
 -        do_autoload (fun, original_fun);
 +        Fautoload_do_load (fun, original_fun, Qnil);
          goto retry;
        }
        if (EQ (funcar, Qmacro))
 -      val = eval_sub (apply1 (Fcdr (fun), original_args));
 +      {
 +        ptrdiff_t count = SPECPDL_INDEX ();
 +        Lisp_Object exp;
 +        /* Bind lexical-binding during expansion of the macro, so the
 +           macro can know reliably if the code it outputs will be
 +           interpreted using lexical-binding or not.  */
 +        specbind (Qlexical_binding,
 +                  NILP (Vinternal_interpreter_environment) ? Qnil : Qt);
 +        exp = apply1 (Fcdr (fun), original_args);
 +        unbind_to (count, Qnil);
 +        val = eval_sub (exp);
 +      }
        else if (EQ (funcar, Qlambda)
               || EQ (funcar, Qclosure))
        val = apply_lambda (fun, original_args);
        else
        xsignal1 (Qinvalid_function, original_fun);
      }
 -  CHECK_CONS_LIST ();
 +  check_cons_list ();
  
    lisp_eval_depth--;
    if (backtrace.debug_on_exit)
    return val;
  }
  \f
 -DEFUN ("apply", Fapply, Sapply, 2, MANY, 0,
 +DEFUN ("apply", Fapply, Sapply, 1, MANY, 0,
         doc: /* Call FUNCTION with our remaining args, using our last arg as list of args.
  Then return the value FUNCTION returns.
  Thus, (apply '+ 1 2 '(3 4)) returns 10.
  usage: (apply FUNCTION &rest ARGUMENTS)  */)
    (ptrdiff_t nargs, Lisp_Object *args)
  {
 -  ptrdiff_t i, numargs;
 +  ptrdiff_t i;
 +  EMACS_INT numargs;
    register Lisp_Object spread_arg;
    register Lisp_Object *funcall_args;
    Lisp_Object fun, retval;
        gcpro1.nvars = 1 + numargs;
      }
  
 -  memcpy (funcall_args, args, nargs * sizeof (Lisp_Object));
 +  memcpy (funcall_args, args, nargs * word_size);
    /* Spread the last arg we got.  Its first element goes in
       the slot that it used to occupy, hence this value of I.  */
    i = nargs - 1;
@@@ -2399,6 -2579,7 +2399,7 @@@ If it is a list of functions, those fun
  with the given arguments ARGS, until one of them
  returns a non-nil value.  Then we return that value.
  However, if they all return nil, we return nil.
+ If the value of HOOK is nil, this function returns nil.
  
  Do not use `make-local-variable' to make a hook variable buffer-local.
  Instead, use `add-hook' and specify t for the LOCAL argument.
@@@ -2420,10 -2601,12 +2421,12 @@@ DEFUN ("run-hook-with-args-until-failur
  HOOK should be a symbol, a hook variable.  If HOOK has a non-nil
  value, that value may be a function or a list of functions to be
  called to run the hook.  If the value is a function, it is called with
- the given arguments and its return value is returned.
+ the given arguments.  Then we return nil if the function returns nil,
+ and t if it returns non-nil.
  If it is a list of functions, those functions are called, in order,
  with the given arguments ARGS, until one of them returns nil.
- Then we return nil.  However, if they all return non-nil, we return non-nil.
+ Then we return nil.  However, if they all return non-nil, we return t.
+ If the value of HOOK is nil, this function returns t.
  
  Do not use `make-local-variable' to make a hook variable buffer-local.
  Instead, use `add-hook' and specify t for the LOCAL argument.
@@@ -2705,9 -2888,33 +2708,9 @@@ DEFUN ("functionp", Ffunctionp, Sfuncti
         doc: /* Non-nil if OBJECT is a function.  */)
       (Lisp_Object object)
  {
 -  if (SYMBOLP (object) && !NILP (Ffboundp (object)))
 -    {
 -      object = Findirect_function (object, Qt);
 -
 -      if (CONSP (object) && EQ (XCAR (object), Qautoload))
 -      {
 -        /* Autoloaded symbols are functions, except if they load
 -           macros or keymaps.  */
 -        int i;
 -        for (i = 0; i < 4 && CONSP (object); i++)
 -          object = XCDR (object);
 -
 -        return (CONSP (object) && !NILP (XCAR (object))) ? Qnil : Qt;
 -      }
 -    }
 -
 -  if (SUBRP (object))
 -    return (XSUBR (object)->max_args != UNEVALLED) ? Qt : Qnil;
 -  else if (COMPILEDP (object))
 +  if (FUNCTIONP (object))
      return Qt;
 -  else if (CONSP (object))
 -    {
 -      Lisp_Object car = XCAR (object);
 -      return (EQ (car, Qlambda) || EQ (car, Qclosure)) ? Qt : Qnil;
 -    }
 -  else
 -    return Qnil;
 +  return Qnil;
  }
  
  DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0,
@@@ -2727,6 -2934,11 +2730,6 @@@ usage: (funcall FUNCTION &rest ARGUMENT
    ptrdiff_t i;
  
    QUIT;
 -  if ((consing_since_gc > gc_cons_threshold
 -       && consing_since_gc > gc_relative_threshold)
 -      ||
 -      (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
 -    Fgarbage_collect ();
  
    if (++lisp_eval_depth > max_lisp_eval_depth)
      {
    backtrace.next = backtrace_list;
    backtrace_list = &backtrace;
    backtrace.function = &args[0];
 -  backtrace.args = &args[1];
 +  backtrace.args = &args[1];  /* This also GCPROs them.  */
    backtrace.nargs = nargs - 1;
    backtrace.debug_on_exit = 0;
  
 +  /* Call GC after setting up the backtrace, so the latter GCPROs the args.  */
 +  maybe_gc ();
 +
    if (debug_on_next_call)
      do_debug_on_call (Qlambda);
  
 -  CHECK_CONS_LIST ();
 +  check_cons_list ();
  
    original_fun = args[0];
  
        {
          if (XSUBR (fun)->max_args > numargs)
            {
 -            internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object));
 -            memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object));
 +            internal_args = alloca (XSUBR (fun)->max_args
 +                                    * sizeof *internal_args);
 +            memcpy (internal_args, args + 1, numargs * word_size);
              for (i = numargs; i < XSUBR (fun)->max_args; i++)
                internal_args[i] = Qnil;
            }
              /* If a subr takes more than 8 arguments without using MANY
                 or UNEVALLED, we need to extend this function to support it.
                 Until this is done, there is no way to call the function.  */
 -            abort ();
 +            emacs_abort ();
            }
        }
      }
        val = funcall_lambda (fun, numargs, args + 1);
        else if (EQ (funcar, Qautoload))
        {
 -        do_autoload (fun, original_fun);
 -        CHECK_CONS_LIST ();
 +        Fautoload_do_load (fun, original_fun, Qnil);
 +        check_cons_list ();
          goto retry;
        }
        else
        xsignal1 (Qinvalid_function, original_fun);
      }
 -  CHECK_CONS_LIST ();
 +  check_cons_list ();
    lisp_eval_depth--;
    if (backtrace.debug_on_exit)
      val = call_debugger (Fcons (Qexit, Fcons (val, Qnil)));
@@@ -2876,8 -3084,7 +2879,8 @@@ static Lisp_Objec
  apply_lambda (Lisp_Object fun, Lisp_Object args)
  {
    Lisp_Object args_left;
 -  ptrdiff_t i, numargs;
 +  ptrdiff_t i;
 +  EMACS_INT numargs;
    register Lisp_Object *arg_vector;
    struct gcpro gcpro1, gcpro2, gcpro3;
    register Lisp_Object tem;
@@@ -2922,9 -3129,9 +2925,9 @@@ funcall_lambda (Lisp_Object fun, ptrdif
                register Lisp_Object *arg_vector)
  {
    Lisp_Object val, syms_left, next, lexenv;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    ptrdiff_t i;
 -  int optional, rest;
 +  bool optional, rest;
  
    if (CONSP (fun))
      {
        lexenv = Qnil;
      }
    else
 -    abort ();
 +    emacs_abort ();
  
    i = optional = rest = 0;
    for (; CONSP (syms_left); syms_left = XCDR (syms_left))
@@@ -3061,8 -3268,12 +3064,8 @@@ DEFUN ("fetch-bytecode", Ffetch_bytecod
  static void
  grow_specpdl (void)
  {
 -  register int count = SPECPDL_INDEX ();
 -  int max_size =
 -    min (max_specpdl_size,
 -       min (max (PTRDIFF_MAX, SIZE_MAX) / sizeof (struct specbinding),
 -            INT_MAX));
 -  int size;
 +  register ptrdiff_t count = SPECPDL_INDEX ();
 +  ptrdiff_t max_size = min (max_specpdl_size, PTRDIFF_MAX);
    if (max_size <= specpdl_size)
      {
        if (max_specpdl_size < 400)
        if (max_size <= specpdl_size)
        signal_error ("Variable binding depth exceeds max-specpdl-size", Qnil);
      }
 -  size = specpdl_size < max_size / 2 ? 2 * specpdl_size : max_size;
 -  specpdl = xnrealloc (specpdl, size, sizeof *specpdl);
 -  specpdl_size = size;
 +  specpdl = xpalloc (specpdl, &specpdl_size, 1, max_size, sizeof *specpdl);
    specpdl_ptr = specpdl + count;
  }
  
@@@ -3094,6 -3307,8 +3097,6 @@@ specbind (Lisp_Object symbol, Lisp_Obje
  {
    struct Lisp_Symbol *sym;
  
 -  eassert (!handling_signal);
 -
    CHECK_SYMBOL (symbol);
    sym = XSYMBOL (symbol);
    if (specpdl_ptr == specpdl + specpdl_size)
      case SYMBOL_PLAINVAL:
        /* The most common case is that of a non-constant symbol with a
         trivial value.  Make that as fast as we can.  */
 -      specpdl_ptr->symbol = symbol;
 -      specpdl_ptr->old_value = SYMBOL_VAL (sym);
 +      set_specpdl_symbol (symbol);
 +      set_specpdl_old_value (SYMBOL_VAL (sym));
        specpdl_ptr->func = NULL;
        ++specpdl_ptr;
        if (!sym->constant)
        {
        Lisp_Object ovalue = find_symbol_value (symbol);
        specpdl_ptr->func = 0;
 -      specpdl_ptr->old_value = ovalue;
 +      set_specpdl_old_value (ovalue);
  
        eassert (sym->redirect != SYMBOL_LOCALIZED
                 || (EQ (SYMBOL_BLV (sym)->where,
            if (!NILP (Flocal_variable_p (symbol, Qnil)))
              {
                eassert (sym->redirect != SYMBOL_LOCALIZED
 -                       || (BLV_FOUND (SYMBOL_BLV (sym))
 +                       || (blv_found (SYMBOL_BLV (sym))
                             && EQ (cur_buf, SYMBOL_BLV (sym)->where)));
                where = cur_buf;
              }
            else if (sym->redirect == SYMBOL_LOCALIZED
 -                   && BLV_FOUND (SYMBOL_BLV (sym)))
 +                   && blv_found (SYMBOL_BLV (sym)))
              where = SYMBOL_BLV (sym)->where;
            else
              where = Qnil;
               let_shadows_buffer_binding_p which is itself only used
               in set_internal for local_if_set.  */
            eassert (NILP (where) || EQ (where, cur_buf));
 -          specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf));
 +          set_specpdl_symbol (Fcons (symbol, Fcons (where, cur_buf)));
  
            /* If SYMBOL is a per-buffer variable which doesn't have a
               buffer-local value here, make the `let' change the global
              }
          }
        else
 -        specpdl_ptr->symbol = symbol;
 +        set_specpdl_symbol (symbol);
  
        specpdl_ptr++;
        set_internal (symbol, value, Qnil, 1);
        break;
        }
 -    default: abort ();
 +    default: emacs_abort ();
      }
  }
  
  void
  record_unwind_protect (Lisp_Object (*function) (Lisp_Object), Lisp_Object arg)
  {
 -  eassert (!handling_signal);
 -
    if (specpdl_ptr == specpdl + specpdl_size)
      grow_specpdl ();
    specpdl_ptr->func = function;
 -  specpdl_ptr->symbol = Qnil;
 -  specpdl_ptr->old_value = arg;
 +  set_specpdl_symbol (Qnil);
 +  set_specpdl_old_value (arg);
    specpdl_ptr++;
  }
  
  Lisp_Object
 -unbind_to (int count, Lisp_Object value)
 +unbind_to (ptrdiff_t count, Lisp_Object value)
  {
    Lisp_Object quitf = Vquit_flag;
    struct gcpro gcpro1, gcpro2;
@@@ -3276,7 -3493,7 +3279,7 @@@ The debugger is entered when that fram
    (Lisp_Object level, Lisp_Object flag)
  {
    register struct backtrace *backlist = backtrace_list;
 -  register int i;
 +  register EMACS_INT i;
  
    CHECK_NUMBER (level);
  
@@@ -3323,13 -3540,13 +3326,13 @@@ Output stream used is value of `standar
          write_string ("(", -1);
          if (backlist->nargs == MANY)
            {                   /* FIXME: Can this happen?  */
 -            int i;
 -            for (tail = *backlist->args, i = 0;
 -                 !NILP (tail);
 -                 tail = Fcdr (tail), i = 1)
 +            bool later_arg = 0;
 +            for (tail = *backlist->args; !NILP (tail); tail = Fcdr (tail))
                {
 -                if (i) write_string (" ", -1);
 +                if (later_arg)
 +                  write_string (" ", -1);
                  Fprin1 (Fcar (tail), Qnil);
 +                later_arg = 1;
                }
            }
          else
@@@ -3415,7 -3632,7 +3418,7 @@@ voi
  syms_of_eval (void)
  {
    DEFVAR_INT ("max-specpdl-size", max_specpdl_size,
 -            doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's.
 +            doc: /* Limit on number of Lisp variable bindings and `unwind-protect's.
  If Lisp code tries to increase the total number past this amount,
  an error is signaled.
  You can safely use a value considerably larger than the default value,
@@@ -3423,7 -3640,7 +3426,7 @@@ if that proves inconveniently small.  H
  Emacs could run out of memory trying to make the stack bigger.  */);
  
    DEFVAR_INT ("max-lisp-eval-depth", max_lisp_eval_depth,
 -            doc: /* *Limit on depth in `eval', `apply' and `funcall' before error.
 +            doc: /* Limit on depth in `eval', `apply' and `funcall' before error.
  
  This limit serves to catch infinite recursions for you before they cause
  actual stack overflow in C, which would be fatal for Emacs.
@@@ -3450,7 -3667,7 +3453,7 @@@ before making `inhibit-quit' nil.  */)
  
    DEFSYM (Qinhibit_quit, "inhibit-quit");
    DEFSYM (Qautoload, "autoload");
 -  DEFSYM (Qdebug_on_error, "debug-on-error");
 +  DEFSYM (Qinhibit_debugger, "inhibit-debugger");
    DEFSYM (Qmacro, "macro");
    DEFSYM (Qdeclare, "declare");
  
  
    DEFSYM (Qinteractive, "interactive");
    DEFSYM (Qcommandp, "commandp");
 -  DEFSYM (Qdefun, "defun");
    DEFSYM (Qand_rest, "&rest");
    DEFSYM (Qand_optional, "&optional");
    DEFSYM (Qclosure, "closure");
    DEFSYM (Qdebug, "debug");
  
 +  DEFVAR_LISP ("inhibit-debugger", Vinhibit_debugger,
 +             doc: /* Non-nil means never enter the debugger.
 +Normally set while the debugger is already active, to avoid recursive
 +invocations.  */);
 +  Vinhibit_debugger = Qnil;
 +
    DEFVAR_LISP ("debug-on-error", Vdebug_on_error,
 -             doc: /* *Non-nil means enter debugger if an error is signaled.
 +             doc: /* Non-nil means enter debugger if an error is signaled.
  Does not apply to errors handled by `condition-case' or those
  matched by `debug-ignored-errors'.
  If the value is a list, an error only means to enter the debugger
@@@ -3480,11 -3692,11 +3483,11 @@@ if one of its condition symbols appear
  When you evaluate an expression interactively, this variable
  is temporarily non-nil if `eval-expression-debug-on-error' is non-nil.
  The command `toggle-debug-on-error' toggles this.
 -See also the variable `debug-on-quit'.  */);
 +See also the variable `debug-on-quit' and `inhibit-debugger'.  */);
    Vdebug_on_error = Qnil;
  
    DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors,
 -    doc: /* *List of errors for which the debugger should not be called.
 +    doc: /* List of errors for which the debugger should not be called.
  Each element may be a condition-name or a regexp that matches error messages.
  If any element applies to a given error, that error skips the debugger
  and just returns to top level.
@@@ -3493,7 -3705,7 +3496,7 @@@ It does not apply to errors handled by 
    Vdebug_ignored_errors = Qnil;
  
    DEFVAR_BOOL ("debug-on-quit", debug_on_quit,
 -    doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example).
 +    doc: /* Non-nil means enter debugger if quit is signaled (C-g, for example).
  Does not apply if quit is handled by a `condition-case'.  */);
    debug_on_quit = 0;
  
@@@ -3522,21 -3734,28 +3525,21 @@@ The Edebug package uses this to regain 
    Vsignal_hook_function = Qnil;
  
    DEFVAR_LISP ("debug-on-signal", Vdebug_on_signal,
 -             doc: /* *Non-nil means call the debugger regardless of condition handlers.
 +             doc: /* Non-nil means call the debugger regardless of condition handlers.
  Note that `debug-on-error', `debug-on-quit' and friends
  still determine whether to handle the particular condition.  */);
    Vdebug_on_signal = Qnil;
  
 -  DEFVAR_LISP ("macro-declaration-function", Vmacro_declaration_function,
 -             doc: /* Function to process declarations in a macro definition.
 -The function will be called with two args MACRO and DECL.
 -MACRO is the name of the macro being defined.
 -DECL is a list `(declare ...)' containing the declarations.
 -The value the function returns is not used.  */);
 -  Vmacro_declaration_function = Qnil;
 -
    /* When lexical binding is being used,
 -   vinternal_interpreter_environment is non-nil, and contains an alist
 +   Vinternal_interpreter_environment is non-nil, and contains an alist
     of lexically-bound variable, or (t), indicating an empty
     environment.  The lisp name of this variable would be
     `internal-interpreter-environment' if it weren't hidden.
     Every element of this list can be either a cons (VAR . VAL)
     specifying a lexical binding, or a single symbol VAR indicating
     that this variable should use dynamic scoping.  */
 -  DEFSYM (Qinternal_interpreter_environment, "internal-interpreter-environment");
 +  DEFSYM (Qinternal_interpreter_environment,
 +        "internal-interpreter-environment");
    DEFVAR_LISP ("internal-interpreter-environment",
                Vinternal_interpreter_environment,
               doc: /* If non-nil, the current lexical environment of the lisp interpreter.
@@@ -3567,10 -3786,12 +3570,10 @@@ alist of active lexical bindings.  */)
    defsubr (&Ssetq);
    defsubr (&Squote);
    defsubr (&Sfunction);
 -  defsubr (&Sdefun);
 -  defsubr (&Sdefmacro);
    defsubr (&Sdefvar);
    defsubr (&Sdefvaralias);
    defsubr (&Sdefconst);
 -  defsubr (&Suser_variable_p);
 +  defsubr (&Smake_var_non_special);
    defsubr (&Slet);
    defsubr (&SletX);
    defsubr (&Swhile);
    defsubr (&Scalled_interactively_p);
    defsubr (&Scommandp);
    defsubr (&Sautoload);
 +  defsubr (&Sautoload_do_load);
    defsubr (&Seval);
    defsubr (&Sapply);
    defsubr (&Sfuncall);
diff --combined src/fileio.c
index ca71af7ed9528b9425b8b3e7e4e6e506bc237c7f,c5979293feb2a0d8fe269d60be6413d34e48aaab..6c4e34d7312dd4f1bfce437cfdefb0f96a82818d
@@@ -23,12 -23,14 +23,12 @@@ along with GNU Emacs.  If not, see <htt
  #include <stdio.h>
  #include <sys/types.h>
  #include <sys/stat.h>
 -#include <setjmp.h>
  #include <unistd.h>
  
  #ifdef HAVE_PWD_H
  #include <pwd.h>
  #endif
  
 -#include <ctype.h>
  #include <errno.h>
  
  #ifdef HAVE_LIBSELINUX
  #include <selinux/context.h>
  #endif
  
 +#include <c-ctype.h>
 +
  #include "lisp.h"
  #include "intervals.h"
 -#include "buffer.h"
  #include "character.h"
 +#include "buffer.h"
  #include "coding.h"
  #include "window.h"
  #include "blockinput.h"
  #define IS_DRIVE(x) ((x) >= 'A' && (x) <= 'z')
  #endif
  #ifdef WINDOWSNT
 -#define IS_DRIVE(x) isalpha ((unsigned char) (x))
 +#define IS_DRIVE(x) c_isalpha (x)
  #endif
  /* Need to lower-case the drive letter, or else expanded
     filenames will sometimes compare unequal, because
     `expand-file-name' doesn't always down-case the drive letter.  */
 -#define DRIVE_LETTER(x) (tolower ((unsigned char) (x)))
 +#define DRIVE_LETTER(x) c_tolower (x)
  #endif
  
  #include "systime.h"
 +#include <stat-time.h>
  
  #ifdef HPUX
  #include <netio.h>
  
  #include "commands.h"
  
 -/* Nonzero during writing of auto-save files */
 -static int auto_saving;
 +/* True during writing of auto-save files.  */
 +static bool auto_saving;
  
 -/* Nonzero umask during creation of auto-save directories */
 -static int auto_saving_dir_umask;
 +/* Nonzero umask during creation of auto-save directories */
 +static mode_t auto_saving_dir_umask;
  
  /* Set by auto_save_1 to mode of original file so Fwrite_region will create
 -   a new file with the same mode as the original */
 -static int auto_save_mode_bits;
 +   a new file with the same mode as the original */
 +static mode_t auto_save_mode_bits;
  
 -/* Set by auto_save_1 if an error occurred during the last auto-save. */
 -static int auto_save_error_occurred;
 +/* Set by auto_save_1 if an error occurred during the last auto-save.  */
 +static bool auto_save_error_occurred;
  
  /* The symbol bound to coding-system-for-read when
     insert-file-contents is called for recovering a file.  This is not
@@@ -108,7 -107,7 +108,7 @@@ static Lisp_Object Qauto_save_coding
     which gives a list of operations it handles..  */
  static Lisp_Object Qoperations;
  
 -/* Lisp functions for translating file formats */
 +/* Lisp functions for translating file formats */
  static Lisp_Object Qformat_decode, Qformat_annotate_function;
  
  /* Lisp function for setting buffer-file-coding-system and the
@@@ -144,10 -143,11 +144,10 @@@ Lisp_Object Qfile_name_history
  
  static Lisp_Object Qcar_less_than_car;
  
 -static Lisp_Object Fmake_symbolic_link (Lisp_Object, Lisp_Object, Lisp_Object);
 -static int a_write (int, Lisp_Object, EMACS_INT, EMACS_INT,
 -                    Lisp_Object *, struct coding_system *);
 -static int e_write (int, Lisp_Object, EMACS_INT, EMACS_INT,
 -                  struct coding_system *);
 +static bool a_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t,
 +                   Lisp_Object *, struct coding_system *);
 +static bool e_write (int, Lisp_Object, ptrdiff_t, ptrdiff_t,
 +                   struct coding_system *);
  
  \f
  void
@@@ -159,7 -159,8 +159,7 @@@ report_file_error (const char *string, 
  
    synchronize_system_messages_locale ();
    str = strerror (errorno);
 -  errstring = code_convert_string_norecord (make_unibyte_string (str,
 -                                                               strlen (str)),
 +  errstring = code_convert_string_norecord (build_unibyte_string (str),
                                            Vlocale_coding_system, 0);
  
    while (1)
@@@ -255,7 -256,7 +255,7 @@@ use the standard functions without call
  {
    /* This function must not munge the match data.  */
    Lisp_Object chain, inhibited_handlers, result;
 -  int pos = -1;
 +  ptrdiff_t pos = -1;
  
    result = Qnil;
    CHECK_STRING (filename);
        if (CONSP (elt))
        {
          Lisp_Object string = XCAR (elt);
 -        EMACS_INT match_pos;
 +        ptrdiff_t match_pos;
          Lisp_Object handler = XCDR (elt);
          Lisp_Object operations = Qnil;
  
@@@ -330,7 -331,7 +330,7 @@@ Given a Unix syntax file name, returns 
      }
  
  #ifdef DOS_NT
 -  beg = (char *) alloca (SBYTES (filename) + 1);
 +  beg = alloca (SBYTES (filename) + 1);
    memcpy (beg, SSDATA (filename), SBYTES (filename) + 1);
  #else
    beg = SSDATA (filename);
  
        if (p == beg + 4 && IS_DIRECTORY_SEP (*beg) && beg[1] == ':')
        {
 -        strncpy (res, beg, 2);
 +        memcpy (res, beg, 2);
          beg += 2;
          r += 2;
        }
  
 -      if (getdefdir (toupper ((unsigned char) *beg) - 'A' + 1, r))
 +      if (getdefdir (c_toupper (*beg) - 'A' + 1, r))
        {
          if (!IS_DIRECTORY_SEP (res[strlen (res) - 1]))
            strcat (res, "/");
@@@ -447,33 -448,32 +447,33 @@@ get a current directory to run processe
    return Ffile_name_directory (filename);
  }
  
 -\f
 -static char *
 -file_name_as_directory (char *out, const char *in)
 -{
 -  ptrdiff_t len = strlen (in);
 +/* Convert from file name SRC of length SRCLEN to directory name
 +   in DST.  On UNIX, just make sure there is a terminating /.
 +   Return the length of DST.  */
  
 -  if (len == 0)
 +static ptrdiff_t
 +file_name_as_directory (char *dst, const char *src, ptrdiff_t srclen)
 +{
 +  if (srclen == 0)
      {
 -      out[0] = '.';
 -      out[1] = '/';
 -      out[2] = 0;
 -      return out;
 +      dst[0] = '.';
 +      dst[1] = '/';
 +      dst[2] = '\0';
 +      return 2;
      }
  
 -  strcpy (out, in);
 +  strcpy (dst, src);
  
 -  /* For Unix syntax, Append a slash if necessary */
 -  if (!IS_DIRECTORY_SEP (out[len - 1]))
 +  if (!IS_DIRECTORY_SEP (dst[srclen - 1]))
      {
 -      out[len] = DIRECTORY_SEP;
 -      out[len + 1] = '\0';
 +      dst[srclen] = DIRECTORY_SEP;
 +      dst[srclen + 1] = '\0';
 +      srclen++;
      }
  #ifdef DOS_NT
 -  dostounix_filename (out);
 +  dostounix_filename (dst);
  #endif
 -  return out;
 +  return srclen;
  }
  
  DEFUN ("file-name-as-directory", Ffile_name_as_directory,
@@@ -487,7 -487,6 +487,7 @@@ For a Unix-syntax file name, just appen
    (Lisp_Object file)
  {
    char *buf;
 +  ptrdiff_t length;
    Lisp_Object handler;
  
    CHECK_STRING (file);
        error ("Invalid handler in `file-name-handler-alist'");
      }
  
 -  buf = (char *) alloca (SBYTES (file) + 10);
 -  file_name_as_directory (buf, SSDATA (file));
 -  return make_specified_string (buf, -1, strlen (buf),
 -                              STRING_MULTIBYTE (file));
 +  buf = alloca (SBYTES (file) + 10);
 +  length = file_name_as_directory (buf, SSDATA (file), SBYTES (file));
 +  return make_specified_string (buf, -1, length, STRING_MULTIBYTE (file));
  }
  \f
 -/*
 - * Convert from directory name to filename.
 - * On UNIX, it's simple: just make sure there isn't a terminating /
 +/* Convert from directory name SRC of length SRCLEN to
 +   file name in DST.  On UNIX, just make sure there isn't
 +   a terminating /.  Return the length of DST.  */
  
 - * Value is nonzero if the string output is different from the input.
 - */
 -
 -static int
 -directory_file_name (char *src, char *dst)
 +static ptrdiff_t
 +directory_file_name (char *dst, char *src, ptrdiff_t srclen)
  {
 -  ptrdiff_t slen;
 -
 -  slen = strlen (src);
 -
    /* Process as Unix format: just remove any final slash.
       But leave "/" unchanged; do not change it to "".  */
    strcpy (dst, src);
 -  if (slen > 1
 -      && IS_DIRECTORY_SEP (dst[slen - 1])
 +  if (srclen > 1
 +      && IS_DIRECTORY_SEP (dst[srclen - 1])
  #ifdef DOS_NT
 -      && !IS_ANY_SEP (dst[slen - 2])
 +      && !IS_ANY_SEP (dst[srclen - 2])
  #endif
        )
 -    dst[slen - 1] = 0;
 +    {
 +      dst[srclen - 1] = 0;
 +      srclen--;
 +    }
  #ifdef DOS_NT
    dostounix_filename (dst);
  #endif
 -  return 1;
 +  return srclen;
  }
  
  DEFUN ("directory-file-name", Fdirectory_file_name, Sdirectory_file_name,
@@@ -547,7 -551,6 +547,7 @@@ In Unix-syntax, this function just remo
    (Lisp_Object directory)
  {
    char *buf;
 +  ptrdiff_t length;
    Lisp_Object handler;
  
    CHECK_STRING (directory);
        error ("Invalid handler in `file-name-handler-alist'");
      }
  
 -  buf = (char *) alloca (SBYTES (directory) + 20);
 -  directory_file_name (SSDATA (directory), buf);
 -  return make_specified_string (buf, -1, strlen (buf),
 -                              STRING_MULTIBYTE (directory));
 +  buf = alloca (SBYTES (directory) + 20);
 +  length = directory_file_name (buf, SSDATA (directory), SBYTES (directory));
 +  return make_specified_string (buf, -1, length, STRING_MULTIBYTE (directory));
  }
  
  static const char make_temp_name_tbl[64] =
@@@ -594,7 -598,7 +594,7 @@@ static unsigned make_temp_name_count, m
     which has no existing file.  To make this work, PREFIX should be
     an absolute file name.
  
 -   BASE64_P non-zero means add the pid as 3 characters in base64
 +   BASE64_P means add the pid as 3 characters in base64
     encoding.  In this case, 6 characters will be added to PREFIX to
     form the file name.  Otherwise, if Emacs is running on a system
     with long file names, add the pid as a decimal number.
     generated.  */
  
  Lisp_Object
 -make_temp_name (Lisp_Object prefix, int base64_p)
 +make_temp_name (Lisp_Object prefix, bool base64_p)
  {
    Lisp_Object val;
    int len, clen;
@@@ -760,12 -764,12 +760,12 @@@ filesystem tree, not (expand-file-name 
    struct passwd *pw;
  #ifdef DOS_NT
    int drive = 0;
 -  int collapse_newdir = 1;
 -  int is_escaped = 0;
 +  bool collapse_newdir = 1;
 +  bool is_escaped = 0;
  #endif /* DOS_NT */
    ptrdiff_t length;
    Lisp_Object handler, result, handled_name;
 -  int multibyte;
 +  bool multibyte;
    Lisp_Object hdir;
  
    CHECK_STRING (name);
        }
      }
  
 -  /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
 -  nm = (char *) alloca (SBYTES (name) + 1);
 +  /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below.  */
 +  nm = alloca (SBYTES (name) + 1);
    memcpy (nm, SSDATA (name), SBYTES (name) + 1);
  
  #ifdef DOS_NT
    if (drive && IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1]))
      nm++;
  
 -  /* Discard any previous drive specifier if nm is now in UNC format. */
 +  /* Discard any previous drive specifier if nm is now in UNC format.  */
    if (IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1]))
      {
        drive = 0;
        /* If it turns out that the filename we want to return is just a
         suffix of FILENAME, we don't need to go through and edit
         things; we just need to construct a new string using data
 -       starting at the middle of FILENAME.  If we set lose to a
 -       non-zero value, that means we've discovered that we can't do
 -       that cool trick.  */
 -      int lose = 0;
 +       starting at the middle of FILENAME.  If we set LOSE, that
 +       means we've discovered that we can't do that cool trick.  */
 +      bool lose = 0;
        char *p = nm;
  
        while (*p)
            }
          else
  #endif
 -        /* drive must be set, so this is okay */
 +        /* Drive must be set, so this is okay.  */
          if (strcmp (nm - 2, SSDATA (name)) != 0)
            {
              char temp[] = " :";
          if (!(newdir = egetenv ("HOME")))
            newdir = "";
          nm++;
 -        /* egetenv may return a unibyte string, which will bite us since
 +        /* `egetenv' may return a unibyte string, which will bite us since
             we expect the directory to be multibyte.  */
          tem = build_string (newdir);
          if (!STRING_MULTIBYTE (tem))
       use the drive's current directory as the prefix if needed.  */
    if (!newdir && drive)
      {
 -      /* Get default directory if needed to make nm absolute. */
 +      /* Get default directory if needed to make nm absolute.  */
        char *adir = NULL;
        if (!IS_DIRECTORY_SEP (nm[0]))
        {
          adir = alloca (MAXPATHLEN + 1);
 -        if (!getdefdir (toupper (drive) - 'A' + 1, adir))
 +        if (!getdefdir (c_toupper (drive) - 'A' + 1, adir))
            adir = NULL;
        }
        if (!adir)
        {
 -        /* Either nm starts with /, or drive isn't mounted. */
 +        /* Either nm starts with /, or drive isn't mounted.  */
          adir = alloca (4);
          adir[0] = DRIVE_LETTER (drive);
          adir[1] = ':';
  #endif /* DOS_NT */
  
    /* Finally, if no prefix has been specified and nm is not absolute,
 -     then it must be expanded relative to default_directory. */
 +     then it must be expanded relative to default_directory.  */
  
    if (1
  #ifndef DOS_NT
 -      /* /... alone is not absolute on DOS and Windows. */
 +      /* /... alone is not absolute on DOS and Windows.  */
        && !IS_DIRECTORY_SEP (nm[0])
  #endif
  #ifdef WINDOWSNT
  #ifdef DOS_NT
    if (newdir)
      {
 -      /* First ensure newdir is an absolute name. */
 +      /* First ensure newdir is an absolute name.  */
        if (
          /* Detect MSDOS file names with drive specifiers.  */
          ! (IS_DRIVE (newdir[0])
             Because of the admonition against calling expand-file-name
             when we have pointers into lisp strings, we accomplish this
             indirectly by prepending newdir to nm if necessary, and using
 -           cwd (or the wd of newdir's drive) as the new newdir. */
 +           cwd (or the wd of newdir's drive) as the new newdir.  */
          char *adir;
          if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1]))
            {
            }
          if (!IS_DIRECTORY_SEP (nm[0]))
            {
 -            char * tmp = alloca (strlen (newdir) + strlen (nm) + 2);
 -            file_name_as_directory (tmp, newdir);
 +            ptrdiff_t newlen = strlen (newdir);
 +            char *tmp = alloca (newlen + strlen (nm) + 2);
 +            file_name_as_directory (tmp, newdir, newlen);
              strcat (tmp, nm);
              nm = tmp;
            }
          adir = alloca (MAXPATHLEN + 1);
          if (drive)
            {
 -            if (!getdefdir (toupper (drive) - 'A' + 1, adir))
 +            if (!getdefdir (c_toupper (drive) - 'A' + 1, adir))
                newdir = "/";
            }
          else
          newdir = adir;
        }
  
 -      /* Strip off drive name from prefix, if present. */
 +      /* Strip off drive name from prefix, if present.  */
        if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1]))
        {
          drive = newdir[0];
        /* Get rid of any slash at the end of newdir, unless newdir is
         just / or // (an incomplete UNC name).  */
        length = strlen (newdir);
 +      tlen = length + 1;
        if (length > 1 && IS_DIRECTORY_SEP (newdir[length - 1])
  #ifdef WINDOWSNT
          && !(length == 2 && IS_DIRECTORY_SEP (newdir[0]))
  #endif
          )
        {
 -        char *temp = (char *) alloca (length);
 +        char *temp = alloca (length);
          memcpy (temp, newdir, length - 1);
          temp[length - 1] = 0;
 +        length--;
          newdir = temp;
        }
 -      tlen = length + 1;
      }
    else
 -    tlen = 0;
 +    {
 +      length = 0;
 +      tlen = 0;
 +    }
  
 -  /* Now concatenate the directory and name to new space in the stack frame */
 +  /* Now concatenate the directory and name to new space in the stack frame */
    tlen += strlen (nm) + 1;
  #ifdef DOS_NT
    /* Reserve space for drive specifier and escape prefix, since either
       or both may need to be inserted.  (The Microsoft x86 compiler
       produces incorrect code if the following two lines are combined.)  */
 -  target = (char *) alloca (tlen + 4);
 +  target = alloca (tlen + 4);
    target += 4;
  #else  /* not DOS_NT */
 -  target = (char *) alloca (tlen);
 +  target = alloca (tlen);
  #endif /* not DOS_NT */
    *target = 0;
  
            strcpy (target, newdir);
        }
        else
 -      file_name_as_directory (target, newdir);
 +      file_name_as_directory (target, newdir, length);
      }
  
    strcat (target, nm);
        }
  
  #ifdef DOS_NT
 -    /* At last, set drive name. */
 +    /* At last, set drive name.  */
  #ifdef WINDOWSNT
      /* Except for network file name.  */
      if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])))
  #endif /* WINDOWSNT */
        {
 -      if (!drive) abort ();
 +      if (!drive) emacs_abort ();
        target -= 2;
        target[0] = DRIVE_LETTER (drive);
        target[1] = ':';
       and perhaps call the corresponding file handler.  This is needed
       for filenames such as "/foo/../user@host:/bar/../baz".  Expanding
       the ".." component gives us "/user@host:/bar/../baz" which needs
 -     to be expanded again. */
 +     to be expanded again.  */
    handler = Ffind_file_name_handler (result, Qexpand_file_name);
    if (!NILP (handler))
      {
@@@ -1358,6 -1358,7 +1358,6 @@@ See also the function `substitute-in-fi
    ptrdiff_t tlen;
    unsigned char *target;
    struct passwd *pw;
 -  int lose;
  
    CHECK_STRING (name);
    nm = SDATA (name);
       If no /./ or /../ we can return right away.  */
    if (nm[0] == '/')
      {
 +      bool lose = 0;
        p = nm;
 -      lose = 0;
        while (*p)
        {
          if (p[0] == '/' && p[1] == '/'
        }
      }
  
 -  /* Now determine directory to start with and put it in NEWDIR */
 +  /* Now determine directory to start with and put it in NEWDIR */
  
    newdir = 0;
  
        }
      else  /* ~user/filename */
        {
 -      /* Get past ~ to user */
 +      /* Get past ~ to user */
        unsigned char *user = nm + 1;
 -      /* Find end of name. */
 +      /* Find end of name.  */
        unsigned char *ptr = (unsigned char *) strchr (user, '/');
        ptrdiff_t len = ptr ? ptr - user : strlen (user);
 -      /* Copy the user name into temp storage. */
 -      o = (unsigned char *) alloca (len + 1);
 +      /* Copy the user name into temp storage.  */
 +      o = alloca (len + 1);
        memcpy (o, user, len);
        o[len] = 0;
  
 -      /* Look up the user name. */
 +      /* Look up the user name.  */
        BLOCK_INPUT;
        pw = (struct passwd *) getpwnam (o + 1);
        UNBLOCK_INPUT;
        newdir = SDATA (defalt);
      }
  
 -  /* Now concatenate the directory and name to new space in the stack frame */
 +  /* Now concatenate the directory and name to new space in the stack frame */
  
    tlen = (newdir ? strlen (newdir) + 1 : 0) + strlen (nm) + 1;
 -  target = (unsigned char *) alloca (tlen);
 +  target = alloca (tlen);
    *target = 0;
  
    if (newdir)
  
    strcat (target, nm);
  
 -  /* Now canonicalize by removing /. and /foo/.. if they appear */
 +  /* Now canonicalize by removing /. and /foo/.. if they appear */
  
    p = target;
    o = target;
  #endif
  \f
  /* If /~ or // appears, discard everything through first slash.  */
 -static int
 +static bool
  file_name_absolute_p (const char *filename)
  {
    return
@@@ -1521,7 -1522,7 +1521,7 @@@ search_embedded_absfilename (char *nm, 
              )
        {
          for (s = p; *s && (!IS_DIRECTORY_SEP (*s)); s++);
 -        if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */
 +        if (p[0] == '~' && s > p + 1) /* We've got "/~something/".  */
            {
              char *o = alloca (s - p + 1);
              struct passwd *pw;
@@@ -1557,11 -1558,13 +1557,11 @@@ If `//' appears, everything up to and i
  those `/' is discarded.  */)
    (Lisp_Object filename)
  {
 -  char *nm;
 -
 -  register char *s, *p, *o, *x, *endp;
 +  char *nm, *s, *p, *o, *x, *endp;
    char *target = NULL;
    int total = 0;
 -  int substituted = 0;
 -  int multibyte;
 +  bool substituted = 0;
 +  bool multibyte;
    char *xnm;
    Lisp_Object handler;
  
    /* Always work on a copy of the string, in case GC happens during
       decode of environment variables, causing the original Lisp_String
       data to be relocated.  */
 -  nm = (char *) alloca (SBYTES (filename) + 1);
 +  nm = alloca (SBYTES (filename) + 1);
    memcpy (nm, SDATA (filename), SBYTES (filename) + 1);
  
  #ifdef DOS_NT
        (make_specified_string (p, -1, endp - p, multibyte));
  
    /* See if any variables are substituted into the string
 -     and find the total length of their values in `total' */
 +     and find the total length of their values in `total' */
  
    for (p = nm; p != endp;)
      if (*p != '$')
          goto badsubst;
        else if (*p == '$')
          {
 -          /* "$$" means a single "$" */
 +          /* "$$" means a single "$" */
            p++;
            total -= 1;
            substituted = 1;
        else
          {
            o = p;
 -          while (p != endp && (isalnum (*p) || *p == '_')) p++;
 +          while (p != endp && (c_isalnum (*p) || *p == '_')) p++;
            s = p;
          }
  
 -      /* Copy out the variable name */
 -      target = (char *) alloca (s - o + 1);
 -      strncpy (target, o, s - o);
 +      /* Copy out the variable name */
 +      target = alloca (s - o + 1);
 +      memcpy (target, o, s - o);
        target[s - o] = 0;
  #ifdef DOS_NT
        strupr (target); /* $home == $HOME etc.  */
  #endif /* DOS_NT */
  
 -      /* Get variable value */
 +      /* Get variable value */
        o = egetenv (target);
        if (o)
          {
               env variables twice should be acceptable. Note that
               decoding may cause a garbage collect.  */
            Lisp_Object orig, decoded;
 -          orig = make_unibyte_string (o, strlen (o));
 +          orig = build_unibyte_string (o);
            decoded = DECODE_FILE (orig);
            total += SBYTES (decoded);
            substituted = 1;
    if (!substituted)
      return filename;
  
 -  /* If substitution required, recopy the string and do it */
 -  /* Make space in stack frame for the new copy */
 -  xnm = (char *) alloca (SBYTES (filename) + total + 1);
 +  /* If substitution required, recopy the string and do it */
 +  /* Make space in stack frame for the new copy */
 +  xnm = alloca (SBYTES (filename) + total + 1);
    x = xnm;
  
 -  /* Copy the rest of the name through, replacing $ constructs with values */
 +  /* Copy the rest of the name through, replacing $ constructs with values */
    for (p = nm; *p;)
      if (*p != '$')
        *x++ = *p++;
        else
          {
            o = p;
 -          while (p != endp && (isalnum (*p) || *p == '_')) p++;
 +          while (p != endp && (c_isalnum (*p) || *p == '_')) p++;
            s = p;
          }
  
 -      /* Copy out the variable name */
 -      target = (char *) alloca (s - o + 1);
 -      strncpy (target, o, s - o);
 +      /* Copy out the variable name */
 +      target = alloca (s - o + 1);
 +      memcpy (target, o, s - o);
        target[s - o] = 0;
  #ifdef DOS_NT
        strupr (target); /* $home == $HOME etc.  */
  #endif /* DOS_NT */
  
 -      /* Get variable value */
 +      /* Get variable value */
        o = egetenv (target);
        if (!o)
          {
            orig = make_unibyte_string (o, orig_length);
            decoded = DECODE_FILE (orig);
            decoded_length = SBYTES (decoded);
 -          strncpy (x, SSDATA (decoded), decoded_length);
 +          memcpy (x, SDATA (decoded), decoded_length);
            x += decoded_length;
  
            /* If environment variable needed decoding, return value
               needs to be multibyte.  */
            if (decoded_length != orig_length
 -              || strncmp (SSDATA (decoded), o, orig_length))
 +              || memcmp (SDATA (decoded), o, orig_length))
              multibyte = 1;
          }
        }
@@@ -1768,14 -1771,14 +1768,14 @@@ expand_and_dir_to_file (Lisp_Object fil
       stat behaves differently depending!  */
    if (SCHARS (absname) > 1
        && IS_DIRECTORY_SEP (SREF (absname, SBYTES (absname) - 1))
 -      && !IS_DEVICE_SEP (SREF (absname, SBYTES (absname)-2)))
 +      && !IS_DEVICE_SEP (SREF (absname, SBYTES (absname) - 2)))
      /* We cannot take shortcuts; they might be wrong for magic file names.  */
      absname = Fdirectory_file_name (absname);
    return absname;
  }
  \f
  /* Signal an error if the file ABSNAME already exists.
 -   If INTERACTIVE is nonzero, ask the user whether to proceed,
 +   If INTERACTIVE, ask the user whether to proceed,
     and bypass the error if the user says to go ahead.
     QUERYSTRING is a name for the action that is being considered
     to alter the file.
     If the file does not exist, STATPTR->st_mode is set to 0.
     If STATPTR is null, we don't store into it.
  
 -   If QUICK is nonzero, we ask for y or n, not yes or no.  */
 +   If QUICK, ask for y or n, not yes or no.  */
  
  static void
  barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring,
 -                            int interactive, struct stat *statptr, int quick)
 +                            bool interactive, struct stat *statptr,
 +                            bool quick)
  {
 -  register Lisp_Object tem, encoded_filename;
 +  Lisp_Object tem, encoded_filename;
    struct stat statbuf;
    struct gcpro gcpro1;
  
    encoded_filename = ENCODE_FILE (absname);
  
 -  /* stat is a good way to tell whether the file exists,
 +  /* `stat' is a good way to tell whether the file exists,
       regardless of what access permissions it has.  */
    if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
      {
@@@ -1859,17 -1861,17 +1859,17 @@@ on the system, we copy the SELinux cont
    (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;
 -  EMACS_INT n;
 +  int n;
    char buf[16 * 1024];
    struct stat st, out_st;
    Lisp_Object handler;
    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
 -  int count = SPECPDL_INDEX ();
 -  int input_file_statable_p;
 +  ptrdiff_t count = SPECPDL_INDEX ();
 +  bool input_file_statable_p;
    Lisp_Object encoded_file, encoded_newname;
  #if HAVE_LIBSELINUX
    security_context_t con;
 -  int fail, conlength = 0;
 +  int conlength = 0;
  #endif
  
    encoded_file = encoded_newname = Qnil;
        DWORD attributes;
        char * filename;
  
 -      EMACS_GET_TIME (now);
        filename = SDATA (encoded_newname);
  
        /* Ensure file is writable while its modified time is set.  */
        attributes = GetFileAttributes (filename);
        SetFileAttributes (filename, attributes & ~FILE_ATTRIBUTE_READONLY);
 -      if (set_file_times (filename, now, now))
 +      now = current_emacs_time ();
 +      if (set_file_times (-1, filename, now, now))
        {
          /* Restore original attributes.  */
          SetFileAttributes (filename, attributes);
                    S_IREAD | S_IWRITE);
  #else  /* not MSDOS */
    {
 -    int new_mask = 0666;
 +    mode_t new_mask = 0666;
      if (input_file_statable_p)
        {
        if (!NILP (preserve_uid_gid))
       owner and group.  */
    if (input_file_statable_p)
      {
 -      int mode_mask = 07777;
 +      mode_t mode_mask = 07777;
        if (!NILP (preserve_uid_gid))
        {
          /* Attempt to change owner and group.  If that doesn't work
    if (conlength > 0)
      {
        /* Set the modified context back to the file.  */
 -      fail = fsetfilecon (ofd, con);
 +      bool fail = fsetfilecon (ofd, con) != 0;
        /* See http://debbugs.gnu.org/11245 for ENOTSUP.  */
        if (fail && errno != ENOTSUP)
        report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil));
      }
  #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));
 -
    if (input_file_statable_p)
      {
        if (!NILP (keep_time))
        {
 -        EMACS_TIME atime, mtime;
 -        EMACS_SET_SECS_USECS (atime, st.st_atime, 0);
 -        EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
 -        if (set_file_times (SSDATA (encoded_newname),
 -                            atime, mtime))
 +        EMACS_TIME atime = get_stat_atime (&st);
 +        EMACS_TIME mtime = get_stat_mtime (&st);
 +        if (set_file_times (ofd, SSDATA (encoded_newname), atime, mtime))
            xsignal2 (Qfile_date_error,
                      build_string ("Cannot set file date"), newname);
        }
      }
  
 +  if (emacs_close (ofd) < 0)
 +    report_file_error ("I/O error", Fcons (newname, Qnil));
 +
    emacs_close (ifd);
  
  #ifdef MSDOS
@@@ -2180,14 -2185,17 +2180,14 @@@ internal_delete_file_1 (Lisp_Object ign
    return Qt;
  }
  
 -/* Delete file FILENAME, returning 1 if successful and 0 if failed.
 +/* Delete file FILENAME.
     This ignores `delete-by-moving-to-trash'.  */
  
 -int
 +void
  internal_delete_file (Lisp_Object filename)
  {
 -  Lisp_Object tem;
 -
 -  tem = internal_condition_case_2 (Fdelete_file, filename, Qnil,
 -                                 Qt, internal_delete_file_1);
 -  return NILP (tem);
 +  internal_condition_case_2 (Fdelete_file, filename, Qnil,
 +                           Qt, internal_delete_file_1);
  }
  \f
  DEFUN ("rename-file", Frename_file, Srename_file, 2, 3,
@@@ -2251,7 -2259,7 +2251,7 @@@ This is what happens in interactive us
      {
        if (errno == EXDEV)
        {
 -          int count;
 +          ptrdiff_t count;
            symlink_target = Ffile_symlink_p (file);
            if (! NILP (symlink_target))
              Fmake_symbolic_link (symlink_target, newname,
@@@ -2423,9 -2431,9 +2423,9 @@@ On Unix, this is a name starting with 
    return file_name_absolute_p (SSDATA (filename)) ? Qt : Qnil;
  }
  \f
 -/* Return nonzero if file FILENAME exists and can be executed.  */
 +/* Return true if file FILENAME exists and can be executed.  */
  
 -static int
 +static bool
  check_executable (char *filename)
  {
  #ifdef DOS_NT
  #endif /* not DOS_NT */
  }
  
 -/* Return nonzero if file FILENAME exists and can be written.  */
 +/* Return true if file FILENAME exists and can be written.  */
  
 -static int
 +static bool
  check_writable (const char *filename)
  {
  #ifdef MSDOS
    return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode));
  #else /* not MSDOS */
  #ifdef HAVE_EUIDACCESS
 -  int res = (euidaccess (filename, 2) >= 0);
 +  bool res = (euidaccess (filename, 2) >= 0);
  #ifdef CYGWIN
    /* euidaccess may have returned failure because Cygwin couldn't
       determine the file's UID or GID; if so, we return success. */
@@@ -2725,7 -2733,7 +2725,7 @@@ searchable directory.  */
    (Lisp_Object filename)
  {
    Lisp_Object handler;
 -  int tem;
 +  bool tem;
    struct gcpro gcpro1;
  
    /* If the file name has special constructs in it,
@@@ -2833,9 -2841,8 +2833,8 @@@ or if SELinux is disabled, or if Emacs 
          if (context_range_get (context))
            values[3] = build_string (context_range_get (context));
          context_free (context);
+         freecon (con);
        }
-       if (con)
-       freecon (con);
      }
  #endif
  
@@@ -2861,8 -2868,7 +2860,8 @@@ compiled with SELinux support.  */
    Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context)));
    Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context))));
    security_context_t con;
 -  int fail, conlength;
 +  bool fail;
 +  int conlength;
    context_t parsed_con;
  #endif
  
            }
  
          /* Set the modified context back to the file.  */
 -        fail = lsetfilecon (SSDATA (encoded_absname),
 -                            context_str (parsed_con));
 +        fail = (lsetfilecon (SSDATA (encoded_absname),
 +                             context_str (parsed_con))
 +                != 0);
            /* See http://debbugs.gnu.org/11245 for ENOTSUP.  */
          if (fail && errno != ENOTSUP)
            report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
  
          context_free (parsed_con);
+         freecon (con);
        }
        else
        report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
-       if (con)
-       freecon (con);
      }
  #endif
  
@@@ -2999,13 -3002,11 +2996,13 @@@ DEFUN ("default-file-modes", Fdefault_f
  The value is an integer.  */)
    (void)
  {
 -  int realmask;
 +  mode_t realmask;
    Lisp_Object value;
  
 +  BLOCK_INPUT;
    realmask = umask (0);
    umask (realmask);
 +  UNBLOCK_INPUT;
  
    XSETINT (value, (~ realmask) & 0777);
    return value;
@@@ -3022,7 -3023,11 +3019,7 @@@ Use the current time if TIMESTAMP is ni
  {
    Lisp_Object absname, encoded_absname;
    Lisp_Object handler;
 -  time_t sec;
 -  int usec;
 -
 -  if (! lisp_time_argument (timestamp, &sec, &usec))
 -    error ("Invalid time specification");
 +  EMACS_TIME t = lisp_time_argument (timestamp);
  
    absname = Fexpand_file_name (filename, BVAR (current_buffer, directory));
  
    encoded_absname = ENCODE_FILE (absname);
  
    {
 -    EMACS_TIME t;
 -
 -    EMACS_SET_SECS (t, sec);
 -    EMACS_SET_USECS (t, usec);
 -
 -    if (set_file_times (SSDATA (encoded_absname), t, t))
 +    if (set_file_times (-1, SSDATA (encoded_absname), t, t))
        {
  #ifdef DOS_NT
          struct stat st;
@@@ -3070,7 -3080,8 +3067,7 @@@ otherwise, if FILE2 does not exist, th
    (Lisp_Object file1, Lisp_Object file2)
  {
    Lisp_Object absname1, absname2;
 -  struct stat st;
 -  int mtime1;
 +  struct stat st1, st2;
    Lisp_Object handler;
    struct gcpro gcpro1, gcpro2;
  
    absname2 = ENCODE_FILE (absname2);
    UNGCPRO;
  
 -  if (stat (SSDATA (absname1), &st) < 0)
 +  if (stat (SSDATA (absname1), &st1) < 0)
      return Qnil;
  
 -  mtime1 = st.st_mtime;
 -
 -  if (stat (SSDATA (absname2), &st) < 0)
 +  if (stat (SSDATA (absname2), &st2) < 0)
      return Qt;
  
 -  return (mtime1 > st.st_mtime) ? Qt : Qnil;
 +  return (EMACS_TIME_GT (get_stat_mtime (&st1), get_stat_mtime (&st2))
 +        ? Qt : Qnil);
  }
  \f
  #ifndef READ_BUF_SIZE
  #define READ_BUF_SIZE (64 << 10)
  #endif
 +/* Some buffer offsets are stored in 'int' variables.  */
 +verify (READ_BUF_SIZE <= INT_MAX);
  
  /* This function is called after Lisp functions to decide a coding
     system are called, or when they cause an error.  Before they are
@@@ -3137,15 -3147,16 +3134,15 @@@ decide_coding_unwind (Lisp_Object unwin
    undo_list = XCAR (unwind_data);
    buffer = XCDR (unwind_data);
  
 -  if (current_buffer != XBUFFER (buffer))
 -    set_buffer_internal (XBUFFER (buffer));
 +  set_buffer_internal (XBUFFER (buffer));
    adjust_markers_for_delete (BEG, BEG_BYTE, Z, Z_BYTE);
    adjust_overlays_for_delete (BEG, Z - BEG);
 -  BUF_INTERVALS (current_buffer) = 0;
 +  set_buffer_intervals (current_buffer, NULL);
    TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
  
    /* Now we are safe to change the buffer's multibyteness directly.  */
 -  BVAR (current_buffer, enable_multibyte_characters) = multibyte;
 -  BVAR (current_buffer, undo_list) = undo_list;
 +  bset_enable_multibyte_characters (current_buffer, multibyte);
 +  bset_undo_list (current_buffer, undo_list);
  
    return Qnil;
  }
  /* Used to pass values from insert-file-contents to read_non_regular.  */
  
  static int non_regular_fd;
 -static EMACS_INT non_regular_inserted;
 -static EMACS_INT non_regular_nbytes;
 +static ptrdiff_t non_regular_inserted;
 +static int non_regular_nbytes;
  
  
  /* Read from a non-regular file.
  static Lisp_Object
  read_non_regular (Lisp_Object ignore)
  {
 -  EMACS_INT nbytes;
 +  int nbytes;
  
    immediate_quit = 1;
    QUIT;
@@@ -3203,15 -3214,6 +3200,15 @@@ emacs_lseek (int fd, EMACS_INT offset, 
    return lseek (fd, offset, whence);
  }
  
 +/* Return a special time value indicating the error number ERRNUM.  */
 +static EMACS_TIME
 +time_error_value (int errnum)
 +{
 +  int ns = (errnum == ENOENT || errnum == EACCES || errnum == ENOTDIR
 +          ? NONEXISTENT_MODTIME_NSECS
 +          : UNKNOWN_MODTIME_NSECS);
 +  return make_emacs_time (0, ns);
 +}
  
  DEFUN ("insert-file-contents", Finsert_file_contents, Sinsert_file_contents,
         1, 5, 0,
@@@ -3239,31 -3241,29 +3236,31 @@@ variable `last-coding-system-used' to t
    (Lisp_Object filename, Lisp_Object visit, Lisp_Object beg, Lisp_Object end, Lisp_Object replace)
  {
    struct stat st;
 -  register int fd;
 -  EMACS_INT inserted = 0;
 -  int nochange = 0;
 -  register EMACS_INT how_much;
 +  int file_status;
 +  EMACS_TIME mtime;
 +  int fd;
 +  ptrdiff_t inserted = 0;
 +  bool nochange = 0;
 +  ptrdiff_t how_much;
    off_t beg_offset, end_offset;
 -  register EMACS_INT unprocessed;
 -  int count = SPECPDL_INDEX ();
 +  int unprocessed;
 +  ptrdiff_t count = SPECPDL_INDEX ();
    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
    Lisp_Object handler, val, insval, orig_filename, old_undo;
    Lisp_Object p;
 -  EMACS_INT total = 0;
 -  int not_regular = 0;
 +  ptrdiff_t total = 0;
 +  bool not_regular = 0;
    int save_errno = 0;
    char read_buf[READ_BUF_SIZE];
    struct coding_system coding;
    char buffer[1 << 14];
 -  int replace_handled = 0;
 -  int set_coding_system = 0;
 +  bool replace_handled = 0;
 +  bool set_coding_system = 0;
    Lisp_Object coding_system;
 -  int read_quit = 0;
 +  bool read_quit = 0;
    Lisp_Object old_Vdeactivate_mark = Vdeactivate_mark;
 -  int we_locked_file = 0;
 -  int deferred_remove_unwind_protect = 0;
 +  bool we_locked_file = 0;
 +  bool deferred_remove_unwind_protect = 0;
  
    if (current_buffer->base_buffer && ! NILP (visit))
      error ("Cannot do file visiting in an indirect buffer");
      {
        val = call6 (handler, Qinsert_file_contents, filename,
                   visit, beg, end, replace);
 -      if (CONSP (val) && CONSP (XCDR (val)))
 +      if (CONSP (val) && CONSP (XCDR (val))
 +        && RANGED_INTEGERP (0, XCAR (XCDR (val)), ZV - PT))
        inserted = XINT (XCAR (XCDR (val)));
        goto handled;
      }
  
      /* Tell stat to use expensive method to get accurate info.  */
      Vw32_get_true_file_attributes = Qt;
 -    total = stat (SSDATA (filename), &st);
 +    file_status = stat (SSDATA (filename), &st);
      Vw32_get_true_file_attributes = tem;
    }
 -  if (total < 0)
  #else
 -  if (stat (SSDATA (filename), &st) < 0)
 +  file_status = stat (SSDATA (filename), &st);
  #endif /* WINDOWSNT */
 +
 +  if (file_status == 0)
 +    mtime = get_stat_mtime (&st);
 +  else
      {
      badopen:
        save_errno = errno;
        if (NILP (visit))
        report_file_error ("Opening input file", Fcons (orig_filename, Qnil));
 -      st.st_mtime = -1;
 +      mtime = time_error_value (save_errno);
        st.st_size = -1;
        how_much = 0;
        if (!NILP (Vcoding_system_for_read))
                 We assume that the 1K-byte and 3K-byte for heading
                 and tailing respectively are sufficient for this
                 purpose.  */
 -            EMACS_INT nread;
 +            int nread;
  
              if (st.st_size <= (1024 * 4))
                nread = emacs_read (fd, read_buf, 1024 * 4);
                  Lisp_Object workbuf;
                  struct buffer *buf;
  
 -                record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
 +                record_unwind_current_buffer ();
  
                  workbuf = Fget_buffer_create (build_string (" *code-converting-work*"));
                  buf = XBUFFER (workbuf);
  
                  delete_all_overlays (buf);
 -                BVAR (buf, directory) = BVAR (current_buffer, directory);
 -                BVAR (buf, read_only) = Qnil;
 -                BVAR (buf, filename) = Qnil;
 -                BVAR (buf, undo_list) = Qt;
 +                bset_directory (buf, BVAR (current_buffer, directory));
 +                bset_read_only (buf, Qnil);
 +                bset_filename (buf, Qnil);
 +                bset_undo_list (buf, Qt);
                  eassert (buf->overlays_before == NULL);
                  eassert (buf->overlays_after == NULL);
  
                  set_buffer_internal (buf);
                  Ferase_buffer ();
 -                BVAR (buf, enable_multibyte_characters) = Qnil;
 +                bset_enable_multibyte_characters (buf, Qnil);
  
                  insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0);
                  TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
        /* same_at_start and same_at_end count bytes,
         because file access counts bytes
         and BEG and END count bytes.  */
 -      EMACS_INT same_at_start = BEGV_BYTE;
 -      EMACS_INT same_at_end = ZV_BYTE;
 -      EMACS_INT overlap;
 +      ptrdiff_t same_at_start = BEGV_BYTE;
 +      ptrdiff_t same_at_end = ZV_BYTE;
 +      ptrdiff_t overlap;
        /* There is still a possibility we will find the need to do code
 -       conversion.  If that happens, we set this variable to 1 to
 +       conversion.  If that happens, set this variable to
         give up on handling REPLACE in the optimized way.  */
 -      int giveup_match_end = 0;
 +      bool giveup_match_end = 0;
  
        if (beg_offset != 0)
        {
         match the text at the beginning of the buffer.  */
        while (1)
        {
 -        EMACS_INT nread, bufpos;
 +        int nread, bufpos;
  
          nread = emacs_read (fd, buffer, sizeof buffer);
          if (nread < 0)
  
        if (! giveup_match_end)
        {
 -        EMACS_INT temp;
 +        ptrdiff_t temp;
  
          /* We win!  We can handle REPLACE the optimized way.  */
  
          /* If display currently starts at beginning of line,
             keep it that way.  */
          if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
 -          XWINDOW (selected_window)->start_at_line_beg = Fbolp ();
 +          XWINDOW (selected_window)->start_at_line_beg = !NILP (Fbolp ());
  
          replace_handled = 1;
        }
       in a more optimized way.  */
    if (!NILP (replace) && ! replace_handled && BEGV < ZV)
      {
 -      EMACS_INT same_at_start = BEGV_BYTE;
 -      EMACS_INT same_at_end = ZV_BYTE;
 -      EMACS_INT same_at_start_charpos;
 -      EMACS_INT inserted_chars;
 -      EMACS_INT overlap;
 -      EMACS_INT bufpos;
 +      ptrdiff_t same_at_start = BEGV_BYTE;
 +      ptrdiff_t same_at_end = ZV_BYTE;
 +      ptrdiff_t same_at_start_charpos;
 +      ptrdiff_t inserted_chars;
 +      ptrdiff_t overlap;
 +      ptrdiff_t bufpos;
        unsigned char *decoded;
 -      EMACS_INT temp;
 -      EMACS_INT this = 0;
 -      int this_count = SPECPDL_INDEX ();
 -      int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
 +      ptrdiff_t temp;
 +      ptrdiff_t this = 0;
 +      ptrdiff_t this_count = SPECPDL_INDEX ();
 +      bool multibyte
 +      = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
        Lisp_Object conversion_buffer;
        struct gcpro gcpro1;
  
          /* We read one bunch by one (READ_BUF_SIZE bytes) to allow
             quitting while reading a huge while.  */
          /* `try'' is reserved in some compilers (Microsoft C).  */
 -        EMACS_INT trytry = min (total - how_much,
 -                                READ_BUF_SIZE - unprocessed);
 +        int trytry = min (total - how_much, READ_BUF_SIZE - unprocessed);
  
          /* Allow quitting out of the actual I/O.  */
          immediate_quit = 1;
        /* If display currently starts at beginning of line,
         keep it that way.  */
        if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
 -      XWINDOW (selected_window)->start_at_line_beg = Fbolp ();
 +      XWINDOW (selected_window)->start_at_line_beg = !NILP (Fbolp ());
  
        /* Replace the chars that we need to replace,
         and update INSERTED to equal the number of bytes
    /* Here, we don't do code conversion in the loop.  It is done by
       decode_coding_gap after all data are read into the buffer.  */
    {
 -    EMACS_INT gap_size = GAP_SIZE;
 +    ptrdiff_t gap_size = GAP_SIZE;
  
      while (how_much < total)
        {
        /* try is reserved in some compilers (Microsoft C) */
 -      EMACS_INT trytry = min (total - how_much, READ_BUF_SIZE);
 -      EMACS_INT this;
 +      int trytry = min (total - how_much, READ_BUF_SIZE);
 +      ptrdiff_t this;
  
        if (not_regular)
          {
             care of marker adjustment.  By this way, we can run Lisp
             program safely before decoding the inserted text.  */
          Lisp_Object unwind_data;
 -        int count1 = SPECPDL_INDEX ();
 +        ptrdiff_t count1 = SPECPDL_INDEX ();
  
          unwind_data = Fcons (BVAR (current_buffer, enable_multibyte_characters),
                               Fcons (BVAR (current_buffer, undo_list),
                                      Fcurrent_buffer ()));
 -        BVAR (current_buffer, enable_multibyte_characters) = Qnil;
 -        BVAR (current_buffer, undo_list) = Qt;
 +        bset_enable_multibyte_characters (current_buffer, Qnil);
 +        bset_undo_list (current_buffer, Qt);
          record_unwind_protect (decide_coding_unwind, unwind_data);
  
          if (inserted > 0 && ! NILP (Vset_auto_coding_function))
          && NILP (replace))
        /* Visiting a file with these coding system makes the buffer
           unibyte. */
 -      BVAR (current_buffer, enable_multibyte_characters) = Qnil;
 +      bset_enable_multibyte_characters (current_buffer, Qnil);
      }
  
    coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
    if (!NILP (visit))
      {
        if (!EQ (BVAR (current_buffer, undo_list), Qt) && !nochange)
 -      BVAR (current_buffer, undo_list) = Qnil;
 +      bset_undo_list (current_buffer, Qnil);
  
        if (NILP (handler))
        {
 -        current_buffer->modtime = st.st_mtime;
 +        current_buffer->modtime = mtime;
          current_buffer->modtime_size = st.st_size;
 -        BVAR (current_buffer, filename) = orig_filename;
 +        bset_filename (current_buffer, orig_filename);
        }
  
        SAVE_MODIFF = MODIFF;
                      visit);
        if (! NILP (insval))
        {
 -        CHECK_NUMBER (insval);
 +        if (! RANGED_INTEGERP (0, insval, ZV - PT))
 +          wrong_type_argument (intern ("inserted-chars"), insval);
          inserted = XFASTINT (insval);
        }
      }
    if (inserted > 0)
      {
        /* Don't run point motion or modification hooks when decoding.  */
 -      int count1 = SPECPDL_INDEX ();
 -      EMACS_INT old_inserted = inserted;
 +      ptrdiff_t count1 = SPECPDL_INDEX ();
 +      ptrdiff_t old_inserted = inserted;
        specbind (Qinhibit_point_motion_hooks, Qt);
        specbind (Qinhibit_modification_hooks, Qt);
  
        /* Save old undo list and don't record undo for decoding.  */
        old_undo = BVAR (current_buffer, undo_list);
 -      BVAR (current_buffer, undo_list) = Qt;
 +      bset_undo_list (current_buffer, Qt);
  
        if (NILP (replace))
        {
          insval = call3 (Qformat_decode,
                          Qnil, make_number (inserted), visit);
 -        CHECK_NUMBER (insval);
 +        if (! RANGED_INTEGERP (0, insval, ZV - PT))
 +          wrong_type_argument (intern ("inserted-chars"), insval);
          inserted = XFASTINT (insval);
        }
        else
             Hence we temporarily save `point' and `inserted' here and
             restore `point' iff format-decode did not insert or delete
             any text.  Otherwise we leave `point' at point-min.  */
 -        EMACS_INT opoint = PT;
 -        EMACS_INT opoint_byte = PT_BYTE;
 -        EMACS_INT oinserted = ZV - BEGV;
 -        int ochars_modiff = CHARS_MODIFF;
 +        ptrdiff_t opoint = PT;
 +        ptrdiff_t opoint_byte = PT_BYTE;
 +        ptrdiff_t oinserted = ZV - BEGV;
 +        EMACS_INT ochars_modiff = CHARS_MODIFF;
  
          TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
          insval = call3 (Qformat_decode,
                          Qnil, make_number (oinserted), visit);
 -        CHECK_NUMBER (insval);
 +        if (! RANGED_INTEGERP (0, insval, ZV - PT))
 +          wrong_type_argument (intern ("inserted-chars"), insval);
          if (ochars_modiff == CHARS_MODIFF)
            /* format_decode didn't modify buffer's characters => move
               point back to position before inserted text and leave
              insval = call1 (XCAR (p), make_number (inserted));
              if (!NILP (insval))
                {
 -                CHECK_NUMBER (insval);
 +                if (! RANGED_INTEGERP (0, insval, ZV - PT))
 +                  wrong_type_argument (intern ("inserted-chars"), insval);
                  inserted = XFASTINT (insval);
                }
            }
            {
              /* For the rationale of this see the comment on
                 format-decode above.  */
 -            EMACS_INT opoint = PT;
 -            EMACS_INT opoint_byte = PT_BYTE;
 -            EMACS_INT oinserted = ZV - BEGV;
 -            int ochars_modiff = CHARS_MODIFF;
 +            ptrdiff_t opoint = PT;
 +            ptrdiff_t opoint_byte = PT_BYTE;
 +            ptrdiff_t oinserted = ZV - BEGV;
 +            EMACS_INT ochars_modiff = CHARS_MODIFF;
  
              TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
              insval = call1 (XCAR (p), make_number (oinserted));
              if (!NILP (insval))
                {
 -                CHECK_NUMBER (insval);
 +                if (! RANGED_INTEGERP (0, insval, ZV - PT))
 +                  wrong_type_argument (intern ("inserted-chars"), insval);
                  if (ochars_modiff == CHARS_MODIFF)
                    /* after_insert_file_functions didn't modify
                       buffer's characters => move point back to
  
        if (NILP (visit))
        {
 -        BVAR (current_buffer, undo_list) = old_undo;
 +        bset_undo_list (current_buffer, old_undo);
          if (CONSP (old_undo) && inserted != old_inserted)
            {
              /* Adjust the last undo record for the size change during
        else
        /* If undo_list was Qt before, keep it that way.
           Otherwise start with an empty undo_list.  */
 -      BVAR (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil;
 +      bset_undo_list (current_buffer, EQ (old_undo, Qt) ? Qt : Qnil);
  
        unbind_to (count1, Qnil);
      }
  
    if (!NILP (visit)
 -      && current_buffer->modtime == -1)
 +      && EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS)
      {
        /* If visiting nonexistent file, return nil.  */
        errno = save_errno;
@@@ -4422,8 -4413,8 +4419,8 @@@ choose_write_coding_system (Lisp_Objec
         If it is not set locally, we anyway have to convert EOL
         format if the default value of `buffer-file-coding-system'
         tells that it is not Unix-like (LF only) format.  */
 -      int using_default_coding = 0;
 -      int force_raw_text = 0;
 +      bool using_default_coding = 0;
 +      bool force_raw_text = 0;
  
        val = BVAR (current_buffer, buffer_file_coding_system);
        if (NILP (val)
@@@ -4532,19 -4523,19 +4529,19 @@@ This calls `write-region-annotate-funct
  `write-region-post-annotation-function' at the end.  */)
    (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;
 +  int desc;
 +  bool ok;
    int save_errno = 0;
    const char *fn;
    struct stat st;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    int count1;
    Lisp_Object handler;
    Lisp_Object visit_file;
    Lisp_Object annotations;
    Lisp_Object encoded_filename;
 -  int visiting = (EQ (visit, Qt) || STRINGP (visit));
 -  int quietly = !NILP (visit);
 +  bool visiting = (EQ (visit, Qt) || STRINGP (visit));
 +  bool quietly = !NILP (visit);
    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
    struct buffer *given_buffer;
    struct coding_system coding;
        {
          SAVE_MODIFF = MODIFF;
          XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
 -        BVAR (current_buffer, filename) = visit_file;
 +        bset_filename (current_buffer, visit_file);
        }
        UNGCPRO;
        return val;
  
    UNGCPRO;
  
 -  failure = 0;
    immediate_quit = 1;
  
    if (STRINGP (start))
 -    {
 -      failure = 0 > a_write (desc, start, 0, SCHARS (start),
 -                           &annotations, &coding);
 -      save_errno = errno;
 -    }
 +    ok = a_write (desc, start, 0, SCHARS (start), &annotations, &coding);
    else if (XINT (start) != XINT (end))
 -    {
 -      failure = 0 > a_write (desc, Qnil,
 -                           XINT (start), XINT (end) - XINT (start),
 -                           &annotations, &coding);
 -      save_errno = errno;
 -    }
 +    ok = a_write (desc, Qnil, XINT (start), XINT (end) - XINT (start),
 +                &annotations, &coding);
    else
      {
 -      /* If file was empty, still need to write the annotations */
 +      /* If file was empty, still need to write the annotations */
        coding.mode |= CODING_MODE_LAST_BLOCK;
 -      failure = 0 > a_write (desc, Qnil, XINT (end), 0, &annotations, &coding);
 -      save_errno = errno;
 +      ok = a_write (desc, Qnil, XINT (end), 0, &annotations, &coding);
      }
 +  save_errno = errno;
  
 -  if (CODING_REQUIRE_FLUSHING (&coding)
 -      && !(coding.mode & CODING_MODE_LAST_BLOCK)
 -      && ! failure)
 +  if (ok && CODING_REQUIRE_FLUSHING (&coding)
 +      && !(coding.mode & CODING_MODE_LAST_BLOCK))
      {
        /* We have to flush out a data. */
        coding.mode |= CODING_MODE_LAST_BLOCK;
 -      failure = 0 > e_write (desc, Qnil, 1, 1, &coding);
 +      ok = e_write (desc, Qnil, 1, 1, &coding);
        save_errno = errno;
      }
  
         ignore EINVAL which happens when fsync is not supported on this
         file.  */
        if (errno != EINTR && errno != EINVAL)
 -      failure = 1, save_errno = errno;
 +      ok = 0, save_errno = errno;
      }
  #endif
  
    /* NFS can report a write failure now.  */
    if (emacs_close (desc) < 0)
 -    failure = 1, save_errno = errno;
 +    ok = 0, save_errno = errno;
  
    stat (fn, &st);
  
       next attempt to save.  */
    if (visiting)
      {
 -      current_buffer->modtime = st.st_mtime;
 +      current_buffer->modtime = get_stat_mtime (&st);
        current_buffer->modtime_size = st.st_size;
      }
  
 -  if (failure)
 +  if (! ok)
      error ("IO error writing %s: %s", SDATA (filename),
           emacs_strerror (save_errno));
  
      {
        SAVE_MODIFF = MODIFF;
        XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
 -      BVAR (current_buffer, filename) = visit_file;
 +      bset_filename (current_buffer, visit_file);
        update_mode_lines++;
      }
    else if (quietly)
@@@ -4844,8 -4845,7 +4841,8 @@@ build_annotations (Lisp_Object start, L
    Lisp_Object p, res;
    struct gcpro gcpro1, gcpro2;
    Lisp_Object original_buffer;
 -  int i, used_global = 0;
 +  int i;
 +  bool used_global = 0;
  
    XSETBUFFER (original_buffer, current_buffer);
  
  
     We modify *ANNOT by discarding elements as we use them up.
  
 -   The return value is negative in case of system call failure.  */
 +   Return true if successful.  */
  
 -static int
 -a_write (int desc, Lisp_Object string, EMACS_INT pos,
 -       register EMACS_INT nchars, Lisp_Object *annot,
 +static bool
 +a_write (int desc, Lisp_Object string, ptrdiff_t pos,
 +       ptrdiff_t nchars, Lisp_Object *annot,
         struct coding_system *coding)
  {
    Lisp_Object tem;
 -  EMACS_INT nextpos;
 -  EMACS_INT lastpos = pos + nchars;
 +  ptrdiff_t nextpos;
 +  ptrdiff_t lastpos = pos + nchars;
  
    while (NILP (*annot) || CONSP (*annot))
      {
        /* Output buffer text up to the next annotation's position.  */
        if (nextpos > pos)
        {
 -        if (0 > e_write (desc, string, pos, nextpos, coding))
 -          return -1;
 +        if (!e_write (desc, string, pos, nextpos, coding))
 +          return 0;
          pos = nextpos;
        }
        /* Output the annotation.  */
        tem = Fcdr (Fcar (*annot));
        if (STRINGP (tem))
        {
 -        if (0 > e_write (desc, tem, 0, SCHARS (tem), coding))
 -          return -1;
 +        if (!e_write (desc, tem, 0, SCHARS (tem), coding))
 +          return 0;
        }
        *annot = Fcdr (*annot);
      }
 -  return 0;
 +  return 1;
  }
  
  
  /* Write text in the range START and END into descriptor DESC,
     encoding them with coding system CODING.  If STRING is nil, START
     and END are character positions of the current buffer, else they
 -   are indexes to the string STRING.  */
 +   are indexes to the string STRING.  Return true if successful.  */
  
 -static int
 -e_write (int desc, Lisp_Object string, EMACS_INT start, EMACS_INT end,
 +static bool
 +e_write (int desc, Lisp_Object string, ptrdiff_t start, ptrdiff_t end,
         struct coding_system *coding)
  {
    if (STRINGP (string))
        }
        else
        {
 -        EMACS_INT start_byte = CHAR_TO_BYTE (start);
 -        EMACS_INT end_byte = CHAR_TO_BYTE (end);
 +        ptrdiff_t start_byte = CHAR_TO_BYTE (start);
 +        ptrdiff_t end_byte = CHAR_TO_BYTE (end);
  
          coding->src_multibyte = (end - start) < (end_byte - start_byte);
          if (CODING_REQUIRE_ENCODING (coding))
                         coding->produced);
  
          if (coding->produced)
 -          return -1;
 +          return 0;
        }
        start += coding->consumed_char;
      }
  
 -  return 0;
 +  return 1;
  }
  \f
  DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime,
@@@ -5062,7 -5062,6 +5059,7 @@@ See Info node `(elisp)Modification Time
    struct stat st;
    Lisp_Object handler;
    Lisp_Object filename;
 +  EMACS_TIME mtime, diff;
  
    if (NILP (buf))
      b = current_buffer;
      }
  
    if (!STRINGP (BVAR (b, filename))) return Qt;
 -  if (b->modtime == 0) return Qt;
 +  if (EMACS_NSECS (b->modtime) == UNKNOWN_MODTIME_NSECS) return Qt;
  
    /* If the file name has special constructs in it,
       call the corresponding file handler.  */
  
    filename = ENCODE_FILE (BVAR (b, filename));
  
 -  if (stat (SSDATA (filename), &st) < 0)
 -    {
 -      /* If the file doesn't exist now and didn't exist before,
 -       we say that it isn't modified, provided the error is a tame one.  */
 -      if (errno == ENOENT || errno == EACCES || errno == ENOTDIR)
 -      st.st_mtime = -1;
 -      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 - 1 == b->modtime
 -             || st.st_mtime == b->modtime - 1)))
 +  mtime = (stat (SSDATA (filename), &st) == 0
 +         ? get_stat_mtime (&st)
 +         : time_error_value (errno));
 +  if ((EMACS_TIME_EQ (mtime, b->modtime)
 +       /* If both exist, accept them if they are off by one second.  */
 +       || (EMACS_TIME_VALID_P (mtime) && EMACS_TIME_VALID_P (b->modtime)
 +         && ((diff = (EMACS_TIME_LT (mtime, b->modtime)
 +                      ? sub_emacs_time (b->modtime, mtime)
 +                      : sub_emacs_time (mtime, b->modtime))),
 +             EMACS_TIME_LE (diff, make_emacs_time (1, 0)))))
        && (st.st_size == b->modtime_size
            || b->modtime_size < 0))
      return Qt;
@@@ -5106,7 -5109,7 +5103,7 @@@ DEFUN ("clear-visited-file-modtime", Fc
  Next attempt to save will certainly not complain of a discrepancy.  */)
    (void)
  {
 -  current_buffer->modtime = 0;
 +  current_buffer->modtime = make_emacs_time (0, UNKNOWN_MODTIME_NSECS);
    current_buffer->modtime_size = -1;
    return Qnil;
  }
  DEFUN ("visited-file-modtime", Fvisited_file_modtime,
         Svisited_file_modtime, 0, 0, 0,
         doc: /* Return the current buffer's recorded visited file modification time.
 -The value is a list of the form (HIGH LOW), like the time values that
 +The value is a list of the form (HIGH LOW USEC PSEC), like the time values that
  `file-attributes' returns.  If the current buffer has no recorded file
  modification time, this function returns 0.  If the visited file
  doesn't exist, HIGH will be -1.
  See Info node `(elisp)Modification Time' for more details.  */)
    (void)
  {
 -  if (! current_buffer->modtime)
 +  if (EMACS_NSECS (current_buffer->modtime) < 0)
      return make_number (0);
 -  return make_time (current_buffer->modtime);
 +  return make_lisp_time (current_buffer->modtime);
  }
  
  DEFUN ("set-visited-file-modtime", Fset_visited_file_modtime,
@@@ -5133,12 -5136,12 +5130,12 @@@ Useful if the buffer was not read from 
  or if the file itself has been changed for some known benign reason.
  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).  */)
 +\(HIGH LOW USEC PSEC) as returned by `current-time'.  */)
    (Lisp_Object time_list)
  {
    if (!NILP (time_list))
      {
 -      CONS_TO_INTEGER (time_list, time_t, current_buffer->modtime);
 +      current_buffer->modtime = lisp_time_argument (time_list);
        current_buffer->modtime_size = -1;
      }
    else
  
        if (stat (SSDATA (filename), &st) >= 0)
          {
 -        current_buffer->modtime = st.st_mtime;
 +        current_buffer->modtime = get_stat_mtime (&st);
            current_buffer->modtime_size = st.st_size;
          }
      }
@@@ -5187,7 -5190,7 +5184,7 @@@ auto_save_error (Lisp_Object error_val
    msg = Fformat (3, args);
    GCPRO1 (msg);
    nbytes = SBYTES (msg);
 -  SAFE_ALLOCA (msgbuf, char *, nbytes);
 +  msgbuf = SAFE_ALLOCA (nbytes);
    memcpy (msgbuf, SDATA (msg), nbytes);
  
    for (i = 0; i < 3; ++i)
@@@ -5286,13 -5289,13 +5283,13 @@@ A non-nil CURRENT-ONLY argument means s
  {
    struct buffer *old = current_buffer, *b;
    Lisp_Object tail, buf, hook;
 -  int auto_saved = 0;
 +  bool auto_saved = 0;
    int do_handled_files;
    Lisp_Object oquit;
    FILE *stream = NULL;
 -  int count = SPECPDL_INDEX ();
 -  int orig_minibuffer_auto_raise = minibuffer_auto_raise;
 -  int old_message_p = 0;
 +  ptrdiff_t count = SPECPDL_INDEX ();
 +  bool orig_minibuffer_auto_raise = minibuffer_auto_raise;
 +  bool old_message_p = 0;
    struct gcpro gcpro1, gcpro2;
  
    if (max_specpdl_size < specpdl_size + 40)
                || NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name),
                                                  Qwrite_region))))
          {
 -          EMACS_TIME before_time, after_time;
 -
 -          EMACS_GET_TIME (before_time);
 +          EMACS_TIME before_time = current_emacs_time ();
 +          EMACS_TIME after_time;
  
            /* If we had a failure, don't try again for 20 minutes.  */
            if (b->auto_save_failure_time > 0
            if (!auto_saved && NILP (no_message))
              message1 ("Auto-saving...");
            internal_condition_case (auto_save_1, Qt, auto_save_error);
 -          auto_saved++;
 +          auto_saved = 1;
            BUF_AUTOSAVE_MODIFF (b) = BUF_MODIFF (b);
            XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
            set_buffer_internal (old);
  
 -          EMACS_GET_TIME (after_time);
 +          after_time = current_emacs_time ();
  
            /* If auto-save took more than 60 seconds,
               assume it was an NFS failure that got a timeout.  */
@@@ -5600,7 -5604,7 +5597,7 @@@ syms_of_fileio (void
    DEFSYM (Qexcl, "excl");
  
    DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
 -             doc: /* *Coding system for encoding file names.
 +             doc: /* Coding system for encoding file names.
  If it is nil, `default-file-name-coding-system' (which see) is used.  */);
    Vfile_name_coding_system = Qnil;
  
@@@ -5623,17 -5627,17 +5620,17 @@@ of file names regardless of the curren
    Fput (Qfile_error, Qerror_conditions,
        Fpurecopy (list2 (Qfile_error, Qerror)));
    Fput (Qfile_error, Qerror_message,
 -      make_pure_c_string ("File error"));
 +      build_pure_c_string ("File error"));
  
    Fput (Qfile_already_exists, Qerror_conditions,
        Fpurecopy (list3 (Qfile_already_exists, Qfile_error, Qerror)));
    Fput (Qfile_already_exists, Qerror_message,
 -      make_pure_c_string ("File already exists"));
 +      build_pure_c_string ("File already exists"));
  
    Fput (Qfile_date_error, Qerror_conditions,
        Fpurecopy (list3 (Qfile_date_error, Qfile_error, Qerror)));
    Fput (Qfile_date_error, Qerror_message,
 -      make_pure_c_string ("Cannot set file date"));
 +      build_pure_c_string ("Cannot set file date"));
  
    DEFVAR_LISP ("file-name-handler-alist", Vfile_name_handler_alist,
               doc: /* Alist of elements (REGEXP . HANDLER) for file names handled specially.
@@@ -5754,7 -5758,7 +5751,7 @@@ file is usually more useful if it conta
  
  #ifdef HAVE_FSYNC
    DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync,
 -             doc: /* *Non-nil means don't call fsync in `write-region'.
 +             doc: /* Non-nil means don't call fsync in `write-region'.
  This variable affects calls to `write-region' as well as save commands.
  A non-nil value may result in data loss!  */);
    write_region_inhibit_fsync = 0;
diff --combined src/unexmacosx.c
index 05a16466dfb62ac47abc7116d6d798c9788a190f,753a15fde95ead1c77cd6fc4b3370302a307697e..d38b91e955aa11c6624b19a28a756ec0927c2e3d
@@@ -117,6 -117,13 +117,13 @@@ along with GNU Emacs.  If not, see <htt
  
  #include <assert.h>
  
+ /* LC_DATA_IN_CODE is not defined in mach-o/loader.h on OS X 10.7.
+    But it is used if we build with "Command Line Tools for Xcode 4.5
+    (OS X Lion) - Septemper 2012".  */
+ #ifndef LC_DATA_IN_CODE
+ #define LC_DATA_IN_CODE 0x29 /* table of non-instructions in __text */
+ #endif
  #ifdef _LP64
  #define mach_header                   mach_header_64
  #define segment_command                       segment_command_64
@@@ -197,6 -204,8 +204,6 @@@ static off_t data_segment_old_fileoff 
  
  static struct segment_command *data_segment_scp;
  
 -static void unexec_error (const char *format, ...) NO_RETURN;
 -
  /* Read N bytes from infd into memory starting at address DEST.
     Return true if successful, false otherwise.  */
  static int
@@@ -273,7 -282,7 +280,7 @@@ unexec_copy (off_t dest, off_t src, ssi
  
  /* Debugging and informational messages routines.  */
  
 -static void
 +static _Noreturn void
  unexec_error (const char *format, ...)
  {
    va_list ap;
@@@ -394,7 -403,7 +401,7 @@@ build_region_list (void
        }
        else
        {
 -        r = (struct region_t *) malloc (sizeof (struct region_t));
 +        r = malloc (sizeof *r);
  
          if (!r)
            unexec_error ("cannot allocate region structure");
@@@ -612,6 -621,11 +619,11 @@@ print_load_command_name (int lc
        printf ("LC_MAIN          ");
        break;
  #endif
+ #ifdef LC_DATA_IN_CODE
+     case LC_DATA_IN_CODE:
+       printf ("LC_DATA_IN_CODE  ");
+       break;
+ #endif
  #ifdef LC_SOURCE_VERSION
      case LC_SOURCE_VERSION:
        printf ("LC_SOURCE_VERSION");
@@@ -684,7 -698,7 +696,7 @@@ read_load_commands (void
  #endif
  
    nlc = mh.ncmds;
 -  lca = (struct load_command **) malloc (nlc * sizeof (struct load_command *));
 +  lca = malloc (nlc * sizeof *lca);
  
    for (i = 0; i < nlc; i++)
      {
         size first and then read the rest.  */
        if (!unexec_read (&lc, sizeof (struct load_command)))
          unexec_error ("cannot read load command");
 -      lca[i] = (struct load_command *) malloc (lc.cmdsize);
 +      lca[i] = malloc (lc.cmdsize);
        memcpy (lca[i], &lc, sizeof (struct load_command));
        if (!unexec_read (lca[i] + 1, lc.cmdsize - sizeof (struct load_command)))
          unexec_error ("cannot read content of load command");
@@@ -838,9 -852,9 +850,9 @@@ copy_data_segment (struct load_command 
        {
          sectp->flags = S_REGULAR;
          if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
 -          unexec_error ("cannot write section %s", sectp->sectname);
 +          unexec_error ("cannot write section %.16s", sectp->sectname);
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
 -          unexec_error ("cannot write section %s's header", sectp->sectname);
 +          unexec_error ("cannot write section %.16s's header", sectp->sectname);
        }
        else if (strncmp (sectp->sectname, SECT_BSS, 16) == 0)
        {
          my_size = (unsigned long)my_endbss_static - sectp->addr;
          if (!(sectp->addr <= (unsigned long)my_endbss_static
                && my_size <= sectp->size))
 -          unexec_error ("my_endbss_static is not in section %s",
 +          unexec_error ("my_endbss_static is not in section %.16s",
                          sectp->sectname);
          if (!unexec_write (sectp->offset, (void *) sectp->addr, my_size))
 -          unexec_error ("cannot write section %s", sectp->sectname);
 +          unexec_error ("cannot write section %.16s", sectp->sectname);
          if (!unexec_write_zero (sectp->offset + my_size,
                                  sectp->size - my_size))
 -          unexec_error ("cannot write section %s", sectp->sectname);
 +          unexec_error ("cannot write section %.16s", sectp->sectname);
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
 -          unexec_error ("cannot write section %s's header", sectp->sectname);
 +          unexec_error ("cannot write section %.16s's header", sectp->sectname);
        }
        else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
               || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
               || strncmp (sectp->sectname, "__cfstring", 16) == 0
               || strncmp (sectp->sectname, "__gcc_except_tab", 16) == 0
               || strncmp (sectp->sectname, "__program_vars", 16) == 0
 +             || strncmp (sectp->sectname, "__mod_init_func", 16) == 0
 +             || strncmp (sectp->sectname, "__mod_term_func", 16) == 0
               || strncmp (sectp->sectname, "__objc_", 7) == 0)
        {
          if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
 -          unexec_error ("cannot copy section %s", sectp->sectname);
 +          unexec_error ("cannot copy section %.16s", sectp->sectname);
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
 -          unexec_error ("cannot write section %s's header", sectp->sectname);
 +          unexec_error ("cannot write section %.16s's header", sectp->sectname);
        }
        else
 -      unexec_error ("unrecognized section name in __DATA segment");
 +      unexec_error ("unrecognized section %.16s in __DATA segment",
 +                    sectp->sectname);
  
        printf ("        section %-16.16s at %#8lx - %#8lx (sz: %#8lx)\n",
              sectp->sectname, (long) (sectp->offset),
@@@ -1178,9 -1189,9 +1190,9 @@@ copy_dyld_info (struct load_command *lc
  #endif
  
  #ifdef LC_FUNCTION_STARTS
- /* Copy a LC_FUNCTION_STARTS/LC_DYLIB_CODE_SIGN_DRS load command from
-    the input file to the output file, adjusting the data offset
-    field.  */
+ /* Copy a LC_FUNCTION_STARTS/LC_DATA_IN_CODE/LC_DYLIB_CODE_SIGN_DRS
+    load command from the input file to the output file, adjusting the
+    data offset field.  */
  static void
  copy_linkedit_data (struct load_command *lc, long delta)
  {
@@@ -1274,6 -1285,9 +1286,9 @@@ dump_it (void
  #endif
  #ifdef LC_FUNCTION_STARTS
        case LC_FUNCTION_STARTS:
+ #ifdef LC_DATA_IN_CODE
+       case LC_DATA_IN_CODE:
+ #endif
  #ifdef LC_DYLIB_CODE_SIGN_DRS
        case LC_DYLIB_CODE_SIGN_DRS:
  #endif
@@@ -1413,7 -1427,7 +1428,7 @@@ unexec_realloc (void *old_ptr, size_t n
          size_t old_size = ((unexec_malloc_header_t *) old_ptr)[-1].u.size;
          size_t size = new_size > old_size ? old_size : new_size;
  
 -        p = (size_t *) malloc (new_size);
 +        p = malloc (new_size);
          if (size)
            memcpy (p, old_ptr, size);
        }
diff --combined src/xdisp.c
index 5ee5a46601cfac32eca0a3df946705d26825c974,c5962541cb674e79b453ebef67bf7e93a759dc3b..f00719be37a3d1ac558454f1dd3c00ace385509e
@@@ -1,6 -1,6 +1,6 @@@
  /* Display generation from window structure and buffer text.
  
 -Copyright (C) 1985-1988, 1993-1995, 1997-2012  Free Software Foundation, Inc.
 +Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
@@@ -273,6 -273,7 +273,6 @@@ along with GNU Emacs.  If not, see <htt
  #include <config.h>
  #include <stdio.h>
  #include <limits.h>
 -#include <setjmp.h>
  
  #include "lisp.h"
  #include "keyboard.h"
  #include "window.h"
  #include "termchar.h"
  #include "dispextern.h"
 -#include "buffer.h"
  #include "character.h"
 +#include "buffer.h"
  #include "charset.h"
  #include "indent.h"
  #include "commands.h"
@@@ -364,28 -365,6 +364,28 @@@ Lisp_Object Qcenter
  static Lisp_Object Qmargin, Qpointer;
  static Lisp_Object Qline_height;
  
 +/* These setters are used only in this file, so they can be private.  */
 +static inline void
 +wset_base_line_number (struct window *w, Lisp_Object val)
 +{
 +  w->base_line_number = val;
 +}
 +static inline void
 +wset_base_line_pos (struct window *w, Lisp_Object val)
 +{
 +  w->base_line_pos = val;
 +}
 +static inline void
 +wset_column_number_displayed (struct window *w, Lisp_Object val)
 +{
 +  w->column_number_displayed = val;
 +}
 +static inline void
 +wset_region_showing (struct window *w, Lisp_Object val)
 +{
 +  w->region_showing = val;
 +}
 +
  #ifdef HAVE_WINDOW_SYSTEM
  
  /* Test if overflow newline into fringe.  Called with iterator IT
  #define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) 0
  #endif /* HAVE_WINDOW_SYSTEM */
  
 -/* Test if the display element loaded in IT is a space or tab
 -   character.  This is used to determine word wrapping.  */
 -
 -#define IT_DISPLAYING_WHITESPACE(it)                          \
 -  (it->what == IT_CHARACTER && (it->c == ' ' || it->c == '\t'))
 +/* Test if the display element loaded in IT, or the underlying buffer
 +   or string character, is a space or a TAB character.  This is used
 +   to determine where word wrapping can occur.  */
 +
 +#define IT_DISPLAYING_WHITESPACE(it)                                  \
 +  ((it->what == IT_CHARACTER && (it->c == ' ' || it->c == '\t'))      \
 +   || ((STRINGP (it->string)                                          \
 +      && (SREF (it->string, IT_STRING_BYTEPOS (*it)) == ' '           \
 +          || SREF (it->string, IT_STRING_BYTEPOS (*it)) == '\t'))     \
 +       || (it->s                                                      \
 +         && (it->s[IT_BYTEPOS (*it)] == ' '                           \
 +             || it->s[IT_BYTEPOS (*it)] == '\t'))                     \
 +       || (IT_BYTEPOS (*it) < ZV_BYTE                                 \
 +         && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' '                 \
 +             || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t'))))         \
  
  /* Name of the face used to highlight trailing whitespace.  */
  
@@@ -648,10 -617,10 +648,10 @@@ int current_mode_line_height, current_h
      CACHE = NULL;                             \
    } while (0)
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
  
  /* Non-zero means print traces of redisplay if compiled with
 -   GLYPH_DEBUG != 0.  */
 +   GLYPH_DEBUG defined.  */
  
  int trace_redisplay_p;
  
@@@ -767,12 -736,11 +767,12 @@@ static int clear_image_cache_count
  static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 };
  #endif
  
 -/* Non-zero while redisplay_internal is in progress.  */
 +/* True while redisplay_internal is in progress.  */
  
 -int redisplaying_p;
 +bool redisplaying_p;
  
  static Lisp_Object Qinhibit_free_realized_faces;
 +static Lisp_Object Qmode_line_default_help_echo;
  
  /* If a string, XTread_socket generates an event to display that string.
     (The display is done in read_char.)  */
  Lisp_Object help_echo_string;
  Lisp_Object help_echo_window;
  Lisp_Object help_echo_object;
 -EMACS_INT help_echo_pos;
 +ptrdiff_t help_echo_pos;
  
  /* Temporary variable for XTread_socket.  */
  
@@@ -827,48 -795,49 +827,48 @@@ static Lisp_Object get_it_property (str
  
  static void handle_line_prefix (struct it *);
  
 -static void pint2str (char *, int, EMACS_INT);
 -static void pint2hrstr (char *, int, EMACS_INT);
 +static void pint2str (char *, int, ptrdiff_t);
 +static void pint2hrstr (char *, int, ptrdiff_t);
  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);
 +                                        ptrdiff_t, ptrdiff_t);
  static void store_mode_line_noprop_char (char);
  static int store_mode_line_noprop (const char *, int, int);
  static void handle_stop (struct it *);
 -static void handle_stop_backwards (struct it *, EMACS_INT);
 +static void handle_stop_backwards (struct it *, ptrdiff_t);
  static void vmessage (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0);
  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);
 +                                  int (*) (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t),
 +                                  ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t);
  static void clear_garbaged_frames (void);
 -static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static int current_message_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t);
  static void pop_message (void);
 -static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 -static void set_message (const char *, Lisp_Object, EMACS_INT, int);
 -static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
 +static int truncate_message_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t);
 +static void set_message (const char *, Lisp_Object, ptrdiff_t, int);
 +static int set_message_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t);
  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 int display_echo_area_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t);
 +static int resize_mini_window_1 (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t);
  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_scrolling (Lisp_Object, int, ptrdiff_t, ptrdiff_t, int, int);
  static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
 -static int trailing_whitespace_p (EMACS_INT);
 -static intmax_t message_log_check_duplicate (EMACS_INT, EMACS_INT);
 +static int trailing_whitespace_p (ptrdiff_t);
 +static intmax_t message_log_check_duplicate (ptrdiff_t, ptrdiff_t);
  static void push_it (struct it *, struct text_pos *);
  static void iterate_out_of_display_property (struct it *);
  static void pop_it (struct it *);
@@@ -882,7 -851,7 +882,7 @@@ static Lisp_Object redisplay_window_err
  static Lisp_Object redisplay_window_0 (Lisp_Object);
  static Lisp_Object redisplay_window_1 (Lisp_Object);
  static int set_cursor_from_row (struct window *, struct glyph_row *,
 -                              struct glyph_matrix *, EMACS_INT, EMACS_INT,
 +                              struct glyph_matrix *, ptrdiff_t, ptrdiff_t,
                                int, int);
  static int update_menu_bar (struct frame *, int, int);
  static int try_window_reusing_current_matrix (struct window *);
@@@ -894,14 -863,14 +894,14 @@@ static int display_mode_element (struc
  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, Lisp_Object *);
  static void display_menu_bar (struct window *);
 -static EMACS_INT display_count_lines (EMACS_INT, EMACS_INT, EMACS_INT,
 -                                    EMACS_INT *);
 +static ptrdiff_t display_count_lines (ptrdiff_t, ptrdiff_t, ptrdiff_t,
 +                                    ptrdiff_t *);
  static int display_string (const char *, Lisp_Object, Lisp_Object,
 -                           EMACS_INT, EMACS_INT, struct it *, int, int, int, int);
 +                           ptrdiff_t, ptrdiff_t, 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 int get_overlay_strings (struct it *, ptrdiff_t);
 +static int get_overlay_strings_1 (struct it *, ptrdiff_t, 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);
@@@ -916,14 -885,14 +916,14 @@@ static int next_element_from_buffer (st
  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 void load_overlay_strings (struct it *, ptrdiff_t);
  static int init_from_display_pos (struct it *, struct window *,
                                    struct display_pos *);
  static void reseat_to_string (struct it *, const char *,
 -                              Lisp_Object, EMACS_INT, EMACS_INT, int, int);
 +                              Lisp_Object, ptrdiff_t, ptrdiff_t, int, int);
  static int get_next_display_element (struct it *);
  static enum move_it_result
 -       move_it_in_display_line_to (struct it *, EMACS_INT, int,
 +       move_it_in_display_line_to (struct it *, ptrdiff_t, int,
                                   enum move_operation_enum);
  void move_it_vertically_backward (struct it *, int);
  static void init_to_row_start (struct it *, struct window *,
@@@ -933,20 -902,20 +933,20 @@@ static int init_to_row_end (struct it *
  static void back_to_previous_line_start (struct it *);
  static int forward_to_next_line_start (struct it *, int *, struct bidi_it *);
  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 char *, int);
 -static EMACS_INT number_of_chars (const char *, int);
 +                                                Lisp_Object, ptrdiff_t);
 +static struct text_pos string_pos (ptrdiff_t, Lisp_Object);
 +static struct text_pos c_string_pos (ptrdiff_t, const char *, int);
 +static ptrdiff_t number_of_chars (const 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 ptrdiff_t next_overlay_change (ptrdiff_t);
  static int handle_display_spec (struct it *, Lisp_Object, Lisp_Object,
 -                              Lisp_Object, struct text_pos *, EMACS_INT, int);
 +                              Lisp_Object, struct text_pos *, ptrdiff_t, int);
  static int handle_single_display_spec (struct it *, Lisp_Object,
                                         Lisp_Object, Lisp_Object,
 -                                       struct text_pos *, EMACS_INT, int, int);
 +                                       struct text_pos *, ptrdiff_t, int, int);
  static int underlying_face_id (struct it *);
  static int in_ellipses_for_invisible_text_p (struct display_pos *,
                                               struct window *);
@@@ -971,7 -940,6 +971,7 @@@ static void append_stretch_glyph (struc
  
  #endif /* HAVE_WINDOW_SYSTEM */
  
 +static void produce_special_glyphs (struct it *, enum display_element_type);
  static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
  static int coords_in_mouse_face_p (struct window *, int, int);
  
@@@ -1046,7 -1014,7 +1046,7 @@@ window_box_height (struct window *w
    struct frame *f = XFRAME (w->frame);
    int height = WINDOW_TOTAL_HEIGHT (w);
  
 -  xassert (height >= 0);
 +  eassert (height >= 0);
  
    /* Note: the code below that determines the mode-line/header-line
       height is essentially the same as that contained in the macro
@@@ -1272,23 -1240,6 +1272,23 @@@ string_from_display_spec (Lisp_Object s
    return spec;
  }
  
 +
 +/* Limit insanely large values of W->hscroll on frame F to the largest
 +   value that will still prevent first_visible_x and last_visible_x of
 +   'struct it' from overflowing an int.  */
 +static inline int
 +window_hscroll_limited (struct window *w, struct frame *f)
 +{
 +  ptrdiff_t window_hscroll = w->hscroll;
 +  int window_text_width = window_box_width (w, TEXT_AREA);
 +  int colwidth = FRAME_COLUMN_WIDTH (f);
 +
 +  if (window_hscroll > (INT_MAX - window_text_width) / colwidth - 1)
 +    window_hscroll = (INT_MAX - window_text_width) / colwidth - 1;
 +
 +  return window_hscroll;
 +}
 +
  /* Return 1 if position CHARPOS is visible in window W.
     CHARPOS < 0 means return info about WINDOW_END position.
     If visible, set *X and *Y to pixel coordinates of top left corner.
     Set *ROWH and *VPOS to row's visible height and VPOS (row number).  */
  
  int
 -pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
 +pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
               int *rtop, int *rbot, int *rowh, int *vpos)
  {
    struct it it;
    if (WINDOW_WANTS_HEADER_LINE_P (w))
      current_header_line_height
        = display_mode_line (w, HEADER_LINE_FACE_ID,
 -                             BVAR (current_buffer, header_line_format));
 +                         BVAR (current_buffer, header_line_format));
  
    start_display (&it, w, top);
    move_it_to (&it, charpos, -1, it.last_visible_y-1, -1,
                          --g;
                          top_x -= g->pixel_width;
                        }
 -                    xassert (g < it3.glyph_row->glyphs[TEXT_AREA]
 +                    eassert (g < it3.glyph_row->glyphs[TEXT_AREA]
                                    + it3.glyph_row->used[TEXT_AREA]);
                    }
                }
  
    current_header_line_height = current_mode_line_height = -1;
  
 -  if (visible_p && XFASTINT (w->hscroll) > 0)
 -    *x -= XFASTINT (w->hscroll) * WINDOW_FRAME_COLUMN_WIDTH (w);
 +  if (visible_p && w->hscroll > 0)
 +    *x -=
 +      window_hscroll_limited (w, WINDOW_XFRAME (w))
 +      * WINDOW_FRAME_COLUMN_WIDTH (w);
  
  #if 0
    /* Debugging code.  */
@@@ -1644,9 -1593,9 +1644,9 @@@ string_char_and_length (const unsigned 
     in STRING, return the position NCHARS ahead (NCHARS >= 0).  */
  
  static struct text_pos
 -string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, EMACS_INT nchars)
 +string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, ptrdiff_t nchars)
  {
 -  xassert (STRINGP (string) && nchars >= 0);
 +  eassert (STRINGP (string) && nchars >= 0);
  
    if (STRING_MULTIBYTE (string))
      {
     for character position CHARPOS in STRING.  */
  
  static inline struct text_pos
 -string_pos (EMACS_INT charpos, Lisp_Object string)
 +string_pos (ptrdiff_t charpos, Lisp_Object string)
  {
    struct text_pos pos;
 -  xassert (STRINGP (string));
 -  xassert (charpos >= 0);
 +  eassert (STRINGP (string));
 +  eassert (charpos >= 0);
    SET_TEXT_POS (pos, charpos, string_char_to_byte (string, charpos));
    return pos;
  }
     means recognize multibyte characters.  */
  
  static struct text_pos
 -c_string_pos (EMACS_INT charpos, const char *s, int multibyte_p)
 +c_string_pos (ptrdiff_t charpos, const char *s, int multibyte_p)
  {
    struct text_pos pos;
  
 -  xassert (s != NULL);
 -  xassert (charpos >= 0);
 +  eassert (s != NULL);
 +  eassert (charpos >= 0);
  
    if (multibyte_p)
      {
  /* Value is the number of characters in C string S.  MULTIBYTE_P
     non-zero means recognize multibyte characters.  */
  
 -static EMACS_INT
 +static ptrdiff_t
  number_of_chars (const char *s, int multibyte_p)
  {
 -  EMACS_INT nchars;
 +  ptrdiff_t nchars;
  
    if (multibyte_p)
      {
 -      EMACS_INT rest = strlen (s);
 +      ptrdiff_t rest = strlen (s);
        int len;
        const unsigned char *p = (const unsigned char *) s;
  
  static void
  compute_string_pos (struct text_pos *newpos, struct text_pos pos, Lisp_Object string)
  {
 -  xassert (STRINGP (string));
 -  xassert (CHARPOS (*newpos) >= CHARPOS (pos));
 +  eassert (STRINGP (string));
 +  eassert (CHARPOS (*newpos) >= CHARPOS (pos));
  
    if (STRING_MULTIBYTE (string))
      *newpos = string_pos_nchars_ahead (pos, string,
@@@ -2417,19 -2366,22 +2417,19 @@@ remember_mouse_glyph (struct frame *f, 
  /* Error handler for safe_eval and safe_call.  */
  
  static Lisp_Object
 -safe_eval_handler (Lisp_Object arg)
 +safe_eval_handler (Lisp_Object arg, ptrdiff_t nargs, Lisp_Object *args)
  {
 -  add_to_log ("Error during redisplay: %S", arg, Qnil);
 +  add_to_log ("Error during redisplay: %S signaled %S",
 +            Flist (nargs, args), arg);
    return Qnil;
  }
  
 -
 -/* Evaluate SEXPR and return the result, or nil if something went
 +/* Call function FUNC with the rest of NARGS - 1 arguments
 +   following.  Return the result, or nil if something went
     wrong.  Prevent redisplay during the evaluation.  */
  
 -/* Call function ARGS[0] with arguments ARGS[1] to ARGS[NARGS - 1].
 -   Return the result, or nil if something went wrong.  Prevent
 -   redisplay during the evaluation.  */
 -
  Lisp_Object
 -safe_call (ptrdiff_t nargs, Lisp_Object *args)
 +safe_call (ptrdiff_t nargs, Lisp_Object func, ...)
  {
    Lisp_Object val;
  
      val = Qnil;
    else
      {
 -      int count = SPECPDL_INDEX ();
 +      va_list ap;
 +      ptrdiff_t i;
 +      ptrdiff_t count = SPECPDL_INDEX ();
        struct gcpro gcpro1;
 +      Lisp_Object *args = alloca (nargs * word_size);
 +
 +      args[0] = func;
 +      va_start (ap, func);
 +      for (i = 1; i < nargs; i++)
 +      args[i] = va_arg (ap, Lisp_Object);
 +      va_end (ap);
  
        GCPRO1 (args[0]);
        gcpro1.nvars = nargs;
  Lisp_Object
  safe_call1 (Lisp_Object fn, Lisp_Object arg)
  {
 -  Lisp_Object args[2];
 -  args[0] = fn;
 -  args[1] = arg;
 -  return safe_call (2, args);
 +  return safe_call (2, fn, arg);
  }
  
  static Lisp_Object Qeval;
@@@ -2481,13 -2427,17 +2481,13 @@@ safe_eval (Lisp_Object sexpr
    return safe_call1 (Qeval, sexpr);
  }
  
 -/* Call function FN with one argument ARG.
 +/* Call function FN with two arguments ARG1 and ARG2.
     Return the result, or nil if something went wrong.  */
  
  Lisp_Object
  safe_call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
  {
 -  Lisp_Object args[3];
 -  args[0] = fn;
 -  args[1] = arg1;
 -  args[2] = arg2;
 -  return safe_call (3, args);
 +  return safe_call (3, fn, arg1, arg2);
  }
  
  
@@@ -2506,23 -2456,23 +2506,23 @@@ check_it (struct it *it
  {
    if (it->method == GET_FROM_STRING)
      {
 -      xassert (STRINGP (it->string));
 -      xassert (IT_STRING_CHARPOS (*it) >= 0);
 +      eassert (STRINGP (it->string));
 +      eassert (IT_STRING_CHARPOS (*it) >= 0);
      }
    else
      {
 -      xassert (IT_STRING_CHARPOS (*it) < 0);
 +      eassert (IT_STRING_CHARPOS (*it) < 0);
        if (it->method == GET_FROM_BUFFER)
        {
          /* Check that character and byte positions agree.  */
 -        xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it)));
 +        eassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it)));
        }
      }
  
    if (it->dpvec)
 -    xassert (it->current.dpvec_index >= 0);
 +    eassert (it->current.dpvec_index >= 0);
    else
 -    xassert (it->current.dpvec_index < 0);
 +    eassert (it->current.dpvec_index < 0);
  }
  
  #define CHECK_IT(IT)  check_it ((IT))
  #endif /* not 0 */
  
  
 -#if GLYPH_DEBUG && XASSERTS
 +#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
  
  /* Check that the window end of window W is what we expect it
     to be---the last row in the current matrix displaying text.  */
@@@ -2546,7 -2496,7 +2546,7 @@@ check_window_end (struct window *w
        && !NILP (w->window_end_valid))
      {
        struct glyph_row *row;
 -      xassert ((row = MATRIX_ROW (w->current_matrix,
 +      eassert ((row = MATRIX_ROW (w->current_matrix,
                                  XFASTINT (w->window_end_vpos)),
                !row->enabled_p
                || MATRIX_ROW_DISPLAYS_TEXT_P (row)
  
  #define CHECK_WINDOW_END(W)   (void) 0
  
 -#endif
 +#endif /* GLYPH_DEBUG and ENABLE_CHECKING */
  
  
  \f
  
  void
  init_iterator (struct it *it, struct window *w,
 -             EMACS_INT charpos, EMACS_INT bytepos,
 +             ptrdiff_t charpos, ptrdiff_t 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;
  
    /* Some precondition checks.  */
 -  xassert (w != NULL && it != NULL);
 -  xassert (charpos < 0 || (charpos >= BUF_BEG (current_buffer)
 +  eassert (w != NULL && it != NULL);
 +  eassert (charpos < 0 || (charpos >= BUF_BEG (current_buffer)
                           && charpos <= ZV));
  
    /* If face attributes have been changed since the last redisplay,
  
    /* Perhaps remap BASE_FACE_ID to a user-specified alternative.  */
    if (! NILP (Vface_remapping_alist))
 -    remapped_base_face_id = lookup_basic_face (XFRAME (w->frame), base_face_id);
 +    remapped_base_face_id
 +      = lookup_basic_face (XFRAME (w->frame), base_face_id);
  
    /* Use one of the mode line rows of W's desired matrix if
       appropriate.  */
       is invisible.  >0 means lines indented more than this value are
       invisible.  */
    it->selective = (INTEGERP (BVAR (current_buffer, selective_display))
 -                 ? XINT (BVAR (current_buffer, selective_display))
 +                 ? (clip_to_bounds
 +                    (-1, XINT (BVAR (current_buffer, selective_display)),
 +                     PTRDIFF_MAX))
                   : (!NILP (BVAR (current_buffer, selective_display))
                      ? -1 : 0));
    it->selective_display_ellipsis_p
              && WINDOWP (minibuf_selected_window)
              && w == XWINDOW (minibuf_selected_window))))
      {
 -      EMACS_INT markpos = marker_position (BVAR (current_buffer, mark));
 +      ptrdiff_t markpos = marker_position (BVAR (current_buffer, mark));
        it->region_beg_charpos = min (PT, markpos);
        it->region_end_charpos = max (PT, markpos);
      }
      it->redisplay_end_trigger_charpos
        = marker_position (w->redisplay_end_trigger);
    else if (INTEGERP (w->redisplay_end_trigger))
 -    it->redisplay_end_trigger_charpos = XINT (w->redisplay_end_trigger);
 +    it->redisplay_end_trigger_charpos =
 +      clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger), PTRDIFF_MAX);
  
    it->tab_width = SANE_TAB_WIDTH (current_buffer);
  
    /* Are lines in the display truncated?  */
    if (base_face_id != DEFAULT_FACE_ID
 -      || XINT (it->w->hscroll)
 +      || it->w->hscroll
        || (! WINDOW_FULL_WIDTH_P (it->w)
          && ((!NILP (Vtruncate_partial_width_windows)
               && !INTEGERP (Vtruncate_partial_width_windows))
      it->line_wrap = TRUNCATE;
  
    /* Get dimensions of truncation and continuation glyphs.  These are
 -     displayed as fringe bitmaps under X, so we don't need them for such
 -     frames.  */
 -  if (!FRAME_WINDOW_P (it->f))
 +     displayed as fringe bitmaps under X, but we need them for such
 +     frames when the fringes are turned off.  But leave the dimensions
 +     zero for tooltip frames, as these glyphs look ugly there and also
 +     sabotage calculations of tooltip dimensions in x-show-tip.  */
 +#ifdef HAVE_WINDOW_SYSTEM
 +  if (!(FRAME_WINDOW_P (it->f)
 +      && FRAMEP (tip_frame)
 +      && it->f == XFRAME (tip_frame)))
 +#endif
      {
        if (it->line_wrap == TRUNCATE)
        {
          /* We will need the truncation glyph.  */
 -        xassert (it->glyph_row == NULL);
 +        eassert (it->glyph_row == NULL);
          produce_special_glyphs (it, IT_TRUNCATION);
          it->truncation_pixel_width = it->pixel_width;
        }
        else
        {
          /* We will need the continuation glyph.  */
 -        xassert (it->glyph_row == NULL);
 +        eassert (it->glyph_row == NULL);
          produce_special_glyphs (it, IT_CONTINUATION);
          it->continuation_pixel_width = it->pixel_width;
        }
 -
 -      /* Reset these values to zero because the produce_special_glyphs
 -       above has changed them.  */
 -      it->pixel_width = it->ascent = it->descent = 0;
 -      it->phys_ascent = it->phys_descent = 0;
      }
  
 +  /* Reset these values to zero because the produce_special_glyphs
 +     above has changed them.  */
 +  it->pixel_width = it->ascent = it->descent = 0;
 +  it->phys_ascent = it->phys_descent = 0;
 +
    /* Set this after getting the dimensions of truncation and
       continuation glyphs, so that we don't produce glyphs when calling
       produce_special_glyphs, above.  */
      }
    else
      {
 -      it->first_visible_x
 -      = XFASTINT (it->w->hscroll) * FRAME_COLUMN_WIDTH (it->f);
 +      it->first_visible_x =
 +      window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f);
        it->last_visible_x = (it->first_visible_x
                            + window_box_width (w, TEXT_AREA));
  
 -      /* If we truncate lines, leave room for the truncator glyph(s) at
 +      /* If we truncate lines, leave room for the truncation glyph(s) at
         the right margin.  Otherwise, leave room for the continuation
 -       glyph(s).  Truncation and continuation glyphs are not inserted
 -       for window-based redisplay.  */
 -      if (!FRAME_WINDOW_P (it->f))
 +       glyph(s).  Done only if the window has no fringes.  Since we
 +       don't know at this point whether there will be any R2L lines in
 +       the window, we reserve space for truncation/continuation glyphs
 +       even if only one of the fringes is absent.  */
 +      if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0
 +        || (it->bidi_p && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0))
        {
          if (it->line_wrap == TRUNCATE)
            it->last_visible_x -= it->truncation_pixel_width;
@@@ -2953,10 -2890,7 +2953,10 @@@ start_display (struct it *it, struct wi
                  /* Or it fits exactly and we're on a window
                     system frame.  */
                  || (new_x == it->last_visible_x
 -                    && FRAME_WINDOW_P (it->f))))
 +                    && FRAME_WINDOW_P (it->f)
 +                    && ((it->bidi_p && it->bidi_it.paragraph_dir == R2L)
 +                        ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                        : WINDOW_RIGHT_FRINGE_WIDTH (it->w)))))
            {
              if ((it->current.dpvec_index >= 0
                   || it->current.overlay_string_index >= 0)
@@@ -3003,7 -2937,7 +3003,7 @@@ in_ellipses_for_invisible_text_p (struc
  {
    Lisp_Object prop, window;
    int ellipses_p = 0;
 -  EMACS_INT charpos = CHARPOS (pos->pos);
 +  ptrdiff_t 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
  static int
  init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
  {
 -  EMACS_INT charpos = CHARPOS (pos->pos), bytepos = BYTEPOS (pos->pos);
 +  ptrdiff_t 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
         pos->overlay_string_index is in IT->overlay_strings.  */
        if (pos->overlay_string_index >= OVERLAY_STRING_CHUNK_SIZE)
        {
 -        int n = pos->overlay_string_index / OVERLAY_STRING_CHUNK_SIZE;
 +        ptrdiff_t n = pos->overlay_string_index / OVERLAY_STRING_CHUNK_SIZE;
          it->current.overlay_string_index = 0;
          while (n--)
            {
        relative_index = (it->current.overlay_string_index
                        % OVERLAY_STRING_CHUNK_SIZE);
        it->string = it->overlay_strings[relative_index];
 -      xassert (STRINGP (it->string));
 +      eassert (STRINGP (it->string));
        it->current.string_pos = pos->string_pos;
        it->method = GET_FROM_STRING;
      }
         string.  This can only be a string from a `display' property.
         IT should already be filled with that string.  */
        it->current.string_pos = pos->string_pos;
 -      xassert (STRINGP (it->string));
 +      eassert (STRINGP (it->string));
      }
  
    /* Restore position in display vector translations, control
      {
        if (it->dpvec == NULL)
        get_next_display_element (it);
 -      xassert (it->dpvec && it->current.dpvec_index == 0);
 +      eassert (it->dpvec && it->current.dpvec_index == 0);
        it->current.dpvec_index = pos->dpvec_index;
      }
  
@@@ -3290,7 -3224,7 +3290,7 @@@ compute_stop_pos (struct it *it
  {
    register INTERVAL iv, next_iv;
    Lisp_Object object, limit, position;
 -  EMACS_INT charpos, bytepos;
 +  ptrdiff_t charpos, bytepos;
  
    if (STRINGP (it->string))
      {
      }
    else
      {
 -      EMACS_INT pos;
 +      ptrdiff_t pos;
  
        /* If end_charpos is out of range for some reason, such as a
         misbehaving display function, rationalize it (Bug#5984).  */
       interval if there isn't such an interval.  */
    position = make_number (charpos);
    iv = validate_interval_range (object, &position, &position, 0);
 -  if (!NULL_INTERVAL_P (iv))
 +  if (iv)
      {
        Lisp_Object values_here[LAST_PROP_IDX];
        struct props *p;
        /* Look for an interval following iv that has different
         properties.  */
        for (next_iv = next_interval (iv);
 -         (!NULL_INTERVAL_P (next_iv)
 +         (next_iv
            && (NILP (limit)
                || XFASTINT (limit) > next_iv->position));
           next_iv = next_interval (next_iv))
            break;
        }
  
 -      if (!NULL_INTERVAL_P (next_iv))
 +      if (next_iv)
        {
          if (INTEGERP (limit)
              && next_iv->position >= XFASTINT (limit))
  
    if (it->cmp_it.id < 0)
      {
 -      EMACS_INT stoppos = it->end_charpos;
 +      ptrdiff_t stoppos = it->end_charpos;
  
        if (it->bidi_p && it->bidi_it.scan_dir < 0)
        stoppos = -1;
                                    stoppos, it->string);
      }
  
 -  xassert (STRINGP (it->string)
 +  eassert (STRINGP (it->string)
           || (it->stop_charpos >= BEGV
               && it->stop_charpos >= IT_CHARPOS (*it)));
  }
     follows.  This is like `next-overlay-change' but doesn't use
     xmalloc.  */
  
 -static EMACS_INT
 -next_overlay_change (EMACS_INT pos)
 +static ptrdiff_t
 +next_overlay_change (ptrdiff_t pos)
  {
    ptrdiff_t i, noverlays;
 -  EMACS_INT endpos;
 +  ptrdiff_t endpos;
    Lisp_Object *overlays;
  
    /* Get all overlays at the given position.  */
    for (i = 0; i < noverlays; ++i)
      {
        Lisp_Object oend;
 -      EMACS_INT oendpos;
 +      ptrdiff_t oendpos;
  
        oend = OVERLAY_END (overlays[i]);
        oendpos = OVERLAY_POSITION (oend);
     strings, non-zero otherwise.  It is set to 2 if the display string
     uses any kind of `(space ...)' spec that will produce a stretch of
     white space in the text area.  */
 -EMACS_INT
 +ptrdiff_t
  compute_display_string_pos (struct text_pos *position,
                            struct bidi_string_data *string,
                            int frame_window_p, int *disp_prop)
      (string && STRINGP (string->lstring)) ? string->lstring : Qnil;
    Lisp_Object pos, spec, limpos;
    int string_p = (string && (STRINGP (string->lstring) || string->s));
 -  EMACS_INT eob = string_p ? string->schars : ZV;
 -  EMACS_INT begb = string_p ? 0 : BEGV;
 -  EMACS_INT bufpos, charpos = CHARPOS (*position);
 -  EMACS_INT lim =
 +  ptrdiff_t eob = string_p ? string->schars : ZV;
 +  ptrdiff_t begb = string_p ? 0 : BEGV;
 +  ptrdiff_t bufpos, charpos = CHARPOS (*position);
 +  ptrdiff_t lim =
      (charpos < eob - MAX_DISP_SCAN) ? charpos + MAX_DISP_SCAN : eob;
    struct text_pos tpos;
    int rv = 0;
     return -1.  A display string is either an overlay with `display'
     property whose value is a string or a `display' text property whose
     value is a string.  */
 -EMACS_INT
 -compute_display_string_end (EMACS_INT charpos, struct bidi_string_data *string)
 +ptrdiff_t
 +compute_display_string_end (ptrdiff_t charpos, struct bidi_string_data *string)
  {
    /* OBJECT = nil means current buffer.  */
    Lisp_Object object =
      (string && STRINGP (string->lstring)) ? string->lstring : Qnil;
    Lisp_Object pos = make_number (charpos);
 -  EMACS_INT eob =
 +  ptrdiff_t eob =
      (STRINGP (object) || (string && string->s)) ? string->schars : ZV;
  
    if (charpos >= eob || (string->s && !STRINGP (object)))
@@@ -3601,7 -3535,7 +3601,7 @@@ handle_fontified_prop (struct it *it
             no amount of fontifying will be able to change it.  */
          NILP (prop) && IT_CHARPOS (*it) < Z))
      {
 -      int count = SPECPDL_INDEX ();
 +      ptrdiff_t count = SPECPDL_INDEX ();
        Lisp_Object val;
        struct buffer *obuf = current_buffer;
        int begv = BEGV, zv = ZV;
        val = Vfontification_functions;
        specbind (Qfontification_functions, Qnil);
  
 -      xassert (it->end_charpos == ZV);
 +      eassert (it->end_charpos == ZV);
  
        if (!CONSP (val) || EQ (XCAR (val), Qlambda))
        safe_call1 (val, pos);
                }
        /* There isn't much we can reasonably do to protect against
                 misbehaving fontification, but here's a fig leaf.  */
 -      else if (!NILP (BVAR (obuf, name)))
 +      else if (BUFFER_LIVE_P (obuf))
                set_buffer_internal_1 (obuf);
  
        /* The fontification code may have added/removed text.
@@@ -3698,7 -3632,7 +3698,7 @@@ static enum prop_handle
  handle_face_prop (struct it *it)
  {
    int new_face_id;
 -  EMACS_INT next_stop;
 +  ptrdiff_t next_stop;
  
    if (!STRINGP (it->string))
      {
    else
      {
        int base_face_id;
 -      EMACS_INT bufpos;
 +      ptrdiff_t bufpos;
        int i;
        Lisp_Object from_overlay
        = (it->current.overlay_string_index >= 0
 -         ? it->string_overlays[it->current.overlay_string_index]
 +         ? it->string_overlays[it->current.overlay_string_index
 +                               % OVERLAY_STRING_CHUNK_SIZE]
           : Qnil);
  
        /* See if we got to this string directly or indirectly from
          {
            if (it->stack[i].current.overlay_string_index >= 0)
              from_overlay
 -              = it->string_overlays[it->stack[i].current.overlay_string_index];
 +              = it->string_overlays[it->stack[i].current.overlay_string_index
 +                                    % OVERLAY_STRING_CHUNK_SIZE];
            else if (! NILP (it->stack[i].from_overlay))
              from_overlay = it->stack[i].from_overlay;
  
@@@ -3842,7 -3774,7 +3842,7 @@@ underlying_face_id (struct it *it
  {
    int face_id = it->base_face_id, i;
  
 -  xassert (STRINGP (it->string));
 +  eassert (STRINGP (it->string));
  
    for (i = it->sp - 1; i >= 0; --i)
      if (NILP (it->stack[i].string))
@@@ -3861,15 -3793,15 +3861,15 @@@ static in
  face_before_or_after_it_pos (struct it *it, int before_p)
  {
    int face_id, limit;
 -  EMACS_INT next_check_charpos;
 +  ptrdiff_t next_check_charpos;
    struct it it_copy;
    void *it_copy_data = NULL;
  
 -  xassert (it->s == NULL);
 +  eassert (it->s == NULL);
  
    if (STRINGP (it->string))
      {
 -      EMACS_INT bufpos, charpos;
 +      ptrdiff_t bufpos, charpos;
        int base_face_id;
  
        /* No face change past the end of the string (for the case
              charpos = it_copy.bidi_it.charpos;
            }
        }
 -      xassert (0 <= charpos && charpos <= SCHARS (it->string));
 +      eassert (0 <= charpos && charpos <= SCHARS (it->string));
  
        if (it->current.overlay_string_index >= 0)
        bufpos = IT_CHARPOS (*it);
                            it_copy.bidi_it.charpos, it_copy.bidi_it.bytepos);
            }
        }
 -      xassert (BEGV <= CHARPOS (pos) && CHARPOS (pos) <= ZV);
 +      eassert (BEGV <= CHARPOS (pos) && CHARPOS (pos) <= ZV);
  
        /* Determine face for CHARSET_ASCII, or unibyte.  */
        face_id = face_at_buffer_position (it->w,
@@@ -4068,56 -4000,40 +4068,56 @@@ static enum prop_handle
  handle_invisible_prop (struct it *it)
  {
    enum prop_handled handled = HANDLED_NORMALLY;
 +  int invis_p;
 +  Lisp_Object prop;
  
    if (STRINGP (it->string))
      {
 -      Lisp_Object prop, end_charpos, limit, charpos;
 +      Lisp_Object end_charpos, limit, charpos;
  
        /* Get the value of the invisible text property at the
         current position.  Value will be nil if there is no such
         property.  */
        charpos = make_number (IT_STRING_CHARPOS (*it));
        prop = Fget_text_property (charpos, Qinvisible, it->string);
 +      invis_p = TEXT_PROP_MEANS_INVISIBLE (prop);
  
 -      if (!NILP (prop)
 -        && IT_STRING_CHARPOS (*it) < it->end_charpos)
 +      if (invis_p && IT_STRING_CHARPOS (*it) < it->end_charpos)
        {
 -        EMACS_INT endpos;
 +        /* Record whether we have to display an ellipsis for the
 +           invisible text.  */
 +        int display_ellipsis_p = (invis_p == 2);
 +        ptrdiff_t len, endpos;
  
          handled = HANDLED_RECOMPUTE_PROPS;
  
 -        /* Get the position at which the next change of the
 -           invisible text property can be found in IT->string.
 -           Value will be nil if the property value is the same for
 -           all the rest of IT->string.  */
 -        XSETINT (limit, SCHARS (it->string));
 -        end_charpos = Fnext_single_property_change (charpos, Qinvisible,
 -                                                    it->string, limit);
 -
 -        /* Text at current position is invisible.  The next
 -           change in the property is at position end_charpos.
 -           Move IT's current position to that position.  */
 -        if (INTEGERP (end_charpos)
 -            && (endpos = XFASTINT (end_charpos)) < XFASTINT (limit))
 +        /* Get the position at which the next visible text can be
 +           found in IT->string, if any.  */
 +        endpos = len = SCHARS (it->string);
 +        XSETINT (limit, len);
 +        do
 +          {
 +            end_charpos = Fnext_single_property_change (charpos, Qinvisible,
 +                                                        it->string, limit);
 +            if (INTEGERP (end_charpos))
 +              {
 +                endpos = XFASTINT (end_charpos);
 +                prop = Fget_text_property (end_charpos, Qinvisible, it->string);
 +                invis_p = TEXT_PROP_MEANS_INVISIBLE (prop);
 +                if (invis_p == 2)
 +                  display_ellipsis_p = 1;
 +              }
 +          }
 +        while (invis_p && endpos < len);
 +
 +        if (display_ellipsis_p)
 +          it->ellipsis_p = 1;
 +
 +        if (endpos < len)
            {
 +            /* Text at END_CHARPOS is visible.  Move IT there.  */
              struct text_pos old;
 -            EMACS_INT oldpos;
 +            ptrdiff_t oldpos;
  
              old = it->current.string_pos;
              oldpos = CHARPOS (old);
              /* The rest of the string is invisible.  If this is an
                 overlay string, proceed with the next overlay string
                 or whatever comes and return a character from there.  */
 -            if (it->current.overlay_string_index >= 0)
 +            if (it->current.overlay_string_index >= 0
 +                && !display_ellipsis_p)
                {
                  next_overlay_string (it);
                  /* Don't check for overlay strings when we just
      }
    else
      {
 -      int invis_p;
 -      EMACS_INT newpos, next_stop, start_charpos, tem;
 -      Lisp_Object pos, prop, overlay;
 +      ptrdiff_t newpos, next_stop, start_charpos, tem;
 +      Lisp_Object pos, overlay;
  
        /* First of all, is there invisible text at this position?  */
        tem = start_charpos = IT_CHARPOS (*it);
          /* The position newpos is now either ZV or on visible text.  */
          if (it->bidi_p)
            {
 -            EMACS_INT bpos = CHAR_TO_BYTE (newpos);
 +            ptrdiff_t bpos = CHAR_TO_BYTE (newpos);
              int on_newline =
                bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
              int after_newline =
@@@ -4408,7 -4324,7 +4408,7 @@@ handle_display_prop (struct it *it
  {
    Lisp_Object propval, object, overlay;
    struct text_pos *position;
 -  EMACS_INT bufpos;
 +  ptrdiff_t bufpos;
    /* Nonzero if some property replaces the display of the text itself.  */
    int display_replaced_p = 0;
  
  static int
  handle_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
                     Lisp_Object overlay, struct text_pos *position,
 -                   EMACS_INT bufpos, int frame_window_p)
 +                   ptrdiff_t bufpos, int frame_window_p)
  {
    int replacing_p = 0;
    int rv;
      }
    else if (VECTORP (spec))
      {
 -      int i;
 +      ptrdiff_t i;
        for (i = 0; i < ASIZE (spec); ++i)
        if ((rv = handle_single_display_spec (it, AREF (spec, i), object,
                                              overlay, position, bufpos,
@@@ -4580,7 -4496,7 +4580,7 @@@ display_prop_end (struct it *it, Lisp_O
  static int
  handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
                            Lisp_Object overlay, struct text_pos *position,
 -                          EMACS_INT bufpos, int display_replaced_p,
 +                          ptrdiff_t bufpos, int display_replaced_p,
                            int frame_window_p)
  {
    Lisp_Object form;
  
    if (!NILP (form) && !EQ (form, Qt))
      {
 -      int count = SPECPDL_INDEX ();
 +      ptrdiff_t count = SPECPDL_INDEX ();
        struct gcpro gcpro1;
  
        /* Bind `object' to the object having the `display' property, a
                  && (EQ (XCAR (it->font_height), Qplus)
                      || EQ (XCAR (it->font_height), Qminus))
                  && CONSP (XCDR (it->font_height))
 -                && INTEGERP (XCAR (XCDR (it->font_height))))
 +                && RANGED_INTEGERP (0, XCAR (XCDR (it->font_height)), INT_MAX))
                {
                  /* `(+ N)' or `(- N)' where N is an integer.  */
                  int steps = XINT (XCAR (XCDR (it->font_height)));
                {
                  /* Evaluate IT->font_height with `height' bound to the
                     current specified height to get the new height.  */
 -                int count = SPECPDL_INDEX ();
 +                ptrdiff_t count = SPECPDL_INDEX ();
  
                  specbind (Qheight, face->lface[LFACE_HEIGHT_INDEX]);
                  value = safe_eval (it->font_height);
  
  int
  display_prop_intangible_p (Lisp_Object prop, Lisp_Object overlay,
 -                         EMACS_INT charpos, EMACS_INT bytepos)
 +                         ptrdiff_t charpos, ptrdiff_t bytepos)
  {
    int frame_window_p = FRAME_WINDOW_P (XFRAME (selected_frame));
    struct text_pos position;
@@@ -5106,7 -5022,7 +5106,7 @@@ display_prop_string_p (Lisp_Object prop
    else if (VECTORP (prop))
      {
        /* A vector of sub-properties.  */
 -      int i;
 +      ptrdiff_t i;
        for (i = 0; i < ASIZE (prop); ++i)
        if (single_display_spec_string_p (AREF (prop, i), string))
          return 1;
     This function may only use code that doesn't eval because it is
     called asynchronously from note_mouse_highlight.  */
  
 -static EMACS_INT
 +static ptrdiff_t
  string_buffer_position_lim (Lisp_Object string,
 -                          EMACS_INT from, EMACS_INT to, int back_p)
 +                          ptrdiff_t from, ptrdiff_t to, int back_p)
  {
    Lisp_Object limit, prop, pos;
    int found = 0;
     This function may only use code that doesn't eval because it is
     called asynchronously from note_mouse_highlight.  */
  
 -static EMACS_INT
 -string_buffer_position (Lisp_Object string, EMACS_INT around_charpos)
 +static ptrdiff_t
 +string_buffer_position (Lisp_Object string, ptrdiff_t around_charpos)
  {
    const int MAX_DISTANCE = 1000;
 -  EMACS_INT found = string_buffer_position_lim (string, around_charpos,
 +  ptrdiff_t found = string_buffer_position_lim (string, around_charpos,
                                                around_charpos + MAX_DISTANCE,
                                                0);
  
@@@ -5202,7 -5118,7 +5202,7 @@@ static enum prop_handle
  handle_composition_prop (struct it *it)
  {
    Lisp_Object prop, string;
 -  EMACS_INT pos, pos_byte, start, end;
 +  ptrdiff_t pos, pos_byte, start, end;
  
    if (STRINGP (it->string))
      {
@@@ -5268,7 -5184,7 +5268,7 @@@ struct overlay_entr
  {
    Lisp_Object overlay;
    Lisp_Object string;
 -  int priority;
 +  EMACS_INT priority;
    int after_string_p;
  };
  
@@@ -5305,7 -5221,7 +5305,7 @@@ next_overlay_string (struct it *it
  
        it->ellipsis_p = (it->stack[it->sp - 1].display_ellipsis_p != 0);
        pop_it (it);
 -      xassert (it->sp > 0
 +      eassert (it->sp > 0
               || (NILP (it->string)
                   && it->method == GET_FROM_BUFFER
                   && it->stop_charpos >= BEGV
@@@ -5400,17 -5316,12 +5400,17 @@@ compare_overlay_entries (const void *e1
        else
        result = entry1->after_string_p ? -1 : 1;
      }
 -  else if (entry1->after_string_p)
 -    /* After-strings sorted in order of decreasing priority.  */
 -    result = entry2->priority - entry1->priority;
 +  else if (entry1->priority != entry2->priority)
 +    {
 +      if (entry1->after_string_p)
 +      /* After-strings sorted in order of decreasing priority.  */
 +      result = entry2->priority < entry1->priority ? -1 : 1;
 +      else
 +      /* Before-strings sorted in order of increasing priority.  */
 +      result = entry1->priority < entry2->priority ? -1 : 1;
 +    }
    else
 -    /* Before-strings sorted in order of increasing priority.  */
 -    result = entry1->priority - entry2->priority;
 +    result = 0;
  
    return result;
  }
     compare_overlay_entries.  */
  
  static void
 -load_overlay_strings (struct it *it, EMACS_INT charpos)
 +load_overlay_strings (struct it *it, ptrdiff_t charpos)
  {
    Lisp_Object overlay, window, str, invisible;
    struct Lisp_Overlay *ov;
 -  EMACS_INT start, end;
 -  int size = 20;
 -  int n = 0, i, j, invis_p;
 -  struct overlay_entry *entries
 -    = (struct overlay_entry *) alloca (size * sizeof *entries);
 +  ptrdiff_t start, end;
 +  ptrdiff_t size = 20;
 +  ptrdiff_t n = 0, i, j;
 +  int invis_p;
 +  struct overlay_entry *entries = alloca (size * sizeof *entries);
 +  USE_SAFE_ALLOCA;
  
    if (charpos <= 0)
      charpos = IT_CHARPOS (*it);
                                                                        \
        if (n == size)                                                  \
        {                                                               \
 -        int new_size = 2 * size;                                      \
          struct overlay_entry *old = entries;                          \
 -        entries =                                                     \
 -            (struct overlay_entry *) alloca (new_size                 \
 -                                           * sizeof *entries);        \
 +        SAFE_NALLOCA (entries, 2, size);                              \
          memcpy (entries, old, size * sizeof *entries);                \
 -        size = new_size;                                              \
 +        size *= 2;                                                    \
        }                                                               \
                                                                        \
        entries[n].string = (STRING);                                   \
    for (ov = current_buffer->overlays_before; ov; ov = ov->next)
      {
        XSETMISC (overlay, ov);
 -      xassert (OVERLAYP (overlay));
 +      eassert (OVERLAYP (overlay));
        start = OVERLAY_POSITION (OVERLAY_START (overlay));
        end = OVERLAY_POSITION (OVERLAY_END (overlay));
  
    for (ov = current_buffer->overlays_after; ov; ov = ov->next)
      {
        XSETMISC (overlay, ov);
 -      xassert (OVERLAYP (overlay));
 +      eassert (OVERLAYP (overlay));
        start = OVERLAY_POSITION (OVERLAY_START (overlay));
        end = OVERLAY_POSITION (OVERLAY_END (overlay));
  
      }
  
    CHECK_IT (it);
 +  SAFE_FREE ();
  }
  
  
     least one overlay string was found.  */
  
  static int
 -get_overlay_strings_1 (struct it *it, EMACS_INT charpos, int compute_stop_p)
 +get_overlay_strings_1 (struct it *it, ptrdiff_t 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
         strings.  */
        if (compute_stop_p)
        compute_stop_pos (it);
 -      xassert (it->face_id >= 0);
 +      eassert (it->face_id >= 0);
  
        /* Save IT's settings.  They are restored after all overlay
         strings have been processed.  */
 -      xassert (!compute_stop_p || it->sp == 0);
 +      eassert (!compute_stop_p || it->sp == 0);
  
        /* When called from handle_stop, there might be an empty display
           string loaded.  In that case, don't bother saving it.  But
        it->string = it->overlay_strings[0];
        it->from_overlay = Qnil;
        it->stop_charpos = 0;
 -      xassert (STRINGP (it->string));
 +      eassert (STRINGP (it->string));
        it->end_charpos = SCHARS (it->string);
        it->prev_stop = 0;
        it->base_level_stop = 0;
        /* Set up the bidi iterator for this overlay string.  */
        if (it->bidi_p)
        {
 -        EMACS_INT pos = (charpos > 0 ? charpos : IT_CHARPOS (*it));
 +        ptrdiff_t pos = (charpos > 0 ? charpos : IT_CHARPOS (*it));
  
          it->bidi_it.string.lstring = it->string;
          it->bidi_it.string.s = NULL;
  }
  
  static int
 -get_overlay_strings (struct it *it, EMACS_INT charpos)
 +get_overlay_strings (struct it *it, ptrdiff_t charpos)
  {
    it->string = Qnil;
    it->method = GET_FROM_BUFFER;
@@@ -5703,14 -5615,14 +5703,14 @@@ push_it (struct it *it, struct text_po
  {
    struct iterator_stack_entry *p;
  
 -  xassert (it->sp < IT_STACK_SIZE);
 +  eassert (it->sp < IT_STACK_SIZE);
    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);
 +  eassert (it->face_id >= 0);
    p->face_id = it->face_id;
    p->string = it->string;
    p->method = it->method;
@@@ -5754,10 -5666,10 +5754,10 @@@ static voi
  iterate_out_of_display_property (struct it *it)
  {
    int buffer_p = !STRINGP (it->string);
 -  EMACS_INT eob = (buffer_p ? ZV : it->end_charpos);
 -  EMACS_INT bob = (buffer_p ? BEGV : 0);
 +  ptrdiff_t eob = (buffer_p ? ZV : it->end_charpos);
 +  ptrdiff_t bob = (buffer_p ? BEGV : 0);
  
 -  xassert (eob >= CHARPOS (it->position) && CHARPOS (it->position) >= bob);
 +  eassert (eob >= CHARPOS (it->position) && CHARPOS (it->position) >= bob);
  
    /* Maybe initialize paragraph direction.  If we are at the beginning
       of a new paragraph, next_element_from_buffer may not have a
@@@ -5796,7 -5708,7 +5796,7 @@@ pop_it (struct it *it
    struct iterator_stack_entry *p;
    int from_display_prop = it->from_disp_prop_p;
  
 -  xassert (it->sp > 0);
 +  eassert (it->sp > 0);
    --it->sp;
    p = it->stack + it->sp;
    it->stop_charpos = p->stop_charpos;
          && (it->method == GET_FROM_BUFFER || it->method == GET_FROM_STRING))
        iterate_out_of_display_property (it);
  
 -      xassert ((BUFFERP (it->object)
 +      eassert ((BUFFERP (it->object)
                && IT_CHARPOS (*it) == it->bidi_it.charpos
                && IT_BYTEPOS (*it) == it->bidi_it.bytepos)
               || (STRINGP (it->object)
@@@ -5917,7 -5829,7 +5917,7 @@@ static in
  forward_to_next_line_start (struct it *it, int *skipped_p,
                            struct bidi_it *bidi_it_prev)
  {
 -  EMACS_INT old_selective;
 +  ptrdiff_t old_selective;
    int newline_found_p, n;
    const int MAX_NEWLINE_DISTANCE = 500;
  
       short-cut.  */
    if (!newline_found_p)
      {
 -      EMACS_INT start = IT_CHARPOS (*it);
 -      EMACS_INT limit = find_next_newline_no_quit (start, 1);
 +      ptrdiff_t start = IT_CHARPOS (*it);
 +      ptrdiff_t limit = find_next_newline_no_quit (start, 1);
        Lisp_Object pos;
  
 -      xassert (!STRINGP (it->string));
 +      eassert (!STRINGP (it->string));
  
        /* If there isn't any `display' property in sight, and no
         overlays, we can just use the position of the newline in
@@@ -6047,7 -5959,7 +6047,7 @@@ back_to_previous_visible_line_start (st
        {
        Lisp_Object prop;
        prop = Fget_char_property (make_number (IT_CHARPOS (*it) - 1),
 -                                   Qinvisible, it->window);
 +                                 Qinvisible, it->window);
        if (TEXT_PROP_MEANS_INVISIBLE (prop))
          continue;
        }
        {
        struct it it2;
        void *it2data = NULL;
 -      EMACS_INT pos;
 -      EMACS_INT beg, end;
 +      ptrdiff_t pos;
 +      ptrdiff_t beg, end;
        Lisp_Object val, overlay;
  
        SAVE_IT (it2, *it, it2data);
  
    it->continuation_lines_width = 0;
  
 -  xassert (IT_CHARPOS (*it) >= BEGV);
 -  xassert (IT_CHARPOS (*it) == BEGV
 +  eassert (IT_CHARPOS (*it) >= BEGV);
 +  eassert (IT_CHARPOS (*it) == BEGV
           || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
    CHECK_IT (it);
  }
@@@ -6145,7 -6057,7 +6145,7 @@@ reseat_at_next_visible_line_start (stru
           && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it),
                                 it->selective))
        {
 -      xassert (IT_BYTEPOS (*it) == BEGV
 +      eassert (IT_BYTEPOS (*it) == BEGV
                 || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
        newline_found_p =
          forward_to_next_line_start (it, &skipped_p, &bidi_it_prev);
  static void
  reseat (struct it *it, struct text_pos pos, int force_p)
  {
 -  EMACS_INT original_pos = IT_CHARPOS (*it);
 +  ptrdiff_t original_pos = IT_CHARPOS (*it);
  
    reseat_1 (it, pos, 0);
  
@@@ -6259,10 -6171,10 +6259,10 @@@ static voi
  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);
 +  eassert (it->s == NULL);
  
    /* POS must be a reasonable value.  */
 -  xassert (CHARPOS (pos) >= BEGV && CHARPOS (pos) <= ZV);
 +  eassert (CHARPOS (pos) >= BEGV && CHARPOS (pos) <= ZV);
  
    it->current.pos = it->position = pos;
    it->end_charpos = ZV;
  
  static void
  reseat_to_string (struct it *it, const char *s, Lisp_Object string,
 -                EMACS_INT charpos, EMACS_INT precision, int field_width,
 +                ptrdiff_t charpos, ptrdiff_t precision, int field_width,
                  int multibyte)
  {
    /* No region in strings.  */
    memset (&it->current, 0, sizeof it->current);
    it->current.overlay_string_index = -1;
    it->current.dpvec_index = -1;
 -  xassert (charpos >= 0);
 +  eassert (charpos >= 0);
  
    /* If STRING is specified, use its multibyteness, otherwise use the
       setting of MULTIBYTE, if specified.  */
  
    if (s == NULL)
      {
 -      xassert (STRINGP (string));
 +      eassert (STRINGP (string));
        it->string = string;
        it->s = NULL;
        it->end_charpos = it->string_nchars = SCHARS (string);
      }
    if (s == NULL && it->multibyte_p)
      {
 -      EMACS_INT endpos = SCHARS (it->string);
 +      ptrdiff_t endpos = SCHARS (it->string);
        if (endpos > it->end_charpos)
        endpos = it->end_charpos;
        composition_compute_stop_pos (&it->cmp_it, charpos, -1, endpos,
@@@ -6548,11 -6460,11 +6548,11 @@@ lookup_glyphless_char_display (int c, s
     end of buffer (or C string) is reached.  */
  
  static struct frame *last_escape_glyph_frame = NULL;
 -static unsigned last_escape_glyph_face_id = (1 << FACE_ID_BITS);
 +static int 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_face_id = (1 << FACE_ID_BITS);
  int last_glyphless_glyph_merged_face_id = 0;
  
  static int
@@@ -6595,7 -6507,7 +6595,7 @@@ get_next_display_element (struct it *it
  
          if (! it->multibyte_p && ! ASCII_CHAR_P (c))
            {
 -            xassert (SINGLE_BYTE_CHAR_P (c));
 +            eassert (SINGLE_BYTE_CHAR_P (c));
              if (unibyte_display_via_language_environment)
                {
                  c = DECODE_CHAR (unibyte, c);
              Lisp_Object gc;
              int ctl_len;
              int face_id;
 -            EMACS_INT lface_id = 0;
 +            int lface_id = 0;
              int escape_glyph;
  
              /* Handle control characters with ^.  */
                  g = '^';           /* default glyph for Control */
                  /* Set IT->ctl_chars[0] to the glyph for `^'.  */
                  if (it->dp
 -                    && (gc = DISP_CTRL_GLYPH (it->dp), GLYPH_CODE_P (gc))
 -                    && GLYPH_CODE_CHAR_VALID_P (gc))
 +                    && (gc = DISP_CTRL_GLYPH (it->dp), GLYPH_CODE_P (gc)))
                    {
                      g = GLYPH_CODE_CHAR (gc);
                      lface_id = GLYPH_CODE_FACE (gc);
              escape_glyph = '\\';
  
              if (it->dp
 -                && (gc = DISP_ESCAPE_GLYPH (it->dp), GLYPH_CODE_P (gc))
 -                && GLYPH_CODE_CHAR_VALID_P (gc))
 +                && (gc = DISP_ESCAPE_GLYPH (it->dp), GLYPH_CODE_P (gc)))
                {
                  escape_glyph = GLYPH_CODE_CHAR (gc);
                  lface_id = GLYPH_CODE_FACE (gc);
        }
        else
        {
 -        EMACS_INT pos = (it->s ? -1
 +        ptrdiff_t pos = (it->s ? -1
                     : STRINGP (it->string) ? IT_STRING_CHARPOS (*it)
                     : IT_CHARPOS (*it));
          int c;
                       && (it->current.overlay_string_index
                           == it->n_overlay_strings - 1))
                {
 -                EMACS_INT ignore;
 +                ptrdiff_t ignore;
                  int next_face_id;
                  struct text_pos pos = it->current.pos;
                  INC_TEXT_POS (pos, it->multibyte_p);
@@@ -7008,7 -6922,7 +7008,7 @@@ set_iterator_to_next (struct it *it, in
                {
                  /* No more grapheme clusters in this composition.
                     Find the next stop position.  */
 -                EMACS_INT stop = it->end_charpos;
 +                ptrdiff_t stop = it->end_charpos;
                  if (it->bidi_it.scan_dir < 0)
                    /* Now we are scanning backward and don't know
                       where to stop.  */
                {
                  /* No more grapheme clusters in this composition.
                     Find the next stop position.  */
 -                EMACS_INT stop = it->end_charpos;
 +                ptrdiff_t stop = it->end_charpos;
                  if (it->bidi_it.scan_dir < 0)
                    /* Now we are scanning backward and don't know
                       where to stop.  */
        }
        else
        {
 -        xassert (it->len != 0);
 +        eassert (it->len != 0);
  
          if (!it->bidi_p)
            {
                {
                  /* As the scan direction was changed, we must
                     re-compute the stop position for composition.  */
 -                EMACS_INT stop = it->end_charpos;
 +                ptrdiff_t 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)));
 +        eassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it)));
        }
        break;
  
  
      case GET_FROM_STRING:
        /* Current display element is a character from a Lisp string.  */
 -      xassert (it->s == NULL && STRINGP (it->string));
 +      eassert (it->s == NULL && STRINGP (it->string));
        /* Don't advance past string end.  These conditions are true
         when set_iterator_to_next is called at the end of
         get_next_display_element, in which case the Lisp string is
                it->cmp_it.from = it->cmp_it.to;
              else
                {
 -                EMACS_INT stop = it->end_charpos;
 +                ptrdiff_t stop = it->end_charpos;
                  if (it->bidi_it.scan_dir < 0)
                    stop = -1;
                  composition_compute_stop_pos (&it->cmp_it,
                it->cmp_it.to = it->cmp_it.from;
              else
                {
 -                EMACS_INT stop = it->end_charpos;
 +                ptrdiff_t stop = it->end_charpos;
                  if (it->bidi_it.scan_dir < 0)
                    stop = -1;
                  composition_compute_stop_pos (&it->cmp_it,
              IT_STRING_CHARPOS (*it) = it->bidi_it.charpos;
              if (prev_scan_dir != it->bidi_it.scan_dir)
                {
 -                EMACS_INT stop = it->end_charpos;
 +                ptrdiff_t stop = it->end_charpos;
  
                  if (it->bidi_it.scan_dir < 0)
                    stop = -1;
        /* The position etc with which we have to proceed are on
         the stack.  The position may be at the end of a string,
           if the `display' property takes up the whole string.  */
 -      xassert (it->sp > 0);
 +      eassert (it->sp > 0);
        pop_it (it);
        if (it->method == GET_FROM_STRING)
        goto consider_string_end;
  
      default:
        /* There are no other methods defined, so this should be a bug.  */
 -      abort ();
 +      emacs_abort ();
      }
  
 -  xassert (it->method != GET_FROM_STRING
 +  eassert (it->method != GET_FROM_STRING
           || (STRINGP (it->string)
               && IT_STRING_CHARPOS (*it) >= 0));
  }
@@@ -7328,7 -7242,7 +7328,7 @@@ next_element_from_display_vector (struc
    Lisp_Object gc;
  
    /* Precondition.  */
 -  xassert (it->dpvec && it->current.dpvec_index >= 0);
 +  eassert (it->dpvec && it->current.dpvec_index >= 0);
  
    it->face_id = it->saved_face_id;
  
       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))
 +  if (GLYPH_CODE_P (gc))
      {
        it->c = GLYPH_CODE_CHAR (gc);
        it->len = CHAR_BYTES (it->c);
        it->face_id = it->dpvec_face_id;
        else
        {
 -        EMACS_INT lface_id = GLYPH_CODE_FACE (gc);
 +        int lface_id = GLYPH_CODE_FACE (gc);
          if (lface_id > 0)
            it->face_id = merge_faces (it->f, Qt, lface_id,
                                       it->saved_face_id);
@@@ -7371,8 -7285,8 +7371,8 @@@ static voi
  get_visually_first_element (struct it *it)
  {
    int string_p = STRINGP (it->string) || it->s;
 -  EMACS_INT eob = (string_p ? it->bidi_it.string.schars : ZV);
 -  EMACS_INT bob = (string_p ? 0 : BEGV);
 +  ptrdiff_t eob = (string_p ? it->bidi_it.string.schars : ZV);
 +  ptrdiff_t bob = (string_p ? 0 : BEGV);
  
    if (STRINGP (it->string))
      {
      }
    else
      {
 -      EMACS_INT orig_bytepos = it->bidi_it.bytepos;
 +      ptrdiff_t orig_bytepos = it->bidi_it.bytepos;
  
        /* We need to prime the bidi iterator starting at the line's or
         string's beginning, before we will be able to produce the
  
    if (STRINGP (it->string) || !it->s)
      {
 -      EMACS_INT stop, charpos, bytepos;
 +      ptrdiff_t stop, charpos, bytepos;
  
        if (STRINGP (it->string))
        {
 -        xassert (!it->s);
 +        eassert (!it->s);
          stop = SCHARS (it->string);
          if (stop > it->end_charpos)
            stop = it->end_charpos;
@@@ -7476,9 -7390,9 +7476,9 @@@ next_element_from_string (struct it *it
  {
    struct text_pos position;
  
 -  xassert (STRINGP (it->string));
 -  xassert (!it->bidi_p || EQ (it->string, it->bidi_it.string.lstring));
 -  xassert (IT_STRING_CHARPOS (*it) >= 0);
 +  eassert (STRINGP (it->string));
 +  eassert (!it->bidi_p || EQ (it->string, it->bidi_it.string.lstring));
 +  eassert (IT_STRING_CHARPOS (*it) >= 0);
    position = it->current.string_pos;
  
    /* With bidi reordering, the character to display might not be the
@@@ -7642,8 -7556,8 +7642,8 @@@ next_element_from_c_string (struct it *
  {
    int success_p = 1;
  
 -  xassert (it->s);
 -  xassert (!it->bidi_p || it->s == it->bidi_it.string.s);
 +  eassert (it->s);
 +  eassert (!it->bidi_p || it->s == it->bidi_it.string.s);
    it->what = IT_CHARACTER;
    BYTEPOS (it->position) = CHARPOS (it->position) = 0;
    it->object = Qnil;
@@@ -7743,24 -7657,24 +7743,24 @@@ compute_stop_pos_backwards (struct it *
    struct text_pos pos;
    struct display_pos save_current = it->current;
    struct text_pos save_position = it->position;
 -  EMACS_INT charpos = IT_CHARPOS (*it);
 -  EMACS_INT where_we_are = charpos;
 -  EMACS_INT save_stop_pos = it->stop_charpos;
 -  EMACS_INT save_end_pos = it->end_charpos;
 +  ptrdiff_t charpos = IT_CHARPOS (*it);
 +  ptrdiff_t where_we_are = charpos;
 +  ptrdiff_t save_stop_pos = it->stop_charpos;
 +  ptrdiff_t save_end_pos = it->end_charpos;
  
 -  xassert (NILP (it->string) && !it->s);
 -  xassert (it->bidi_p);
 +  eassert (NILP (it->string) && !it->s);
 +  eassert (it->bidi_p);
    it->bidi_p = 0;
    do
      {
        it->end_charpos = min (charpos + 1, ZV);
        charpos = max (charpos - SCAN_BACK_LIMIT, BEGV);
-       SET_TEXT_POS (pos, charpos, BYTE_TO_CHAR (charpos));
+       SET_TEXT_POS (pos, charpos, CHAR_TO_BYTE (charpos));
        reseat_1 (it, pos, 0);
        compute_stop_pos (it);
        /* We must advance forward, right?  */
        if (it->stop_charpos <= charpos)
 -      abort ();
 +      emacs_abort ();
      }
    while (charpos > BEGV && it->stop_charpos >= it->end_charpos);
  
     position.  */
  
  static void
 -handle_stop_backwards (struct it *it, EMACS_INT charpos)
 +handle_stop_backwards (struct it *it, ptrdiff_t charpos)
  {
    int bufp = !STRINGP (it->string);
 -  EMACS_INT where_we_are = (bufp ? IT_CHARPOS (*it) : IT_STRING_CHARPOS (*it));
 +  ptrdiff_t where_we_are = (bufp ? IT_CHARPOS (*it) : IT_STRING_CHARPOS (*it));
    struct display_pos save_current = it->current;
    struct text_pos save_position = it->position;
    struct text_pos pos1;
 -  EMACS_INT next_stop;
 +  ptrdiff_t next_stop;
  
    /* Scan in strict logical order.  */
 -  xassert (it->bidi_p);
 +  eassert (it->bidi_p);
    it->bidi_p = 0;
    do
      {
        compute_stop_pos (it);
        /* We must advance forward, right?  */
        if (it->stop_charpos <= it->prev_stop)
 -      abort ();
 +      emacs_abort ();
        charpos = it->stop_charpos;
      }
    while (charpos <= where_we_are);
@@@ -7833,9 -7747,9 +7833,9 @@@ next_element_from_buffer (struct it *it
  {
    int success_p = 1;
  
 -  xassert (IT_CHARPOS (*it) >= BEGV);
 -  xassert (NILP (it->string) && !it->s);
 -  xassert (!it->bidi_p
 +  eassert (IT_CHARPOS (*it) >= BEGV);
 +  eassert (NILP (it->string) && !it->s);
 +  eassert (!it->bidi_p
           || (EQ (it->bidi_it.string.lstring, Qnil)
               && it->bidi_it.string.s == NULL));
  
        /* No face changes, overlays etc. in sight, so just return a
         character from current_buffer.  */
        unsigned char *p;
 -      EMACS_INT stop;
 +      ptrdiff_t stop;
  
        /* Maybe run the redisplay end trigger hook.  Performance note:
         This doesn't seem to cost measurable time.  */
      }
  
    /* Value is zero if end of buffer reached.  */
 -  xassert (!success_p || it->what != IT_CHARACTER || it->len > 0);
 +  eassert (!success_p || it->what != IT_CHARACTER || it->len > 0);
    return success_p;
  }
  
@@@ -8008,7 -7922,7 +8008,7 @@@ run_redisplay_end_trigger_hook (struct 
  
    /* IT->glyph_row should be non-null, i.e. we should be actually
       displaying something, or otherwise we should not run the hook.  */
 -  xassert (it->glyph_row);
 +  eassert (it->glyph_row);
  
    /* Set up hook arguments.  */
    args[0] = Qredisplay_end_trigger_functions;
  
    /* Since we are *trying* to run these functions, don't try to run
       them again, even if they get an error.  */
 -  it->w->redisplay_end_trigger = Qnil;
 +  wset_redisplay_end_trigger (it->w, Qnil);
    Frun_hook_with_args (3, args);
  
    /* Notice if it changed the face of the character we are on.  */
@@@ -8124,7 -8038,7 +8124,7 @@@ next_element_from_composition (struct i
  
  static enum move_it_result
  move_it_in_display_line_to (struct it *it,
 -                          EMACS_INT to_charpos, int to_x,
 +                          ptrdiff_t to_charpos, int to_x,
                            enum move_operation_enum op)
  {
    enum move_it_result result = MOVE_UNDEFINED;
    void *ppos_data = NULL;
    int may_wrap = 0;
    enum it_method prev_method = it->method;
 -  EMACS_INT prev_pos = IT_CHARPOS (*it);
 +  ptrdiff_t prev_pos = IT_CHARPOS (*it);
    int saw_smaller_pos = prev_pos < to_charpos;
  
    /* Don't produce glyphs in produce_glyphs.  */
                      /* Or it fits exactly and we're on a window
                         system frame.  */
                      || (new_x == it->last_visible_x
 -                        && FRAME_WINDOW_P (it->f))))
 +                        && FRAME_WINDOW_P (it->f)
 +                        && ((it->bidi_p && it->bidi_it.paragraph_dir == R2L)
 +                            ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                            : WINDOW_RIGHT_FRINGE_WIDTH (it->w)))))
                {
                  if (/* IT->hpos == 0 means the very first glyph
                         doesn't fit on the line, e.g. a wide image.  */
                          /* On graphical terminals, newlines may
                             "overflow" into the fringe if
                             overflow-newline-into-fringe is non-nil.
 -                           On text-only terminals, newlines may
 -                           overflow into the last glyph on the
 +                           On text terminals, and on graphical
 +                           terminals with no right margin, newlines
 +                           may overflow into the last glyph on the
                             display line.*/
                          if (!FRAME_WINDOW_P (it->f)
 +                            || ((it->bidi_p
 +                                 && it->bidi_it.paragraph_dir == R2L)
 +                                ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                                : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0
                              || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
                            {
                              if (!get_next_display_element (it))
             necessary here because of lines consisting of a line end,
             only.  The line end will not produce any glyphs and we
             would never get MOVE_X_REACHED.  */
 -        xassert (it->nglyphs == 0);
 +        eassert (it->nglyphs == 0);
          result = MOVE_X_REACHED;
          break;
        }
          && it->current_x >= it->last_visible_x)
        {
          if (!FRAME_WINDOW_P (it->f)
 +            || ((it->bidi_p && it->bidi_it.paragraph_dir == R2L)
 +                ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0
              || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
            {
              int at_eob_p = 0;
  /* For external use.  */
  void
  move_it_in_display_line (struct it *it,
 -                       EMACS_INT to_charpos, int to_x,
 +                       ptrdiff_t to_charpos, int to_x,
                         enum move_operation_enum op)
  {
    if (it->line_wrap == WORD_WRAP
     displayed to the right of TO_CHARPOS on the screen.  */
  
  void
 -move_it_to (struct it *it, EMACS_INT to_charpos, int to_x, int to_y, int to_vpos, int op)
 +move_it_to (struct it *it, ptrdiff_t 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;
          break;
  
        default:
 -        abort ();
 +        emacs_abort ();
        }
  
        /* Reset/increment for the next run.  */
@@@ -8959,10 -8862,10 +8959,10 @@@ move_it_vertically_backward (struct it 
    int nlines, h;
    struct it it2, it3;
    void *it2data = NULL, *it3data = NULL;
 -  EMACS_INT start_pos;
 +  ptrdiff_t start_pos;
  
   move_further_back:
 -  xassert (dy >= 0);
 +  eassert (dy >= 0);
  
    start_pos = IT_CHARPOS (*it);
  
           || (it2.method == GET_FROM_STRING
               && IT_CHARPOS (it2) == start_pos
               && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
 -  xassert (IT_CHARPOS (*it) >= BEGV);
 +  eassert (IT_CHARPOS (*it) >= BEGV);
    SAVE_IT (it3, it2, it3data);
  
    move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS);
 -  xassert (IT_CHARPOS (*it) >= BEGV);
 +  eassert (IT_CHARPOS (*it) >= BEGV);
    /* H is the actual vertical distance from the position in *IT
       and the starting position.  */
    h = it2.current_y - it->current_y;
          && IT_CHARPOS (*it) > BEGV
          && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n')
        {
 -        EMACS_INT nl_pos =
 +        ptrdiff_t nl_pos =
            find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1);
  
          move_it_to (it, nl_pos, -1, -1, -1, MOVE_TO_POS);
@@@ -9151,7 -9054,7 +9151,7 @@@ move_it_past_eol (struct it *it
     truncate-lines nil.  */
  
  void
 -move_it_by_lines (struct it *it, int dvpos)
 +move_it_by_lines (struct it *it, ptrdiff_t dvpos)
  {
  
    /* The commented-out optimization uses vmotion on terminals.  This
      {
        struct it it2;
        void *it2data = NULL;
 -      EMACS_INT start_charpos, i;
 +      ptrdiff_t start_charpos, i;
  
        /* Start at the beginning of the screen line containing IT's
         position.  This may actually move vertically backwards,
@@@ -9286,10 -9189,16 +9286,10 @@@ add_to_log (const char *format, Lisp_Ob
    Lisp_Object args[3];
    Lisp_Object msg, fmt;
    char *buffer;
 -  EMACS_INT len;
 +  ptrdiff_t len;
    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
    USE_SAFE_ALLOCA;
  
 -  /* Do nothing if called asynchronously.  Inserting text into
 -     a buffer may call after-change-functions and alike and
 -     that would means running Lisp asynchronously.  */
 -  if (handling_signal)
 -    return;
 -
    fmt = msg = Qnil;
    GCPRO4 (fmt, msg, arg1, arg2);
  
    msg = Fformat (3, args);
  
    len = SBYTES (msg) + 1;
 -  SAFE_ALLOCA (buffer, char *, len);
 +  buffer = SAFE_ALLOCA (len);
    memcpy (buffer, SDATA (msg), len);
  
    message_dolog (buffer, len - 1, 1, 0);
@@@ -9329,7 -9238,7 +9329,7 @@@ message_log_maybe_newline (void
     so the buffer M must NOT point to a Lisp string.  */
  
  void
 -message_dolog (const char *m, EMACS_INT nbytes, int nlflag, int multibyte)
 +message_dolog (const char *m, ptrdiff_t nbytes, int nlflag, int multibyte)
  {
    const unsigned char *msg = (const unsigned char *) m;
  
        struct buffer *oldbuf;
        Lisp_Object oldpoint, oldbegv, oldzv;
        int old_windows_or_buffers_changed = windows_or_buffers_changed;
 -      EMACS_INT point_at_end = 0;
 -      EMACS_INT zv_at_end = 0;
 +      ptrdiff_t point_at_end = 0;
 +      ptrdiff_t zv_at_end = 0;
        Lisp_Object old_deactivate_mark, tem;
        struct gcpro gcpro1;
  
        old_deactivate_mark = Vdeactivate_mark;
        oldbuf = current_buffer;
        Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));
 -      BVAR (current_buffer, undo_list) = Qt;
 +      bset_undo_list (current_buffer, Qt);
  
        oldpoint = message_dolog_marker1;
        set_marker_restricted (oldpoint, make_number (PT), Qnil);
        if (multibyte
          && NILP (BVAR (current_buffer, enable_multibyte_characters)))
        {
 -        EMACS_INT i;
 +        ptrdiff_t i;
          int c, char_bytes;
          char work[1];
  
        else if (! multibyte
               && ! NILP (BVAR (current_buffer, enable_multibyte_characters)))
        {
 -        EMACS_INT i;
 +        ptrdiff_t i;
          int c, char_bytes;
          unsigned char str[MAX_MULTIBYTE_LENGTH];
          /* Convert a single-byte string to multibyte
  
        if (nlflag)
        {
 -        EMACS_INT this_bol, this_bol_byte, prev_bol, prev_bol_byte;
 +        ptrdiff_t this_bol, this_bol_byte, prev_bol, prev_bol_byte;
          printmax_t dups;
          insert_1 ("\n", 1, 1, 0, 0);
  
                    {
                      char dupstr[sizeof " [ times]"
                                  + INT_STRLEN_BOUND (printmax_t)];
 -                    int duplen;
  
                      /* If you change this format, don't forget to also
                         change message_log_check_duplicate.  */
 -                    sprintf (dupstr, " [%"pMd" times]", dups);
 -                    duplen = strlen (dupstr);
 +                    int duplen = sprintf (dupstr, " [%"pMd" times]", dups);
                      TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1);
                      insert_1 (dupstr, duplen, 1, 0, 1);
                    }
     value N > 1 if we should also append " [N times]".  */
  
  static intmax_t
 -message_log_check_duplicate (EMACS_INT prev_bol_byte, EMACS_INT this_bol_byte)
 +message_log_check_duplicate (ptrdiff_t prev_bol_byte, ptrdiff_t this_bol_byte)
  {
 -  EMACS_INT i;
 -  EMACS_INT len = Z_BYTE - 1 - this_bol_byte;
 +  ptrdiff_t i;
 +  ptrdiff_t 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 (const char *m, EMACS_INT nbytes, int multibyte)
 +message2 (const char *m, ptrdiff_t 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 (const char *m, EMACS_INT nbytes, int multibyte)
 +message2_nolog (const char *m, ptrdiff_t nbytes, int multibyte)
  {
    struct frame *sf = SELECTED_FRAME ();
    message_enable_multibyte = multibyte;
     This function cancels echoing.  */
  
  void
 -message3 (Lisp_Object m, EMACS_INT nbytes, int multibyte)
 +message3 (Lisp_Object m, ptrdiff_t nbytes, int multibyte)
  {
    struct gcpro gcpro1;
  
    message_log_maybe_newline ();
    if (STRINGP (m))
      {
 -      char *buffer;
        USE_SAFE_ALLOCA;
 -
 -      SAFE_ALLOCA (buffer, char *, nbytes);
 +      char *buffer = SAFE_ALLOCA (nbytes);
        memcpy (buffer, SDATA (m), nbytes);
        message_dolog (buffer, nbytes, 1, multibyte);
        SAFE_FREE ();
     and make this cancel echoing.  */
  
  void
 -message3_nolog (Lisp_Object m, EMACS_INT nbytes, int multibyte)
 +message3_nolog (Lisp_Object m, ptrdiff_t nbytes, int multibyte)
  {
    struct frame *sf = SELECTED_FRAME ();
    message_enable_multibyte = multibyte;
@@@ -9835,7 -9748,7 +9835,7 @@@ vmessage (const char *m, va_list ap
              len = doprnt (FRAME_MESSAGE_BUF (f),
                            FRAME_MESSAGE_BUF_SIZE (f), m, (char *)0, ap);
  
 -            message2 (FRAME_MESSAGE_BUF (f), len, 0);
 +            message2 (FRAME_MESSAGE_BUF (f), len, 1);
            }
          else
            message1 (0);
@@@ -9902,16 -9815,16 +9902,16 @@@ ensure_echo_area_buffers (void
  
    for (i = 0; i < 2; ++i)
      if (!BUFFERP (echo_buffer[i])
 -      || NILP (BVAR (XBUFFER (echo_buffer[i]), name)))
 +      || !BUFFER_LIVE_P (XBUFFER (echo_buffer[i])))
        {
        char name[30];
        Lisp_Object old_buffer;
        int j;
  
        old_buffer = echo_buffer[i];
 -      sprintf (name, " *Echo Area %d*", i);
 -      echo_buffer[i] = Fget_buffer_create (build_string (name));
 -      BVAR (XBUFFER (echo_buffer[i]), truncate_lines) = Qnil;
 +      echo_buffer[i] = Fget_buffer_create
 +        (make_formatted_string (name, " *Echo Area %d*", i));
 +      bset_truncate_lines (XBUFFER (echo_buffer[i]), Qnil);
        /* to force word wrap in echo area -
           it was decided to postpone this*/
        /* XBUFFER (echo_buffer[i])->word_wrap = Qt; */
  
  static int
  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)
 +                     int (*fn) (ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t),
 +                     ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4)
  {
    Lisp_Object buffer;
    int this_one, the_other, clear_buffer_p, rc;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
  
    /* If buffers aren't live, make new ones.  */
    ensure_echo_area_buffers ();
    set_buffer_internal_1 (XBUFFER (buffer));
    if (w)
      {
 -      w->buffer = buffer;
 +      wset_buffer (w, buffer);
        set_marker_both (w->pointm, buffer, BEG, BEG_BYTE);
      }
  
 -  BVAR (current_buffer, undo_list) = Qt;
 -  BVAR (current_buffer, read_only) = Qnil;
 +  bset_undo_list (current_buffer, Qt);
 +  bset_read_only (current_buffer, Qnil);
    specbind (Qinhibit_read_only, Qt);
    specbind (Qinhibit_modification_hooks, Qt);
  
    if (clear_buffer_p && Z > BEG)
      del_range (BEG, Z);
  
 -  xassert (BEGV >= BEG);
 -  xassert (ZV <= Z && ZV >= BEGV);
 +  eassert (BEGV >= BEG);
 +  eassert (ZV <= Z && ZV >= BEGV);
  
    rc = fn (a1, a2, a3, a4);
  
 -  xassert (BEGV >= BEG);
 -  xassert (ZV <= Z && ZV >= BEGV);
 +  eassert (BEGV >= BEG);
 +  eassert (ZV <= Z && ZV >= BEGV);
  
    unbind_to (count, Qnil);
    return rc;
@@@ -10060,7 -9973,7 +10060,7 @@@ with_echo_area_buffer_unwind_data (stru
        ASET (vector, i, Qnil);
      }
  
 -  xassert (i == ASIZE (vector));
 +  eassert (i == ASIZE (vector));
    return vector;
  }
  
@@@ -10085,7 -9998,7 +10085,7 @@@ unwind_with_echo_area_buffer (Lisp_Obje
        charpos = AREF (vector, 5);
        bytepos = AREF (vector, 6);
  
 -      w->buffer = buffer;
 +      wset_buffer (w, buffer);
        set_marker_both (w->pointm, buffer,
                       XFASTINT (charpos), XFASTINT (bytepos));
      }
@@@ -10118,11 -10031,11 +10118,11 @@@ setup_echo_area_for_printing (int multi
  
        /* Switch to that buffer and clear it.  */
        set_buffer_internal (XBUFFER (echo_area_buffer[0]));
 -      BVAR (current_buffer, truncate_lines) = Qnil;
 +      bset_truncate_lines (current_buffer, Qnil);
  
        if (Z > BEG)
        {
 -        int count = SPECPDL_INDEX ();
 +        ptrdiff_t count = SPECPDL_INDEX ();
          specbind (Qinhibit_read_only, Qt);
          /* Note that undo recording is always disabled.  */
          del_range (BEG, Z);
        {
          /* Someone switched buffers between print requests.  */
          set_buffer_internal (XBUFFER (echo_area_buffer[0]));
 -        BVAR (current_buffer, truncate_lines) = Qnil;
 +        bset_truncate_lines (current_buffer, Qnil);
        }
      }
  }
  static int
  display_echo_area (struct window *w)
  {
 -  int i, no_message_p, window_height_changed_p, count;
 +  int i, no_message_p, window_height_changed_p;
  
    /* Temporarily disable garbage collections while displaying the echo
       area.  This is done because a GC can print a message itself.
       That message would modify the echo area buffer's contents while a
       redisplay of the buffer is going on, and seriously confuse
       redisplay.  */
 -  count = inhibit_garbage_collection ();
 +  ptrdiff_t count = inhibit_garbage_collection ();
  
    /* If there is no message, we must call display_echo_area_1
       nevertheless because it resizes the window.  But we will have to
     Value is non-zero if height of W was changed.  */
  
  static int
 -display_echo_area_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 +display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4)
  {
    intptr_t i1 = a1;
    struct window *w = (struct window *) i1;
@@@ -10275,7 -10188,7 +10275,7 @@@ resize_echo_area_exactly (void
     resize_mini_window returns.  */
  
  static int
 -resize_mini_window_1 (EMACS_INT a1, Lisp_Object exactly, EMACS_INT a3, EMACS_INT a4)
 +resize_mini_window_1 (ptrdiff_t a1, Lisp_Object exactly, ptrdiff_t a3, ptrdiff_t a4)
  {
    intptr_t i1 = a1;
    return resize_mini_window ((struct window *) i1, !NILP (exactly));
@@@ -10299,7 -10212,7 +10299,7 @@@ resize_mini_window (struct window *w, i
    struct frame *f = XFRAME (w->frame);
    int window_height_changed_p = 0;
  
 -  xassert (MINI_WINDOW_P (w));
 +  eassert (MINI_WINDOW_P (w));
  
    /* By default, start display at the beginning.  */
    set_marker_both (w->start, w->buffer,
        struct it it;
        struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
        int total_height = WINDOW_TOTAL_LINES (root) + WINDOW_TOTAL_LINES (w);
 -      int height, max_height;
 +      int height;
 +      EMACS_INT max_height;
        int unit = FRAME_LINE_HEIGHT (f);
        struct text_pos start;
        struct buffer *old_current_buffer = NULL;
@@@ -10455,7 -10367,7 +10455,7 @@@ current_message (void
  
  
  static int
 -current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 +current_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4)
  {
    intptr_t i1 = a1;
    Lisp_Object *msg = (Lisp_Object *) i1;
     empty.  This is a relatively infrequent operation, so it's not
     worth optimizing.  */
  
 -int
 +bool
  push_message (void)
  {
 -  Lisp_Object msg;
 -  msg = current_message ();
 +  Lisp_Object msg = current_message ();
    Vmessage_stack = Fcons (msg, Vmessage_stack);
    return STRINGP (msg);
  }
@@@ -10489,7 -10402,7 +10489,7 @@@ restore_message (void
  {
    Lisp_Object msg;
  
 -  xassert (CONSP (Vmessage_stack));
 +  eassert (CONSP (Vmessage_stack));
    msg = XCAR (Vmessage_stack);
    if (STRINGP (msg))
      message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg));
@@@ -10512,7 -10425,7 +10512,7 @@@ pop_message_unwind (Lisp_Object dummy
  static void
  pop_message (void)
  {
 -  xassert (CONSP (Vmessage_stack));
 +  eassert (CONSP (Vmessage_stack));
    Vmessage_stack = XCDR (Vmessage_stack);
  }
  
  check_message_stack (void)
  {
    if (!NILP (Vmessage_stack))
 -    abort ();
 +    emacs_abort ();
  }
  
  
     time we display it---but don't redisplay it now.  */
  
  void
 -truncate_echo_area (EMACS_INT nchars)
 +truncate_echo_area (ptrdiff_t nchars)
  {
    if (nchars == 0)
      echo_area_buffer[0] = Qnil;
     message to at most NCHARS characters.  */
  
  static int
 -truncate_message_1 (EMACS_INT nchars, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
 +truncate_message_1 (ptrdiff_t nchars, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4)
  {
    if (BEG + nchars < Z)
      del_range (BEG + nchars, Z);
    return 0;
  }
  
 -
  /* Set the current message to a substring of S or STRING.
  
     If STRING is a Lisp string, set the message to the first NBYTES
  
  static void
  set_message (const char *s, Lisp_Object string,
 -           EMACS_INT nbytes, int multibyte_p)
 +           ptrdiff_t nbytes, int multibyte_p)
  {
    message_enable_multibyte
      = ((s && multibyte_p)
                         (intptr_t) s, string, nbytes, multibyte_p);
    message_buf_print = 0;
    help_echo_showing_p = 0;
 +
 +  if (STRINGP (Vdebug_on_message)
 +      && fast_string_match (Vdebug_on_message, string) >= 0)
 +    call_debugger (list2 (Qerror, string));
  }
  
  
     current.  */
  
  static int
 -set_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT nbytes, EMACS_INT multibyte_p)
 +set_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t nbytes, ptrdiff_t multibyte_p)
  {
    intptr_t i1 = a1;
    const char *s = (const char *) i1;
        != !NILP (BVAR (current_buffer, enable_multibyte_characters)))
      Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil);
  
 -  BVAR (current_buffer, truncate_lines) = message_truncate_lines ? Qt : Qnil;
 +  bset_truncate_lines (current_buffer, message_truncate_lines ? Qt : Qnil);
    if (!NILP (BVAR (current_buffer, bidi_display_reordering)))
 -    BVAR (current_buffer, bidi_paragraph_direction) = Qleft_to_right;
 +    bset_bidi_paragraph_direction (current_buffer, Qleft_to_right);
  
    /* Insert new message at BEG.  */
    TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
  
    if (STRINGP (string))
      {
 -      EMACS_INT nchars;
 +      ptrdiff_t nchars;
  
        if (nbytes == 0)
        nbytes = SBYTES (string);
        if (multibyte_p && NILP (BVAR (current_buffer, enable_multibyte_characters)))
        {
          /* Convert from multi-byte to single-byte.  */
 -        EMACS_INT i;
 +        ptrdiff_t i;
          int c, n;
          char work[1];
  
               && !NILP (BVAR (current_buffer, enable_multibyte_characters)))
        {
          /* Convert from single-byte to multi-byte.  */
 -        EMACS_INT i;
 +        ptrdiff_t i;
          int c, n;
          unsigned char str[MAX_MULTIBYTE_LENGTH];
  
@@@ -10806,7 -10716,7 +10806,7 @@@ echo_area_display (int update_frame_p
              /* Must update other windows.  Likewise as in other
                 cases, don't let this update be interrupted by
                 pending input.  */
 -            int count = SPECPDL_INDEX ();
 +            ptrdiff_t count = SPECPDL_INDEX ();
              specbind (Qredisplay_dont_pause, Qt);
              windows_or_buffers_changed = 1;
              redisplay_internal ();
@@@ -10891,8 -10801,7 +10891,8 @@@ static Lisp_Object mode_line_string_fac
  static Lisp_Object Vmode_line_unwind_vector;
  
  static Lisp_Object
 -format_mode_line_unwind_data (struct buffer *obuf,
 +format_mode_line_unwind_data (struct frame *target_frame,
 +                            struct buffer *obuf,
                              Lisp_Object owin,
                              int save_proptrans)
  {
    Vmode_line_unwind_vector = Qnil;
  
    if (NILP (vector))
 -    vector = Fmake_vector (make_number (8), Qnil);
 +    vector = Fmake_vector (make_number (10), Qnil);
  
    ASET (vector, 0, make_number (mode_line_target));
    ASET (vector, 1, make_number (MODE_LINE_NOPROP_LEN (0)));
      tmp = Qnil;
    ASET (vector, 6, tmp);
    ASET (vector, 7, owin);
 +  if (target_frame)
 +    {
 +      /* Similarly to `with-selected-window', if the operation selects
 +       a window on another frame, we must restore that frame's
 +       selected window, and (for a tty) the top-frame.  */
 +      ASET (vector, 8, target_frame->selected_window);
 +      if (FRAME_TERMCAP_P (target_frame))
 +      ASET (vector, 9, FRAME_TTY (target_frame)->top_frame);
 +    }
  
    return vector;
  }
  static Lisp_Object
  unwind_format_mode_line (Lisp_Object vector)
  {
 +  Lisp_Object old_window = AREF (vector, 7);
 +  Lisp_Object target_frame_window = AREF (vector, 8);
 +  Lisp_Object old_top_frame = AREF (vector, 9);
 +
    mode_line_target = XINT (AREF (vector, 0));
    mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1));
    mode_line_string_list = AREF (vector, 2);
    mode_line_string_face = AREF (vector, 4);
    mode_line_string_face_prop = AREF (vector, 5);
  
 -  if (!NILP (AREF (vector, 7)))
 -    /* Select window before buffer, since it may change the buffer.  */
 -    Fselect_window (AREF (vector, 7), Qt);
 +  /* Select window before buffer, since it may change the buffer.  */
 +  if (!NILP (old_window))
 +    {
 +      /* If the operation that we are unwinding had selected a window
 +       on a different frame, reset its frame-selected-window.  For a
 +       text terminal, reset its top-frame if necessary.  */
 +      if (!NILP (target_frame_window))
 +      {
 +        Lisp_Object frame
 +          = WINDOW_FRAME (XWINDOW (target_frame_window));
 +
 +        if (!EQ (frame, WINDOW_FRAME (XWINDOW (old_window))))
 +          Fselect_window (target_frame_window, Qt);
 +
 +        if (!NILP (old_top_frame) && !EQ (old_top_frame, frame))
 +          Fselect_frame (old_top_frame, Qt);
 +      }
 +
 +      Fselect_window (old_window, Qt);
 +    }
  
    if (!NILP (AREF (vector, 6)))
      {
@@@ -11014,7 -10893,7 +11014,7 @@@ store_mode_line_noprop (const char *str
  {
    const unsigned char *str = (const unsigned char *) string;
    int n = 0;
 -  EMACS_INT dummy, nbytes;
 +  ptrdiff_t dummy, nbytes;
  
    /* Copy at most PRECISION chars from STR.  */
    nbytes = strlen (string);
@@@ -11059,7 -10938,7 +11059,7 @@@ x_consider_frame_title (Lisp_Object fra
        char *title;
        ptrdiff_t len;
        struct it it;
 -      int count = SPECPDL_INDEX ();
 +      ptrdiff_t count = SPECPDL_INDEX ();
  
        for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
        {
         mode_line_noprop_buf; then display the title.  */
        record_unwind_protect (unwind_format_mode_line,
                             format_mode_line_unwind_data
 -                              (current_buffer, selected_window, 0));
 +                             (f, current_buffer, selected_window, 0));
  
        Fselect_window (f->selected_window, Qt);
 -      set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->buffer));
 +      set_buffer_internal_1
 +      (XBUFFER (XWINDOW (f->selected_window)->buffer));
        fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
  
        mode_line_target = MODE_LINE_TITLE;
  
  #endif /* not HAVE_WINDOW_SYSTEM */
  
 -
 -
  \f
  /***********************************************************************
                              Menu Bars
@@@ -11161,7 -11041,7 +11161,7 @@@ prepare_menu_bars (void
    if (all_windows)
      {
        Lisp_Object tail, frame;
 -      int count = SPECPDL_INDEX ();
 +      ptrdiff_t count = SPECPDL_INDEX ();
        /* 1 means that update_menu_bar has run its hooks
         so any further calls to update_menu_bar shouldn't do so again.  */
        int menu_bar_hooks_run = 0;
  #ifdef HAVE_NS
            if (windows_or_buffers_changed
              && FRAME_NS_P (f))
 -            ns_set_doc_edited (f, Fbuffer_modified_p
 -                             (XWINDOW (f->selected_window)->buffer));
 +            ns_set_doc_edited
 +            (f, Fbuffer_modified_p (XWINDOW (f->selected_window)->buffer));
  #endif
          UNGCPRO;
        }
@@@ -11272,13 -11152,13 +11272,13 @@@ update_menu_bar (struct frame *f, int s
          || update_mode_lines
          || ((BUF_SAVE_MODIFF (XBUFFER (w->buffer))
               < BUF_MODIFF (XBUFFER (w->buffer)))
 -            != !NILP (w->last_had_star))
 +            != w->last_had_star)
          || ((!NILP (Vtransient_mark_mode)
               && !NILP (BVAR (XBUFFER (w->buffer), mark_active)))
              != !NILP (w->region_showing)))
        {
          struct buffer *prev = current_buffer;
 -        int count = SPECPDL_INDEX ();
 +        ptrdiff_t count = SPECPDL_INDEX ();
  
          specbind (Qinhibit_menubar_update, Qt);
  
            }
  
          XSETFRAME (Vmenu_updating_frame, f);
 -        FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f));
 +        fset_menu_bar_items (f, menu_bar_items (FRAME_MENU_BAR_ITEMS (f)));
  
          /* Redisplay the menu bar in case we changed it.  */
  #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
          else
            /* On a terminal screen, the menu bar is an ordinary screen
               line, and this makes it get updated.  */
 -          w->update_mode_line = Qt;
 +          w->update_mode_line = 1;
  #else /* ! (USE_X_TOOLKIT || HAVE_NTGUI || HAVE_NS || USE_GTK) */
          /* In the non-toolkit version, the menu bar is an ordinary screen
             line, and this makes it get updated.  */
 -        w->update_mode_line = Qt;
 +        w->update_mode_line = 1;
  #endif /* ! (USE_X_TOOLKIT || HAVE_NTGUI || HAVE_NS || USE_GTK) */
  
          unbind_to (count, Qnil);
@@@ -11466,17 -11346,17 +11466,17 @@@ update_tool_bar (struct frame *f, int s
         the rest of the redisplay algorithm is about the same as
         windows_or_buffers_changed anyway.  */
        if (windows_or_buffers_changed
 -        || !NILP (w->update_mode_line)
 +        || w->update_mode_line
          || update_mode_lines
          || ((BUF_SAVE_MODIFF (XBUFFER (w->buffer))
               < BUF_MODIFF (XBUFFER (w->buffer)))
 -            != !NILP (w->last_had_star))
 +            != w->last_had_star)
          || ((!NILP (Vtransient_mark_mode)
               && !NILP (BVAR (XBUFFER (w->buffer), mark_active)))
              != !NILP (w->region_showing)))
        {
          struct buffer *prev = current_buffer;
 -        int count = SPECPDL_INDEX ();
 +        ptrdiff_t count = SPECPDL_INDEX ();
          Lisp_Object frame, new_tool_bar;
            int new_n_tool_bar;
          struct gcpro gcpro1;
          selected_frame = frame;
  
          /* Build desired tool-bar items from keymaps.  */
 -          new_tool_bar = tool_bar_items (Fcopy_sequence (f->tool_bar_items),
 -                                         &new_n_tool_bar);
 +          new_tool_bar
 +          = tool_bar_items (Fcopy_sequence (f->tool_bar_items),
 +                            &new_n_tool_bar);
  
          /* Redisplay the tool-bar if we changed it.  */
          if (new_n_tool_bar != f->n_tool_bar_items
                   may access f->tool_bar_items.  Make sure we update both
                   variables within BLOCK_INPUT so no such event interrupts.  */
                BLOCK_INPUT;
 -              f->tool_bar_items = new_tool_bar;
 +              fset_tool_bar_items (f, new_tool_bar);
                f->n_tool_bar_items = new_n_tool_bar;
 -              w->update_mode_line = Qt;
 +              w->update_mode_line = 1;
                UNBLOCK_INPUT;
              }
  
@@@ -11562,8 -11441,8 +11562,8 @@@ build_desired_tool_bar_string (struct f
  
    /* Reuse f->desired_tool_bar_string, if possible.  */
    if (size < size_needed || NILP (f->desired_tool_bar_string))
 -    f->desired_tool_bar_string = Fmake_string (make_number (size_needed),
 -                                             make_number (' '));
 +    fset_desired_tool_bar_string
 +      (f, Fmake_string (make_number (size_needed), make_number (' ')));
    else
      {
        props = list4 (Qdisplay, Qnil, Qmenu_item, Qnil);
       is the index of the item in F's tool-bar item vector.  */
    for (i = 0; i < f->n_tool_bar_items; ++i)
      {
 -#define PROP(IDX) AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX))
 +#define PROP(IDX) \
 +  AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX))
  
        int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P));
        int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P));
                   ? TOOL_BAR_IMAGE_DISABLED_SELECTED
                   : TOOL_BAR_IMAGE_DISABLED_DESELECTED);
  
 -        xassert (ASIZE (image) >= idx);
 +        eassert (ASIZE (image) >= idx);
          image = AREF (image, idx);
        }
        else
                : DEFAULT_TOOL_BAR_BUTTON_RELIEF);
        hmargin = vmargin = relief;
  
 -      if (INTEGERP (Vtool_bar_button_margin)
 -        && XINT (Vtool_bar_button_margin) > 0)
 +      if (RANGED_INTEGERP (1, Vtool_bar_button_margin,
 +                         INT_MAX - max (hmargin, vmargin)))
        {
          hmargin += XFASTINT (Vtool_bar_button_margin);
          vmargin += XFASTINT (Vtool_bar_button_margin);
        }
        else if (CONSP (Vtool_bar_button_margin))
        {
 -        if (INTEGERP (XCAR (Vtool_bar_button_margin))
 -            && XINT (XCAR (Vtool_bar_button_margin)) > 0)
 +        if (RANGED_INTEGERP (1, XCAR (Vtool_bar_button_margin),
 +                             INT_MAX - hmargin))
            hmargin += XFASTINT (XCAR (Vtool_bar_button_margin));
  
 -        if (INTEGERP (XCDR (Vtool_bar_button_margin))
 -            && XINT (XCDR (Vtool_bar_button_margin)) > 0)
 +        if (RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin),
 +                             INT_MAX - vmargin))
            vmargin += XFASTINT (XCDR (Vtool_bar_button_margin));
        }
  
@@@ -11975,7 -11853,7 +11975,7 @@@ redisplay_tool_bar (struct frame *f
      {
        int border, rows, height, extra;
  
 -      if (INTEGERP (Vtool_bar_border))
 +      if (TYPE_RANGED_INTEGERP (int, Vtool_bar_border))
        border = XINT (Vtool_bar_border);
        else if (EQ (Vtool_bar_border, Qinternal_border_width))
        border = FRAME_INTERNAL_BORDER_WIDTH (f);
@@@ -12163,7 -12041,7 +12163,7 @@@ get_tool_bar_item (struct frame *f, in
  
  void
  handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
 -                     unsigned int modifiers)
 +                     int modifiers)
  {
    Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
    struct window *w = XWINDOW (f->tool_bar_window);
@@@ -12342,7 -12220,7 +12342,7 @@@ hscroll_window_tree (Lisp_Object window
          hscroll_step_abs = 0;
        }
      }
 -  else if (INTEGERP (Vhscroll_step))
 +  else if (TYPE_RANGED_INTEGERP (int, Vhscroll_step))
      {
        hscroll_step_abs = XINT (Vhscroll_step);
        if (hscroll_step_abs < 0)
                 inside the left margin and the window is already
                 hscrolled. */
              && ((!row_r2l_p
 -                 && ((XFASTINT (w->hscroll)
 +                 && ((w->hscroll
                        && w->cursor.x <= h_margin)
                       || (cursor_row->enabled_p
                           && cursor_row->truncated_on_right_p
                              are actually truncated on the left. */
                           && cursor_row->truncated_on_right_p
                           && w->cursor.x <= h_margin)
 -                        || (XFASTINT (w->hscroll)
 +                        || (w->hscroll
                              && (w->cursor.x >= text_area_width - h_margin))))))
            {
              struct it it;
 -            int hscroll;
 +            ptrdiff_t hscroll;
              struct buffer *saved_current_buffer;
 -            EMACS_INT pt;
 +            ptrdiff_t pt;
              int wanted_x;
  
              /* Find point in a display of infinite width.  */
                  hscroll
                    = max (0, it.current_x - wanted_x) / FRAME_COLUMN_WIDTH (it.f);
                }
 -            hscroll = max (hscroll, XFASTINT (w->min_hscroll));
 +            hscroll = max (hscroll, w->min_hscroll);
  
              /* Don't prevent redisplay optimizations if hscroll
                 hasn't changed, as it will unnecessarily slow down
                 redisplay.  */
 -            if (XFASTINT (w->hscroll) != hscroll)
 +            if (w->hscroll != hscroll)
                {
                  XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
 -                w->hscroll = make_number (hscroll);
 +                w->hscroll = hscroll;
                  hscrolled_p = 1;
                }
            }
@@@ -12510,7 -12388,7 +12510,7 @@@ hscroll_windows (Lisp_Object window
     to a non-zero value.  This is sometimes handy to have in a debugger
     session.  */
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
  
  /* First and last unchanged row for try_window_id.  */
  
@@@ -12523,12 -12401,12 +12523,12 @@@ static int debug_dvpos, debug_dy
  
  /* Delta in characters and bytes for try_window_id.  */
  
 -static EMACS_INT debug_delta, debug_delta_bytes;
 +static ptrdiff_t debug_delta, debug_delta_bytes;
  
  /* Values of window_end_pos and window_end_vpos at the end of
     try_window_id.  */
  
 -static EMACS_INT debug_end_vpos;
 +static ptrdiff_t debug_end_vpos;
  
  /* Append a string to W->desired_matrix->method.  FMT is a printf
     format string.  If trace_redisplay_p is non-zero also printf the
@@@ -12540,21 -12418,23 +12540,21 @@@ static void debug_method_add (struct wi
  static void
  debug_method_add (struct window *w, char const *fmt, ...)
  {
 -  char buffer[512];
    char *method = w->desired_matrix->method;
    int len = strlen (method);
    int size = sizeof w->desired_matrix->method;
    int remaining = size - len - 1;
    va_list ap;
  
 -  va_start (ap, fmt);
 -  vsprintf (buffer, fmt, ap);
 -  va_end (ap);
    if (len && remaining)
      {
        method[len] = '|';
        --remaining, ++len;
      }
  
 -  strncpy (method + len, buffer, remaining);
 +  va_start (ap, fmt);
 +  vsnprintf (method + len, remaining + 1, fmt, ap);
 +  va_end (ap);
  
    if (trace_redisplay_p)
      fprintf (stderr, "%p (%s): %s\n",
               && STRINGP (BVAR (XBUFFER (w->buffer), name)))
              ? SSDATA (BVAR (XBUFFER (w->buffer), name))
              : "no buffer"),
 -           buffer);
 +           method + len);
  }
  
  #endif /* GLYPH_DEBUG */
  
  static inline int
  text_outside_line_unchanged_p (struct window *w,
 -                             EMACS_INT start, EMACS_INT end)
 +                             ptrdiff_t start, ptrdiff_t end)
  {
    int unchanged_p = 1;
  
    /* If text or overlays have changed, see where.  */
 -  if (XFASTINT (w->last_modified) < MODIFF
 -      || XFASTINT (w->last_overlay_modified) < OVERLAY_MODIFF)
 +  if (w->last_modified < MODIFF
 +      || w->last_overlay_modified < OVERLAY_MODIFF)
      {
        /* Gap in the line?  */
        if (GPT < start || Z - GPT < end)
@@@ -12785,7 -12665,7 +12785,7 @@@ overlay_arrow_at_row (struct it *it, st
                    return make_number (fringe_bitmap);
                }
  #endif
 -            return make_number (-1); /* Use default arrow bitmap */
 +            return make_number (-1); /* Use default arrow bitmap */
            }
          return overlay_arrow_string_or_property (var);
        }
     position.  BUF and PT are the current point buffer and position.  */
  
  static int
 -check_point_in_composition (struct buffer *prev_buf, EMACS_INT prev_pt,
 -                          struct buffer *buf, EMACS_INT pt)
 +check_point_in_composition (struct buffer *prev_buf, ptrdiff_t prev_pt,
 +                          struct buffer *buf, ptrdiff_t pt)
  {
 -  EMACS_INT start, end;
 +  ptrdiff_t start, end;
    Lisp_Object prop;
    Lisp_Object buffer;
  
@@@ -12853,7 -12733,7 +12853,7 @@@ reconsider_clip_changes (struct window 
    if (!b->clip_changed
        && BUFFERP (w->buffer) && !NILP (w->window_end_valid))
      {
 -      EMACS_INT pt;
 +      ptrdiff_t pt;
  
        if (w == XWINDOW (selected_window))
        pt = PT;
        pt = marker_position (w->pointm);
  
        if ((w->current_matrix->buffer != XBUFFER (w->buffer)
 -         || pt != XINT (w->last_point))
 +         || pt != w->last_point)
          && check_point_in_composition (w->current_matrix->buffer,
 -                                       XINT (w->last_point),
 +                                       w->last_point,
                                         XBUFFER (w->buffer), pt))
        b->clip_changed = 1;
      }
@@@ -12881,13 -12761,12 +12881,13 @@@ select_frame_for_redisplay (Lisp_Objec
    Lisp_Object old = selected_frame;
    struct Lisp_Symbol *sym;
  
 -  xassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame)));
 +  eassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame)));
  
    selected_frame = frame;
  
    do {
 -    for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail))
 +    for (tail = XFRAME (frame)->param_alist;
 +       CONSP (tail); tail = XCDR (tail))
        if (CONSP (XCAR (tail))
          && (tem = XCAR (XCAR (tail)),
              SYMBOLP (tem))
@@@ -12923,7 -12802,7 +12923,7 @@@ redisplay_internal (void
    int must_finish = 0;
    struct text_pos tlbufpos, tlendpos;
    int number_of_visible_frames;
 -  int count, count1;
 +  ptrdiff_t count, count1;
    struct frame *sf;
    int polling_stopped_here = 0;
    Lisp_Object old_frame = selected_frame;
       frames.  Zero means, only selected_window is considered.  */
    int consider_all_windows_p;
  
 +  /* Non-zero means redisplay has to redisplay the miniwindow */
 +  int update_miniwindow_p = 0;
 +
    TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
  
    /* No redisplay if running in batch mode or frame is not yet fully
    if (redisplaying_p)
      return;
  
 -  /* Record a function that resets redisplaying_p to its old value
 +  /* Record a function that clears redisplaying_p
       when we leave this function.  */
    count = SPECPDL_INDEX ();
 -  record_unwind_protect (unwind_redisplay,
 -                       Fcons (make_number (redisplaying_p), selected_frame));
 -  ++redisplaying_p;
 +  record_unwind_protect (unwind_redisplay, selected_frame);
 +  redisplaying_p = 1;
    specbind (Qinhibit_free_realized_faces, Qnil);
  
    {
      update_mode_lines++;
  
    /* Detect case that we need to write or remove a star in the mode line.  */
 -  if ((SAVE_MODIFF < MODIFF) != !NILP (w->last_had_star))
 +  if ((SAVE_MODIFF < MODIFF) != w->last_had_star)
      {
 -      w->update_mode_line = Qt;
 +      w->update_mode_line = 1;
        if (buffer_shared > 1)
        update_mode_lines++;
      }
    if (!NILP (w->column_number_displayed)
        /* This alternative quickly identifies a common case
         where no change is needed.  */
 -      && !(PT == XFASTINT (w->last_point)
 -         && XFASTINT (w->last_modified) >= MODIFF
 -         && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
 +      && !(PT == w->last_point
 +         && w->last_modified >= MODIFF
 +         && w->last_overlay_modified >= OVERLAY_MODIFF)
        && (XFASTINT (w->column_number_displayed) != current_column ()))
 -    w->update_mode_line = Qt;
 +    w->update_mode_line = 1;
  
    unbind_to (count1, Qnil);
  
          && !MINI_WINDOW_P (XWINDOW (selected_window))))
      {
        int window_height_changed_p = echo_area_display (0);
 +
 +      if (message_cleared_p)
 +      update_miniwindow_p = 1;
 +
        must_finish = 1;
  
        /* If we don't display the current message, don't clear the
      }
    else if (EQ (selected_window, minibuf_window)
           && (current_buffer->clip_changed
 -             || XFASTINT (w->last_modified) < MODIFF
 -             || XFASTINT (w->last_overlay_modified) < OVERLAY_MODIFF)
 +             || w->last_modified < MODIFF
 +             || w->last_overlay_modified < OVERLAY_MODIFF)
           && resize_mini_window (w, 0))
      {
        /* Resized active mini-window to fit the size of what it is
  /* FIXME: this causes all frames to be updated, which seems unnecessary
     since only the current frame needs to be considered.  This function needs
     to be rewritten with two variables, consider_all_windows and
 -   consider_all_frames. */
 +   consider_all_frames.  */
        consider_all_windows_p = 1;
        ++windows_or_buffers_changed;
        ++update_mode_lines;
    tlendpos = this_line_end_pos;
    if (!consider_all_windows_p
        && CHARPOS (tlbufpos) > 0
 -      && NILP (w->update_mode_line)
 +      && !w->update_mode_line
        && !current_buffer->clip_changed
        && !current_buffer->prevent_redisplay_optimizations_p
        && FRAME_VISIBLE_P (XFRAME (w->frame))
        /* Make sure recorded data applies to current buffer, etc.  */
        && this_line_buffer == current_buffer
        && current_buffer == XBUFFER (w->buffer)
 -      && NILP (w->force_start)
 -      && NILP (w->optional_new_start)
 +      && !w->force_start
 +      && !w->optional_new_start
        /* Point must be on the line that we have info recorded about.  */
        && PT >= CHARPOS (tlbufpos)
        && PT <= Z - CHARPOS (tlendpos)
              || FETCH_BYTE (BYTEPOS (tlbufpos)) == '\n'))
        /* Former continuation line has disappeared by becoming empty.  */
        goto cancel;
 -      else if (XFASTINT (w->last_modified) < MODIFF
 -             || XFASTINT (w->last_overlay_modified) < OVERLAY_MODIFF
 +      else if (w->last_modified < MODIFF
 +             || w->last_overlay_modified < OVERLAY_MODIFF
               || MINI_WINDOW_P (w))
        {
          /* We have to handle the case of continuation around a
                {
                  struct glyph_row *row
                    = MATRIX_ROW (w->current_matrix, this_line_vpos + 1);
 -                EMACS_INT delta, delta_bytes;
 +                ptrdiff_t delta, delta_bytes;
  
                  /* We used to distinguish between two cases here,
                     conditioned by Z - CHARPOS (tlendpos) == ZV, for
              if ((it.glyph_row - 1)->displays_text_p)
                {
                  if (XFASTINT (w->window_end_vpos) < this_line_vpos)
 -                  XSETINT (w->window_end_vpos, this_line_vpos);
 +                  wset_window_end_vpos (w, make_number (this_line_vpos));
                }
              else if (XFASTINT (w->window_end_vpos) == this_line_vpos
                       && this_line_vpos > 0)
 -              XSETINT (w->window_end_vpos, this_line_vpos - 1);
 -            w->window_end_valid = Qnil;
 +              wset_window_end_vpos (w, make_number (this_line_vpos - 1));
 +            wset_window_end_valid (w, Qnil);
  
              /* Update hint: No need to try to scroll in update_window.  */
              w->desired_matrix->no_scrolling_p = 1;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
              *w->desired_matrix->method = 0;
              debug_method_add (w, "optimization 1");
  #endif
            goto cancel;
        }
        else if (/* Cursor position hasn't changed.  */
 -             PT == XFASTINT (w->last_point)
 +             PT == w->last_point
               /* Make sure the cursor was last displayed
                  in this window.  Otherwise we have to reposition it.  */
               && 0 <= w->cursor.vpos
         then we can't just move the cursor.  */
        else if (! (!NILP (Vtransient_mark_mode)
                  && !NILP (BVAR (current_buffer, mark_active)))
 -             && (EQ (selected_window, BVAR (current_buffer, last_selected_window))
 +             && (EQ (selected_window,
 +                     BVAR (current_buffer, last_selected_window))
                   || highlight_nonselected_windows)
               && NILP (w->region_showing)
               && NILP (Vshow_trailing_whitespace)
              && (row = MATRIX_ROW (w->current_matrix, this_line_vpos),
                  row->enabled_p))
            {
 -            xassert (this_line_vpos == it.vpos);
 -            xassert (this_line_y == it.current_y);
 +            eassert (this_line_vpos == it.vpos);
 +            eassert (this_line_y == it.current_y);
              set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
              *w->desired_matrix->method = 0;
              debug_method_add (w, "optimization 3");
  #endif
        {
          struct frame *f = XFRAME (frame);
  
 +        /* We don't have to do anything for unselected terminal
 +           frames.  */
 +        if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
 +            && !EQ (FRAME_TTY (f)->top_frame, frame))
 +          continue;
 +
          if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
            {
              if (! EQ (frame, selected_frame))
           and selected_window to be temporarily out-of-sync but let's make
           sure this stays contained.  */
        select_frame_for_redisplay (old_frame);
 -      eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window));
 +      eassert (EQ (XFRAME (selected_frame)->selected_window,
 +                 selected_window));
  
        if (!pending)
        {
      }
    else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
      {
 -      Lisp_Object mini_window;
 +      Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
        struct frame *mini_frame;
  
        displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer);
        internal_condition_case_1 (redisplay_window_1, selected_window,
                                 list_of_error,
                                 redisplay_window_error);
 +      if (update_miniwindow_p)
 +      internal_condition_case_1 (redisplay_window_1, mini_window,
 +                                 list_of_error,
 +                                 redisplay_window_error);
  
        /* Compare desired and current matrices, perform output.  */
  
@@@ -13704,15 -13565,21 +13704,15 @@@ redisplay_preserve_echo_area (int from_
  }
  
  
 -/* Function registered with record_unwind_protect in
 -   redisplay_internal.  Reset redisplaying_p to the value it had
 -   before redisplay_internal was called, and clear
 -   prevent_freeing_realized_faces_p.  It also selects the previously
 +/* Function registered with record_unwind_protect in redisplay_internal.
 +   Clear redisplaying_p.  Also, select the previously
     selected frame, unless it has been deleted (by an X connection
     failure during redisplay, for example).  */
  
  static Lisp_Object
 -unwind_redisplay (Lisp_Object val)
 +unwind_redisplay (Lisp_Object old_frame)
  {
 -  Lisp_Object old_redisplaying_p, old_frame;
 -
 -  old_redisplaying_p = XCAR (val);
 -  redisplaying_p = XFASTINT (old_redisplaying_p);
 -  old_frame = XCDR (val);
 +  redisplaying_p = 0;
    if (! EQ (old_frame, selected_frame)
        && FRAME_LIVE_P (XFRAME (old_frame)))
      select_frame_for_redisplay (old_frame);
@@@ -13732,10 -13599,12 +13732,10 @@@ mark_window_display_accurate_1 (struct 
      {
        struct buffer *b = XBUFFER (w->buffer);
  
 -      w->last_modified
 -      = make_number (accurate_p ? BUF_MODIFF (b) : 0);
 -      w->last_overlay_modified
 -      = make_number (accurate_p ? BUF_OVERLAY_MODIFF (b) : 0);
 +      w->last_modified = accurate_p ? BUF_MODIFF(b) : 0;
 +      w->last_overlay_modified = accurate_p ? BUF_OVERLAY_MODIFF(b) : 0;
        w->last_had_star
 -      = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b) ? Qt : Qnil;
 +      = BUF_MODIFF (b) > BUF_SAVE_MODIFF (b);
  
        if (accurate_p)
        {
          w->last_cursor_off_p = w->cursor_off_p;
  
          if (w == XWINDOW (selected_window))
 -          w->last_point = make_number (BUF_PT (b));
 +          w->last_point = BUF_PT (b);
          else
 -          w->last_point = make_number (XMARKER (w->pointm)->charpos);
 +          w->last_point = XMARKER (w->pointm)->charpos;
        }
      }
  
    if (accurate_p)
      {
 -      w->window_end_valid = w->buffer;
 -      w->update_mode_line = Qnil;
 +      wset_window_end_valid (w, w->buffer);
 +      w->update_mode_line = 0;
      }
  }
  
@@@ -13899,18 -13768,18 +13899,18 @@@ redisplay_window_1 (Lisp_Object window
  static int
  set_cursor_from_row (struct window *w, struct glyph_row *row,
                     struct glyph_matrix *matrix,
 -                   EMACS_INT delta, EMACS_INT delta_bytes,
 +                   ptrdiff_t delta, ptrdiff_t 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 last known character position in row.  */
 -  EMACS_INT last_pos = MATRIX_ROW_START_CHARPOS (row) + delta;
 +  ptrdiff_t last_pos = MATRIX_ROW_START_CHARPOS (row) + delta;
    int x = row->x;
 -  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;
 +  ptrdiff_t pt_old = PT - delta;
 +  ptrdiff_t pos_before = MATRIX_ROW_START_CHARPOS (row) + delta;
 +  ptrdiff_t 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.  */
    int string_seen = 0;
    /* Largest and smallest buffer positions seen so far during scan of
       glyph row.  */
 -  EMACS_INT bpos_max = pos_before;
 -  EMACS_INT bpos_min = pos_after;
 +  ptrdiff_t bpos_max = pos_before;
 +  ptrdiff_t bpos_min = pos_after;
    /* Last buffer position covered by an overlay string with an integer
       `cursor' property.  */
 -  EMACS_INT bpos_covered = 0;
 +  ptrdiff_t bpos_covered = 0;
    /* Non-zero means the display string on which to display the cursor
       comes from a text property, not from an overlay.  */
    int string_from_text_prop = 0;
    /* Don't even try doing anything if called for a mode-line or
       header-line row, since the rest of the code isn't prepared to
       deal with such calamities.  */
 -  xassert (!row->mode_line_p);
 +  eassert (!row->mode_line_p);
    if (row->mode_line_p)
      return 0;
  
        {
        if (BUFFERP (glyph->object))
          {
 -          EMACS_INT dpos = glyph->charpos - pt_old;
 +          ptrdiff_t dpos = glyph->charpos - pt_old;
  
            if (glyph->charpos > bpos_max)
              bpos_max = glyph->charpos;
                    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.  */
 +                 POS_BEFORE or to POS_AFTER.  */
                if (0 > dpos && dpos > pos_before - pt_old)
                  {
                    pos_before = glyph->charpos;
                    glyph_before = glyph;
                  }
 -              else if (0 < dpos && dpos <= pos_after - pt_old)
 +              else if (0 < dpos && dpos < pos_after - pt_old)
                  {
                    pos_after = glyph->charpos;
                    glyph_after = glyph;
        else if (STRINGP (glyph->object))
          {
            Lisp_Object chprop;
 -          EMACS_INT glyph_pos = glyph->charpos;
 +          ptrdiff_t glyph_pos = glyph->charpos;
  
            chprop = Fget_char_property (make_number (glyph_pos), Qcursor,
                                         glyph->object);
                   text is completely covered by display properties,
                   so that no glyph with valid buffer positions is
                   ever seen in the row.  */
 -              EMACS_INT prop_pos =
 +              ptrdiff_t prop_pos =
                  string_buffer_position_lim (glyph->object, pos_before,
                                              pos_after, 0);
  
        {
        if (BUFFERP (glyph->object))
          {
 -          EMACS_INT dpos = glyph->charpos - pt_old;
 +          ptrdiff_t dpos = glyph->charpos - pt_old;
  
            if (glyph->charpos > bpos_max)
              bpos_max = glyph->charpos;
                    pos_before = glyph->charpos;
                    glyph_before = glyph;
                  }
 -              else if (0 < dpos && dpos <= pos_after - pt_old)
 +              else if (0 < dpos && dpos < pos_after - pt_old)
                  {
                    pos_after = glyph->charpos;
                    glyph_after = glyph;
        else if (STRINGP (glyph->object))
          {
            Lisp_Object chprop;
 -          EMACS_INT glyph_pos = glyph->charpos;
 +          ptrdiff_t glyph_pos = glyph->charpos;
  
            chprop = Fget_char_property (make_number (glyph_pos), Qcursor,
                                         glyph->object);
            if (!NILP (chprop))
              {
 -              EMACS_INT prop_pos =
 +              ptrdiff_t prop_pos =
                  string_buffer_position_lim (glyph->object, pos_before,
                                              pos_after, 0);
  
  
        if (row->ends_in_ellipsis_p && pos_after == last_pos)
        {
 -        EMACS_INT ellipsis_pos;
 +        ptrdiff_t ellipsis_pos;
  
          /* Scan back over the ellipsis glyphs.  */
          if (!row->reversed_p)
             positioned between POS_BEFORE and POS_AFTER in the
             buffer.  */
          struct glyph *start, *stop;
 -        EMACS_INT pos = pos_before;
 +        ptrdiff_t pos = pos_before;
  
          x = -1;
  
              if (STRINGP (glyph->object))
                {
                  Lisp_Object str;
 -                EMACS_INT tem;
 +                ptrdiff_t tem;
                  /* If the display property covers the newline, we
                     need to search for it one position farther.  */
 -                EMACS_INT lim = pos_after
 +                ptrdiff_t lim = pos_after
                    + (pos_after == MATRIX_ROW_END_CHARPOS (row) + delta);
  
                  string_from_text_prop = 0;
                      || 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
 +                       found in the buffer at point, or at position
 +                       that is closer to point than pos_after, 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)
 +                    if (tem == 0
 +                        || tem == pt_old
 +                        || (tem - pt_old > 0 && tem < pos_after))
                        {
                          /* The glyphs from this string could have
                             been reordered.  Find the one with the
                             be a character in the string with the
                             `cursor' property, which means display
                             cursor on that character's glyph.  */
 -                        EMACS_INT strpos = glyph->charpos;
 +                        ptrdiff_t strpos = glyph->charpos;
  
                          if (tem)
                            {
                               glyph += incr)
                            {
                              Lisp_Object cprop;
 -                            EMACS_INT gpos = glyph->charpos;
 +                            ptrdiff_t gpos = glyph->charpos;
  
                              cprop = Fget_char_property (make_number (gpos),
                                                          Qcursor,
                                }
                            }
  
 -                        if (tem == pt_old)
 +                        if (tem == pt_old
 +                            || (tem - pt_old > 0 && tem < pos_after))
                            goto compute_x;
                        }
                      if (tem)
             the cursor is not on this line.  */
          if (cursor == NULL
              && (row->reversed_p ? glyph <= end : glyph >= end)
 +            && (row->reversed_p ? end > glyphs_end : end < glyphs_end)
              && STRINGP (end->object)
              && row->continued_p)
            return 0;
   compute_x:
    if (cursor != NULL)
      glyph = cursor;
 +  else if (glyph == glyphs_end
 +         && pos_before == pos_after
 +         && STRINGP ((row->reversed_p
 +                      ? row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1
 +                      : row->glyphs[TEXT_AREA])->object))
 +    {
 +      /* If all the glyphs of this row came from strings, put the
 +       cursor on the first glyph of the row.  This avoids having the
 +       cursor outside of the text area in this very rare and hard
 +       use case.  */
 +      glyph =
 +      row->reversed_p
 +      ? row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1
 +      : row->glyphs[TEXT_AREA];
 +    }
    if (x < 0)
      {
        struct glyph *g;
        for (g = row->glyphs[TEXT_AREA], x = row->x; g < glyph; g++)
        {
          if (g >= row->glyphs[TEXT_AREA] + row->used[TEXT_AREA])
 -          abort ();
 +          emacs_abort ();
          x += g->pixel_width;
        }
      }
@@@ -14532,7 -14384,7 +14532,7 @@@ run_window_scroll_functions (Lisp_Objec
    SET_MARKER_FROM_TEXT_POS (w->start, startp);
  
    if (current_buffer != XBUFFER (w->buffer))
 -    abort ();
 +    emacs_abort ();
  
    if (!NILP (Vwindow_scroll_functions))
      {
                            make_number (CHARPOS (startp)));
        SET_TEXT_POS_FROM_MARKER (startp, w->start);
        /* In case the hook functions switch buffers.  */
 -      if (current_buffer != XBUFFER (w->buffer))
 -      set_buffer_internal_1 (XBUFFER (w->buffer));
 +      set_buffer_internal (XBUFFER (w->buffer));
      }
  
    return startp;
  
  static int
  try_scrolling (Lisp_Object window, int just_this_one_p,
 -             EMACS_INT arg_scroll_conservatively, EMACS_INT scroll_step,
 +             ptrdiff_t arg_scroll_conservatively, ptrdiff_t scroll_step,
               int temp_scroll_step, int last_line_misfit)
  {
    struct window *w = XWINDOW (window);
    /* We will never try scrolling more than this number of lines.  */
    int scroll_limit = SCROLL_LIMIT;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    debug_method_add (w, "try_scrolling");
  #endif
  
        if (!just_this_one_p
          || current_buffer->clip_changed
          || BEG_UNCHANGED < CHARPOS (startp))
 -      w->base_line_number = Qnil;
 +      wset_base_line_number (w, Qnil);
  
        /* If cursor ends up on a partially visible line,
         treat that as being off the bottom of the screen.  */
@@@ -14992,16 -14845,11 +14992,16 @@@ try_cursor_movement (Lisp_Object window
    struct frame *f = XFRAME (w->frame);
    int rc = CURSOR_MOVEMENT_CANNOT_BE_USED;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    if (inhibit_try_cursor_movement)
      return rc;
  #endif
  
 +  /* Previously, there was a check for Lisp integer in the
 +     if-statement below. Now, this field is converted to
 +     ptrdiff_t, thus zero means invalid position in a buffer.  */
 +  eassert (w->last_point > 0);
 +
    /* Handle case where text has not changed, only point, and it has
       not moved off the frame.  */
    if (/* Point may be in this window.  */
           && !NILP (BVAR (current_buffer, mark_active)))
        && NILP (w->region_showing)
        && NILP (Vshow_trailing_whitespace)
 -      /* Right after splitting windows, last_point may be nil.  */
 -      && INTEGERP (w->last_point)
        /* This code is not used for mini-buffer for the sake of the case
         of redisplaying to replace an echo area message; since in
         that case the mini-buffer contents per se are usually
        int this_scroll_margin, top_scroll_margin;
        struct glyph_row *row = NULL;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "cursor movement");
  #endif
  
          int scroll_p = 0, must_scroll = 0;
          int last_y = window_text_bottom_y (w) - this_scroll_margin;
  
 -        if (PT > XFASTINT (w->last_point))
 +        if (PT > w->last_point)
            {
              /* Point has moved forward.  */
              while (MATRIX_ROW_END_CHARPOS (row) < PT
                     && MATRIX_ROW_BOTTOM_Y (row) < last_y)
                {
 -                xassert (row->enabled_p);
 +                eassert (row->enabled_p);
                  ++row;
                }
  
                      && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)))
                scroll_p = 1;
            }
 -        else if (PT < XFASTINT (w->last_point))
 +        else if (PT < w->last_point)
            {
              /* Cursor has to be moved backward.  Note that PT >=
                 CHARPOS (startp) because of the outer if-statement.  */
                     && (row->y > top_scroll_margin
                         || CHARPOS (startp) == BEGV))
                {
 -                xassert (row->enabled_p);
 +                eassert (row->enabled_p);
                  --row;
                }
  
                      rc = CURSOR_MOVEMENT_MUST_SCROLL;
                      break;
                    }
 -                xassert (row->enabled_p);
 +                eassert (row->enabled_p);
                }
            }
          if (must_scroll)
                        MATRIX_ROW (w->current_matrix, w->cursor.vpos);
                      struct glyph *g =
                        candidate->glyphs[TEXT_AREA] + w->cursor.hpos;
 -                    EMACS_INT endpos = MATRIX_ROW_END_CHARPOS (candidate);
 +                    ptrdiff_t endpos = MATRIX_ROW_END_CHARPOS (candidate);
  
                      exact_match_p =
                        (BUFFERP (g->object) && g->charpos == PT)
@@@ -15329,7 -15179,7 +15329,7 @@@ stati
  void
  set_vertical_scroll_bar (struct window *w)
  {
 -  EMACS_INT start, end, whole;
 +  ptrdiff_t start, end, whole;
  
    /* Calculate the start and end positions for the current window.
       At some point, it would be nice to choose between scrollbars
     selected_window is redisplayed.
  
     We can return without actually redisplaying the window if
 -   fonts_changed_p is nonzero.  In that case, redisplay_internal will
 +   fonts_changed_p.  In that case, redisplay_internal will
     retry.  */
  
  static void
@@@ -15389,18 -15239,18 +15389,18 @@@ redisplay_window (Lisp_Object window, i
       It indicates that the buffer contents and narrowing are unchanged.  */
    int buffer_unchanged_p = 0;
    int temp_scroll_step = 0;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    int rc;
    int centering_position = -1;
    int last_line_misfit = 0;
 -  EMACS_INT beg_unchanged, end_unchanged;
 +  ptrdiff_t beg_unchanged, end_unchanged;
  
    SET_TEXT_POS (lpoint, PT, PT_BYTE);
    opoint = lpoint;
  
    /* W must be a leaf window here.  */
 -  xassert (!NILP (w->buffer));
 -#if GLYPH_DEBUG
 +  eassert (!NILP (w->buffer));
 +#ifdef GLYPH_DEBUG
    *w->desired_matrix->method = 0;
  #endif
  
    reconsider_clip_changes (w, buffer);
  
    /* Has the mode line to be updated?  */
 -  update_mode_line = (!NILP (w->update_mode_line)
 +  update_mode_line = (w->update_mode_line
                      || update_mode_lines
                      || buffer->clip_changed
                      || buffer->prevent_redisplay_optimizations_p);
      = (!NILP (w->window_end_valid)
         && !current_buffer->clip_changed
         && !current_buffer->prevent_redisplay_optimizations_p
 -       && XFASTINT (w->last_modified) >= MODIFF
 -       && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF);
 +       && w->last_modified >= MODIFF
 +       && w->last_overlay_modified >= OVERLAY_MODIFF);
  
    /* Run the window-bottom-change-functions
       if it is possible that the text on the screen has changed
    buffer_unchanged_p
      = (!NILP (w->window_end_valid)
         && !current_buffer->clip_changed
 -       && XFASTINT (w->last_modified) >= MODIFF
 -       && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF);
 +       && w->last_modified >= MODIFF
 +       && w->last_overlay_modified >= OVERLAY_MODIFF);
  
    /* When windows_or_buffers_changed is non-zero, we can't rely on
       the window end being valid, so set it to nil there.  */
        if (XMARKER (w->start)->buffer == current_buffer)
        compute_window_start_on_continuation_line (w);
  
 -      w->window_end_valid = Qnil;
 +      wset_window_end_valid (w, Qnil);
      }
  
    /* Some sanity checks.  */
    CHECK_WINDOW_END (w);
    if (Z == Z_BYTE && CHARPOS (opoint) != BYTEPOS (opoint))
 -    abort ();
 +    emacs_abort ();
    if (BYTEPOS (opoint) < CHARPOS (opoint))
 -    abort ();
 +    emacs_abort ();
  
    /* If %c is in mode line, update it if needed.  */
    if (!NILP (w->column_number_displayed)
        /* This alternative quickly identifies a common case
         where no change is needed.  */
 -      && !(PT == XFASTINT (w->last_point)
 -         && XFASTINT (w->last_modified) >= MODIFF
 -         && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)
 +      && !(PT == w->last_point
 +         && w->last_modified >= MODIFF
 +         && w->last_overlay_modified >= OVERLAY_MODIFF)
        && (XFASTINT (w->column_number_displayed) != current_column ()))
      update_mode_line = 1;
  
       window, set up appropriate value.  */
    if (!EQ (window, selected_window))
      {
 -      EMACS_INT new_pt = XMARKER (w->pointm)->charpos;
 -      EMACS_INT new_pt_byte = marker_byte_position (w->pointm);
 +      ptrdiff_t new_pt = XMARKER (w->pointm)->charpos;
 +      ptrdiff_t new_pt_byte = marker_byte_position (w->pointm);
        if (new_pt < BEGV)
        {
          new_pt = BEGV;
      {
        struct Lisp_Char_Table *disptab = buffer_display_table ();
  
 -      if (! disptab_matches_widthtab (disptab,
 -                                      XVECTOR (BVAR (current_buffer, width_table))))
 +      if (! disptab_matches_widthtab
 +        (disptab, XVECTOR (BVAR (current_buffer, width_table))))
          {
            invalidate_region_cache (current_buffer,
                                     current_buffer->width_run_cache,
  
    /* If someone specified a new starting point but did not insist,
       check whether it can be used.  */
 -  if (!NILP (w->optional_new_start)
 +  if (w->optional_new_start
        && CHARPOS (startp) >= BEGV
        && CHARPOS (startp) <= ZV)
      {
 -      w->optional_new_start = Qnil;
 +      w->optional_new_start = 0;
        start_display (&it, w, startp);
        move_it_to (&it, PT, 0, it.last_visible_y, -1,
                  MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
        if (IT_CHARPOS (it) == PT)
 -      w->force_start = Qt;
 +      w->force_start = 1;
        /* IT may overshoot PT if text at PT is invisible.  */
        else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT)
 -      w->force_start = Qt;
 +      w->force_start = 1;
      }
  
   force_start:
  
    /* Handle case where place to start displaying has been specified,
       unless the specified location is outside the accessible range.  */
 -  if (!NILP (w->force_start)
 -      || w->frozen_window_start_p)
 +  if (w->force_start || w->frozen_window_start_p)
      {
        /* We set this later on if we have to adjust point.  */
        int new_vpos = -1;
  
 -      w->force_start = Qnil;
 +      w->force_start = 0;
        w->vscroll = 0;
 -      w->window_end_valid = Qnil;
 +      wset_window_end_valid (w, Qnil);
  
        /* Forget any recorded base line for line number display.  */
        if (!buffer_unchanged_p)
 -      w->base_line_number = Qnil;
 +      wset_base_line_number (w, Qnil);
  
        /* Redisplay the mode line.  Select the buffer properly for that.
         Also, run the hook window-scroll-functions
          || ! NILP (Vwindow_scroll_functions))
        {
          update_mode_line = 1;
 -        w->update_mode_line = Qt;
 +        w->update_mode_line = 1;
          startp = run_window_scroll_functions (window, startp);
        }
  
 -      w->last_modified = make_number (0);
 -      w->last_overlay_modified = make_number (0);
 +      w->last_modified = 0;
 +      w->last_overlay_modified = 0;
        if (CHARPOS (startp) < BEGV)
        SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
        else if (CHARPOS (startp) > ZV)
         the scroll margin (bug#148) -- cyd  */
        if (!try_window (window, startp, 0))
        {
 -        w->force_start = Qt;
 +        w->force_start = 1;
          clear_glyph_matrix (w->desired_matrix);
          goto need_larger_matrices;
        }
            }
        }
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "forced window start");
  #endif
        goto done;
          goto try_to_scroll;
  
        default:
 -        abort ();
 +        emacs_abort ();
        }
      }
    /* If current starting point was originally the beginning of a line
       but no longer is, find a new starting point.  */
 -  else if (!NILP (w->start_at_line_beg)
 +  else if (w->start_at_line_beg
           && !(CHARPOS (startp) <= BEGV
                || FETCH_BYTE (BYTEPOS (startp) - 1) == '\n'))
      {
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "recenter 1");
  #endif
        goto recenter;
       not work.  It is 0 if unsuccessful for some other reason.  */
    else if ((tem = try_window_id (w)) != 0)
      {
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "try_window_id %d", tem);
  #endif
  
           && (CHARPOS (startp) < ZV
               /* Avoid starting at end of buffer.  */
               || CHARPOS (startp) == BEGV
 -             || (XFASTINT (w->last_modified) >= MODIFF
 -                 && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF)))
 +             || (w->last_modified >= MODIFF
 +                 && w->last_overlay_modified >= OVERLAY_MODIFF)))
      {
        int d1, d2, d3, d4, d5, d6;
  
         new window start, since that would change the position under
         the mouse, resulting in an unwanted mouse-movement rather
         than a simple mouse-click.  */
 -      if (NILP (w->start_at_line_beg)
 +      if (!w->start_at_line_beg
          && NILP (do_mouse_tracking)
                  && CHARPOS (startp) > BEGV
          && CHARPOS (startp) > BEG + beg_unchanged
             See bug#9324.  */
          && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6))
        {
 -        w->force_start = Qt;
 +        w->force_start = 1;
          SET_TEXT_POS_FROM_MARKER (startp, w->start);
          goto force_start;
                }
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "same window start");
  #endif
  
              || current_buffer->clip_changed
              || BEG_UNCHANGED < CHARPOS (startp))
            /* Forget any recorded base line for line number display.  */
 -          w->base_line_number = Qnil;
 +          wset_base_line_number (w, Qnil);
  
          if (!cursor_row_fully_visible_p (w, 1, 0))
            {
  
   try_to_scroll:
  
 -  w->last_modified = make_number (0);
 -  w->last_overlay_modified = make_number (0);
 +  w->last_modified = 0;
 +  w->last_overlay_modified = 0;
  
    /* Redisplay the mode line.  Select the buffer properly for that.  */
    if (!update_mode_line)
      {
        update_mode_line = 1;
 -      w->update_mode_line = Qt;
 +      w->update_mode_line = 1;
      }
  
    /* Try to scroll by specified few lines.  */
          break;
  
        default:
 -        abort ();
 +        emacs_abort ();
        }
      }
  
  
   recenter:
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    debug_method_add (w, "recenter");
  #endif
  
  
    /* Forget any previously recorded base line for line number display.  */
    if (!buffer_unchanged_p)
 -    w->base_line_number = Qnil;
 +    wset_base_line_number (w, Qnil);
  
    /* Determine the window start relative to point.  */
    init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID);
        scroll_margin > 0
        ? min (scroll_margin, WINDOW_TOTAL_LINES (w) / 4)
        : 0;
 -      EMACS_INT margin_pos = CHARPOS (startp);
 +      ptrdiff_t margin_pos = CHARPOS (startp);
        Lisp_Object aggressive;
        int scrolling_up;
  
      }
    move_it_vertically_backward (&it, centering_position);
  
 -  xassert (IT_CHARPOS (it) >= BEGV);
 +  eassert (IT_CHARPOS (it) >= BEGV);
  
    /* The function move_it_vertically_backward may move over more
       than the specified y-distance.  If it->w is small, e.g. a
   done:
  
    SET_TEXT_POS_FROM_MARKER (startp, w->start);
 -  w->start_at_line_beg = ((CHARPOS (startp) == BEGV
 -                         || FETCH_BYTE (BYTEPOS (startp) - 1) == '\n')
 -                        ? Qt : Qnil);
 +  w->start_at_line_beg = (CHARPOS (startp) == BEGV
 +                          || FETCH_BYTE (BYTEPOS (startp) - 1) == '\n');
  
    /* Display the mode line, if we must.  */
    if ((update_mode_line
    if (!line_number_displayed
        && !BUFFERP (w->base_line_pos))
      {
 -      w->base_line_pos = Qnil;
 -      w->base_line_number = Qnil;
 +      wset_base_line_pos (w, Qnil);
 +      wset_base_line_number (w, Qnil);
      }
  
   finish_menu_bars:
      }
  #endif /* HAVE_WINDOW_SYSTEM */
  
 -  /* We go to this label, with fonts_changed_p nonzero,
 +  /* We go to this label, with fonts_changed_p set,
       if it is necessary to try again using larger glyph matrices.
       We have to redeem the scroll bar even in this case,
       because the loop in redisplay_internal expects that.  */
@@@ -16321,33 -16173,32 +16321,33 @@@ try_window (Lisp_Object window, struct 
    /* If bottom moved off end of frame, change mode line percentage.  */
    if (XFASTINT (w->window_end_pos) <= 0
        && Z != IT_CHARPOS (it))
 -    w->update_mode_line = Qt;
 +    w->update_mode_line = 1;
  
    /* Set window_end_pos to the offset of the last character displayed
       on the window from the end of current_buffer.  Set
       window_end_vpos to its row number.  */
    if (last_text_row)
      {
 -      xassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row));
 +      eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row));
        w->window_end_bytepos
        = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
 -      w->window_end_pos
 -      = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row));
 -      w->window_end_vpos
 -      = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix));
 -      xassert (MATRIX_ROW (w->desired_matrix, XFASTINT (w->window_end_vpos))
 -             ->displays_text_p);
 +      wset_window_end_pos
 +      (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
 +      wset_window_end_vpos
 +      (w, make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)));
 +      eassert
 +      (MATRIX_ROW (w->desired_matrix,
 +                   XFASTINT (w->window_end_vpos))->displays_text_p);
      }
    else
      {
        w->window_end_bytepos = Z_BYTE - ZV_BYTE;
 -      w->window_end_pos = make_number (Z - ZV);
 -      w->window_end_vpos = make_number (0);
 +      wset_window_end_pos (w, make_number (Z - ZV));
 +      wset_window_end_vpos (w, make_number (0));
      }
  
    /* But that is not valid info until redisplay finishes.  */
 -  w->window_end_valid = Qnil;
 +  wset_window_end_valid (w, Qnil);
    return 1;
  }
  
@@@ -16376,7 -16227,7 +16376,7 @@@ try_window_reusing_current_matrix (stru
    struct glyph_row *start_row;
    int start_vpos, min_y, max_y;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    if (inhibit_try_window_reusing)
      return 0;
  #endif
        {
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row);
 -        w->window_end_pos
 -          = make_number (Z - MATRIX_ROW_END_CHARPOS (last_reused_text_row));
 -        w->window_end_vpos
 -          = make_number (MATRIX_ROW_VPOS (last_reused_text_row,
 -                                          w->current_matrix));
 +        wset_window_end_pos
 +          (w, make_number (Z
 +                           - MATRIX_ROW_END_CHARPOS (last_reused_text_row)));
 +        wset_window_end_vpos
 +          (w, make_number (MATRIX_ROW_VPOS (last_reused_text_row,
 +                                            w->current_matrix)));
        }
        else if (last_text_row)
        {
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
 -        w->window_end_pos
 -          = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row));
 -        w->window_end_vpos
 -          = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix));
 +        wset_window_end_pos
 +          (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
 +        wset_window_end_vpos
 +          (w, make_number (MATRIX_ROW_VPOS (last_text_row,
 +                                            w->desired_matrix)));
        }
        else
        {
          /* This window must be completely empty.  */
          w->window_end_bytepos = Z_BYTE - ZV_BYTE;
 -        w->window_end_pos = make_number (Z - ZV);
 -        w->window_end_vpos = make_number (0);
 +        wset_window_end_pos (w, make_number (Z - ZV));
 +        wset_window_end_vpos (w, make_number (0));
        }
 -      w->window_end_valid = Qnil;
 +      wset_window_end_valid (w, Qnil);
  
        /* Update hint: don't try scrolling again in update_window.  */
        w->desired_matrix->no_scrolling_p = 1;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "try_window_reusing_current_matrix 1");
  #endif
        return 1;
        }
  
        /* Start displaying at the start of first_row_to_display.  */
 -      xassert (first_row_to_display->y < yb);
 +      eassert (first_row_to_display->y < yb);
        init_to_row_start (&it, w, first_row_to_display);
  
        nrows_scrolled = (MATRIX_ROW_VPOS (first_reusable_row, w->current_matrix)
        }
  
        /* Scroll the current matrix.  */
 -      xassert (nrows_scrolled > 0);
 +      eassert (nrows_scrolled > 0);
        rotate_matrix (w->current_matrix,
                     start_vpos,
                     MATRIX_ROW_VPOS (bottom_row, w->current_matrix),
            }
          if (row < bottom_row)
            {
-             struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
-             struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
-             /* Can't use this optimization with bidi-reordered glyph
-                rows, unless cursor is already at point. */
+             /* Can't simply scan the row for point with
+                bidi-reordered glyph rows.  Let set_cursor_from_row
+                figure out where to put the cursor, and if it fails,
+                give up.  */
              if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)))
                {
-                 if (!(w->cursor.hpos >= 0
-                       && w->cursor.hpos < row->used[TEXT_AREA]
-                       && BUFFERP (glyph->object)
-                       && glyph->charpos == PT))
-                   return 0;
+                 if (!set_cursor_from_row (w, row, w->current_matrix,
+                                           0, 0, 0, 0))
+                   {
+                     clear_glyph_matrix (w->desired_matrix);
+                     return 0;
+                   }
                }
              else
-               for (; glyph < end
-                      && (!BUFFERP (glyph->object)
-                          || glyph->charpos < PT);
-                    glyph++)
-                 {
-                   w->cursor.hpos++;
-                   w->cursor.x += glyph->pixel_width;
-                 }
+               {
+                 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
+                 struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
+                 for (; glyph < end
+                        && (!BUFFERP (glyph->object)
+                            || glyph->charpos < PT);
+                      glyph++)
+                   {
+                     w->cursor.hpos++;
+                     w->cursor.x += glyph->pixel_width;
+                   }
+               }
            }
        }
  
        {
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
 -        w->window_end_pos
 -          = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row));
 -        w->window_end_vpos
 -          = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix));
 +        wset_window_end_pos
 +          (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
 +        wset_window_end_vpos
 +          (w, make_number (MATRIX_ROW_VPOS (last_text_row,
 +                                            w->desired_matrix)));
        }
        else
        {
 -        w->window_end_vpos
 -          = make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled);
 +        wset_window_end_vpos
 +          (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled));
        }
  
 -      w->window_end_valid = Qnil;
 +      wset_window_end_valid (w, Qnil);
        w->desired_matrix->no_scrolling_p = 1;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
        debug_method_add (w, "try_window_reusing_current_matrix 2");
  #endif
        return 1;
  
  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 *);
 +                                                          ptrdiff_t *, ptrdiff_t *);
  static struct glyph_row *
  find_last_row_displaying_text (struct glyph_matrix *, struct it *,
                                 struct glyph_row *);
@@@ -16832,7 -16685,7 +16837,7 @@@ find_last_row_displaying_text (struct g
    row = start ? start : MATRIX_FIRST_TEXT_ROW (matrix);
    while (MATRIX_ROW_DISPLAYS_TEXT_P (row))
      {
 -      xassert (row->enabled_p);
 +      eassert (row->enabled_p);
        row_found = row;
        if (MATRIX_ROW_BOTTOM_Y (row) >= it->last_visible_y)
        break;
  static struct glyph_row *
  find_last_unchanged_at_beg_row (struct window *w)
  {
 -  EMACS_INT first_changed_pos = BEG + BEG_UNCHANGED;
 +  ptrdiff_t first_changed_pos = BEG + BEG_UNCHANGED;
    struct glyph_row *row;
    struct glyph_row *row_found = NULL;
    int yb = window_text_bottom_y (w);
  
  static struct glyph_row *
  find_first_unchanged_at_end_row (struct window *w,
 -                               EMACS_INT *delta, EMACS_INT *delta_bytes)
 +                               ptrdiff_t *delta, ptrdiff_t *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.  */
 -      EMACS_INT Z_old =
 +      ptrdiff_t Z_old =
        MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
 -      EMACS_INT Z_BYTE_old =
 +      ptrdiff_t Z_BYTE_old =
        MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
 -      EMACS_INT last_unchanged_pos, last_unchanged_pos_old;
 +      ptrdiff_t last_unchanged_pos, last_unchanged_pos_old;
        struct glyph_row *first_text_row
        = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
  
@@@ -16994,9 -16847,9 +16999,9 @@@ sync_frame_with_window_matrix_rows (str
  
    /* Preconditions: W must be a leaf window and full-width.  Its frame
       must have a frame matrix.  */
 -  xassert (NILP (w->hchild) && NILP (w->vchild));
 -  xassert (WINDOW_FULL_WIDTH_P (w));
 -  xassert (!FRAME_WINDOW_P (f));
 +  eassert (NILP (w->hchild) && NILP (w->vchild));
 +  eassert (WINDOW_FULL_WIDTH_P (w));
 +  eassert (!FRAME_WINDOW_P (f));
  
    /* If W is a full-width window, glyph pointers in W's current matrix
       have, by definition, to be the same as glyph pointers in the
     containing CHARPOS or null.  */
  
  struct glyph_row *
 -row_containing_pos (struct window *w, EMACS_INT charpos,
 +row_containing_pos (struct window *w, ptrdiff_t 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;
 +  ptrdiff_t mindif = BUF_ZV (XBUFFER (w->buffer)) + 1;
    int last_y;
  
    /* If we happen to start on a header-line, skip that.  */
@@@ -17150,16 -17003,16 +17155,16 @@@ try_window_id (struct window *w
    struct glyph_row *bottom_row;
    int bottom_vpos;
    struct it it;
 -  EMACS_INT delta = 0, delta_bytes = 0, stop_pos;
 +  ptrdiff_t 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;
 -  EMACS_INT first_changed_charpos, last_changed_charpos;
 +  ptrdiff_t first_changed_charpos, last_changed_charpos;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    if (inhibit_try_window_id)
      return 0;
  #endif
      GIVE_UP (5);
  
    /* Another way to prevent redisplay optimizations.  */
 -  if (XFASTINT (w->last_modified) == 0)
 +  if (w->last_modified == 0)
      GIVE_UP (6);
  
    /* Verify that window is not hscrolled.  */
 -  if (XFASTINT (w->hscroll) != 0)
 +  if (w->hscroll != 0)
      GIVE_UP (7);
  
    /* Verify that display wasn't paused.  */
          || (last_changed_charpos < CHARPOS (start) - 1
              && FETCH_BYTE (BYTEPOS (start) - 1) == '\n')))
      {
 -      EMACS_INT Z_old, Z_delta, Z_BYTE_old, Z_delta_bytes;
 +      ptrdiff_t Z_old, Z_delta, Z_BYTE_old, Z_delta_bytes;
        struct glyph_row *r0;
  
        /* Compute how many chars/bytes have been added to or removed
          if (row)
            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
          else
 -          abort ();
 +          emacs_abort ();
          return 1;
        }
      }
        {
          /* We have to compute the window end anew since text
             could have been added/removed after it.  */
 -        w->window_end_pos
 -          = make_number (Z - MATRIX_ROW_END_CHARPOS (row));
 +        wset_window_end_pos
 +          (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
  
          if (row)
            set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
          else
 -          abort ();
 +          emacs_abort ();
          return 2;
        }
      }
        it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
        it.current_y = MATRIX_ROW_BOTTOM_Y (last_unchanged_at_beg_row);
  
 -      xassert (it.hpos == 0 && it.current_x == 0);
 +      eassert (it.hpos == 0 && it.current_x == 0);
      }
    else
      {
    stop_pos = 0;
    if (first_unchanged_at_end_row)
      {
 -      xassert (last_unchanged_at_beg_row == NULL
 +      eassert (last_unchanged_at_beg_row == NULL
               || first_unchanged_at_end_row >= last_unchanged_at_beg_row);
  
        /* If this is a continuation line, move forward to the next one
                      + delta);
          first_unchanged_at_end_vpos
            = MATRIX_ROW_VPOS (first_unchanged_at_end_row, current_matrix);
 -        xassert (stop_pos >= Z - END_UNCHANGED);
 +        eassert (stop_pos >= Z - END_UNCHANGED);
        }
      }
    else if (last_unchanged_at_beg_row == NULL)
      GIVE_UP (19);
  
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
  
    /* Either there is no unchanged row at the end, or the one we have
       now displays text.  This is a necessary condition for the window
       end pos calculation at the end of this function.  */
 -  xassert (first_unchanged_at_end_row == NULL
 +  eassert (first_unchanged_at_end_row == NULL
           || MATRIX_ROW_DISPLAYS_TEXT_P (first_unchanged_at_end_row));
  
    debug_last_unchanged_at_beg_vpos
         : -1);
    debug_first_unchanged_at_end_vpos = first_unchanged_at_end_vpos;
  
 -#endif /* GLYPH_DEBUG != 0 */
 +#endif /* GLYPH_DEBUG */
  
  
    /* Display new lines.  Set last_text_row to the last new line
      {
        rotate_matrix (current_matrix, first_unchanged_at_end_vpos + dvpos,
                     bottom_vpos, dvpos);
 -      enable_glyph_matrix_rows (current_matrix, bottom_vpos + dvpos,
 -                              bottom_vpos, 0);
 +      clear_glyph_matrix_rows (current_matrix, bottom_vpos + dvpos,
 +                             bottom_vpos);
      }
    else if (dvpos > 0)
      {
        rotate_matrix (current_matrix, first_unchanged_at_end_vpos,
                     bottom_vpos, dvpos);
 -      enable_glyph_matrix_rows (current_matrix, first_unchanged_at_end_vpos,
 -                              first_unchanged_at_end_vpos + dvpos, 0);
 +      clear_glyph_matrix_rows (current_matrix, first_unchanged_at_end_vpos,
 +                             first_unchanged_at_end_vpos + dvpos);
      }
  
    /* For frame-based redisplay, make sure that current frame and window
        struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos);
  
        /* If last_row is the window end line, it should display text.  */
 -      xassert (last_row->displays_text_p);
 +      eassert (last_row->displays_text_p);
  
        /* If window end line was partially visible before, begin
         displaying at that line.  Otherwise begin displaying with the
         matrix.  Set row to the last row displaying text in current
         matrix starting at first_unchanged_at_end_row, after
         scrolling.  */
 -      xassert (first_unchanged_at_end_row->displays_text_p);
 +      eassert (first_unchanged_at_end_row->displays_text_p);
        row = find_last_row_displaying_text (w->current_matrix, &it,
                                           first_unchanged_at_end_row);
 -      xassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row));
 +      eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row));
  
 -      w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row));
 +      wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
        w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
 -      w->window_end_vpos
 -      = make_number (MATRIX_ROW_VPOS (row, w->current_matrix));
 -      xassert (w->window_end_bytepos >= 0);
 +      wset_window_end_vpos
 +      (w, make_number (MATRIX_ROW_VPOS (row, w->current_matrix)));
 +      eassert (w->window_end_bytepos >= 0);
        IF_DEBUG (debug_method_add (w, "A"));
      }
    else if (last_text_row_at_end)
      {
 -      w->window_end_pos
 -      = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end));
 +      wset_window_end_pos
 +      (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end)));
        w->window_end_bytepos
        = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end);
 -      w->window_end_vpos
 -      = make_number (MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix));
 -      xassert (w->window_end_bytepos >= 0);
 +      wset_window_end_vpos
 +      (w, make_number (MATRIX_ROW_VPOS (last_text_row_at_end,
 +                                        desired_matrix)));
 +      eassert (w->window_end_bytepos >= 0);
        IF_DEBUG (debug_method_add (w, "B"));
      }
    else if (last_text_row)
        /* We have displayed either to the end of the window or at the
         end of the window, i.e. the last row with text is to be found
         in the desired matrix.  */
 -      w->window_end_pos
 -      = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row));
 +      wset_window_end_pos
 +      (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
        w->window_end_bytepos
        = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
 -      w->window_end_vpos
 -      = make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix));
 -      xassert (w->window_end_bytepos >= 0);
 +      wset_window_end_vpos
 +      (w, make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)));
 +      eassert (w->window_end_bytepos >= 0);
      }
    else if (first_unchanged_at_end_row == NULL
           && last_text_row == NULL
            row  = current_row;
        }
  
 -      xassert (row != NULL);
 -      w->window_end_vpos = make_number (vpos + 1);
 -      w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row));
 +      eassert (row != NULL);
 +      wset_window_end_vpos (w, make_number (vpos + 1));
 +      wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
        w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
 -      xassert (w->window_end_bytepos >= 0);
 +      eassert (w->window_end_bytepos >= 0);
        IF_DEBUG (debug_method_add (w, "C"));
      }
    else
 -    abort ();
 +    emacs_abort ();
  
    IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos);
            debug_end_vpos = XFASTINT (w->window_end_vpos));
  
    /* Record that display has not been completed.  */
 -  w->window_end_valid = Qnil;
 +  wset_window_end_valid (w, Qnil);
    w->desired_matrix->no_scrolling_p = 1;
    return 3;
  
                        More debugging support
   ***********************************************************************/
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
  
  void dump_glyph_row (struct glyph_row *, int, int) EXTERNALLY_VISIBLE;
  void dump_glyph_matrix (struct glyph_matrix *, int) EXTERNALLY_VISIBLE;
@@@ -18029,7 -17881,7 +18034,7 @@@ dump_glyph_row (struct glyph_row *row, 
               row->visible_height,
               row->ascent,
               row->phys_ascent);
 -      fprintf (stderr, "%9d %5d\t%5d\n", row->start.overlay_string_index,
 +      fprintf (stderr, "%9"pD"d %5"pD"d\t%5d\n", row->start.overlay_string_index,
               row->end.overlay_string_index,
               row->continuation_lines_width);
        fprintf (stderr, "%9"pI"d %5"pI"d\n",
  
        for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
        {
 -        char *s = (char *) alloca (row->used[area] + 1);
 +        char *s = alloca (row->used[area] + 1);
          int i;
  
          for (i = 0; i < row->used[area]; ++i)
@@@ -18103,7 -17955,7 +18108,7 @@@ glyphs in short form, otherwise show gl
           w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);
    fprintf (stderr, "=============================================\n");
    dump_glyph_matrix (w->current_matrix,
 -                   NILP (glyphs) ? 0 : XINT (glyphs));
 +                   TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 0);
    return Qnil;
  }
  
@@@ -18126,7 -17978,7 +18131,7 @@@ GLYPH > 1 or omitted means dump glyphs 
    (Lisp_Object row, Lisp_Object glyphs)
  {
    struct glyph_matrix *matrix;
 -  int vpos;
 +  EMACS_INT vpos;
  
    CHECK_NUMBER (row);
    matrix = XWINDOW (selected_window)->current_matrix;
    if (vpos >= 0 && vpos < matrix->nrows)
      dump_glyph_row (MATRIX_ROW (matrix, vpos),
                    vpos,
 -                  INTEGERP (glyphs) ? XINT (glyphs) : 2);
 +                  TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 2);
    return Qnil;
  }
  
@@@ -18148,13 -18000,13 +18153,13 @@@ GLYPH > 1 or omitted means dump glyphs 
  {
    struct frame *sf = SELECTED_FRAME ();
    struct glyph_matrix *m = XWINDOW (sf->tool_bar_window)->current_matrix;
 -  int vpos;
 +  EMACS_INT vpos;
  
    CHECK_NUMBER (row);
    vpos = XINT (row);
    if (vpos >= 0 && vpos < m->nrows)
      dump_glyph_row (MATRIX_ROW (m, vpos), vpos,
 -                  INTEGERP (glyphs) ? XINT (glyphs) : 2);
 +                  TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 2);
    return Qnil;
  }
  
@@@ -18257,8 -18109,11 +18262,8 @@@ get_overlay_arrow_glyph_row (struct win
  }
  
  
 -/* Insert truncation glyphs at the start of IT->glyph_row.  Truncation
 -   glyphs are only inserted for terminal frames since we can't really
 -   win with truncation glyphs when partially visible glyphs are
 -   involved.  Which glyphs to insert is determined by
 -   produce_special_glyphs.  */
 +/* Insert truncation glyphs at the start of IT->glyph_row.  Which
 +   glyphs to insert is determined by produce_special_glyphs.  */
  
  static void
  insert_left_trunc_glyphs (struct it *it)
    struct it truncate_it;
    struct glyph *from, *end, *to, *toend;
  
 -  xassert (!FRAME_WINDOW_P (it->f));
 +  eassert (!FRAME_WINDOW_P (it->f)
 +         || (!it->glyph_row->reversed_p
 +             && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)
 +         || (it->glyph_row->reversed_p
 +             && WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0));
  
    /* Get the truncation glyphs.  */
    truncate_it = *it;
    /* Overwrite glyphs from IT with truncation glyphs.  */
    if (!it->glyph_row->reversed_p)
      {
 +      short tused = truncate_it.glyph_row->used[TEXT_AREA];
 +
        from = truncate_it.glyph_row->glyphs[TEXT_AREA];
 -      end = from + truncate_it.glyph_row->used[TEXT_AREA];
 +      end = from + tused;
        to = it->glyph_row->glyphs[TEXT_AREA];
        toend = to + it->glyph_row->used[TEXT_AREA];
 +      if (FRAME_WINDOW_P (it->f))
 +      {
 +        /* On GUI frames, when variable-size fonts are displayed,
 +           the truncation glyphs may need more pixels than the row's
 +           glyphs they overwrite.  We overwrite more glyphs to free
 +           enough screen real estate, and enlarge the stretch glyph
 +           on the right (see display_line), if there is one, to
 +           preserve the screen position of the truncation glyphs on
 +           the right.  */
 +        int w = 0;
 +        struct glyph *g = to;
 +        short used;
 +
 +        /* The first glyph could be partially visible, in which case
 +           it->glyph_row->x will be negative.  But we want the left
 +           truncation glyphs to be aligned at the left margin of the
 +           window, so we override the x coordinate at which the row
 +           will begin.  */
 +        it->glyph_row->x = 0;
 +        while (g < toend && w < it->truncation_pixel_width)
 +          {
 +            w += g->pixel_width;
 +            ++g;
 +          }
 +        if (g - to - tused > 0)
 +          {
 +            memmove (to + tused, g, (toend - g) * sizeof(*g));
 +            it->glyph_row->used[TEXT_AREA] -= g - to - tused;
 +          }
 +        used = it->glyph_row->used[TEXT_AREA];
 +        if (it->glyph_row->truncated_on_right_p
 +            && WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0
 +            && it->glyph_row->glyphs[TEXT_AREA][used - 2].type
 +            == STRETCH_GLYPH)
 +          {
 +            int extra = w - it->truncation_pixel_width;
 +
 +            it->glyph_row->glyphs[TEXT_AREA][used - 2].pixel_width += extra;
 +          }
 +      }
  
        while (from < end)
        *to++ = *from++;
  
        /* There may be padding glyphs left over.  Overwrite them too.  */
 -      while (to < toend && CHAR_GLYPH_PADDING_P (*to))
 +      if (!FRAME_WINDOW_P (it->f))
        {
 -        from = truncate_it.glyph_row->glyphs[TEXT_AREA];
 -        while (from < end)
 -          *to++ = *from++;
 +        while (to < toend && CHAR_GLYPH_PADDING_P (*to))
 +          {
 +            from = truncate_it.glyph_row->glyphs[TEXT_AREA];
 +            while (from < end)
 +              *to++ = *from++;
 +          }
        }
  
        if (to > toend)
      }
    else
      {
 +      short tused = truncate_it.glyph_row->used[TEXT_AREA];
 +
        /* 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;
 +      if (FRAME_WINDOW_P (it->f))
 +      {
 +        int w = 0;
 +        struct glyph *g = to;
 +
 +        while (g >= toend && w < it->truncation_pixel_width)
 +          {
 +            w += g->pixel_width;
 +            --g;
 +          }
 +        if (to - g - tused > 0)
 +          to = g + tused;
 +        if (it->glyph_row->truncated_on_right_p
 +            && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0
 +            && it->glyph_row->glyphs[TEXT_AREA][1].type == STRETCH_GLYPH)
 +          {
 +            int extra = w - it->truncation_pixel_width;
 +
 +            it->glyph_row->glyphs[TEXT_AREA][1].pixel_width += extra;
 +          }
 +      }
  
        while (from >= end && to >= toend)
        *to-- = *from--;
 -      while (to >= toend && CHAR_GLYPH_PADDING_P (*to))
 +      if (!FRAME_WINDOW_P (it->f))
        {
 -        from =
 -          truncate_it.glyph_row->glyphs[TEXT_AREA]
 -          + truncate_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)
        {
@@@ -18474,8 -18254,8 +18479,8 @@@ compute_line_metrics (struct it *it
        for (i = 0; i < row->used[TEXT_AREA]; ++i)
        row->pixel_width += row->glyphs[TEXT_AREA][i].pixel_width;
  
 -      xassert (row->pixel_width >= 0);
 -      xassert (row->ascent >= 0 && row->height > 0);
 +      eassert (row->pixel_width >= 0);
 +      eassert (row->ascent >= 0 && row->height > 0);
  
        row->overlapping_p = (MATRIX_ROW_OVERLAPS_SUCC_P (row)
                            || MATRIX_ROW_OVERLAPS_PRED_P (row));
@@@ -18751,9 -18531,9 +18756,9 @@@ extend_face_to_end_of_line (struct it *
     trailing whitespace.  */
  
  static int
 -trailing_whitespace_p (EMACS_INT charpos)
 +trailing_whitespace_p (ptrdiff_t charpos)
  {
 -  EMACS_INT bytepos = CHAR_TO_BYTE (charpos);
 +  ptrdiff_t bytepos = CHAR_TO_BYTE (charpos);
    int c = 0;
  
    while (bytepos < ZV_BYTE
@@@ -18895,7 -18675,7 +18900,7 @@@ cursor_row_p (struct glyph_row *row
  
                        for ( ; glyph >= beg && EQ (glyph->object, s); --glyph)
                          {
 -                          EMACS_INT gpos = glyph->charpos;
 +                          ptrdiff_t gpos = glyph->charpos;
  
                            if (!NILP (Fget_char_property (make_number (gpos),
                                                           Qcursor, s)))
@@@ -18948,7 -18728,7 +18953,7 @@@ push_prefix_prop (struct it *it, Lisp_O
    struct text_pos pos =
      STRINGP (it->string) ? it->current.string_pos : it->current.pos;
  
 -  xassert (it->method == GET_FROM_BUFFER
 +  eassert (it->method == GET_FROM_BUFFER
           || it->method == GET_FROM_DISPLAY_VECTOR
           || it->method == GET_FROM_STRING);
  
@@@ -19075,10 -18855,10 +19080,10 @@@ 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]);
 +  eassert (it->glyph_row);
 +  eassert (it->glyph_row->reversed_p);
 +  eassert (it->area == TEXT_AREA);
 +  eassert (n <= it->glyph_row->used[TEXT_AREA]);
  
    if (n > it->glyph_row->used[TEXT_AREA])
      n = it->glyph_row->used[TEXT_AREA];
     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)
 +              ptrdiff_t min_pos, ptrdiff_t min_bpos,
 +              ptrdiff_t max_pos, ptrdiff_t max_bpos)
  {
    /* FIXME: Revisit this when glyph ``spilling'' in continuation
       lines' rows is implemented for bidi-reordered rows.  */
        /* A line that is entirely from a string/image/stretch...  */
        row->maxpos = row->minpos;
        else
 -      abort ();
 +      emacs_abort ();
      }
    else
      row->maxpos = it->current.pos;
@@@ -19260,14 -19040,14 +19265,14 @@@ display_line (struct it *it
    int wrap_row_ascent IF_LINT (= 0), wrap_row_height IF_LINT (= 0);
    int wrap_row_phys_ascent IF_LINT (= 0), wrap_row_phys_height IF_LINT (= 0);
    int wrap_row_extra_line_spacing IF_LINT (= 0);
 -  EMACS_INT wrap_row_min_pos IF_LINT (= 0), wrap_row_min_bpos IF_LINT (= 0);
 -  EMACS_INT wrap_row_max_pos IF_LINT (= 0), wrap_row_max_bpos IF_LINT (= 0);
 +  ptrdiff_t wrap_row_min_pos IF_LINT (= 0), wrap_row_min_bpos IF_LINT (= 0);
 +  ptrdiff_t wrap_row_max_pos IF_LINT (= 0), wrap_row_max_bpos IF_LINT (= 0);
    int cvpos;
 -  EMACS_INT min_pos = ZV + 1, max_pos = 0;
 -  EMACS_INT min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0);
 +  ptrdiff_t min_pos = ZV + 1, max_pos = 0;
 +  ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0);
  
    /* We always start displaying at hpos zero even if hscrolled.  */
 -  xassert (it->hpos == 0 && it->current_x == 0);
 +  eassert (it->hpos == 0 && it->current_x == 0);
  
    if (MATRIX_ROW_VPOS (row, it->w->desired_matrix)
        >= it->w->desired_matrix->nrows)
      }
  
    /* Is IT->w showing the region?  */
 -  it->w->region_showing = it->region_beg_charpos > 0 ? Qt : Qnil;
 +  wset_region_showing (it->w, it->region_beg_charpos > 0 ? Qt : Qnil);
  
    /* Clear the result glyph row and enable it.  */
    prepare_desired_row (row);
       if the first glyph is partially visible or if we hit a line end.  */
    if (it->current_x < it->first_visible_x)
      {
 +      enum move_it_result move_result;
 +
        this_line_min_pos = row->start.pos;
 -      move_it_in_display_line_to (it, ZV, it->first_visible_x,
 -                                MOVE_TO_POS | MOVE_TO_X);
 +      move_result = move_it_in_display_line_to (it, ZV, it->first_visible_x,
 +                                              MOVE_TO_POS | MOVE_TO_X);
 +      /* If we are under a large hscroll, move_it_in_display_line_to
 +       could hit the end of the line without reaching
 +       it->first_visible_x.  Pretend that we did reach it.  This is
 +       especially important on a TTY, where we will call
 +       extend_face_to_end_of_line, which needs to know how many
 +       blank glyphs to produce.  */
 +      if (it->current_x < it->first_visible_x
 +        && (move_result == MOVE_NEWLINE_OR_CR
 +            || move_result == MOVE_POS_MATCH_OR_ZV))
 +      it->current_x = it->first_visible_x;
 +
        /* Record the smallest positions seen while we moved over
         display elements that are not visible.  This is needed by
         redisplay_internal for optimizing the case where the cursor
      {                                                         \
        int composition_p = !STRINGP ((IT)->string)             \
        && ((IT)->what == IT_COMPOSITION);                      \
 -      EMACS_INT current_pos =                                 \
 +      ptrdiff_t current_pos =                                 \
        composition_p ? (IT)->cmp_it.charpos                    \
                      : IT_CHARPOS (*(IT));                     \
 -      EMACS_INT current_bpos =                                        \
 +      ptrdiff_t current_bpos =                                        \
        composition_p ? CHAR_TO_BYTE (current_pos)              \
                      : IT_BYTEPOS (*(IT));                     \
        if (current_pos < min_pos)                              \
                      new_x > it->last_visible_x
                      /* Or it fits exactly on a window system frame.  */
                      || (new_x == it->last_visible_x
 -                        && FRAME_WINDOW_P (it->f))))
 +                        && FRAME_WINDOW_P (it->f)
 +                        && (row->reversed_p
 +                            ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                            : WINDOW_RIGHT_FRINGE_WIDTH (it->w)))))
                {
                  /* End of a continued line.  */
  
                  if (it->hpos == 0
                      || (new_x == it->last_visible_x
 -                        && FRAME_WINDOW_P (it->f)))
 +                        && FRAME_WINDOW_P (it->f)
 +                        && (row->reversed_p
 +                            ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                            : WINDOW_RIGHT_FRINGE_WIDTH (it->w))))
                    {
                      /* Current glyph is the only one on the line or
                         fits exactly on the line.  We must continue
                         window system frames.  We leave the glyph in
                         this row and let it fill the row, but don't
                         consume the TAB.  */
 +                    if ((row->reversed_p
 +                         ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                         : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0)
 +                      produce_special_glyphs (it, IT_CONTINUATION);
                      it->continuation_lines_width += it->last_visible_x;
                      row->ends_in_middle_of_char_p = 1;
                      row->continued_p = 1;
                      row->used[TEXT_AREA] = n_glyphs_before + i;
  
                      /* Display continuation glyphs.  */
 -                    if (!FRAME_WINDOW_P (it->f))
 +                    it->current_x = x_before;
 +                    it->continuation_lines_width += x;
 +                    if (!FRAME_WINDOW_P (it->f)
 +                        || (row->reversed_p
 +                            ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                            : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0)
                        produce_special_glyphs (it, IT_CONTINUATION);
                      row->continued_p = 1;
  
 -                    it->current_x = x_before;
 -                    it->continuation_lines_width += x;
                      extend_face_to_end_of_line (it);
  
                      if (nglyphs > 1 && i > 0)
                     move_it_in_display_line at the start of this
                     function, unless the text display area of the
                     window is empty.  */
 -                xassert (it->first_visible_x <= it->last_visible_x);
 +                eassert (it->first_visible_x <= it->last_visible_x);
                }
            }
          /* Even if this display element produced no glyphs at all,
        /* If we truncate lines, we are done when the last displayed
         glyphs reach past the right margin of the window.  */
        if (it->line_wrap == TRUNCATE
 -        && (FRAME_WINDOW_P (it->f)
 +        && (FRAME_WINDOW_P (it->f) && WINDOW_RIGHT_FRINGE_WIDTH (it->w)
              ? (it->current_x >= it->last_visible_x)
              : (it->current_x > it->last_visible_x)))
        {
          /* Maybe add truncation glyphs.  */
 -        if (!FRAME_WINDOW_P (it->f))
 +        if (!FRAME_WINDOW_P (it->f)
 +            || (row->reversed_p
 +                ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
 +                : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0)
            {
              int i, n;
  
                  i = row->used[TEXT_AREA] - (i + 1);
                }
  
 -            for (n = row->used[TEXT_AREA]; i < n; ++i)
 +            it->current_x = x_before;
 +            if (!FRAME_WINDOW_P (it->f))
 +              {
 +                for (n = row->used[TEXT_AREA]; i < n; ++i)
 +                  {
 +                    row->used[TEXT_AREA] = i;
 +                    produce_special_glyphs (it, IT_TRUNCATION);
 +                  }
 +              }
 +            else
                {
                  row->used[TEXT_AREA] = i;
                  produce_special_glyphs (it, IT_TRUNCATION);
                  row->exact_window_width_line_p = 1;
                  goto at_end_of_line;
                }
 +            it->current_x = x_before;
            }
  
          row->truncated_on_right_p = 1;
          reseat_at_next_visible_line_start (it, 0);
          row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n';
          it->hpos = hpos_before;
 -        it->current_x = x_before;
          break;
        }
      }
    if (it->first_visible_x
        && IT_CHARPOS (*it) != CHARPOS (row->start.pos))
      {
 -      if (!FRAME_WINDOW_P (it->f))
 +      if (!FRAME_WINDOW_P (it->f)
 +        || (row->reversed_p
 +            ? WINDOW_RIGHT_FRINGE_WIDTH (it->w)
 +            : WINDOW_LEFT_FRINGE_WIDTH (it->w)) == 0)
        insert_left_trunc_glyphs (it);
        row->truncated_on_left_p = 1;
      }
        }
        else
        {
 -        xassert (INTEGERP (overlay_arrow_string));
 +        eassert (INTEGERP (overlay_arrow_string));
          row->overlay_arrow_bitmap = XINT (overlay_arrow_string);
        }
        overlay_arrow_seen = 1;
@@@ -20029,8 -19768,8 +20034,8 @@@ See also `bidi-paragraph-direction'.  *
         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);
 +      ptrdiff_t pos = BUF_PT (buf);
 +      ptrdiff_t bytepos = BUF_PT_BYTE (buf);
        int c;
        void *itb_data = bidi_shelve_cache ();
  
          return Qright_to_left;
          break;
        default:
 -        abort ();
 +        emacs_abort ();
        }
      }
  }
@@@ -20122,7 -19861,7 +20127,7 @@@ display_menu_bar (struct window *w
  #endif /* HAVE_NS */
  
  #ifdef USE_X_TOOLKIT
 -  xassert (!FRAME_WINDOW_P (f));
 +  eassert (!FRAME_WINDOW_P (f));
    init_iterator (&it, w, -1, -1, f->desired_matrix->rows, MENU_FACE_ID);
    it.first_visible_x = 0;
    it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f);
        /* Menu bar lines are displayed in the desired matrix of the
         dummy window menu_bar_window.  */
        struct window *menu_w;
 -      xassert (WINDOWP (f->menu_bar_window));
 +      eassert (WINDOWP (f->menu_bar_window));
        menu_w = XWINDOW (f->menu_bar_window);
        init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows,
                     MENU_FACE_ID);
@@@ -20282,7 -20021,7 +20287,7 @@@ display_mode_lines (struct window *w
  
    /* These will be set while the mode line specs are processed.  */
    line_number_displayed = 0;
 -  w->column_number_displayed = Qnil;
 +  wset_column_number_displayed (w, Qnil);
  
    if (WINDOW_WANTS_MODELINE_P (w))
      {
@@@ -20318,7 -20057,7 +20323,7 @@@ display_mode_line (struct window *w, en
  {
    struct it it;
    struct face *face;
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
  
    init_iterator (&it, w, -1, -1, NULL, face_id);
    /* Don't extend on a previously drawn mode-line.
    it.paragraph_embedding = L2R;
  
    record_unwind_protect (unwind_format_mode_line,
 -                       format_mode_line_unwind_data (NULL, Qnil, 0));
 +                       format_mode_line_unwind_data (NULL, NULL, Qnil, 0));
  
    mode_line_target = MODE_LINE_DISPLAY;
  
@@@ -20448,13 -20187,13 +20453,13 @@@ display_mode_element (struct it *it, in
  
    depth++;
  
 -  switch (SWITCH_ENUM_CAST (XTYPE (elt)))
 +  switch (XTYPE (elt))
      {
      case Lisp_String:
        {
        /* A string: output it and check for %-constructs within it.  */
        unsigned char c;
 -      EMACS_INT offset = 0;
 +      ptrdiff_t offset = 0;
  
        if (SCHARS (elt) > 0
            && (!NILP (props) || risky))
               && (mode_line_target != MODE_LINE_DISPLAY
                   || it->current_x < it->last_visible_x))
          {
 -          EMACS_INT last_offset = offset;
 +          ptrdiff_t last_offset = offset;
  
            /* Advance to end of string or next format specifier.  */
            while ((c = SREF (elt, offset++)) != '\0' && c != '%')
  
            if (offset - 1 != last_offset)
              {
 -              EMACS_INT nchars, nbytes;
 +              ptrdiff_t 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:
                    {
 -                    EMACS_INT bytepos = last_offset;
 -                    EMACS_INT charpos = string_byte_to_char (elt, bytepos);
 -                    EMACS_INT endpos = (precision <= 0
 +                    ptrdiff_t bytepos = last_offset;
 +                    ptrdiff_t charpos = string_byte_to_char (elt, bytepos);
 +                    ptrdiff_t endpos = (precision <= 0
                                          ? string_byte_to_char (elt, offset)
                                          : charpos + nchars);
  
                    break;
                  case MODE_LINE_DISPLAY:
                    {
 -                    EMACS_INT bytepos = last_offset;
 -                    EMACS_INT charpos = string_byte_to_char (elt, bytepos);
 +                    ptrdiff_t bytepos = last_offset;
 +                    ptrdiff_t charpos = string_byte_to_char (elt, bytepos);
  
                      if (precision <= 0)
                        nchars = string_byte_to_char (elt, offset) - charpos;
              }
            else /* c == '%' */
              {
 -              EMACS_INT percent_position = offset;
 +              ptrdiff_t percent_position = offset;
  
                /* Get the specified minimum width.  Zero means
                   don't pad.  */
                else if (c != 0)
                  {
                    int multibyte;
 -                  EMACS_INT bytepos, charpos;
 +                  ptrdiff_t bytepos, charpos;
                    const char *spec;
                    Lisp_Object string;
  
@@@ -20901,7 -20640,7 +20906,7 @@@ static in
  store_mode_line_string (const char *string, Lisp_Object lisp_string, int copy_string,
                        int field_width, int precision, Lisp_Object props)
  {
 -  EMACS_INT len;
 +  ptrdiff_t len;
    int n = 0;
  
    if (string != NULL)
@@@ -21002,7 -20741,7 +21007,7 @@@ are the selected window and the WINDOW'
    struct buffer *old_buffer = NULL;
    int face_id;
    int no_props = INTEGERP (face);
 -  int count = SPECPDL_INDEX ();
 +  ptrdiff_t count = SPECPDL_INDEX ();
    Lisp_Object str;
    int string_start = 0;
  
      : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
      : DEFAULT_FACE_ID;
  
 -  if (XBUFFER (buffer) != current_buffer)
 -    old_buffer = current_buffer;
 +  old_buffer = current_buffer;
  
    /* Save things including mode_line_proptrans_alist,
       and set that to nil so that we don't alter the outer value.  */
    record_unwind_protect (unwind_format_mode_line,
                         format_mode_line_unwind_data
 -                           (old_buffer, selected_window, 1));
 +                         (XFRAME (WINDOW_FRAME (XWINDOW (window))),
 +                          old_buffer, selected_window, 1));
    mode_line_proptrans_alist = Qnil;
  
    Fselect_window (window, Qt);
 -  if (old_buffer)
 -    set_buffer_internal_1 (XBUFFER (buffer));
 +  set_buffer_internal_1 (XBUFFER (buffer));
  
    init_iterator (&it, w, -1, -1, NULL, face_id);
  
     the positive integer D to BUF using a minimal field width WIDTH.  */
  
  static void
 -pint2str (register char *buf, register int width, register EMACS_INT d)
 +pint2str (register char *buf, register int width, register ptrdiff_t d)
  {
    register char *p = buf;
  
@@@ -21131,11 -20871,11 +21136,11 @@@ static const char power_letter[] 
    };
  
  static void
 -pint2hrstr (char *buf, int width, EMACS_INT d)
 +pint2hrstr (char *buf, int width, ptrdiff_t d)
  {
    /* We aim to represent the nonnegative integer D as
       QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */
 -  EMACS_INT quotient = d;
 +  ptrdiff_t quotient = d;
    int remainder = 0;
    /* -1 means: do not use TENTHS. */
    int tenths = -1;
@@@ -21245,7 -20985,8 +21250,7 @@@ decode_mode_spec_coding (Lisp_Object co
  
    if (!VECTORP (val))         /* Not yet decided.  */
      {
 -      if (multibyte)
 -      *buf++ = '-';
 +      *buf++ = multibyte ? '-' : ' ';
        if (eol_flag)
        eoltype = eol_mnemonic_undecided;
        /* Don't mention EOL conversion if it isn't decided.  */
        attrs = AREF (val, 0);
        eolvalue = AREF (val, 2);
  
 -      if (multibyte)
 -      *buf++ = XFASTINT (CODING_ATTR_MNEMONIC (attrs));
 +      *buf++ = multibyte
 +      ? XFASTINT (CODING_ATTR_MNEMONIC (attrs))
 +      : ' ';
  
        if (eol_flag)
        {
        }
        else if (CHARACTERP (eoltype))
        {
 -        unsigned char *tmp = (unsigned char *) alloca (MAX_MULTIBYTE_LENGTH);
 +        unsigned char *tmp = alloca (MAX_MULTIBYTE_LENGTH);
          int c = XFASTINT (eoltype);
          eol_str_len = CHAR_STRING (c, tmp);
          eol_str = tmp;
@@@ -21415,8 -21155,8 +21420,8 @@@ decode_mode_spec (struct window *w, reg
        return "";
        else
        {
 -        EMACS_INT col = current_column ();
 -        w->column_number_displayed = make_number (col);
 +        ptrdiff_t col = current_column ();
 +        wset_column_number_displayed (w, make_number (col));
          pint2str (decode_mode_spec_buf, field_width, col);
          return decode_mode_spec_buf;
        }
  
      case 'i':
        {
 -      EMACS_INT size = ZV - BEGV;
 +      ptrdiff_t size = ZV - BEGV;
        pint2str (decode_mode_spec_buf, field_width, size);
        return decode_mode_spec_buf;
        }
  
      case 'I':
        {
 -      EMACS_INT size = ZV - BEGV;
 +      ptrdiff_t size = ZV - BEGV;
        pint2hrstr (decode_mode_spec_buf, field_width, size);
        return decode_mode_spec_buf;
        }
  
      case 'l':
        {
 -      EMACS_INT startpos, startpos_byte, line, linepos, linepos_byte;
 -      EMACS_INT topline, nlines, height;
 -      EMACS_INT junk;
 +      ptrdiff_t startpos, startpos_byte, line, linepos, linepos_byte;
 +      ptrdiff_t topline, nlines, height;
 +      ptrdiff_t junk;
  
        /* %c and %l are ignored in `frame-title-format'.  */
        if (mode_line_target == MODE_LINE_TITLE)
          goto no_value;
        /* But do forget it, if the window shows a different buffer now.  */
        else if (BUFFERP (w->base_line_pos))
 -        w->base_line_pos = Qnil;
 +        wset_base_line_pos (w, Qnil);
  
        /* If the buffer is very big, don't waste time.  */
        if (INTEGERP (Vline_number_display_limit)
            && BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit))
          {
 -          w->base_line_pos = Qnil;
 -          w->base_line_number = Qnil;
 +          wset_base_line_pos (w, Qnil);
 +          wset_base_line_number (w, Qnil);
            goto no_value;
          }
  
           go back past it.  */
        if (startpos == BUF_BEGV (b))
          {
 -          w->base_line_number = make_number (topline);
 -          w->base_line_pos = make_number (BUF_BEGV (b));
 +          wset_base_line_number (w, make_number (topline));
 +          wset_base_line_pos (w, make_number (BUF_BEGV (b)));
          }
        else if (nlines < height + 25 || nlines > height * 3 + 50
                 || linepos == BUF_BEGV (b))
          {
 -          EMACS_INT limit = BUF_BEGV (b);
 -          EMACS_INT limit_byte = BUF_BEGV_BYTE (b);
 -          EMACS_INT position;
 -          EMACS_INT distance =
 +          ptrdiff_t limit = BUF_BEGV (b);
 +          ptrdiff_t limit_byte = BUF_BEGV_BYTE (b);
 +          ptrdiff_t position;
 +          ptrdiff_t distance =
              (height * 2 + 30) * line_number_display_limit_width;
  
            if (startpos - distance > limit)
               give up on line numbers for this window.  */
            if (position == limit_byte && limit == startpos - distance)
              {
 -              w->base_line_pos = w->buffer;
 -              w->base_line_number = Qnil;
 +              wset_base_line_pos (w, w->buffer);
 +              wset_base_line_number (w, Qnil);
                goto no_value;
              }
  
 -          w->base_line_number = make_number (topline - nlines);
 -          w->base_line_pos = make_number (BYTE_TO_CHAR (position));
 +          wset_base_line_number (w, make_number (topline - nlines));
 +          wset_base_line_pos (w, make_number (BYTE_TO_CHAR (position)));
          }
  
        /* Now count lines from the start pos to point.  */
  
      case 'p':
        {
 -      EMACS_INT pos = marker_position (w->start);
 -      EMACS_INT total = BUF_ZV (b) - BUF_BEGV (b);
 +      ptrdiff_t pos = marker_position (w->start);
 +      ptrdiff_t 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, "%2"pI"d%%", total);
 +          sprintf (decode_mode_spec_buf, "%2"pD"d%%", total);
            return decode_mode_spec_buf;
          }
        }
        /* Display percentage of size above the bottom of the screen.  */
      case 'P':
        {
 -      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);
 +      ptrdiff_t toppos = marker_position (w->start);
 +      ptrdiff_t botpos = BUF_Z (b) - XFASTINT (w->window_end_pos);
 +      ptrdiff_t 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%2"pI"d%%", total);
 +            sprintf (decode_mode_spec_buf, "Top%2"pD"d%%", total);
            else
 -            sprintf (decode_mode_spec_buf, "%2"pI"d%%", total);
 +            sprintf (decode_mode_spec_buf, "%2"pD"d%%", total);
            return decode_mode_spec_buf;
          }
        }
  
      case '@':
        {
 -      int count = inhibit_garbage_collection ();
 +      ptrdiff_t count = inhibit_garbage_collection ();
        Lisp_Object val = call1 (intern ("file-remote-p"),
                                 BVAR (current_buffer, directory));
        unbind_to (count, Qnil);
        obj = Fget_buffer_process (Fcurrent_buffer ());
        if (PROCESSP (obj))
          {
 -          p = decode_mode_spec_coding (XPROCESS (obj)->decode_coding_system,
 -                                       p, eol_flag);
 -          p = decode_mode_spec_coding (XPROCESS (obj)->encode_coding_system,
 -                                       p, eol_flag);
 +          p = decode_mode_spec_coding
 +            (XPROCESS (obj)->decode_coding_system, p, eol_flag);
 +          p = decode_mode_spec_coding
 +            (XPROCESS (obj)->encode_coding_system, p, eol_flag);
          }
  #endif /* subprocesses */
  #endif /* 0 */
  
     Set *BYTE_POS_PTR to 1 if we found COUNT lines, 0 if we hit LIMIT.  */
  
 -static EMACS_INT
 -display_count_lines (EMACS_INT start_byte,
 -                   EMACS_INT limit_byte, EMACS_INT count,
 -                   EMACS_INT *byte_pos_ptr)
 +static ptrdiff_t
 +display_count_lines (ptrdiff_t start_byte,
 +                   ptrdiff_t limit_byte, ptrdiff_t count,
 +                   ptrdiff_t *byte_pos_ptr)
  {
    register unsigned char *cursor;
    unsigned char *base;
  
 -  register EMACS_INT ceiling;
 +  register ptrdiff_t ceiling;
    register unsigned char *ceiling_addr;
 -  EMACS_INT orig_count = count;
 +  ptrdiff_t orig_count = count;
  
    /* If we are not in selective display mode,
       check only for newlines.  */
  
  static int
  display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_string,
 -              EMACS_INT face_string_pos, EMACS_INT start, struct it *it,
 +              ptrdiff_t face_string_pos, ptrdiff_t 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;
    struct glyph_row *row = it->glyph_row;
 -  EMACS_INT it_charpos;
 +  ptrdiff_t it_charpos;
  
    /* Initialize the iterator IT for iteration over STRING beginning
       with index START.  */
       FACE_STRING, if that's given.  */
    if (STRINGP (face_string))
      {
 -      EMACS_INT endptr;
 +      ptrdiff_t endptr;
        struct face *face;
  
        it->face_id
            {
              /* Glyph is off the left margin of the display area.
                 Should not happen.  */
 -            abort ();
 +            emacs_abort ();
            }
  
          row->ascent = max (row->ascent, it->max_ascent);
    if (it->first_visible_x
        && it_charpos > 0)
      {
 -      if (!FRAME_WINDOW_P (it->f))
 +      if (!FRAME_WINDOW_P (it->f)
 +        || (row->reversed_p
 +            ? WINDOW_RIGHT_FRINGE_WIDTH (it->w)
 +            : WINDOW_LEFT_FRINGE_WIDTH (it->w)) == 0)
        insert_left_trunc_glyphs (it);
        row->truncated_on_left_p = 1;
      }
@@@ -22229,7 -21966,7 +22234,7 @@@ calc_pixel_width_or_height (double *res
    if (NILP (prop))
      return OK_PIXELS (0);
  
 -  xassert (FRAME_LIVE_P (it->f));
 +  eassert (FRAME_LIVE_P (it->f));
  
    if (SYMBOLP (prop))
      {
            return OK_PIXELS (WINDOW_SCROLL_BAR_AREA_WIDTH (it->w));
        }
  
 -      prop = Fbuffer_local_value (prop, it->w->buffer);
 +      prop = buffer_local_value_1 (prop, it->w->buffer);
 +      if (EQ (prop, Qunbound))
 +      prop = Qnil;
      }
  
    if (INTEGERP (prop) || FLOATP (prop))
              return OK_PIXELS (pixels);
            }
  
 -        car = Fbuffer_local_value (car, it->w->buffer);
 +        car = buffer_local_value_1 (car, it->w->buffer);
 +        if (EQ (car, Qunbound))
 +          car = Qnil;
        }
  
        if (INTEGERP (car) || FLOATP (car))
  
  #ifdef HAVE_WINDOW_SYSTEM
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
  
  void
  dump_glyph_string (struct glyph_string *s)
@@@ -22556,7 -22289,7 +22561,7 @@@ get_char_face_and_encoding (struct fram
    if (display_p)
  #endif
      {
 -      xassert (face != NULL);
 +      eassert (face != NULL);
        PREPARE_FACE_FOR_DISPLAY (f, face);
      }
  
@@@ -22574,7 -22307,7 +22579,7 @@@ get_glyph_face_and_encoding (struct fra
  {
    struct face *face;
  
 -  xassert (glyph->type == CHAR_GLYPH);
 +  eassert (glyph->type == CHAR_GLYPH);
    face = FACE_FROM_ID (f, glyph->face_id);
  
    if (two_byte_p)
      }
  
    /* Make sure X resources of the face are allocated.  */
 -  xassert (face != NULL);
 +  eassert (face != NULL);
    PREPARE_FACE_FOR_DISPLAY (f, face);
    return face;
  }
@@@ -22642,7 -22375,7 +22647,7 @@@ fill_composite_glyph_string (struct gly
       glyph that requires the different face, add it to S.  */
    struct face *face;
  
 -  xassert (s);
 +  eassert (s);
  
    s->for_overlaps = overlaps;
    s->face = NULL;
@@@ -22752,13 -22485,13 +22757,13 @@@ fill_glyphless_glyph_string (struct gly
    struct glyph *glyph, *last;
    int voffset;
  
 -  xassert (s->first_glyph->type == GLYPHLESS_GLYPH);
 +  eassert (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->font = s->face->font ? s->face->font : FRAME_FONT (s->f);
    s->nchars = 1;
    s->width = glyph->pixel_width;
    glyph++;
@@@ -22793,9 -22526,9 +22798,9 @@@ fill_glyph_string (struct glyph_string 
    int voffset;
    int glyph_not_available_p;
  
 -  xassert (s->f == XFRAME (s->w->frame));
 -  xassert (s->nchars == 0);
 -  xassert (start >= 0 && end > start);
 +  eassert (s->f == XFRAME (s->w->frame));
 +  eassert (s->nchars == 0);
 +  eassert (start >= 0 && end > start);
  
    s->for_overlaps = overlaps;
    glyph = s->row->glyphs[s->area] + start;
                                               &two_byte_p);
        s->two_byte_p = two_byte_p;
        ++s->nchars;
 -      xassert (s->nchars <= end - start);
 +      eassert (s->nchars <= end - start);
        s->width += glyph->pixel_width;
        if (glyph++->padding_p != s->padding_p)
        break;
    /* Adjust base line for subscript/superscript text.  */
    s->ybase += voffset;
  
 -  xassert (s->face && s->face->gc);
 +  eassert (s->face && s->face->gc);
    return glyph - s->row->glyphs[s->area];
  }
  
  static void
  fill_image_glyph_string (struct glyph_string *s)
  {
 -  xassert (s->first_glyph->type == IMAGE_GLYPH);
 +  eassert (s->first_glyph->type == IMAGE_GLYPH);
    s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id);
 -  xassert (s->img);
 +  eassert (s->img);
    s->slice = s->first_glyph->slice.img;
    s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
    s->font = s->face->font;
@@@ -22875,7 -22608,7 +22880,7 @@@ fill_stretch_glyph_string (struct glyph
    struct glyph *glyph, *last;
    int voffset, face_id;
  
 -  xassert (s->first_glyph->type == STRETCH_GLYPH);
 +  eassert (s->first_glyph->type == STRETCH_GLYPH);
  
    glyph = s->row->glyphs[s->area] + start;
    last = s->row->glyphs[s->area] + end;
  
    /* The case that face->gc == 0 is handled when drawing the glyph
       string by calling PREPARE_FACE_FOR_DISPLAY.  */
 -  xassert (s->face);
 +  eassert (s->face);
    return glyph - s->row->glyphs[s->area];
  }
  
@@@ -23033,8 -22766,7 +23038,8 @@@ right_overwritten (struct glyph_string 
      {
        int x = 0, i;
        struct glyph *glyphs = s->row->glyphs[s->area];
 -      int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
 +      int first = (s->first_glyph - glyphs
 +                 + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
        int end = s->row->used[s->area];
  
        for (i = first; i < end && s->right_overhang > x; ++i)
@@@ -23057,8 -22789,7 +23062,8 @@@ right_overwriting (struct glyph_string 
    int i, k, x;
    int end = s->row->used[s->area];
    struct glyph *glyphs = s->row->glyphs[s->area];
 -  int first = (s->first_glyph - glyphs) + (s->cmp ? 1 : s->nchars);
 +  int first = (s->first_glyph - glyphs
 +             + (s->first_glyph->type == COMPOSITE_GLYPH ? 1 : s->nchars));
  
    k = -1;
    x = 0;
@@@ -23166,7 -22897,7 +23171,7 @@@ compute_overhangs_and_x (struct glyph_s
  #define BUILD_STRETCH_GLYPH_STRING(START, END, HEAD, TAIL, HL, X, LAST_X)   \
       do                                                                           \
         {                                                                  \
 -       s = (struct glyph_string *) alloca (sizeof *s);                    \
 +       s = alloca (sizeof *s);                                            \
         INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL);              \
         START = fill_stretch_glyph_string (s, START, END);                 \
         append_glyph_string (&HEAD, &TAIL, s);                             \
  #define BUILD_IMAGE_GLYPH_STRING(START, END, HEAD, TAIL, HL, X, LAST_X) \
       do                                                                       \
         {                                                              \
 -       s = (struct glyph_string *) alloca (sizeof *s);                \
 +       s = alloca (sizeof *s);                                        \
         INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL);          \
         fill_image_glyph_string (s);                                   \
         append_glyph_string (&HEAD, &TAIL, s);                         \
                                                                           \
         face_id = (row)->glyphs[area][START].face_id;                     \
                                                                           \
 -       s = (struct glyph_string *) alloca (sizeof *s);                   \
 -       char2b = (XChar2b *) alloca ((END - START) * sizeof *char2b);     \
 +       s = alloca (sizeof *s);                                           \
 +       char2b = alloca ((END - START) * sizeof *char2b);                 \
         INIT_GLYPH_STRING (s, char2b, w, row, area, START, HL);           \
         append_glyph_string (&HEAD, &TAIL, s);                            \
         s->x = (X);                                                       \
      struct glyph_string *first_s = NULL;                                  \
      int n;                                                                \
                                                                            \
 -    char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len);      \
 +    char2b = alloca (cmp->glyph_len * sizeof *char2b);                            \
                                                                            \
      /* Make glyph_strings for each glyph sequence that is drawable by     \
         the same face, and append them to HEAD/TAIL.  */                           \
      for (n = 0; n < cmp->glyph_len;)                                      \
        {                                                                           \
 -      s = (struct glyph_string *) alloca (sizeof *s);                     \
 +      s = alloca (sizeof *s);                                             \
        INIT_GLYPH_STRING (s, char2b, w, row, area, START, HL);             \
        append_glyph_string (&(HEAD), &(TAIL), s);                          \
        s->cmp = cmp;                                                       \
      face_id = (row)->glyphs[area][START].face_id;                       \
      gstring = (composition_gstring_from_id                              \
               ((row)->glyphs[area][START].u.cmp.id));                    \
 -    s = (struct glyph_string *) alloca (sizeof *s);                     \
 -    char2b = (XChar2b *) alloca ((sizeof *char2b)                       \
 -                               * LGSTRING_GLYPH_LEN (gstring));         \
 +    s = alloca (sizeof *s);                                             \
 +    char2b = alloca (LGSTRING_GLYPH_LEN (gstring) * sizeof *char2b);    \
      INIT_GLYPH_STRING (s, char2b, w, row, area, START, HL);             \
      append_glyph_string (&(HEAD), &(TAIL), s);                                  \
      s->x = (X);                                                                 \
                                                                            \
        face_id = (row)->glyphs[area][START].face_id;                       \
                                                                            \
 -      s = (struct glyph_string *) alloca (sizeof *s);                     \
 +      s = alloca (sizeof *s);                                             \
        INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL);               \
        append_glyph_string (&HEAD, &TAIL, s);                              \
        s->x = (X);                                                         \
              break;                                                    \
                                                                        \
            default:                                                    \
 -            abort ();                                                 \
 +            emacs_abort ();                                                   \
            }                                                           \
                                                                        \
          if (s)                                                        \
  
  static int
  draw_glyphs (struct window *w, int x, struct glyph_row *row,
 -           enum glyph_row_area area, EMACS_INT start, EMACS_INT end,
 +           enum glyph_row_area area, ptrdiff_t start, ptrdiff_t end,
             enum draw_glyphs_face hl, int overlaps)
  {
    struct glyph_string *head, *tail;
@@@ -23646,8 -23378,8 +23651,8 @@@ append_glyph (struct it *it
    struct glyph *glyph;
    enum glyph_row_area area = it->area;
  
 -  xassert (it->glyph_row);
 -  xassert (it->char_to_display != '\n' && it->char_to_display != '\t');
 +  eassert (it->glyph_row);
 +  eassert (it->char_to_display != '\n' && it->char_to_display != '\t');
  
    glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
    if (glyph < it->glyph_row->glyphs[area + 1])
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
 -          abort ();
 +          emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
        else
@@@ -23720,7 -23452,7 +23725,7 @@@ append_composite_glyph (struct it *it
    struct glyph *glyph;
    enum glyph_row_area area = it->area;
  
 -  xassert (it->glyph_row);
 +  eassert (it->glyph_row);
  
    glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
    if (glyph < it->glyph_row->glyphs[area + 1])
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
 -          abort ();
 +          emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
        ++it->glyph_row->used[area];
@@@ -23812,10 -23544,10 +23817,10 @@@ produce_image_glyph (struct it *it
    int glyph_ascent, crop;
    struct glyph_slice slice;
  
 -  xassert (it->what == IT_IMAGE);
 +  eassert (it->what == IT_IMAGE);
  
    face = FACE_FROM_ID (it->f, it->face_id);
 -  xassert (face);
 +  eassert (face);
    /* Make sure X resources of the face is loaded.  */
    PREPARE_FACE_FOR_DISPLAY (it->f, face);
  
      }
  
    img = IMAGE_FROM_ID (it->f, it->image_id);
 -  xassert (img);
 +  eassert (img);
    /* Make sure X resources of the image is loaded.  */
    prepare_image_for_display (it->f, img);
  
            {
              glyph->resolved_level = it->bidi_it.resolved_level;
              if ((it->bidi_it.type & 7) != it->bidi_it.type)
 -              abort ();
 +              emacs_abort ();
              glyph->bidi_type = it->bidi_it.type;
            }
          ++it->glyph_row->used[area];
@@@ -23971,7 -23703,7 +23976,7 @@@ append_stretch_glyph (struct it *it, Li
    struct glyph *glyph;
    enum glyph_row_area area = it->area;
  
 -  xassert (ascent >= 0 && ascent <= height);
 +  eassert (ascent >= 0 && ascent <= height);
  
    glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area];
    if (glyph < it->glyph_row->glyphs[area + 1])
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
 -          abort ();
 +          emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
        else
@@@ -24081,7 -23813,7 +24086,7 @@@ produce_stretch_glyph (struct it *it
  #endif
  
    /* List should start with `space'.  */
 -  xassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace));
 +  eassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace));
    plist = XCDR (it->object);
  
    /* Compute the width of the stretch.  */
      it->nglyphs = width;
  }
  
 +/* Get information about special display element WHAT in an
 +   environment described by IT.  WHAT is one of IT_TRUNCATION or
 +   IT_CONTINUATION.  Maybe produce glyphs for WHAT if IT has a
 +   non-null glyph_row member.  This function ensures that fields like
 +   face_id, c, len of IT are left untouched.  */
 +
 +static void
 +produce_special_glyphs (struct it *it, enum display_element_type what)
 +{
 +  struct it temp_it;
 +  Lisp_Object gc;
 +  GLYPH glyph;
 +
 +  temp_it = *it;
 +  temp_it.object = make_number (0);
 +  memset (&temp_it.current, 0, sizeof temp_it.current);
 +
 +  if (what == IT_CONTINUATION)
 +    {
 +      /* Continuation glyph.  For R2L lines, we mirror it by hand.  */
 +      if (it->bidi_it.paragraph_dir == R2L)
 +      SET_GLYPH_FROM_CHAR (glyph, '/');
 +      else
 +      SET_GLYPH_FROM_CHAR (glyph, '\\');
 +      if (it->dp
 +        && (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc)))
 +      {
 +        /* FIXME: Should we mirror GC for R2L lines?  */
 +        SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
 +        spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
 +      }
 +    }
 +  else if (what == IT_TRUNCATION)
 +    {
 +      /* Truncation glyph.  */
 +      SET_GLYPH_FROM_CHAR (glyph, '$');
 +      if (it->dp
 +        && (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc)))
 +      {
 +        /* FIXME: Should we mirror GC for R2L lines?  */
 +        SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
 +        spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
 +      }
 +    }
 +  else
 +    emacs_abort ();
 +
 +#ifdef HAVE_WINDOW_SYSTEM
 +  /* On a GUI frame, when the right fringe (left fringe for R2L rows)
 +     is turned off, we precede the truncation/continuation glyphs by a
 +     stretch glyph whose width is computed such that these special
 +     glyphs are aligned at the window margin, even when very different
 +     fonts are used in different glyph rows.  */
 +  if (FRAME_WINDOW_P (temp_it.f)
 +      /* init_iterator calls this with it->glyph_row == NULL, and it
 +       wants only the pixel width of the truncation/continuation
 +       glyphs.  */
 +      && temp_it.glyph_row
 +      /* insert_left_trunc_glyphs calls us at the beginning of the
 +       row, and it has its own calculation of the stretch glyph
 +       width.  */
 +      && temp_it.glyph_row->used[TEXT_AREA] > 0
 +      && (temp_it.glyph_row->reversed_p
 +        ? WINDOW_LEFT_FRINGE_WIDTH (temp_it.w)
 +        : WINDOW_RIGHT_FRINGE_WIDTH (temp_it.w)) == 0)
 +    {
 +      int stretch_width = temp_it.last_visible_x - temp_it.current_x;
 +
 +      if (stretch_width > 0)
 +      {
 +        struct face *face = FACE_FROM_ID (temp_it.f, temp_it.face_id);
 +        struct font *font =
 +          face->font ? face->font : FRAME_FONT (temp_it.f);
 +        int stretch_ascent =
 +          (((temp_it.ascent + temp_it.descent)
 +            * FONT_BASE (font)) / FONT_HEIGHT (font));
 +
 +        append_stretch_glyph (&temp_it, make_number (0), stretch_width,
 +                              temp_it.ascent + temp_it.descent,
 +                              stretch_ascent);
 +      }
 +    }
 +#endif
 +
 +  temp_it.dp = NULL;
 +  temp_it.what = IT_CHARACTER;
 +  temp_it.len = 1;
 +  temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph);
 +  temp_it.face_id = GLYPH_FACE (glyph);
 +  temp_it.len = CHAR_BYTES (temp_it.c);
 +
 +  PRODUCE_GLYPHS (&temp_it);
 +  it->pixel_width = temp_it.pixel_width;
 +  it->nglyphs = temp_it.pixel_width;
 +}
 +
  #ifdef HAVE_WINDOW_SYSTEM
  
  /* Calculate line-height and line-spacing properties.
@@@ -24462,7 -24098,7 +24467,7 @@@ append_glyphless_glyph (struct it *it, 
        {
          glyph->resolved_level = it->bidi_it.resolved_level;
          if ((it->bidi_it.type & 7) != it->bidi_it.type)
 -          abort ();
 +          emacs_abort ();
          glyph->bidi_type = it->bidi_it.type;
        }
        ++it->glyph_row->used[area];
@@@ -24556,7 -24192,7 +24561,7 @@@ produce_glyphless_glyph (struct it *it
        }
        else
        {
 -        xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
 +        eassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
          sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c);
          str = buf;
        }
@@@ -24658,7 -24294,7 +24663,7 @@@ x_produce_glyphs (struct it *it
             Vglyphless_char_display.  */
          Lisp_Object acronym = lookup_glyphless_char_display (-1, it);
  
 -        xassert (it->what == IT_GLYPHLESS);
 +        eassert (it->what == IT_GLYPHLESS);
          produce_glyphless_glyph (it, 1, STRINGP (acronym) ? acronym : Qnil);
          goto done;
        }
          XChar2b char2b;
          struct font_metrics *pcm;
          int font_not_found_p;
 -        EMACS_INT pos;
 +        ptrdiff_t pos;
  
          for (glyph_len = cmp->glyph_len; glyph_len > 0; glyph_len--)
            if ((c = COMPOSITION_GLYPH (cmp, glyph_len - 1)) != '\t')
          font_descent = FONT_DESCENT (font) - boff;
          font_height = FONT_HEIGHT (font);
  
 -        cmp->font = (void *) font;
 +        cmp->font = font;
  
          pcm = NULL;
          if (! font_not_found_p)
   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);
 +  eassert (it->ascent >= 0 && it->descent >= 0);
    if (it->area == TEXT_AREA)
      it->current_x += it->pixel_width;
  
@@@ -25312,7 -24948,7 +25317,7 @@@ x_write_glyphs (struct glyph *start, in
  {
    int x, hpos, chpos = updated_window->phys_cursor.hpos;
  
 -  xassert (updated_window && updated_row);
 +  eassert (updated_window && updated_row);
    /* When the window is hscrolled, cursor hpos can legitimately be out
       of bounds, but we draw the cursor at the corresponding window
       margin in that case.  */
@@@ -25359,9 -24995,9 +25364,9 @@@ x_insert_glyphs (struct glyph *start, i
    struct glyph_row *row;
    struct glyph *glyph;
    int frame_x, frame_y;
 -  EMACS_INT hpos;
 +  ptrdiff_t hpos;
  
 -  xassert (updated_window && updated_row);
 +  eassert (updated_window && updated_row);
    BLOCK_INPUT;
    w = updated_window;
    f = XFRAME (WINDOW_FRAME (w));
@@@ -25416,7 -25052,7 +25421,7 @@@ x_clear_end_of_line (int to_x
    int max_x, min_y, max_y;
    int from_x, from_y, to_y;
  
 -  xassert (updated_window && updated_row);
 +  eassert (updated_window && updated_row);
    f = XFRAME (w->frame);
  
    if (updated_row->full_width_p)
@@@ -25506,7 -25142,8 +25511,7 @@@ get_specified_cursor_type (Lisp_Object 
  
    if (CONSP (arg)
        && EQ (XCAR (arg), Qbar)
 -      && INTEGERP (XCDR (arg))
 -      && XINT (XCDR (arg)) >= 0)
 +      && RANGED_INTEGERP (0, XCDR (arg), INT_MAX))
      {
        *width = XINT (XCDR (arg));
        return BAR_CURSOR;
  
    if (CONSP (arg)
        && EQ (XCAR (arg), Qhbar)
 -      && INTEGERP (XCDR (arg))
 -      && XINT (XCDR (arg)) >= 0)
 +      && RANGED_INTEGERP (0, XCDR (arg), INT_MAX))
      {
        *width = XINT (XCDR (arg));
        return HBAR_CURSOR;
@@@ -26041,7 -25679,7 +26046,7 @@@ display_and_set_cursor (struct window *
        || (0 <= hpos && hpos < glyph_row->used[TEXT_AREA]))
      glyph = glyph_row->glyphs[TEXT_AREA] + hpos;
  
 -  xassert (interrupt_input_blocked);
 +  eassert (interrupt_input_blocked);
  
    /* Set new_cursor_type to the cursor we want to be displayed.  */
    new_cursor_type = get_window_cursor_type (w, glyph,
@@@ -26178,7 -25816,7 +26183,7 @@@ draw_row_with_mouse_face (struct windo
        return;
      }
  #endif
 -#if defined (HAVE_GPM) || defined (MSDOS)
 +#if defined (HAVE_GPM) || defined (MSDOS) || defined (WINDOWSNT)
    tty_draw_row_with_mouse_face (w, row, start_hpos, end_hpos, draw);
  #endif
  }
@@@ -26417,7 -26055,7 +26422,7 @@@ cursor_in_mouse_face_p (struct window *
     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,
 +                   ptrdiff_t start_charpos, ptrdiff_t end_charpos,
                     Lisp_Object disp_string,
                     struct glyph_row **start, struct glyph_row **end)
  {
    for ( ; row->enabled_p && MATRIX_ROW_BOTTOM_Y (row) <= last_y; row++)
      {
        struct glyph_row *next = row + 1;
 -      EMACS_INT next_start = MATRIX_ROW_START_CHARPOS (next);
 +      ptrdiff_t next_start = MATRIX_ROW_START_CHARPOS (next);
  
        if (!next->enabled_p
          || next >= MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w)
  static void
  mouse_face_from_buffer_pos (Lisp_Object window,
                            Mouse_HLInfo *hlinfo,
 -                          EMACS_INT mouse_charpos,
 -                          EMACS_INT start_charpos,
 -                          EMACS_INT end_charpos,
 +                          ptrdiff_t mouse_charpos,
 +                          ptrdiff_t start_charpos,
 +                          ptrdiff_t end_charpos,
                            Lisp_Object before_string,
                            Lisp_Object after_string,
                            Lisp_Object disp_string)
    struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
    struct glyph_row *r1, *r2;
    struct glyph *glyph, *end;
 -  EMACS_INT ignore, pos;
 +  ptrdiff_t ignore, pos;
    int x;
  
 -  xassert (NILP (disp_string) || STRINGP (disp_string));
 -  xassert (NILP (before_string) || STRINGP (before_string));
 -  xassert (NILP (after_string) || STRINGP (after_string));
 +  eassert (NILP (disp_string) || STRINGP (disp_string));
 +  eassert (NILP (before_string) || STRINGP (before_string));
 +  eassert (NILP (after_string) || STRINGP (after_string));
  
    /* Find the rows corresponding to START_CHARPOS and END_CHARPOS.  */
    rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2);
     Value is non-zero if a glyph was found.  */
  
  static int
 -fast_find_string_pos (struct window *w, EMACS_INT pos, Lisp_Object object,
 +fast_find_string_pos (struct window *w, ptrdiff_t pos, Lisp_Object object,
                      int *hpos, int *vpos, int *x, int *y, int right_p)
  {
    int yb = window_text_bottom_y (w);
  static void
  mouse_face_from_string_pos (struct window *w, Mouse_HLInfo *hlinfo,
                            Lisp_Object object,
 -                          EMACS_INT startpos, EMACS_INT endpos)
 +                          ptrdiff_t startpos, ptrdiff_t endpos)
  {
    int yb = window_text_bottom_y (w);
    struct glyph_row *r;
@@@ -27158,8 -26796,8 +27163,8 @@@ on_hot_spot_p (Lisp_Object hot_spot, in
        {
          struct Lisp_Vector *v = XVECTOR (XCDR (hot_spot));
          Lisp_Object *poly = v->contents;
 -        int n = v->header.size;
 -        int i;
 +        ptrdiff_t n = v->header.size;
 +        ptrdiff_t i;
          int inside = 0;
          Lisp_Object lx, ly;
          int x0, y0;
@@@ -27237,9 -26875,7 +27242,9 @@@ Returns the alist element for the firs
    CHECK_NUMBER (x);
    CHECK_NUMBER (y);
  
 -  return find_hot_spot (map, XINT (x), XINT (y));
 +  return find_hot_spot (map,
 +                      clip_to_bounds (INT_MIN, XINT (x), INT_MAX),
 +                      clip_to_bounds (INT_MIN, XINT (y), INT_MAX));
  }
  
  
@@@ -27298,14 -26934,14 +27303,14 @@@ note_mode_line_or_margin_highlight (Lis
    Cursor cursor = No_Cursor;
    Lisp_Object pointer = Qnil;
    int dx, dy, width, height;
 -  EMACS_INT charpos;
 +  ptrdiff_t charpos;
    Lisp_Object string, object = Qnil;
 -  Lisp_Object pos, help;
 +  Lisp_Object pos IF_LINT (= Qnil), help;
  
    Lisp_Object mouse_face;
    int original_x_pixel = x;
    struct glyph * glyph = NULL, * row_start_glyph = NULL;
 -  struct glyph_row *row;
 +  struct glyph_row *row IF_LINT (= 0);
  
    if (area == ON_MODE_LINE || area == ON_HEADER_LINE)
      {
              if (!NILP (help))
                {
                  help_echo_string = help;
 -                /* Is this correct?  ++kfs */
                  XSETWINDOW (help_echo_window, w);
                  help_echo_object = w->buffer;
                  help_echo_pos = charpos;
  #endif        /* HAVE_WINDOW_SYSTEM */
  
    if (STRINGP (string))
 +    pos = make_number (charpos);
 +
 +  /* Set the help text and mouse pointer.  If the mouse is on a part
 +     of the mode line without any text (e.g. past the right edge of
 +     the mode line text), use the default help text and pointer.  */
 +  if (STRINGP (string) || area == ON_MODE_LINE)
      {
 -      pos = make_number (charpos);
 -      /* If we're on a string with `help-echo' text property, arrange
 -       for the help to be displayed.  This is done by setting the
 -       global variable help_echo_string to the help string.  */
 +      /* Arrange to display the help by setting the global variables
 +       help_echo_string, help_echo_object, and help_echo_pos.  */
        if (NILP (help))
        {
 -        help = Fget_text_property (pos, Qhelp_echo, string);
 +        if (STRINGP (string))
 +          help = Fget_text_property (pos, Qhelp_echo, string);
 +
          if (!NILP (help))
            {
              help_echo_string = help;
              help_echo_object = string;
              help_echo_pos = charpos;
            }
 +        else if (area == ON_MODE_LINE)
 +          {
 +            Lisp_Object default_help
 +              = buffer_local_value_1 (Qmode_line_default_help_echo,
 +                                      w->buffer);
 +
 +            if (STRINGP (default_help))
 +              {
 +                help_echo_string = default_help;
 +                XSETWINDOW (help_echo_window, w);
 +                help_echo_object = Qnil;
 +                help_echo_pos = -1;
 +              }
 +          }
        }
  
  #ifdef HAVE_WINDOW_SYSTEM
 +      /* Change the mouse pointer according to what is under it.  */
        if (FRAME_WINDOW_P (f))
        {
          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)))
 +        if (STRINGP (string))
            {
 -            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;
 +            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;
 +              }
            }
 +        else
 +          /* Default mode-line pointer.  */
 +          cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
        }
  #endif
 +    }
  
 -     /* Change the mouse face according to what is under X/Y.  */
 +  /* Change the mouse face according to what is under X/Y.  */
 +  if (STRINGP (string))
 +    {
        mouse_face = Fget_text_property (pos, Qmouse_face, string);
        if (!NILP (mouse_face)
          && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE))
          int gpos;
          int gseq_length;
          int total_pixel_width;
 -        EMACS_INT begpos, endpos, ignore;
 +        ptrdiff_t begpos, endpos, ignore;
  
          int vpos, hpos;
  
@@@ -27694,18 -27300,18 +27699,18 @@@ note_mouse_highlight (struct frame *f, 
    b = XBUFFER (w->buffer);
    if (part == ON_TEXT
        && EQ (w->window_end_valid, w->buffer)
 -      && XFASTINT (w->last_modified) == BUF_MODIFF (b)
 -      && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b))
 +      && w->last_modified == BUF_MODIFF (b)
 +      && w->last_overlay_modified == BUF_OVERLAY_MODIFF (b))
      {
        int hpos, vpos, dx, dy, area = LAST_AREA;
 -      EMACS_INT pos;
 +      ptrdiff_t pos;
        struct glyph *glyph;
        Lisp_Object object;
        Lisp_Object mouse_face = Qnil, position;
        Lisp_Object *overlay_vec = NULL;
        ptrdiff_t i, noverlays;
        struct buffer *obuf;
 -      EMACS_INT obegv, ozv;
 +      ptrdiff_t obegv, ozv;
        int same_region;
  
        /* Find the glyph under X/Y.  */
              /* The mouse-highlighting comes from a display string
                 with a mouse-face.  */
              Lisp_Object s, e;
 -            EMACS_INT ignore;
 +            ptrdiff_t ignore;
  
              s = Fprevious_single_property_change
                (make_number (pos + 1), Qmouse_face, object, Qnil);
                  /* 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);
 -                EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
 +                ptrdiff_t start = MATRIX_ROW_START_CHARPOS (r);
                  pos = string_buffer_position (object, start);
                  if (pos > 0)
                    {
        else
          {
            Lisp_Object obj = glyph->object;
 -          EMACS_INT charpos = glyph->charpos;
 +          ptrdiff_t charpos = glyph->charpos;
  
            /* Try text properties.  */
            if (STRINGP (obj)
                       see if the buffer text ``under'' it does.  */
                    struct glyph_row *r
                      = MATRIX_ROW (w->current_matrix, vpos);
 -                  EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
 -                  EMACS_INT p = string_buffer_position (obj, start);
 +                  ptrdiff_t start = MATRIX_ROW_START_CHARPOS (r);
 +                  ptrdiff_t p = string_buffer_position (obj, start);
                    if (p > 0)
                      {
                        help = Fget_char_property (make_number (p),
          if (NILP (pointer))
            {
              Lisp_Object obj = glyph->object;
 -            EMACS_INT charpos = glyph->charpos;
 +            ptrdiff_t charpos = glyph->charpos;
  
              /* Try text properties.  */
              if (STRINGP (obj)
                         see if the buffer text ``under'' it does.  */
                      struct glyph_row *r
                        = MATRIX_ROW (w->current_matrix, vpos);
 -                    EMACS_INT start = MATRIX_ROW_START_CHARPOS (r);
 -                    EMACS_INT p = string_buffer_position (obj, start);
 +                    ptrdiff_t start = MATRIX_ROW_START_CHARPOS (r);
 +                    ptrdiff_t p = string_buffer_position (obj, start);
                      if (p > 0)
                        pointer = Fget_char_property (make_number (p),
                                                      Qpointer, w->buffer);
@@@ -28206,7 -27812,7 +28211,7 @@@ expose_area (struct window *w, struct g
  static int
  expose_line (struct window *w, struct glyph_row *row, XRectangle *r)
  {
 -  xassert (row->enabled_p);
 +  eassert (row->enabled_p);
  
    if (row->mode_line_p || w->pseudo_window_p)
      draw_glyphs (w, 0, row, TEXT_AREA,
@@@ -28246,7 -27852,7 +28251,7 @@@ expose_overlaps (struct window *w
    for (row = first_overlapping_row; row <= last_overlapping_row; ++row)
      if (row->overlapping_p)
        {
 -      xassert (row->enabled_p && !row->mode_line_p);
 +      eassert (row->enabled_p && !row->mode_line_p);
  
        row->clip = r;
        if (row->used[LEFT_MARGIN_AREA])
@@@ -28692,7 -28298,7 +28697,7 @@@ syms_of_xdisp (void
    message_dolog_marker3 = Fmake_marker ();
    staticpro (&message_dolog_marker3);
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    defsubr (&Sdump_frame_glyph_matrix);
    defsubr (&Sdump_glyph_matrix);
    defsubr (&Sdump_glyph_row);
    staticpro (&echo_area_buffer[0]);
    staticpro (&echo_area_buffer[1]);
  
 -  Vmessages_buffer_name = make_pure_c_string ("*Messages*");
 +  Vmessages_buffer_name = build_pure_c_string ("*Messages*");
    staticpro (&Vmessages_buffer_name);
  
    mode_line_proptrans_alist = Qnil;
    Vmode_line_unwind_vector = Qnil;
    staticpro (&Vmode_line_unwind_vector);
  
 +  DEFSYM (Qmode_line_default_help_echo, "mode-line-default-help-echo");
 +
    help_echo_string = Qnil;
    staticpro (&help_echo_string);
    help_echo_object = Qnil;
  
  #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.
 +    doc: /* Non-nil means draw block 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.  */);
    x_stretch_cursor_p = 0;
  #endif
  
    DEFVAR_LISP ("show-trailing-whitespace", Vshow_trailing_whitespace,
 -    doc: /* *Non-nil means highlight trailing whitespace.
 +    doc: /* Non-nil means highlight trailing whitespace.
  The face used for trailing whitespace is `trailing-whitespace'.  */);
    Vshow_trailing_whitespace = Qnil;
  
@@@ -28840,7 -28444,7 +28845,7 @@@ A value of nil means no special handlin
    Vnobreak_char_display = Qt;
  
    DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer,
 -    doc: /* *The pointer shape to show in void text areas.
 +    doc: /* The pointer shape to show in void text areas.
  A value of nil means to show the text pointer.  Other options are `arrow',
  `text', `hand', `vdrag', `hdrag', `modeline', and `hourglass'.  */);
    Vvoid_text_area_pointer = Qarrow;
@@@ -28863,7 -28467,7 +28868,7 @@@ See also `overlay-arrow-string'.  */)
    DEFVAR_LISP ("overlay-arrow-string", Voverlay_arrow_string,
      doc: /* String to display as an arrow in non-window frames.
  See also `overlay-arrow-position'.  */);
 -  Voverlay_arrow_string = make_pure_c_string ("=>");
 +  Voverlay_arrow_string = build_pure_c_string ("=>");
  
    DEFVAR_LISP ("overlay-arrow-variable-list", Voverlay_arrow_variable_list,
      doc: /* List of variables (symbols) which hold markers for overlay arrows.
@@@ -28873,14 -28477,14 +28878,14 @@@ where to display overlay arrows.  */)
      = Fcons (intern_c_string ("overlay-arrow-position"), Qnil);
  
    DEFVAR_INT ("scroll-step", emacs_scroll_step,
 -    doc: /* *The number of lines to try scrolling a window by when point moves out.
 +    doc: /* The number of lines to try scrolling a window by when point moves out.
  If that fails to bring point back on frame, point is centered instead.
  If this is zero, point is always centered after it moves off frame.
  If you want scrolling to always be a line at a time, you should set
  `scroll-conservatively' to a large value rather than set this to 1.  */);
  
    DEFVAR_INT ("scroll-conservatively", scroll_conservatively,
 -    doc: /* *Scroll up to this many lines, to bring point back on screen.
 +    doc: /* Scroll up to this many lines, to bring point back on screen.
  If point moves off-screen, redisplay will scroll by up to
  `scroll-conservatively' lines in order to bring point just barely
  onto the screen again.  If that cannot be done, then redisplay
@@@ -28894,7 -28498,7 +28899,7 @@@ A value of zero means always recenter p
    scroll_conservatively = 0;
  
    DEFVAR_INT ("scroll-margin", scroll_margin,
 -    doc: /* *Number of lines of margin at the top and bottom of a window.
 +    doc: /* Number of lines of margin at the top and bottom of a window.
  Recenter the window whenever point gets within this many lines
  of the top or bottom of the window.  */);
    scroll_margin = 0;
  Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI).  */);
    Vdisplay_pixels_per_inch = make_float (72.0);
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    DEFVAR_INT ("debug-end-pos", debug_end_pos, doc: /* Don't ask.  */);
  #endif
  
@@@ -28930,20 -28534,20 +28935,20 @@@ Any other value means to use the approp
    mode_line_inverse_video = 1;
  
    DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit,
 -    doc: /* *Maximum buffer size for which line number should be displayed.
 +    doc: /* Maximum buffer size for which line number should be displayed.
  If the buffer is bigger than this, the line number does not appear
  in the mode line.  A value of nil means no limit.  */);
    Vline_number_display_limit = Qnil;
  
    DEFVAR_INT ("line-number-display-limit-width",
              line_number_display_limit_width,
 -    doc: /* *Maximum line width (in characters) for line number display.
 +    doc: /* Maximum line width (in characters) for line number display.
  If the average length of the lines near point is bigger than this, then the
  line number may be omitted from the mode line.  */);
    line_number_display_limit_width = 200;
  
    DEFVAR_BOOL ("highlight-nonselected-windows", highlight_nonselected_windows,
 -    doc: /* *Non-nil means highlight region even in nonselected windows.  */);
 +    doc: /* Non-nil means highlight region even in nonselected windows.  */);
    highlight_nonselected_windows = 0;
  
    DEFVAR_BOOL ("multiple-frames", multiple_frames,
@@@ -28968,14 -28572,14 +28973,14 @@@ and is used only on frames for which n
  \(see `modify-frame-parameters').  */);
    Vicon_title_format
      = Vframe_title_format
 -    = pure_cons (intern_c_string ("multiple-frames"),
 -               pure_cons (make_pure_c_string ("%b"),
 -                          pure_cons (pure_cons (empty_unibyte_string,
 -                                                pure_cons (intern_c_string ("invocation-name"),
 -                                                           pure_cons (make_pure_c_string ("@"),
 -                                                                      pure_cons (intern_c_string ("system-name"),
 -                                                                                 Qnil)))),
 -                                     Qnil)));
 +    = listn (CONSTYPE_PURE, 3,
 +           intern_c_string ("multiple-frames"),
 +           build_pure_c_string ("%b"),
 +           listn (CONSTYPE_PURE, 4,
 +                  empty_unibyte_string,
 +                  intern_c_string ("invocation-name"),
 +                  build_pure_c_string ("@"),
 +                  intern_c_string ("system-name")));
  
    DEFVAR_LISP ("message-log-max", Vmessage_log_max,
      doc: /* Maximum number of lines to keep in the message log buffer.
@@@ -29015,7 -28619,7 +29020,7 @@@ See `set-window-redisplay-end-trigger'
    Vredisplay_end_trigger_functions = Qnil;
  
    DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window,
 -     doc: /* *Non-nil means autoselect window with mouse pointer.
 +     doc: /* Non-nil means autoselect window with mouse pointer.
  If nil, do not autoselect windows.
  A positive number means delay autoselection by that many seconds: a
  window is autoselected only after the mouse has remained in that
@@@ -29035,7 -28639,7 +29040,7 @@@ When customizing this variable make sur
    Vmouse_autoselect_window = Qnil;
  
    DEFVAR_LISP ("auto-resize-tool-bars", Vauto_resize_tool_bars,
 -    doc: /* *Non-nil means automatically resize tool-bars.
 +    doc: /* Non-nil means automatically resize tool-bars.
  This dynamically changes the tool-bar's height to the minimum height
  that is needed to make all tool-bar items visible.
  If value is `grow-only', the tool-bar's height is only increased
@@@ -29043,15 -28647,15 +29048,15 @@@ automatically; to decrease the tool-ba
    Vauto_resize_tool_bars = Qt;
  
    DEFVAR_BOOL ("auto-raise-tool-bar-buttons", auto_raise_tool_bar_buttons_p,
 -    doc: /* *Non-nil means raise tool-bar buttons when the mouse moves over them.  */);
 +    doc: /* Non-nil means raise tool-bar buttons when the mouse moves over them.  */);
    auto_raise_tool_bar_buttons_p = 1;
  
    DEFVAR_BOOL ("make-cursor-line-fully-visible", make_cursor_line_fully_visible_p,
 -    doc: /* *Non-nil means to scroll (recenter) cursor line if it is not fully visible.  */);
 +    doc: /* Non-nil means to scroll (recenter) cursor line if it is not fully visible.  */);
    make_cursor_line_fully_visible_p = 1;
  
    DEFVAR_LISP ("tool-bar-border", Vtool_bar_border,
 -    doc: /* *Border below tool-bar in pixels.
 +    doc: /* Border below tool-bar in pixels.
  If an integer, use it as the height of the border.
  If it is one of `internal-border-width' or `border-width', use the
  value of the corresponding frame parameter.
@@@ -29059,7 -28663,7 +29064,7 @@@ Otherwise, no border is added below th
    Vtool_bar_border = Qinternal_border_width;
  
    DEFVAR_LISP ("tool-bar-button-margin", Vtool_bar_button_margin,
 -    doc: /* *Margin around tool-bar buttons in pixels.
 +    doc: /* Margin around tool-bar buttons in pixels.
  If an integer, use that for both horizontal and vertical margins.
  Otherwise, value should be a pair of integers `(HORZ . VERT)' with
  HORZ specifying the horizontal margin, and VERT specifying the
@@@ -29067,7 -28671,7 +29072,7 @@@ vertical margin.  */)
    Vtool_bar_button_margin = make_number (DEFAULT_TOOL_BAR_BUTTON_MARGIN);
  
    DEFVAR_INT ("tool-bar-button-relief", tool_bar_button_relief,
 -    doc: /* *Relief thickness of tool-bar buttons.  */);
 +    doc: /* Relief thickness of tool-bar buttons.  */);
    tool_bar_button_relief = DEFAULT_TOOL_BAR_BUTTON_RELIEF;
  
    DEFVAR_LISP ("tool-bar-style", Vtool_bar_style,
@@@ -29078,13 -28682,11 +29083,13 @@@ It can be one o
   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.  */);
 + any other        - use system default or image if no system default.
 +
 +This variable only affects the GTK+ toolkit version of Emacs.  */);
    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.
 +    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;
@@@ -29099,7 -28701,7 +29104,7 @@@ fontified regions the property `fontifi
  
    DEFVAR_BOOL ("unibyte-display-via-language-environment",
                 unibyte_display_via_language_environment,
 -    doc: /* *Non-nil means display unibyte text according to language environment.
 +    doc: /* Non-nil means display unibyte text according to language environment.
  Specifically, this means that raw bytes in the range 160-255 decimal
  are displayed by converting them to the equivalent multibyte characters
  according to the current language environment.  As a result, they are
@@@ -29110,7 -28712,7 +29115,7 @@@ but does not change the fact they are i
    unibyte_display_via_language_environment = 0;
  
    DEFVAR_LISP ("max-mini-window-height", Vmax_mini_window_height,
 -    doc: /* *Maximum height for resizing mini-windows (the minibuffer and the echo area).
 +    doc: /* Maximum height for resizing mini-windows (the minibuffer and the echo area).
  If a float, it specifies a fraction of the mini-window frame's height.
  If an integer, it specifies a number of lines.  */);
    Vmax_mini_window_height = make_float (0.25);
@@@ -29144,12 -28746,12 +29149,12 @@@ point visible.  */)
    DEFSYM (Qauto_hscroll_mode, "auto-hscroll-mode");
  
    DEFVAR_INT ("hscroll-margin", hscroll_margin,
 -    doc: /* *How many columns away from the window edge point is allowed to get
 +    doc: /* How many columns away from the window edge point is allowed to get
  before automatic hscrolling will horizontally scroll the window.  */);
    hscroll_margin = 5;
  
    DEFVAR_LISP ("hscroll-step", Vhscroll_step,
 -    doc: /* *How many columns to scroll the window when point gets too close to the edge.
 +    doc: /* How many columns to scroll the window when point gets too close to the edge.
  When point is less than `hscroll-margin' columns from the window
  edge, automatic hscrolling will scroll the window by the amount of columns
  determined by this variable.  If its value is a positive integer, scroll that
@@@ -29221,7 -28823,7 +29226,7 @@@ To add a prefix to continuation lines, 
      doc: /* Non-nil means don't free realized faces.  Internal use only.  */);
    inhibit_free_realized_faces = 0;
  
 -#if GLYPH_DEBUG
 +#ifdef GLYPH_DEBUG
    DEFVAR_BOOL ("inhibit-try-window-id", inhibit_try_window_id,
               doc: /* Inhibit try_window_id display optimization.  */);
    inhibit_try_window_id = 0;
  #endif /* GLYPH_DEBUG */
  
    DEFVAR_INT ("overline-margin", overline_margin,
 -             doc: /* *Space between overline and text, in pixels.
 +             doc: /* Space between overline and text, in pixels.
  The default value is 2: the height of the overline (1 pixel) plus 1 pixel
  margin to the character height.  */);
    overline_margin = 2;
@@@ -29257,7 -28859,7 +29262,7 @@@ cursor shapes.  */)
    display_hourglass_p = 1;
  
    DEFVAR_LISP ("hourglass-delay", Vhourglass_delay,
 -             doc: /* *Seconds to wait before displaying an hourglass pointer when Emacs is busy.  */);
 +             doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy.  */);
    Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
  
    hourglass_atimer = NULL;
@@@ -29295,10 -28897,6 +29300,10 @@@ Its value should be an ASCII acronym st
    Vglyphless_char_display = Fmake_char_table (Qglyphless_char_display, Qnil);
    Fset_char_table_extra_slot (Vglyphless_char_display, make_number (0),
                              Qempty_box);
 +
 +  DEFVAR_LISP ("debug-on-message", Vdebug_on_message,
 +             doc: /* If non-nil, debug if a message matching this regexp is displayed.  */);
 +  Vdebug_on_message = Qnil;
  }
  
  
@@@ -29322,13 -28920,12 +29327,13 @@@ init_xdisp (void
  
        echo_area_window = minibuf_window;
  
 -      XSETFASTINT (r->top_line, FRAME_TOP_MARGIN (f));
 -      XSETFASTINT (r->total_lines, FRAME_LINES (f) - 1 - FRAME_TOP_MARGIN (f));
 -      XSETFASTINT (r->total_cols, FRAME_COLS (f));
 -      XSETFASTINT (m->top_line, FRAME_LINES (f) - 1);
 -      XSETFASTINT (m->total_lines, 1);
 -      XSETFASTINT (m->total_cols, FRAME_COLS (f));
 +      wset_top_line (r, make_number (FRAME_TOP_MARGIN (f)));
 +      wset_total_lines
 +      (r, make_number (FRAME_LINES (f) - 1 - FRAME_TOP_MARGIN (f)));
 +      wset_total_cols (r, make_number (FRAME_COLS (f)));
 +      wset_top_line (m, make_number (FRAME_LINES (f) - 1));
 +      wset_total_lines (m, make_number (1));
 +      wset_total_cols (m, make_number (FRAME_COLS (f)));
  
        scratch_glyph_row.glyphs[TEXT_AREA] = scratch_glyphs;
        scratch_glyph_row.glyphs[TEXT_AREA + 1]
      /* Allocate the buffer for frame titles.
         Also used for `format-mode-line'.  */
      int size = 100;
 -    mode_line_noprop_buf = (char *) xmalloc (size);
 +    mode_line_noprop_buf = xmalloc (size);
      mode_line_noprop_buf_end = mode_line_noprop_buf + size;
      mode_line_noprop_ptr = mode_line_noprop_buf;
      mode_line_target = MODE_LINE_DISPLAY;
  
  /* Platform-independent portion of hourglass implementation. */
  
 -/* Return non-zero if hourglass timer has been started or hourglass is
 -   shown.  */
 -int
 -hourglass_started (void)
 -{
 -  return hourglass_shown_p || hourglass_atimer != NULL;
 -}
 -
  /* Cancel a currently active hourglass timer, and start a new one.  */
  void
  start_hourglass (void)
  {
  #if defined (HAVE_WINDOW_SYSTEM)
    EMACS_TIME delay;
 -  int secs, usecs = 0;
  
    cancel_hourglass ();
  
    if (INTEGERP (Vhourglass_delay)
        && XINT (Vhourglass_delay) > 0)
 -    secs = XFASTINT (Vhourglass_delay);
 +    delay = make_emacs_time (min (XINT (Vhourglass_delay),
 +                                TYPE_MAXIMUM (time_t)),
 +                           0);
    else if (FLOATP (Vhourglass_delay)
           && XFLOAT_DATA (Vhourglass_delay) > 0)
 -    {
 -      Lisp_Object tem;
 -      tem = Ftruncate (Vhourglass_delay, Qnil);
 -      secs = XFASTINT (tem);
 -      usecs = (XFLOAT_DATA (Vhourglass_delay) - secs) * 1000000;
 -    }
 +    delay = EMACS_TIME_FROM_DOUBLE (XFLOAT_DATA (Vhourglass_delay));
    else
 -    secs = DEFAULT_HOURGLASS_DELAY;
 +    delay = make_emacs_time (DEFAULT_HOURGLASS_DELAY, 0);
  
 -  EMACS_SET_SECS_USECS (delay, secs, usecs);
    hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
                                   show_hourglass, NULL);
  #endif