Merge changes from emacs-23 branch.
authorChong Yidong <cyd@stupidchicken.com>
Fri, 16 Jul 2010 15:42:15 +0000 (11:42 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 16 Jul 2010 15:42:15 +0000 (11:42 -0400)
1  2 
lisp/ChangeLog
lisp/simple.el
lisp/vc/vc.el
src/ChangeLog
src/gtkutil.c
src/gtkutil.h
src/w32fns.c
src/xfns.c
src/xmenu.c
src/xterm.c
src/xterm.h

diff --combined lisp/ChangeLog
+ 2010-07-16  Reiner Steib  <Reiner.Steib@gmx.de>
+       * vc.el (vc-coding-system-inherit-eol): New defvar.
+       (vc-coding-system-for-diff): Use it to decide whether to inherit
+       from the file the EOL format for reading the diffs of that file.
+       (Bug#4451)
+ 2010-07-16  Eli Zaretskii  <eliz@gnu.org>
+       * mail/rmailmm.el (rmail-mime-save): Make the temp buffer
+       unibyte, so compressed attachments are not compressed again.
 +2010-07-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired
 +      "/bin/sh" but `tramp-remote-sh' from `tramp-methods'.
 +      (tramp-find-shell): Simplify setting connection property.
 +      (tramp-get-ls-command): Make test for "--color=never" stronger.
 +
 +2010-07-15  Simon South  <ssouth@member.fsf.org>
 +
 +      * progmodes/delphi.el (delphi-previous-indent-of): Indent case
 +      blocks within record declarations (i.e. variant parts) correctly.
 +
 +2010-07-15  Simon South  <ssouth@member.fsf.org>
 +
 +      * progmodes/delphi.el (delphi-token-at): Give newlines precedence
 +      over literal tokens when parsing so newlines aren't "absorbed" by
 +      single-line comments.  Corrects the indentation of case blocks
 +      that have a comment on the first line.
 +
 +2010-07-14  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * bookmark.el (bookmark-load-hook): Fix doc string as suggested
 +      by Drew Adams (Bug#5504).
 +
+ 2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
+       * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127
+       now that unicode is used (Bug#6594).
  2010-07-14  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * simple.el (push-mark-command): Set the selection if
 -      select-active-regions is non-nil.
 +      * term/x-win.el (x-select-enable-clipboard): Default to t.
 +      (x-initialize-window-system): Don't overwrite Paste menu item.
 +
 +      * simple.el (select-active-regions): Default to t.
 +      (push-mark-command): Don't overwrite primary with empty string.
 +
 +      * mouse.el: Bind mouse-2 to mouse-yank-primary.
 +      (mouse-drag-copy-region): Default to nil.
 +
 +      * menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
 +      Cut/Copy/Paste menu bar items.
 +
 +2010-07-13  Thierry Volpiatto <thierry.volpiatto@gmail.com>
 +
 +      Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
 +      Patch applied by Karl Fogel.
 +
 +      * bookmark.el (bookmark-set): Don't set `bookmark-yank-point'
 +      and `bookmark-current-buffer' if they have been already set in
 +      another buffer (e.g gnus-art).
 +
 +2010-07-13  Karl Fogel  <kfogel@red-bean.com>
 +            Thierry Volpiatto <thierry.volpiatto@gmail.com>
 +
 +      Preparation for setting bookmarks in Gnus article buffers (Bug#5975).
 +
 +      * bookmark.el (bookmark-make-record-default): Allow unneeded
 +      information to be omitted from the record.
 +
 +      Adjust declarations and calls:
 +
 +      * info.el (bookmark-make-record-default): Adjust declaration.
 +      (Info-bookmark-make-record): Adjust call.
 +
 +      * woman.el (bookmark-make-record-default): Adjust declaration.
 +      (woman-bookmark-make-record): Adjust call.
 +
 +      * man.el (bookmark-make-record-default): Adjust declaration.
 +      (Man-bookmark-make-record): Adjust call.
 +
 +      * image-mode.el (bookmark-make-record-default): Adjust declaration.
 +
 +      * doc-view.el (bookmark-make-record-default): Adjust declaration.
 +
 +2010-07-13  Karl Fogel  <kfogel@red-bean.com>
 +
 +      * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'.
 +      This is also from Thierry Volpiatto's patch in bug #6444.  However,
 +      because it was extraneous to the functional change in that patch,
 +      and causes a re-indendation, I am committing it separately.
 +
 +2010-07-13  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * bookmark.el (bookmark-show-annotation): Ensure annotations show,
 +      e.g. in Info bookmarks, by using `switch-to-buffer-other-window'.
 +      Patch applied by Karl Fogel (Bug#6444).
 +
 +2010-07-13  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.el (make-frame): Fix typo in 2010-06-30 change (Bug#6625).
 +
 +2010-07-13  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +
 +      * term/ns-win.el: Bind M-~ to 'ns-prev-frame (due to Matthew
 +      Dempsky; bug#5084).  Remove incorrect binding for S-tab.
 +      (ns-alternatives-map): Change S-tab binding to backtab
 +      (bug#6616).
 +
 +      * simple.el (normal-erase-is-backspace-setup-frame): Set mode on
 +      under ns.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * language/tai-viet.el ("TaiViet"): Try to fix re-encoding
 +      bugs. (Bug#5806)
 +
 +      * language/tv-util.el (tai-viet-re): Remove format.
 +
 +2010-07-12  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el: Remove no-byte-compile declaration.  Change
 +      coding: tag to utf-8.  Register hebrew-shape-gstring in
 +      composition-function-table for 3-character looking back.
 +      (hebrew-font-get-precomposed): New function.
 +      (hebrew-shape-gstring): Utilize precomposed glyphs if available.
 +
 +2010-07-11  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-drag-track): Handle select-active-regions
 +      (Bug#6612).
 +
 +2010-07-11  Magnus Henoch  <magnus.henoch@gmail.com>
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass
 +      empty argument to gvfs-copy.
  
+ 2010-07-10  Glenn Morris  <rgm@gnu.org>
+       * calendar/calendar.el (calendar-week-end-day): New function.
+       * calendar/cal-tex.el (cal-tex-cursor-month): Remove unused vars.
+       Respect calendar-week-start-day.  (Bug#6606)
+       (cal-tex-insert-day-names, cal-tex-insert-blank-days)
+       (cal-tex-insert-blank-days-at-end): Respect calendar-week-start-day.
+       (cal-tex-first-blank-p, cal-tex-last-blank-p): Simplify, and
+       respect calendar-week-start-day.
+ 2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
+       * simple.el (use-region-p): Doc fix (Bug#6607).
 +2010-07-10  Aleksei Gusev  <aleksei.gusev@gmail.com>  (tiny change)
 +
 +      * progmodes/compile.el (compilation-error-regexp-alist-alist): Add
 +      regexps for cucumber and ruby.
 +
 +2010-07-08  Daiki Ueno  <ueno@unixuser.org>
 +
 +      * epa-file.el (epa-file-error, epa-file--find-file-not-found-function)
 +      (epa-file-insert-file-contents): Hack to prevent
 +      find-file from opening empty buffer when decryptin failed
 +      (bug#6568).
 +
 +2010-07-07  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * ispell.el (ispell-alternate-dictionary): Use file-readable-p.
 +      Return nil if no word-list is found at default locations.
 +      (ispell-complete-word-dict): Default to nil.
 +      (ispell-command-loop): Use 'word-list' when using lookup-words.
 +      (lookup-words): Use ispell-complete-word-dict or
 +      ispell-alternate-dictionary.  Check for word-list availability
 +      and handle errors if needed with better messages (Bug#6539).
 +      (ispell-complete-word): Use ispell-complete-word-dict or
 +      ispell-alternate-dictionary.
 +
  2010-07-07  Christoph Scholtes  <cschol2112@gmail.com>
  
        * progmodes/python.el (python-font-lock-keywords): Add Python 2.7
  
  2010-07-07  Glenn Morris  <rgm@gnu.org>
  
 +      * play/zone.el (top-level): Do not require timer, tabify, or cl.
 +      (zone-shift-left): Ignore intangibility, and any errors from
 +      forward-char.
 +      (zone-shift-right): Remove no-op end-of-line.  Ignore intangibility.
 +      (zone-pgm-putz-with-case): Use upcase-region rather than inserting,
 +      deleting, and copying text properties.
 +      (zone-line-specs, zone-pgm-stress): Check forward-line exit status.
 +      (zone-pgm-rotate): Handle odd buffers like that of gomoku, where getting
 +      to point-max is hard.
 +      (zone-fret, zone-fill-out-screen): Replace cl's do with dotimes.
 +      (zone-fill-out-screen): Ignore intangibility.
 +
 +2010-07-05  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * menu-bar.el (menu-bar-mode):
 +      * tool-bar.el (tool-bar-mode): Replace default-frame-alist element
 +      if it has been set.
 +
 +      * mouse.el (mouse-drag-track): Call mouse-start-end to handle
 +      word/line selection (Bug#6565).
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * net/dbus.el (dbus-send-signal): Declare function.
 +
 +2010-07-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/dbus.el: Implement signal "PropertiesChanged" (from D-Bus 1.3.1).
 +      (dbus-register-property): New optional argument EMITS-SIGNAL.
 +      (dbus-property-handler): Send signal "PropertiesChanged" if requested.
 +
 +2010-07-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * mouse.el (mouse-drag-overlay): Variable deleted.
 +      (mouse-move-drag-overlay, mouse-show-mark): Functions deleted.
 +      (mouse--remap-link-click-p): New function.
 +      (mouse-drag-track): Handle dragging by using temporary Transient
 +      Mark mode, instead of a special overlay.
 +      (mouse-kill-ring-save, mouse-save-then-kill): Don't call
 +      mouse-show-mark.
 +
 +      * mouse-sel.el (mouse-sel-selection-alist): mouse-drag-overlay
 +      deleted.
 +
 +2010-07-02  Juri Linkov  <juri@jurta.org>
 +
 +      * autoinsert.el (auto-insert-alist): Fix readability
 +      by using dotted pair notation for lambda.
 +
 +2010-07-02  Juri Linkov  <juri@jurta.org>
 +
 +      * faces.el (read-face-name): Rename arg `string-describing-default'
 +      to `default'.  Doc fix.  Display the default value in quotes
 +      in the prompt.  With empty input, return the `default' arg,
 +      unless the default value is a string (in which case return nil).
 +      (describe-face): Replace the string `default' arg of `read-face-name'
 +      with the symbol `default'.
 +
 +2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emulation/viper-cmd.el (viper-delete-backward-char)
 +      (viper-del-backward-char-in-insert)
 +      (viper-del-backward-char-in-replace, viper-change)
 +      (viper-backward-indent): Replace delete-backward-char with
 +      delete-char (Bug#6552).
 +
 +2010-07-01  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ruler-mode.el (ruler--save-header-line-format): Fix typos.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.el (make-frame): Add default-frame-alist to the PARAMETERS
 +      argument passed to frame-creation-function (Bug#5378).
 +
 +      * faces.el (x-handle-named-frame-geometry)
 +      (x-handle-reverse-video, x-create-frame-with-faces)
 +      (face-set-after-frame-default, tty-create-frame-with-faces): Don't
 +      separately consult default-frame-alist.  It is now passed as the
 +      PARAMETER argument.
 +
 +2010-06-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * startup.el (command-line): Don't call tool-bar-setup in a
 +      tty-only build.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ruler-mode.el (ruler--save-header-line-format): New fun.
 +      (ruler-mode): Use it as a setter function, so as not to overwrite
 +      ruler-mode-header-line-format-old if Ruler mode is on (Bug#5370).
 +
 +2010-06-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * vc/vc.el (vc-deduce-backend): New fun.  Handle diff buffers.
 +      (vc-root-diff, vc-print-root-log, vc-log-incoming)
 +      (vc-log-outgoing): Use it.
 +      (vc-diff-internal): Set diff-vc-backend.
 +
 +      * vc/diff-mode.el (diff-vc-backend): New var.
 +
 +2010-06-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * dynamic-setting.el (font-setting-change-default-font): Remove
 +      call to message.
 +
 +2010-06-28  Kenichi Handa  <handa@m17n.org>
 +
 +      * international/quail.el (quail-insert-kbd-layout): Fix the
 +      showing of untranslated characters.
 +
 +2010-06-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * simple.el (delete-active-region): New option.
 +      (delete-backward-char): Implement in Lisp.
 +      (delete-forward-char): New command.
 +
 +      * mouse.el (mouse-region-delete-keys): Deleted.
 +      (mouse-show-mark): Simplify.
 +
 +      * bindings.el (global-map): Bind delete and DEL, the former to
 +      delete-forward-char.
 +
 +2010-01-16  Lennart Borgman  <lennart.borgman@gmail.com>
 +
 +      * progmodes/ruby-mode.el (ruby-mode-map): Don't bind TAB.
 +      (ruby-mode): Bind indent-line-function (Bug#5119).
 +
 +2010-06-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line): Recognize "0" X resource value.
 +
 +2010-06-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * startup.el (command-line): Use X resources to set the value of
 +      menu-bar-mode and tool-bar-mode, before calling frame-initialize.
 +
 +      * menu-bar.el (menu-bar-mode):
 +      * tool-bar.el (tool-bar-mode): Don't change default-frame-alist.
 +      Set init-value to t.
 +
 +      * frame.el (frame-notice-user-settings): Don't change
 +      default-frame-alist based on menu-bar-mode and tool-bar-mode, or
 +      vice versa (Bug#2249).
 +
 +2010-06-26  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32-fns.el (w32-convert-standard-filename): Doc fix.
 +
 +2010-06-25  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * flyspell.el (flyspell-check-previous-highlighted-word): Make
 +      sure `flyspell-word' re-checks word after function run (Bug#6504).
 +
 +      * ispell.el (ispell-init-process): Make sure ispell and default
 +      directories are expanded. (Bug#6143).
 +
 +2010-06-24  Juri Linkov  <juri@jurta.org>
 +
 +      * minibuffer.el (completions-format): Change default from nil to
 +      `horizontal'.  Remove `nil' value from :type.  Doc fix.  (Bug#6459)
 +
 +2010-06-24  Juri Linkov  <juri@jurta.org>
 +
 +      * vc/vc.el (vc-diff-internal): Set `revert-buffer-function'
 +      buffer-locally to lambda that re-runs the vc diff command.
 +      (Bug#6447)
 +
 +2010-06-24  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * kmacro.el (kmacro-call-macro): Don't issue hint message if the
 +      echo area is in use (Bug#3412).
 +
 +2010-06-22  Glenn Morris  <rgm@gnu.org>
 +
 +      * textmodes/texinfmt.el (texinfo-format-region)
 +      (texinfo-raise-lower-sections, texinfo-format-separate-node)
 +      (texinfo-itemize-item, texinfo-multitable-item, texinfo-alias)
 +      (texinfo-format-option, texinfo-noindent):
 +      Use line-beginning-position and line-end-position.
 +
 +      * calc/calc-aent.el, calc/calc-ext.el, calc/calc-lang.el:
 +      * calc/calc-store.el, calc/calc-units.el, calc/calc.el:
 +      * calc/calccomp.el: Add explicit utf-8 coding cookies to files with
 +      utf-8 characters.
 +
 +2010-06-21  Karl Fogel  <kfogel@red-bean.com>
 +
        * play/zone.el (zone-fall-through-ws): Fix next-line ->
        forward-line fallout.
  
        `compose-mail-user-agent-warnings', instead of to the
        nonexistent `compose-mail-check-user-agent'.
  
 +2010-06-21  Alan Mackenzie  <bug-cc-mode@gnu.org>
 +
 +      Fix an indentation bug:
 +
 +      * progmodes/cc-mode.el (c-common-init): Initialise c-new-BEG/END.
 +      (c-neutralize-syntax-in-and-mark-CPP): c-new-BEG/END: Take account
 +      of existing values.
 +
 +      * progmodes/cc-engine.el (c-clear-<-pair-props-if-match-after)
 +      (c-clear->-pair-props-if-match-before): now return t when they've
 +      cleared properties, nil otherwise.
 +      (c-before-change-check-<>-operators): Set c-new-beg/end correctly
 +      by taking account of the existing value.
 +
 +      * progmodes/cc-defs.el
 +      (c-clear-char-property-with-value-function): Fix this to clear the
 +      property rather than overwriting it with nil.
 +
 +2010-06-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-print-package): Add link to
 +      package description via describe-package.
 +      (describe-package-1): List package requirements.  Add button to
 +      perform installation.
 +      (package-menu-describe-package): New command.
 +
 +      * help-mode.el (help-package): New button type.
 +
 +2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el: Move package-list-packages binding to
 +      menu-bar.el.
 +      (describe-package, describe-package-1, package--dir): New funs.
 +      (package-activate-1): Use package--dir.
 +
 +      * emacs-lisp/package-x.el (gnus-article-buffer): Require package.
 +
 +      * help-mode.el (help-package-def): New button type.
 +
 +      * menu-bar.el: Move package-list-packages binding here from
 +      package.el.
 +
 +2010-06-19  Gustav Hållberg  <gustav@gmail.com>  (tiny change)
 +
 +      * descr-text.el (describe-char): Avoid trailing whitespace.  (Bug#6423)
 +
 +2010-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/edebug.el (edebug-read-list):
 +      Phase out old-style backquotes.
 +
 +2010-06-17  Juri Linkov  <juri@jurta.org>
 +
 +      * help-mode.el (help-mode): Set buffer-local variable
 +      revert-buffer-function to help-mode-revert-buffer.
 +      (help-mode-revert-buffer): New function.
 +
 +      * info.el (Info-revert-find-node): Check for major-mode Info-mode
 +      before popping to "*info*" (like in other Info functions).
 +      Keep buffer-name in old-buffer-name.  Keep Info-history-forward in
 +      old-history-forward.  Pop to old-buffer-name or "*info*" to
 +      recreate the killed buffer.  Set Info-history-forward from
 +      old-history-forward.
 +      (Info-breadcrumbs-depth): Add :group and :version.
 +
 +2010-06-17  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * emacs-lisp/package.el (package-menu-mode-map): Add a menu.
 +
 +2010-06-17  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * ispell.el (ispell-aspell-find-dictionary): Fix regexp for
 +      languages like Portuguese with pt_{BR,PT} and no plain pt.
 +
 +2010-06-17  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/package.el (package-menu-mode-map):
 +      Move initialization into declaration.
 +
 +      * menu-bar.el (menu-bar-options-menu): Fix typo in menu entry.
 +
 +2010-06-17  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * emacs-lisp/package.el (package-archive-base): Point to
 +      elpa.gnu.org.
 +      (package-enable, package-load-list): New defcustoms.
 +      (package-user-dir, package-directory-list): Turn into defcustoms.
 +      Don't include package-user-dir in package-directory-list.
 +      (package--builtins-base): Don't include Emacs as a "package".
 +      (package-subdirectory-regexp): New var.
 +      (package-load-all-descriptors, package-compute-transaction)
 +      (package-download-transaction): Obey package-load-list.
 +      (package-activate-1): Rename from package-do-activate.
 +      (package-list-packages-internal): Check package-load-list.
 +      (package-load-descriptor, package-generate-autoloads)
 +      (package-unpack, package-unpack-single)
 +      (package--read-archive-file, package-delete): Use
 +      expand-file-name.
 +
 +      * emacs-lisp/package-x.el: New file.  Package uploading
 +      functionality split out from package.el.
 +
 +      * startup.el (command-line): Load packages after reading init
 +      file.
 +
 +2010-06-17  Tom Tromey  <tromey@redhat.com>
 +
 +      * emacs-lisp/package.el: New file.
 +
  2010-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
  
        Fix vc-annotate for renamed files when using Git.
  
  2010-06-17  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Put back special
 +      handling for `lambda' (misunderstanding).
 +
 +2010-06-16  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-poly.el: (math-accum-factors):  Make sure that
 +      constants aren't distributed after they are factored out.
 +
 +2010-06-16  Juri Linkov  <juri@jurta.org>
 +
 +      * facemenu.el (list-colors-display): Call `pop-to-buffer' before
 +      `list-colors-print'.  (Bug#6332)
 +
        * subr.el (read-quoted-char): Fix up last change (bug#6290).
  
  2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 +      * emacs-lisp/macroexp.el (macroexpand-all-1): Don't handle `lambda'
 +      specially, since it's a macro.  Fix up wrong hint passed to maybe-cons.
 +
        * font-lock.el (font-lock-major-mode): Rename from
        font-lock-mode-major-mode to distinguish it from
        global-font-lock-mode's own font-lock-mode-major-mode (bug#6135).
        * font-core.el (font-lock-default-function): Adjust users.
        (font-lock-mode): Don't set it at all.
  
 -2010-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * vc-annotate.el (vc-annotate): Use vc-read-revision.
  
 -2010-06-15  Glenn Morris  <rgm@gnu.org>
 +2010-06-16  Glenn Morris  <rgm@gnu.org>
  
        * calendar/appt.el (appt-time-msg-list): Doc fix.
        (appt-check): Let-bind appt-warn-time.
        Simplify argument names.  Doc fix.  Check for integer WARNTIME.
        Only add WARNTIME to the output list if non-nil.
  
 -2010-06-15  Ivan Kanis  <apple@kanis.eu>
 +2010-06-16  Ivan Kanis  <apple@kanis.eu>
  
        * calendar/appt.el (appt-check): Let the 3rd element of
        appt-time-msg-list specify the warning time.
        (appt-add): Add new argument with the warning time.  (Bug#5176)
  
 -2010-06-12  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
 +2010-06-16  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
  
        * vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions
        older than version 1.6.  (Bug#6361)
  
 -2010-06-12  Helmut Eller  <eller.helmut@gmail.com>
 +2010-06-16  Helmut Eller  <eller.helmut@gmail.com>
  
        * emacs-lisp/cl-macs.el (destructuring-bind): Bind `bind-enquote',
        used by cl-do-arglist.  (Bug#6408)
  
 -2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-06-16  Agustín Martín  <agustin.martin@hispalinux.es>
  
 -      * emacs-lisp/advice.el (ad-compile-function):
 -      Define warning-suppress-types before we let-bind it (bug#6275).
 +      * ispell.el (ispell-dictionary-base-alist): Fix
 +      portuguese casechars/not-casechars for missing 'çÇ'.
 +      Suggested by Rolando Pereira (bug#6434).
  
 -      * vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;
 -      declare it, make it buffer-local and permanent-local (bug#6324).
 -      (vc-resynch-window): Adjust name.
 -      * vc-hooks.el (vc-find-file-hook): Adjust name.
 +2010-06-15  Juanma Barranquero  <lekktu@gmail.com>
  
 -2010-06-07  Jonathan Rockway  <jon@jrock.us>
 +      * facemenu.el (list-colors-sort): Doc fix.
  
 -      * net/rcirc.el: Add support for password authentication.
 -      (rcirc-server-alist): Add :password keyword.
 -      (rcirc): Ask for a password, or get it from the server's alist.
 -      (rcirc-connect): Add password argument.  Pass it to server.
 +2010-06-15  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>  (tiny change)
  
 -2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
 +      * progmodes/sql.el (sql-connect-mysql): Fix typo.
  
 -      * net/dbus.el (dbus-register-method): Declare function.
 -      (dbus-handle-event, dbus-property-handler): Fix typos in docstrings.
 -      (dbus-introspect): Doc fix.
 -      (dbus-event-bus-name, dbus-introspect-get-interface)
 -      (dbus-introspect-get-argument): Reflow docstrings.
 +2010-06-14  Juri Linkov  <juri@jurta.org>
  
 -2010-06-04  Chong Yidong  <cyd@stupidchicken.com>
 +      Add sort option `list-colors-sort'.  (Bug#6332)
 +      * facemenu.el (color-rgb-to-hsv): New function.
 +      (list-colors-sort): New defcustom.
 +      (list-colors-sort-key): New function.
 +      (list-colors-display): Doc fix.  Sort list according to the option
 +      `list-colors-sort'.
 +      (list-colors-print): Add HSV values to `help-echo' property of
 +      RGB strings.
  
 -      * term/common-win.el (x-colors): Add "dark green" and "dark
 -      turquoise" (Bug#6332).
 +2010-06-14  Juri Linkov  <juri@jurta.org>
  
 -2010-06-03  Eric Ludlam  <zappo@gnu.org>
 +      * compare-w.el: Move to the "vc" subdirectory.
  
 -      * cedet/semantic/lex-spp.el
 -      (semantic-lex-spp-table-write-slot-value): Instead of erroring on
 -      invalid values during save, just save a nil (Bug#6324).
 +2010-06-14  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-06-03  Glenn Morris  <rgm@gnu.org>
 +      * image-mode.el (image-mode-map): Remap left-char and right-char.
  
 -      * desktop.el (desktop-clear-preserve-buffers):
 -      Add "*Warnings*" buffer.  (Bug#6336)
 +      * nxml/nxml-mode.el (nxml-indent-line): Standardize indent behavior.
  
 -2010-06-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-06-12  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * vc-dir.el (vc-dir-update): Remove entries with a nil state (bug#5539).
 +      * term/common-win.el (x-colors): Add all the color names defined
 +      in rgb.txt (Bug#6332).
  
 -2010-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * facemenu.el (list-colors-print): Don't print extra names if it
 +      will overflow the window width.
  
 -      * vc-bzr.el (vc-bzr-revision-completion-table): Apply
 -      `file-directory-p' to the filename part rather than to the whole text.
 +      * vc/log-edit.el (log-edit-font-lock-keywords): Revert 2010-06-02
 +      change (Bug#6343).
  
 -2010-05-31  Jonathan Marchand  <jonathlela@gmail.com>  (tiny change)
 +2010-06-12  Eli Zaretskii  <eliz@gnu.org>
  
 -      * cedet/ede/cpp-root.el (ede-set-project-variables): Fix feature name
 -      (bug#6231).
 +      * files.el (make-directory): Doc fix (bug#6396).
  
 -2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-06-12  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * man.el (Man-completion-table): Let the user type "-k " (bug#6319).
 +      * net/tramp.el (tramp-remote-process-environment): Protect version
 +      string by apostroph.
 +      (tramp-shell-prompt-pattern): Do not use a shy group in case of
 +      XEmacs.
 +      (tramp-file-name-for-operation): Add `call-process-region'.
 +      (tramp-set-process-query-on-exit-flag): Fix wrong parentheses.
  
 -2010-05-31  Drew Adams  <drew.adams@oracle.com>
 +      * net/tramp-compat.el (top): Do not autoload
 +      `tramp-handle-file-remote-p'.  Load tramp-util.el and tramp-vc.el
 +      only when `start-file-process' is not bound.
 +      (tramp-advice-file-expand-wildcards): Do not use
 +      `tramp-handle-file-remote-p'.
 +      (tramp-compat-make-temp-file): Handle the case, that
 +      `make-temp-file' has no third argument EXTENSION.
  
 -      * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298).
 +2010-06-11  Juanma Barranquero  <lekktu@gmail.com>
  
 -2010-05-31  Juanma Barranquero  <lekktu@gmail.com>
 +      * makefile.w32-in (WINS_BASIC): Include new directory vc.
  
 -      * subr.el (momentary-string-display): Just use read-event to read
 -      the exit event (Bug#6238).
 +      * loadup.el ("vc-hooks", "ediff-hook"): Load from lisp/vc/.
  
 -2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +2010-06-11  Juri Linkov  <juri@jurta.org>
  
 -      * ansi-color.el: Delete unused escape sequences (Bug#6085).
 -      (ansi-color-drop-regexp): New constant.
 -      (ansi-color-apply, ansi-color-filter-region)
 -      (ansi-color-apply-on-region): Delete unrecognized control sequences.
 -      (ansi-color-apply): Build string list before calling concat.
 +      * finder.el (finder-known-keywords): Add keyword "vc"
 +      for version control.
  
 -2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +      * add-log.el, cvs-status.el, diff.el, diff-mode.el, ediff.el,
 +      * emerge.el, log-edit.el, log-view.el, pcvs.el, smerge-mode.el,
 +      * vc-annotate.el, vc-bzr.el, vc-dir.el, vc-dispatcher.el, vc-git.el,
 +      * vc-hg.el, vc-mtn.el, vc.el: Add keyword "vc".
  
 -      * progmodes/verilog-mode.el (verilog-type-font-keywords):
 -      Use font-lock-constant-face, not obsolete font-lock-reference-face.
 +2010-06-11  Juri Linkov  <juri@jurta.org>
  
 -2010-05-27  Masatake YAMATO  <yamato@redhat.com>
 +      Move version control related files to the "vc" subdirectory.
 +      * add-log.el, cvs-status.el, diff.el, diff-mode.el, ediff-diff.el,
 +      * ediff.el, ediff-help.el, ediff-hook.el, ediff-init.el,
 +      * ediff-merg.el, ediff-mult.el, ediff-ptch.el, ediff-util.el,
 +      * ediff-vers.el, ediff-wind.el, emerge.el, log-edit.el, log-view.el,
 +      * pcvs-defs.el, pcvs.el, pcvs-info.el, pcvs-parse.el, pcvs-util.el,
 +      * smerge-mode.el, vc-annotate.el, vc-arch.el, vc-bzr.el, vc-cvs.el,
 +      * vc-dav.el, vc-dir.el, vc-dispatcher.el, vc.el, vc-git.el,
 +      * vc-hg.el, vc-hooks.el, vc-mtn.el, vc-rcs.el, vc-sccs.el, vc-svn.el:
 +      Move files to the "vc" subdirectory.
  
 -      * htmlfontify.el (hfy-face-resolve-face): New function.
 -      (hfy-face-to-style): Use it (Bug#6279).
 +2010-06-11  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * comint.el (comint-password-prompt-regexp): Fix 2010-04-10 change
 +      (Bug#6367).
  
 -      * epa.el (epa--select-keys): Don't explicitly delete the window since
 -      that can fail (e.g. sole window in frame).  Use dedication instead.
 +2010-06-11  Stephen Eglen  <stephen@gnu.org>
  
 -2010-05-19  Uday S Reddy  <u.s.reddy@cs.bham.ac.uk>  (tiny change)
 +      * shell.el: Bind `shell-resync-dirs' to M-RET.
  
 -      * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
 +2010-06-10  Michael Albinus  <michael.albinus@gmx.de>
  
 -2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * notifications.el: Move file from lisp/net, because it is
 +      supposed to talk locally to the user.
  
 -      * subr.el (read-quoted-char): Resolve modifiers after key
 -      remapping (bug#6212).
 +2010-06-10  Julien Danjou  <julien@danjou.info>
  
 -2010-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * net/notifications.el (notifications-on-action-signal)
 +      (notifications-on-closed-signal): Pass notification id as first
 +      argument to the callback functions.  Add docstrings.
 +      (notifications-notify): Fix docstring.
  
 -      * tmm.el (tmm-prompt): Don't try to precompute bindings.
 -      (tmm-get-keymap): Compute shortcuts (bug#6171).
 +2010-06-10  Glenn Morris  <rgm@gnu.org>
  
 -2010-05-10  Glenn Morris  <rgm@gnu.org>
 +      * emacs-lisp/authors.el (authors-ignored-files)
 +      (authors-valid-file-names): Add some files.
  
 -      * desktop.el (desktop-save-buffer-p): Don't mistakenly include
 -      all dired buffers, even tramp ones.  (Bug#5755)  [Backport from trunk]
 +2010-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +      * net/rcirc.el (rcirc-server-alist, rcirc, rcirc-connect): Resolve
 +      merge conflict, giving preference to the emacs-23 version of the code.
  
 -      * Version 23.2 released.
 +2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
 +      * emacs-lisp/advice.el (ad-compile-function):
 +      Define warning-suppress-types before we let-bind it (bug#6275).
  
 -      * international/mule.el (auto-coding-alist):  Only purecopy
 -      car of each item, not the whole list (Bug#6083).
 +      * vc-dispatcher.el: Rename mode-line-hook to vc-mode-line-hook;
 +      declare it, make it buffer-local and permanent-local (bug#6324).
 +      (vc-resynch-window): Adjust name.
 +      * vc-hooks.el (vc-find-file-hook): Adjust name.
  
 -2010-05-02  Chong Yidong  <cyd@stupidchicken.com>
 +2010-06-09  Michael Albinus  <michael.albinus@gmx.de>
  
 -      * progmodes/js.el (js-mode): Make paragraph variables local before
 -      calling c-setup-paragraph-variables (Bug#6071).
 +      * net/notifications.el (notifications-notify): Fix docstring.
  
 -2010-05-01  Eli Zaretskii  <eliz@gnu.org>
 +2010-06-09  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * composite.el (compose-region, reference-point-alist): Fix typos
 -      in the doc strings.
 +      Update to Unicode 6.0.0 beta.
 +      * international/charprop.el: Update copyright.
 +      * international/mule-cmds.el (ucs-names): Update character ranges.
 +      * international/uni-bidi.el:
 +      * international/uni-category.el:
 +      * international/uni-combining.el:
 +      * international/uni-comment.el:
 +      * international/uni-decimal.el:
 +      * international/uni-decomposition.el:
 +      * international/uni-digit.el:
 +      * international/uni-lowercase.el:
 +      * international/uni-mirrored.el:
 +      * international/uni-name.el:
 +      * international/uni-numeric.el:
 +      * international/uni-old-name.el:
 +      * international/uni-titlecase.el:
 +      * international/uni-uppercase.el: Regenerate.
  
 -2010-04-28  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +2010-06-09  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * calc/calc-graph.el (calc-graph-plot): Use the proper form for
 -      gnuplot's "set" command.
 +      * emacs-lisp/smie.el (comment-string-strip): Declare function.
 +      (smie-precs-precedence-table): Fix typo in docstring.
 +
 +      * vc-mtn.el (log-edit-extract-headers): Declare function.
 +
 +      * vc-hg.el (log-edit-extract-headers): Remove duplicate declaration.
 +
 +      * net/notifications.el (dbus-register-signal): Declare function.
 +      (notifications-notify): Fix typos and reflow docstring.
 +
 +2010-06-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Improve VC create/retrieve tag/branch.
 +      * vc.el (vc-create-tag): Do not read the directory name for VCs
 +      with repository revision granularity.  Adjust the tag/branch
 +      prompt.  Reset VC properties.
 +      (vc-retrieve-tag): Do not read the directory name for VCs
 +      with repository revision granularity.  Reset VC properties.
 +
 +2010-06-09  Julien Danjou  <julien@danjou.info>
 +
 +      * net/notifications.el: New file.
 +
 +2010-06-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add optional support for resetting VC properties.
 +      * vc-dispatcher.el (vc-resynch-window): Add new optional argument,
 +      call vc-file-clearprops when true.
 +      (vc-resynch-buffer): Add new optional argument, pass it down.
 +      (vc-resynch-buffers-in-directory): Likewise.
 +
 +      Improve support for special markup in the VC commit message.
 +      * vc-mtn.el (vc-mtn-checkin): Add support for Author: and Date: markup.
 +      * vc-hg.el (vc-hg-checkin): Add support for Date:.
 +      * vc-git.el (vc-git-checkin):
 +      * vc-bzr.el (vc-bzr-checkin): Likewise.
 +
 +2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
 +      can be handled with a ((:before "fn") (:prev "=>" parent)) rule.
 +
 +2010-06-07  Martin Pohlack  <mp26@os.inf.tu-dresden.de>
 +
 +      * iimage.el: Remove images as soon as the underlying text is modified.
 +      (iimage-modification-hook): New function.
 +      (iimage-mode-buffer): Use it.
 +
 +2010-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-offset-rule): Rename from
 +      smie-indent-offset-after.  Add :prev case.  Make a bit more generic.
 +      (smie-indent-virtual): Remove `virtual' arg.  Update callers.
 +      (smie-indent-keyword): Add handling of open-paren keywords.
 +      (smie-indent-comment-continue): Don't assume comment-continue.
 +
 +2010-06-07  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.el (pop-to-buffer): Remove the conditional that
 +      compares new-window and old-window, so it will reselect
 +      the selected window unconditionally.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html
 +
 +2010-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-offset-after)
 +      (smie-indent-forward-token, smie-indent-backward-token): New functions.
 +      (smie-indent-after-keyword): Use them.
 +      (smie-indent-fixindent): Only applies to the indentation of the BOL.
 +      (smie-indent-keyword): Tweak the black magic.
 +      (smie-indent-comment-continue): Strip comment-continue before use.
 +      (smie-indent-functions): Indent comments before keywords.
 +
 +2010-06-06  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-lazy-highlight-search): Fix looping
 +      by checking for empty match.  This syncs this loop with the
 +      similar loop in `isearch-search'.  (Bug#6362)
 +
 +2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * net/dbus.el (dbus-register-method): Declare function.
 +      (dbus-handle-event, dbus-property-handler): Fix typos in docstrings.
 +      (dbus-introspect): Doc fix.
 +      (dbus-event-bus-name, dbus-introspect-get-interface)
 +      (dbus-introspect-get-argument): Reflow docstrings.
 +
 +2010-06-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      vc-log-incoming/vc-log-outgoing fixes for Git.
 +      * vc-git.el (vc-git-log-view-mode): Fix font lock for
 +      incoming/outgoing logs.
 +      (vc-git-log-outgoing, vc-git-log-incoming): Use @{upstream}
 +      instead of vc-git-compute-remote.
 +      (vc-git-compute-remote): Remove.
 +
 +2010-06-04  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * term/common-win.el (x-colors): Add "dark green" and "dark
 +      turquoise" (Bug#6332).
 +
 +2010-06-04  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (kill-new): Fix logic of kill-do-not-save-duplicates.
 +      Instead of setting `replace' to t and replacing the same string
 +      with itself, don't do certain actions when
 +      kill-do-not-save-duplicates is non-nil and string is equal to car
 +      of kill-ring: don't call menu-bar-update-yank-menu, don't push
 +      interprogram-paste strings to kill-ring, and don't push the input
 +      argument `string' to kill-ring.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html
 +
 +2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * subr.el (directory-sep-char): Move from fileio.c and make a defconst.
 +
 +2010-06-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name): Expand "~/".
 +      (tramp-gvfs-handler-mounted-unmounted)
 +      (tramp-gvfs-connection-mounted-p): Handle default-location.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-delete-directory): Don't try to
 +      move files to trash.
 +
 +2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * international/mule-cmds.el (nonascii-insert-offset)
 +      (nonascii-translation-table): Add obsolescence information.
 +
 +      * international/mule.el (make-translation-table-from-vector): Doc fix.
 +
 +2010-06-03  Eric Ludlam  <zappo@gnu.org>
 +
 +      * cedet/semantic/lex-spp.el
 +      (semantic-lex-spp-table-write-slot-value): Instead of erroring on
 +      invalid values during save, just save a nil (Bug#6324).
 +
 +2010-06-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * desktop.el (desktop-clear-preserve-buffers):
 +      Add "*Warnings*" buffer.  (Bug#6336)
 +
 +2010-06-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      vc-log-incoming/vc-log-outgoing improvements for Git.
 +      * vc-git.el (vc-git-log-outgoing): Use the same format as the
 +      short log.
 +      (vc-git-log-incoming): Likewise.  Run "git fetch" before the log command.
 +
 +      Add bindings for vc-log-incoming and vc-log-outgoing.
 +      * vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming
 +      and vc-log-outgoing.
 +      * vc-dir.el (vc-dir-menu-map): Add menu bindings for vc-log-incoming
 +      and vc-log-outgoing.
 +
 +2010-06-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * net/rcirc.el (rcirc-sort-nicknames): Remove.
 +      (rcirc-handler-366): Always sort nicknames.
 +
 +2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/smie.el (comment-continue): Declare for byte-compiler.
 +
 +2010-06-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * net/rcirc.el (rcirc-nickname<, rcirc-sort-nicknames-join): Doc
 +      fix.
 +
 +2010-06-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * net/rcirc.el (rcirc-sort-nicknames): Change default.
 +      (rcirc-sort-nicknames-join): Avoid setq.
 +
 +2010-06-03  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 +
 +      * net/rcirc.el (rcirc-sort-nicknames): New custom.
 +      (rcirc-nickname<, rcirc-sort-nicknames-join): New funs.
 +      (rcirc-handler-366): Use them.
 +
 +2010-06-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Split smie-indent-calculate into more manageable chunks.
 +      * emacs-lisp/smie.el (smie-indent-virtual, smie-indent-fixindent)
 +      (smie-indent-comment, smie-indent-after-keyword, smie-indent-keyword)
 +      (smie-indent-close, smie-indent-comment-continue, smie-indent-bob)
 +      (smie-indent-exps): Extract from smie-indent-calculate.
 +      (smie-indent-functions): New var.
 +      (smie-indent-functions): Use them.
 +
 +2010-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-indent-hanging-p): Use smie-bolp.
 +      (smie-indent-calculate): Simplify and cleanup.
 +
 +2010-06-02  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-gvfs.el (top): Require url-util.
 +      (tramp-gvfs-mount-point): Remove.
 +      (tramp-gvfs-stringify-dbus-message, tramp-gvfs-send-command):
 +      New defuns.
 +      (with-tramp-dbus-call-method): Format trace message.
 +      (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file):
 +      Implement backup call, when operation on local files fails.
 +      Use progress reporter.  Flush properties of changed files.
 +      (tramp-gvfs-handle-make-directory): Make more traces.
 +      (tramp-gvfs-url-file-name): Hexify file name in url.
 +      (tramp-gvfs-fuse-file-name): Take also prefix (like dav shares)
 +      into account for the resulting file name.
 +      (tramp-gvfs-handler-askquestion): Return dummy mountpoint, when
 +      the answer is "no".  See `tramp-gvfs-maybe-open-connection'.
 +      (tramp-gvfs-handler-mounted-unmounted)
 +      (tramp-gvfs-connection-mounted-p): Test also for new mountspec
 +      attribute "default_location".  Set "prefix" property.
 +      (tramp-gvfs-mount-spec): Return both prefix and mountspec.
 +      (tramp-gvfs-maybe-open-connection): Test, whether mountpoint
 +      exists.  Raise an error, if not (due to a corresponding answer
 +      "no" in interactive questions, for example).
 +
 +2010-06-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * log-edit.el (log-edit-font-lock-keywords): Make group 4 match lax.
 +
 +2010-06-01  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emacs-lisp/eldoc.el: Add completions for new commands left-* and
 +      right-*.  (Bug#6265)
 +
 +2010-06-01  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add support for vc-log-incoming, improve vc-log-outgoing for Git.
 +      * vc-git.el (vc-git-compute-remote): New function.
 +      (vc-git-log-outgoing): Use it instead of hard coding a value.
 +      (vc-git-log-incoming): New function.
 +
 +      Improve state updating for VC tag commands.
 +      * vc.el (vc-create-tag, vc-retrieve-tag): Call vc-resynch-buffer
 +      to update the state of all buffers in the directory.
 +
 +      * vc-dir.el (vc-dir-update): Remove entries with a nil state (bug#5539).
 +
 +2010-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-bzr.el (vc-bzr-revision-completion-table): Apply
 +      `file-directory-p' to the filename part rather than to the whole text.
 +
 +2010-05-31  Jonathan Marchand  <jonathlela@gmail.com>  (tiny change)
 +
 +      * cedet/ede/cpp-root.el (ede-set-project-variables): Fix feature name
 +      (bug#6231).
 +
 +2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * man.el (Man-completion-table): Let the user type "-k " (bug#6319).
 +
 +2010-05-31  Drew Adams  <drew.adams@oracle.com>
 +
 +      * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298).
 +
 +2010-05-31  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * subr.el (momentary-string-display): Just use read-event to read
 +      the exit event (Bug#6238).
 +
 +2010-05-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/mule.el (define-coding-system): Doc fix (bug#6313).
 +
 +2010-05-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emulation/cua-base.el: Recognize also `right-word' and `left-word'.
 +      Suggested by Eli Zaretskii <eliz@gnu.org>.
 +
 +2010-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-file-name-table): Don't return a boundary
 +      past the end of `string' (bug#6299).
 +      (completion--file-name-table): Delegate to completion-file-name-table
 +      for the `boundaries' case.
 +
 +2010-05-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * emulation/cua-base.el: Recognize `right-char' and `left-char' as
 +      movement commands.
 +
 +      * progmodes/ada-xref.el (ada-prj-ada-project-path-sep): Set from
 +      `path-separator', but maintain compatibility with Emacs 20.2.
 +
 +2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * server.el (server-process-filter): Receive parent-id argument
 +      from emacsclient.
 +      (server-create-window-system-frame): New arg.  Pass parent-id as
 +      frame parameter.
 +
 +2010-05-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Bidi-sensitive word movement with arrow keys.
 +      * subr.el (right-arrow-command, left-arrow-command): Move to
 +      bindings.el.
 +
 +      * bindings.el (right-char, left-char): Move from subr.el and
 +      rename from right-arrow-command and left-arrow-command.
 +      (right-word, left-word): New functions.
 +      (global-map) <right>: Bind to right-char.
 +      (global-map) <left>: Bind to left-char.
 +      (global-map) <C-right>: Bind to right-word.
 +      (global-map) <C-left>: Bind to left-word.
 +
 +      * ls-lisp.el (ls-lisp-classify-file): New function.
 +      (ls-lisp-insert-directory): Call it if switches include -F (bug#6294).
 +      (ls-lisp-classify): Call ls-lisp-classify-file.
 +      (insert-directory): Remove blanks from switches.
 +
 +2010-05-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ansi-color.el: Delete unused escape sequences (Bug#6085).
 +      (ansi-color-drop-regexp): New constant.
 +      (ansi-color-apply, ansi-color-filter-region)
 +      (ansi-color-apply-on-region): Delete unrecognized control sequences.
 +      (ansi-color-apply): Build string list before calling concat.
 +
 +2010-05-28  Juri Linkov  <juri@jurta.org>
 +
 +      * image-dired.el (image-dired-dired-toggle-marked-thumbs):
 +      Replace LOCALP arg of `dired-get-filename' 'no-dir with nil.
 +      (Bug#5270)
 +
 +2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall'
 +      to ignored backtrace functions.
 +      (with-progress-reporter): Expand docstring.
 +      (tramp-handle-delete-file): Implement TRASH argument.
 +      (tramp-get-remote-trash): New defun.
 +
 +2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file): Use
 +      `symbol-value' for backward compatibility.
 +
 +      * net/tramp.el (tramp-handle-make-symbolic-link)
 +      (tramp-handle-load)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-process-file, tramp-handle-call-process-region)
 +      (tramp-handle-shell-command, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-delete-temp-file-function): Use `delete-file' instead
 +      of `tramp-compat-delete-file'.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-delete-directory)
 +      (tramp-fish-handle-make-symbolic-link)
 +      (tramp-fish-handle-process-file): Use `delete-file' instead
 +      of `tramp-compat-delete-file'.
 +
 +      * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use
 +      `delete-file' instead of `tramp-compat-delete-file'.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
 +      (tramp-gvfs-handle-write-region): Use `delete-file' instead of
 +      `tramp-compat-delete-file'.
 +
 +      * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file): Use
 +      `delete-file' instead of `tramp-compat-delete-file'.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region): Use `delete-file' instead of
 +      `tramp-compat-delete-file'.
 +      (tramp-smb-handle-delete-directory): Use 'trash as arg.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * dired.el (dired-delete-file): New arg TRASH.
 +      (dired-internal-do-deletions): New arg TRASH.  Use progress reporter.
 +      (dired-do-flagged-delete, dired-do-delete): Use trash.
 +
 +      * speedbar.el (speedbar-item-delete): Allow trashing.
 +
 +      * files.el (delete-directory): New arg TRASH.
 +
 +      * net/ange-ftp.el (ange-ftp-del-tmp-name, ange-ftp-delete-file)
 +      (ange-ftp-rename-remote-to-remote)
 +      (ange-ftp-rename-local-to-remote)
 +      (ange-ftp-rename-remote-to-local, ange-ftp-load)
 +      (ange-ftp-compress, ange-ftp-uncompress): Remove optional arg from
 +      `delete-file'.
 +      (ange-ftp-delete-directory): Add optional arg to `delete-file', to
 +      allow trashing.
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to
 +      handle new TRASH arg of `delete-file'.
 +
 +      * net/tramp.el (tramp-handle-delete-file): Change FORCE arg to TRASH.
 +      (tramp-handle-make-symbolic-link, tramp-handle-load)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-process-file, tramp-handle-call-process-region)
 +      (tramp-handle-shell-command, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-delete-temp-file-function): Use null TRASH arg in
 +      tramp-compat-delete-file call.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-delete-directory)
 +      (tramp-fish-handle-delete-file)
 +      (tramp-fish-handle-make-symbolic-link)
 +      (tramp-fish-handle-process-file): Use null TRASH arg in
 +      `tramp-compat-delete-file' call.
 +
 +      * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use null TRASH
 +      arg in `tramp-compat-delete-file' call.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
 +      (tramp-gvfs-handle-write-region): Use null TRASH arg in
 +      `tramp-compat-delete-file' call.
 +
 +      * net/tramp-imap.el (tramp-imap-handle-delete-file): Rename arg.
 +      (tramp-imap-do-copy-or-rename-file): Use null TRASH arg in
 +      `tramp-compat-delete-file' call.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region): Use null TRASH arg in
 +      tramp-compat-delete-file call.
 +      (tramp-smb-handle-delete-directory): Use tramp-compat-delete-file.
 +      (tramp-smb-handle-delete-file): Rename arg.
 +
 +      * diff.el (diff-sentinel):
 +      * epg.el (epg--make-temp-file, epg-decrypt-string)
 +      (epg-verify-string, epg-sign-string, epg-encrypt-string):
 +      * jka-compr.el (jka-compr-partial-uncompress)
 +      (jka-compr-call-process, jka-compr-write-region):
 +      * server.el (server-sentinel): Remove optional arg from
 +      delete-file, reverting 2010-05-03 change.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/verilog-mode.el (verilog-type-font-keywords): Use
 +      font-lock-constant-face, not obsolete font-lock-reference-face.
 +
 +2010-05-27  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el (hebrew-shape-gstring): Check if a glyph
 +      element of GSTRING is nil.
 +
 +2010-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-forward-token-function)
 +      (smie-backward-token-function): New vars.
 +      (smie-backward-sexp, smie-forward-sexp)
 +      (smie-indent-hanging-p, smie-indent-calculate): Use them.
 +      (smie-default-backward-token): Rename from smie-backward-token and
 +      skip comments.
 +      (smie-default-forward-token): Rename from smie-forward-token and
 +      skip comments.
 +      (smie-next-sexp): Handle nil results from next-token.
 +      (smie-indent-calculate): Add a new case for special `fixindent' comments.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/verilog-mode.el (verilog-type-font-keywords):
 +      Use font-lock-constant-face, not obsolete font-lock-reference-face.
 +
 +2010-05-27  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * htmlfontify.el (hfy-face-resolve-face): New function.
 +      (hfy-face-to-style): Use it (Bug#6279).
 +
 +2010-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/ada-xref.el (ada-gnat-parse-gpr):
 +      * emulation/edt.el (edt-load-keys): Avoid (expand-file-name ".").
 +
 +2010-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * emulation/edt.el (edt-load-keys): Use locate-library.
 +
 +2010-05-25  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * log-edit.el (log-edit-strip-single-file-name): Default to nil.
 +      (log-edit-changelog-entries): Doc fix.
 +      (log-edit-changelog-insert-entries): Args changed.
 +      Rename relative filenames in ChangeLog entries.  Delete tabs.
 +      (log-edit-insert-changelog-entries): Reorganize return value of
 +      `log-edit-changelog-entries' to pass filenames to
 +      log-edit-changelog-insert-entries.
 +
 +2010-05-25  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * dired.el (dired-mode-map): Rebind "\C-t\C-t" from
 +      `image-dired-dired-insert-marked-thumbs' to
 +      `image-dired-dired-toggle-marked-thumbs'.
 +
 +      * image-dired.el: Require cl when compiling.
 +      (image-dired-dired-toggle-marked-thumbs): Rename from
 +      `image-dired-dired-insert-marked-thumbs'.  Add ARG.  Doc fix.
 +      Use interactive spec "P".  Set LOCALP arg of `dired-get-filename'
 +      to 'no-dir.  Skip files whose names don't match
 +      `image-file-name-regexp'.  When file has a thumbnail overlay,
 +      delete it.  (Bug#5270)
 +
 +2010-05-25  Juri Linkov  <juri@jurta.org>
 +
 +      * image-mode.el (image-mode): Add image-after-revert-hook to
 +      after-revert-hook.
 +      (image-after-revert-hook): New function.  (Bug#5669)
 +
 +2010-05-25  Juri Linkov  <juri@jurta.org>
 +
 +      * image.el (image-animated-p): When delay between animated images
 +      is 0, set it to 10 (0.1 sec).  (Bug#6258)
 +
 +2010-05-25  Christian Lynbech  <christian.lynbech@tieto.com>  (tiny change)
 +
 +      * net/tramp.el (tramp-handle-insert-directory): Don't use
 +      `forward-word', its default syntax could be changed.
 +
 +2010-05-25  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-progress-reporter-update): New defun.
 +      (with-progress-reporter): Use it.
 +      (tramp-process-actions):
 +      * net/tramp-gvfs.el (tramp-gvfs-handler-askquestion): Preserve
 +      current message, in order to let progress reporter continue
 +      afterwards.  (Bug#6257)
 +
 +2010-05-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * net/rcirc.el (rcirc-default-user-name, rcirc-default-full-name):
 +      Add :version.
 +
 +2010-05-25  Ryan Yeske  <rcyeske@gmail.com>
 +
 +      * net/rcirc.el (rcirc-default-user-name): Change to "user".
 +      (rcirc-default-full-name): Change to "unknown".
 +      (rcirc-user-name-history): Add variable.
 +
 +2010-05-25  Ryan Yeske  <rcyeske@gmail.com>
 +            Jonathan Rockway  <jon@jrock.us>
 +
 +      * net/rcirc.el (rcirc-server-alist): Add :pass.
 +      (rcirc): When prompting for connection parameters, also prompt for
 +      username and password.
 +      (rcirc-connect): Take a PASS argument.  If PASS is non-nil, send
 +      value to server when connecting.
 +
 +2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-set-prec2tab): Check override before use.
 +      (smie-merge-prec2s): Pass the tables as separate args.
 +      (smie-bnf-precedence-table): Adjust call accordingly.
 +      (smie-prec2-levels): Set levels at the end.
 +
 +      Replace Lisp calls to delete-backward-char by delete-char.
 +      * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
 +      * skeleton.el, term.el, time.el, wid-edit.el, woman.el,
 +      * calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
 +      * calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
 +      * emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
 +      * eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
 +      * gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
 +      * language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
 +      * net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
 +      * progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
 +      * progmodes/ps-mode.el, progmodes/verilog-mode.el,
 +      * progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
 +      * textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
 +      * textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
 +      delete-backward-char by calls to delete-char.
 +
 +2010-05-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/hebrew.el (hebrew-shape-gstring): New function.
 +      Register it in composition-function-table for all Hebrew combining
 +      characters.
 +
 +2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * epa.el (epa--select-keys): Don't explicitly delete the window since
 +      that can fail (e.g. sole window in frame).  Use dedication instead.
 +
 +2010-05-24  Uday S Reddy  <u.s.reddy@cs.bham.ac.uk>  (tiny change)
 +
 +      * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
 +
 +2010-05-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.el (image-refresh): Define as an alias for image-flush.
 +
 +      * image-mode.el (image-toggle-display-image): Caller changed.
 +
 +2010-05-21  Juri Linkov  <juri@jurta.org>
 +
 +      * progmodes/grep.el (grep-read-files): Fix multi-pattern aliases.
 +      Remove "all" from grep-files-aliases.  Split grep-files-aliases by
 +      whitespace, call wildcard-to-regexp on substrings and concat them
 +      with "\\|".  (Bug#6114)
 +
 +2010-05-21  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-parse-state-get-strategy):
 +      Replace parameter `here' with `here-' and `here-plus', which sandwich
 +      any pertinent CPP construct.
 +      (c-remove-stale-state-cache-backwards): Fix a bug which happens
 +      when doing (c-parse-state) in a CPP construct: Exclude any "new"
 +      CPP construct from taking part in the scanning.
 +
 +2010-05-21  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-do-copy-or-rename-file)
 +      (tramp-handle-file-local-copy, tramp-maybe-open-connection):
 +      Tune `with-progress-reporter' messages.
 +      (tramp-handle-vc-registered):
 +      * net/tramp-fish.el (tramp-fish-handle-file-local-copy)
 +      (tramp-fish-handle-insert-file-contents)
 +      (tramp-fish-maybe-open-connection):
 +      * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
 +      * net/tramp-imap.el (tramp-imap-do-copy-or-rename-file)
 +      (tramp-imap-handle-insert-file-contents)
 +      (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'.
 +
 +2010-05-21  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * add-log.el (change-log-font-lock-keywords):
 +      Highlight all authors in multi-author entries.
 +
 +      * smerge-mode.el (smerge-refine-ignore-whitespace)
 +      (smerge-refine-weight-hack, smerge-refine, smerge-makeup-conflict):
 +      Fix typos in docstrings.
 +      (smerge-resolve, smerge-refine-subst): Reflow docstrings.
 +
 +2010-05-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/fortran.el (fortran-mode):
 +      * progmodes/f90.el (f90-mode): Derive from prog-mode.
 +
 +      * loadup.el [CANNOT_DUMP]: Update for bootstrap-emacs no longer
 +      having a relative path in src/Makefile.in.
 +
 +2010-05-20  Kevin Ryde  <user42@zip.com.au>
 +
 +      * help-mode.el (help-make-xrefs): For Info node links turn
 +      newlines into spaces.  Link node names with newlines are matched
 +      by help-xref-info-regexp and buttonized, this change ensures they
 +      can be followed successfully with RET.  (Bug#6206)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * locate.el (locate): Use pop-to-buffer instead of
 +      switch-to-buffer-other-window.  (Bug#6204)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (replace-highlight): Fix lazy-highlighting
 +      for `M-s w str M-% str RET'.
 +
 +2009-12-15  Masatake YAMATO  <yamato@redhat.com>
 +
 +      * isearch.el (isearch-yank-word-or-char): Pull next subword
 +      when `subword-mode' is activated.  (Bug#6220)
 +
 +2010-05-20  Mark A. Hershberger  <mah@everybody.org>
 +
 +      * isearch.el (isearch-update-post-hook): New hook.
 +      (isearch-update): Use the new hook.  (Bug#6225)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-mode-map): Bind more keys to isearch-help-map:
 +      [f1], [help], and (char-to-string help-char) instead of "\C-h".
 +      (Bug#6222)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-yank-string): Use isearch-process-search-string.
 +      (Bug#6223)
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-x.el (dired-jump, dired-jump-other-window): Add arg
 +      FILE-NAME to read from the minibuffer when called interactively
 +      with prefix argument instead of using buffer-file-name.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00534.html
 +
 +      * dired.el: Update autoloads.
 +
 +2010-05-20  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * nxml/nxml-mode.el (nxml-mode-map): Bind C-c / to
 +      nxml-finish-element, for consistency with SGML mode.
 +
 +      * progmodes/octave-mod.el (octave-mode-map): Bind C-c / to
 +      octave-close-block.
 +
 +2010-05-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * composite.el: Require cl when compiling.
 +      (reference-point-alist, compose-gstring-for-graphic)
 +      (compose-gstring-for-terminal): Fix typos in docstrings.
 +
 +2010-05-19  Juri Linkov  <juri@jurta.org>
 +
 +      * emacs-lisp/cl-macs.el (window-parameter): Add defsetf with
 +      set-window-parameter.
 +
 +2010-05-19  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-methods): Add `tramp-async-args' attribute
 +      where appropriate.
 +      (tramp-maybe-open-connection): Use it.
 +
 +2010-05-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * simple.el (move-end-of-line): Make sure we are at line beginning
 +      before backing up to end of previous line.
 +
 +2010-05-19  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * password-cache.el (password-cache-remove): Fix docstring.
 +
 +      * net/secrets.el: Autoload the widget functions.
 +      (secrets-search-items, secrets-create-item)
 +      (secrets-get-attributes, secrets-expand-item): Attributes will be
 +      stored on the password database without leading ":", as all other
 +      clients do as well.
 +      (secrets-mode): Fix docstring.
 +      (secrets-show-secrets): Provide it as autoloaded command only when
 +      D-Bus support is available.  Check existence of Secret Service API.
 +
 +2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * indent.el (indent-region): Deactivate region (bug#6200).
 +
 +2010-05-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc-dir.el (vc-dir): Don't pop-up-windows.  (Bug#6204)
 +
 +2010-05-19  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.el: Register compose-gstring-for-graphic in
 +      composition-function-table only for combining characters (Mn, Mc, Me).
 +
 +2010-05-18  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-trail.el (calc-trail-isearch-forward)
 +      (calc-trail-isearch-backward): Ensure that the new window
 +      point is set correctly.
 +
 +2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * subr.el (read-quoted-char): Resolve modifiers after key
 +      remapping (bug#6212).
 +
 +2010-05-18  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Add visualization code for secrets.
 +      * net/secrets.el (secrets-mode): New major mode.
 +      (secrets-show-secrets, secrets-show-collections)
 +      (secrets-expand-collection, secrets-expand-item)
 +      (secrets-tree-widget-after-toggle-function)
 +      (secrets-tree-widget-show-password): New defuns.
 +
 +2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/smie.el (smie-next-sexp): Break inf-loop at BOB.
 +      (smie-backward-sexp, smie-forward-sexp): Remove boundary condition now
 +      handled in smie-next-sexp.
 +      (smie-indent-calculate): Provide a starting indentation (so the
 +      recursion is well-founded ;-).
 +
 +      Fix handling of non-associative equal levels.
 +      * emacs-lisp/smie.el (smie-prec2-levels): Choose distinct levels even
 +      when it's not needed.
 +      (smie-op-left, smie-op-right): New functions.
 +      (smie-next-sexp): New function, extracted from smie-backward-sexp.
 +      Better handle equal levels to distinguish the associative case from
 +      the "multi-keyword construct" case.
 +      (smie-backward-sexp, smie-forward-sexp): Use it.
 +
 +2010-05-18  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/prolog.el (smie-indent-basic): Declare for byte-compiler.
 +
 +      * emacs-lisp/smie.el (smie-precs-precedence-table, smie-backward-sexp)
 +      (smie-forward-sexp, smie-indent-calculate): Fix typos in docstrings.
 +
 +2010-05-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Provide a simple generic indentation engine and use it for Prolog.
 +      * emacs-lisp/smie.el: New file.
 +      * progmodes/prolog.el (prolog-smie-op-levels)
 +      (prolog-smie-indent-rules): New var.
 +      (prolog-mode-variables): Use them to configure SMIE.
 +      (prolog-indent-line, prolog-indent-level): Remove.
 +
 +2010-05-17  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-vec.el (math-vector-avg): Put the vector elements in
 +      order before computing the averages.
 +
 +2010-05-16  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-vec.el (calc-histogram):
 +      (calcFunc-histogram): Allow vectors as inputs.
 +      (math-vector-avg): New function.
 +
 +      * calc/calc-ext.el (math-group-float): Have the number of digits
 +      being grouped depend on the radix (Bug#6189).
 +
 +2010-05-15  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * version.el (emacs-copyright, emacs-version): Don't define here,
 +      now that emacs.c defines it.
 +
 +2010-05-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * international/mule-cmds.el (mule-menu-keymap): Fix definition of
 +      "Describe Language Environment" menu item.
 +
 +      * language/hebrew.el ("Hebrew", "Windows-1255"): Doc fix.
 +
 +      Bidi-sensitive movement with arrow keys.
 +      * subr.el (right-arrow-command, left-arrow-command): New functions.
 +
 +      * bindings.el (global-map): Bind them to right and left arrow keys.
 +
 +      Don't override standard definition of convert-standard-filename.
 +      * files.el (convert-standard-filename): Call
 +      w32-convert-standard-filename and dos-convert-standard-filename on
 +      the corresponding systems.
 +
 +      * w32-fns.el (w32-convert-standard-filename): Rename from
 +      convert-standard-filename.  Doc fix.
 +
 +      * dos-fns.el (dos-convert-standard-filename): Doc fix.
 +      (convert-standard-filename): Don't defalias.
 +      (register-name-alist, make-register, register-value)
 +      (set-register-value, intdos): Obsolete aliases for the
 +      corresponding dos-* functions and variables.
 +      (dos-intdos): Add a doc string.
 +
 +2010-05-15  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-aent.el (math-read-token, math-find-user-tokens):
 +      * calc/calc-lang.el (math-read-big-rec, math-lang-read-symbol):
 +      (math-compose-tex-func):
 +      * calc/calccomp.el (math-compose-expr):
 +      * calc/calc-ext.el (math-format-flat-expr-fancy):
 +      * calc/calc-store.el (calc-read-var-name):
 +      * calc/calc-units.el (calc-explain-units-rec): Allow Greek letters.
 +
 +      * calc/calc.el (var-π, var-φ, var-γ): New variables.
 +      * calc/calc-aent.el (math-read-replacement-list): Add "micro" symbol.
 +      * calc/calc-units.el (math-unit-prefixes): Add mu for micro.
 +      (math-standard-units): Add units.
 +
 +2010-05-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/asm-mode.el (asm-mode):
 +      * progmodes/prolog.el (prolog-mode): Use define-derived-mode.
 +
 +      * pcomplete.el (pcomplete-completions-at-point): New function,
 +      extracted from pcomplete-std-complete.
 +      (pcomplete-std-complete): Use it.
 +
 +2010-05-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
 +      Remove references to CVS, RCS and Old directories.
 +
 +2010-05-14  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc/calc-bin.el (math-format-twos-complement): Group digits when
 +      appropriate.
 +
 +2010-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/sh-script.el (sh-mode-default-syntax-table): Remove.
 +      (sh-mode-syntax-table): Give it a default value instead.
 +      (sh-header-marker): Make buffer-local.
 +      (sh-mode): Move make-local-variable to the corresponding setq.
 +      (sh-add-completer): Avoid gratuitously let-binding a buffer-local var.
 +      Use complete-with-action.
 +
 +      * simple.el (prog-mode): New (abstract) major mode.
 +      * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
 +      * progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
 +
 +2010-05-14  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/sql.el (sql-oracle-program): Reflow docstring.
 +      (sql-oracle-scan-on, sql-sybase-program, sql-product-font-lock)
 +      (sql-add-product-keywords, sql-highlight-product, sql-set-product)
 +      (sql-make-alternate-buffer-name, sql-placeholders-filter)
 +      (sql-escape-newlines-filter, sql-input-sender)
 +      (sql-send-magic-terminator, sql-sybase): Fix typos in docstrings.
 +
 +2010-05-13  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      Add TeX open-block and close-block keybindings to SGML, and vice versa.
 +
 +      * textmodes/tex-mode.el (tex-mode-map): Bind C-c C-t to
 +      latex-open-block and C-c / to latex-close-block.
 +
 +      * textmodes/sgml-mode.el (sgml-mode-map): Bind C-c C-o to sgml-tag
 +      and C-c C-e to sgml-close-tag.
 +
 +2010-05-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (with-progress-reporter): Create reporter object
 +      only when the message would be displayed.  Handle nested calls.
 +      (tramp-handle-load, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-maybe-send-script, tramp-find-shell):
 +      Use `with-progress-reporter'.
 +      (tramp-handle-dired-compress-file, tramp-maybe-open-connection):
 +      Fix message text.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file)
 +      (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
 +      (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection):
 +      Use `with-progress-reporter'.
 +
 +2010-05-13  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * ispell.el (ispell-init-process): Do not kill ispell process
 +      everytime when spellchecking from the minibuffer (bug#6143).
 +
 +2010-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/sh-script.el (sh-mode): Use define-derived-mode.
 +
 +      * dos-fns.el: Add "dos-" prefix for namespace control.
 +      (convert-standard-filename): Define as alias for
 +      dos-convert-standard-filename but only if applicable.
 +
 +2010-05-12  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
 +      Push the mark at the start of these functions when appropriate.
 +
 +2010-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-cycle-threshold): New custom var.
 +      (completion--do-completion): Use it.
 +      (minibuffer-complete): Use cycling if appropriate.
 +
 +2010-05-11  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * dirtrack.el (dirtrackp): Remove defcustom; don't make automatically
 +      buffer-local (it's an obsolete alias for `dirtrack-mode') (bug#6173).
 +
 +2010-05-11  Juri Linkov  <juri@jurta.org>
 +
 +      * scroll-all.el (scroll-all-check-to-scroll):
 +      Add `scroll-up-command' and `scroll-down-command' (bug#6164).
 +
 +2010-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * iimage.el (iimage-mode-map): Move initialization into declaration.
 +      (iimage-mode-buffer): Use with-silent-modifications.
 +      Simplify calling convention.  Adjust callers.
 +      (iimage-mode): Don't run hook redundantly.
 +
 +      * minibuffer.el (completion-pcm--pattern->regex):
 +      Fix last change (bug#6160).
 +
 +2010-05-10  Juri Linkov  <juri@jurta.org>
 +
 +      Remove nodes visited during Isearch from the Info history.
 +      * info.el (Info-isearch-initial-history)
 +      (Info-isearch-initial-history-list): New variables.
 +      (Info-isearch-start): Record initial values of
 +      Info-isearch-initial-history and Info-isearch-initial-history-list.
 +      Add Info-isearch-end to isearch-mode-end-hook.
 +      (Info-isearch-end): New function.
 +
 +2010-05-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-do-file-attributes-with-stat): Add space in
 +      format string, in order to work around a bug in pdksh.
 +      Reported by Gilles Pion <gpion@lfdj.com>.
 +      (tramp-handle-verify-visited-file-modtime): Do not send a command
 +      when the connection is not established.
 +      (tramp-handle-set-file-times): Simplify the check for utc.
 +
 +2010-05-10  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Fix use of `filter-buffer-substring' (rework previous change).
 +      * emulation/cua-base.el (cua--filter-buffer-noprops): New function.
 +      (cua-repeat-replace-region):
 +      * emulation/cua-rect.el (cua--extract-rectangle, cua-incr-rectangle):
 +      * emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
 +      (cua-cut-region-to-global-mark): Use it.
 +
 +2010-05-09  Michael R. Mauger  <mmaug@yahoo.com>
 +
 +      * progmodes/sql.el: Version 2.1.
 +      (sql-product-alist): Redesign structure of product info.
 +      (sql-product, sql-user, sql-server, sql-database): Safe variables.
 +      (sql-port, sql-port-history): New variables.
 +      (sql-interactive-product): New variable.
 +      (sql-send-terminator): New variable.
 +      (sql-imenu-generic-expression): Add "Types" imenu entry.
 +      (sql-oracle-login-params, sql-sqlite-login-params)
 +      (sql-mysql-login-params, sql-solid-login-params)
 +      (sql-sybase-login-params, sql-informix-login-params)
 +      (sql-ingres-login-params, sql-ms-login-params)
 +      (sql-postgres-login-params, sql-interbase-login-params)
 +      (sql-db2-login-params, sql-linter-login-params)
 +      (sql-oracle-scan-on): New variables.
 +      (sql-mode-map): Add C-c C-i to start interactive mode.
 +      (sql-mode-menu): Update existing menu entries.
 +      (sql-font-lock-keywords-builder): Compile-time font-lock optimization.
 +      (sql-mode-oracle-font-lock-keywords)
 +      (sql-mode-postgres-font-lock-keywords)
 +      (sql-mode-ms-font-lock-keywords)
 +      (sql-mode-sybase-font-lock-keywords)
 +      (sql-mode-informix-font-lock-keywords)
 +      (sql-mode-interbase-font-lock-keywords)
 +      (sql-mode-ingres-font-lock-keywords)
 +      (sql-mode-solid-font-lock-keywords)
 +      (sql-mode-mysql-font-lock-keywords)
 +      (sql-mode-sqlite-font-lock-keywords)
 +      (sql-mode-db2-font-lock-keywords)
 +      (sql-mode-linter-font-lock-keywords): Update initialization to
 +      reduce run-time complexity.
 +      (sql-add-product, sql-del-product): New functions.
 +      (sql-set-product-feature, sql-get-product-feature): New functions.
 +      (sql-product-font-lock): Update product API.
 +      (sql-add-product-keywords): New function.
 +      (sql-highlight-product): Update product API.
 +      (sql-help-list-products): New function.
 +      (sql-help): Dynamically lists free and non-free products.
 +      (sql-get-login): Correct bug in handling history and added
 +      prompt for port.
 +      (sql-copy-column): Copy without properties.
 +      (sqli-input-sender): Apply filters to SQLi input.
 +      (sql-query-placeholders-and-send): Obey `sql-oracle-scan-on' setting.
 +      Implement as a filter.
 +      (sql-escape-newlines-filter): Implement as a filter.
 +      (sql-remove-tabs-filter): New function.
 +      (sql-send-magic-terminator): New function.
 +      (sql-send-string): Implement magic terminator.
 +      (sql-send-region): Use `sql-send-string'.
 +      (sql-interactive-mode): Use product API.
 +      (sql-product-interactive): Use product API.
 +      (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
 +      (sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
 +      (sql-db2, sql-linter): Use `sql-product-interactive'.
 +      (sql-connect): New function.
 +      (sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
 +      (sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
 +      (sql-connect-ingres, sql-connect-ms, sql-connect-postgres)
 +      (sql-connect-interbase, sql-connect-db2, sql-connect-linter):
 +      Use `sql-connect'.
 +
 +2010-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion-pcm-complete-word-inserts-delimiters):
 +      New custom variable.
 +      (completion-pcm--string->pattern): Use it.
 +      (completion-pcm--pattern->regex, completion-pcm--pattern->string):
 +      Make it handle any symbol as `any'.
 +      (completion-pcm--merge-completions): Extract common suffix for the new
 +      `prefix' symbol as well.
 +      (completion-substring--all-completions): Use the new `prefix' symbol.
 +
 +2010-05-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp-compat.el (byte-compile-not-obsolete-vars): Define if
 +      not bound.
 +      (tramp-compat-copy-file): Add PRESERVE-SELINUX-CONTEXT.
 +      (tramp-compat-funcall): New defmacro.
 +      (tramp-compat-line-beginning-position)
 +      (tramp-compat-line-end-position)
 +      (tramp-compat-temporary-file-directory)
 +      (tramp-compat-make-temp-file, tramp-compat-file-attributes)
 +      (tramp-compat-copy-file, tramp-compat-copy-directory)
 +      (tramp-compat-delete-file, tramp-compat-delete-directory)
 +      (tramp-compat-number-sequence, tramp-compat-process-running-p)
 +      * net/tramp.el (top, with-progress-reporter)
 +      (tramp-rfn-eshadow-setup-minibuffer)
 +      (tramp-rfn-eshadow-update-overlay, tramp-handle-set-file-times)
 +      (tramp-handle-dired-compress-file, tramp-handle-shell-command)
 +      (tramp-completion-mode-p, tramp-check-for-regexp)
 +      (tramp-open-connection-setup-interactive-shell)
 +      (tramp-compute-multi-hops, tramp-read-passwd, tramp-clear-passwd)
 +      (tramp-time-diff, tramp-coding-system-change-eol-conversion)
 +      (tramp-set-process-query-on-exit-flag, tramp-unload-tramp)
 +      * net/tramp-cmds.el (tramp-cleanup-all-connections)
 +      (tramp-reporter-dump-variable, tramp-load-report-modules)
 +      (tramp-append-tramp-buffers)
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-file-selinux-context): Use it.
 +
 +      * net/tramp-imap.el (top): Autoload `epg-make-context'.
 +
 +2010-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * progmodes/compile.el (compilation-buffer-modtime): Rename from
 +      buffer-modtime.  Adjust users.
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * international/mule.el (auto-coding-alist): Only purecopy
 +      car of each item, not the whole list (Bug#6083).
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/js.el (js-mode): Make paragraph variables local before
 +      calling c-setup-paragraph-variables (Bug#6071).
 +
 +2010-05-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * composite.el (compose-region, reference-point-alist): Fix typos
 +      in the doc strings.
 +
 +2010-05-08  Alexander Klimov  <alserkli@inbox.ru>  (tiny change)
 +
 +      * calc/calc-graph.el (calc-graph-plot): Use the proper form for
 +      gnuplot's "set" command.
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * abbrev.el (last-abbrev-text): Doc fix.
 +      (abbrev-prefix-mark): Don't escape parenthesis.
 +
 +2010-05-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * composite.el (find-composition): Doc fix.
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/sql.el (sql-electric-stuff): Fix typo in tag.
 +      (sql-oracle-program, sql-sqlite-options)
 +      (sql-query-placeholders-and-send): Doc fixes.
 +      (sql-set-product, sql-interactive-mode): Reflow docstrings.
 +      (sql-imenu-generic-expression, sql-buffer)
 +      (sql-mode-ansi-font-lock-keywords, sql-mode-oracle-font-lock-keywords)
 +      (sql-mode-postgres-font-lock-keywords, sql-mode-ms-font-lock-keywords)
 +      (sql-mode-sybase-font-lock-keywords)
 +      (sql-mode-informix-font-lock-keywords)
 +      (sql-mode-interbase-font-lock-keywords)
 +      (sql-mode-ingres-font-lock-keywords, sql-mode-solid-font-lock-keywords)
 +      (sql-mode-mysql-font-lock-keywords, sql-mode-sqlite-font-lock-keywords)
 +      (sql-mode-db2-font-lock-keywords, sql-mode-font-lock-keywords)
 +      (sql-product-feature, sql-highlight-product)
 +      (comint-line-beginning-position, sql-rename-buffer)
 +      (sql-toggle-pop-to-buffer-after-send-region sql-oracle)
 +      (sql-sybase, sql-informix, sql-sqlite, sql-mysql, sql-solid)
 +      (sql-ingres, sql-ms, sql-postgres, sql-interbase, sql-db2, sql-linter):
 +      Fix typos in docstrings.
 +
 +2010-05-08  Juri Linkov  <juri@jurta.org>
 +
 +      * info.el (Info-fontify-node): Put Info-breadcrumbs to the `display'
 +      property instead of `invisible' and `after-string' (bug#5998).
 +
 +2010-05-08  Juri Linkov  <juri@jurta.org>
 +
 +      * image-mode.el (image-mode-as-text): Fix typo in docstring.
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * filecache.el (file-cache-add-directory-list)
 +      (file-cache-add-directory-recursively): Fix typos in docstrings.
 +
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/indian.el (gurmukhi-composable-pattern): Fix typo.
 +      (gujarati-composable-pattern): Fix typo.
 +
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/indian.el (oriya-composable-pattern)
 +      (tamil-composable-pattern, malayalam-composable-pattern):
 +      Add two-part vowels to "v" (vowel sign).
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * files.el (copy-directory): Handle symlinks (Bug#5982).
 +
 +2010-05-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vc-hg.el (vc-hg-state): Use HGRCPATH, not HGRC.
 +      (vc-hg-working-revision): Likewise.  Use hg parents, not hg parent
 +      (Bug#5846).
 +
 +2010-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/lisp.el (lisp-completion-at-point): Give it a doc string.
 +
 +      * minibuffer.el (completion-at-point): Doc fix.
 +
 +2010-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * electric.el (Electric-command-loop): Minor tweak.
 +
 +      * ebuff-menu.el (electric-buffer-list): Try and make it behave a bit
 +      better with dedicated windows.
 +
 +2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-05-07  Deniz Dogan  <deniz.a.m.dogan@gmail.com>  (tiny change)
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Highlight vendor specific properties.
 +      * textmodes/css-mode.el (css-proprietary-nmstart-re): New var.
 +      (css-proprietary-property): New face.
 +      (css-font-lock-keywords): Use them.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * cus-start.el (all): Add native condition for tool-bar-* symbols.
 +
 +2010-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * textmodes/dns-mode.el (auto-mode-alist): Add entry for .zone files.
 +      * files.el (auto-mode-alist): Remove redundant entries.
 +
 +      * files.el (auto-save-mode): Move to simple.el to fix bootstrap.
 +      * simple.el (auto-save-mode): Move from files.el.
 +      * minibuffer.el (completion--common-suffix): Fix copy&paste error.
 +
 +2010-05-07  Christian von Roques  <roques@mti.ag>  (tiny change)
 +
 +      * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592).
 +
 +2010-05-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 +
 +      * mail/binhex.el (binhex-decode-region-internal)
 +      * mail/uudecode.el (uudecode-decode-region-internal)
 +      * net/dns.el (dns-read-string-name, dns-write, dns-read)
 +      (dns-read-type, dns-query)
 +      * pgg-parse.el (pgg-parse-armor)
 +      * pgg.el (pgg-verify-region)
 +      * sha1.el (sha1-string-external): Don't run set-buffer-multibyte for
 +      XEmacs.
 +
 +      * net/imap.el (imap-disable-multibyte): Redefine it as a macro.
 +
 +2010-05-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * progmodes/cperl-mode.el (cperl-mode-unload-function): New function.
 +
 +      Fix use of `filter-buffer-substring' (4th arg NOPROPS removed).
 +      * emulation/cua-base.el (cua-repeat-replace-region):
 +      * emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
 +      (cua-cut-region-to-global-mark):
 +      Remove text properties with `set-text-properties'.
 +
 +2010-05-06  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (top, with-progress-reporter):
 +      Use `symbol-function' inside `funcall'.
 +
 +      * net/tramp-compat.el (tramp-compat-file-attributes)
 +      (tramp-compat-delete-file, tramp-compat-delete-directory):
 +      Handle only `wrong-number-of-arguments' error.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Fix typo.
 +      (tramp-gvfs-handle-file-selinux-context): Use `symbol-function'
 +      inside `funcall'.
 +
 +2010-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * minibuffer.el (completion--sreverse, completion--common-suffix):
 +      New functions.
 +      (completion-pcm--merge-completions): Extract common suffix when safe.
 +
 +      * emacs-lisp/easy-mmode.el (define-minor-mode):
 +      Make :variable more flexible.
 +      * files.el (auto-save-mode): Use it to define using define-minor-mode.
 +
 +2010-05-05  Juri Linkov  <juri@jurta.org>
 +
 +      Add `slow' and `history' tags to the desktop data.
 +
 +      * info.el (Info-virtual-nodes) [*Index*]: Add `slow' tag.
 +      (Info-virtual-files) [*Apropos*]: Add `slow' tag.
 +      (Info-finder-find-node): Require `finder.el' to be able
 +      to restore node from the desktop.
 +      (Info-desktop-buffer-misc-data): Save all nodes.  Save additional
 +      data `Info-history' and `slow' tag in the assoc list.
 +      (Info-restore-desktop-buffer): Don't restore nodes with the
 +      `slow' tag.  Restore `Info-history'.
 +
 +2010-05-05  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Add FORCE argument to `delete-file'.
 +
 +      * net/ange-ftp.el (ange-ftp-del-tmp-name): Make it a defun,
 +      forcing to delete the temporary file.
 +      (ange-ftp-delete-file): Add FORCE arg.
 +      (ange-ftp-rename-remote-to-remote)
 +      (ange-ftp-rename-local-to-remote, ange-ftp-rename-remote-to-local)
 +      (ange-ftp-load, ange-ftp-compress, ange-ftp-uncompress):
 +      Force file deletion.
 +
 +      * net/tramp-compat.el (tramp-compat-delete-file): New defun.
 +
 +      * net/tramp.el (tramp-handle-delete-file): Add FORCE arg.
 +      (tramp-handle-make-symbolic-link, tramp-handle-load)
 +      (tramp-do-copy-or-rename-file-via-buffer)
 +      (tramp-do-copy-or-rename-file-directly)
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-handle-process-file, tramp-handle-call-process-region)
 +      (tramp-handle-shell-command, tramp-handle-file-local-copy)
 +      (tramp-handle-insert-file-contents, tramp-handle-write-region)
 +      (tramp-delete-temp-file-function): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-delete-file): Add FORCE arg.
 +      (tramp-fish-handle-make-symbolic-link)
 +      (tramp-fish-handle-process-file): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-ftp.el (tramp-ftp-file-name-handler):
 +      Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Add FORCE arg.
 +      (tramp-gvfs-handle-write-region): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-imap.el (tramp-imap-handle-delete-file): Add FORCE arg.
 +      (tramp-imap-do-copy-or-rename-file): Use `tramp-compat-delete-file'.
 +
 +      * net/tramp-smb.el (tramp-smb-handle-delete-file): Add FORCE arg.
 +      (tramp-smb-handle-copy-file, tramp-smb-handle-file-local-copy)
 +      (tramp-smb-handle-rename-file, tramp-smb-handle-write-region): Use
 +      `tramp-compat-delete-file'.
 +
 +2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Minor cleanups.
 +      * subr.el (add-minor-mode): Use push.
 +      * mail/supercite.el (sc-electric-mode): Use more descriptive arg name.
 +      * emulation/edt.el (edt-select-mode): Simplify.
 +
 +      Use define-minor-mode in more cases.
 +      * term/tvi970.el (tvi970-set-keypad-mode):
 +      * simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
 +      (normal-erase-is-backspace-mode):
 +      * scroll-bar.el (scroll-bar-mode): Use it and define-minor-mode.
 +      (set-scroll-bar-mode-1): (Re)move to its sole caller.
 +      (get-scroll-bar-mode): New function.
 +      * emacs-lisp/cl-macs.el (eq): Handle a non-variable first arg.
 +
 +      Use define-minor-mode for less obvious cases.
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Add :variable keyword.
 +      * emacs-lisp/cl-macs.el (terminal-parameter, eq): Add setf method.
 +      * international/iso-ascii.el (iso-ascii-mode):
 +      * frame.el (auto-raise-mode, auto-lower-mode):
 +      * composite.el (global-auto-composition-mode): Use define-minor-mode.
 +
 +2010-05-04  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-methods): Remove "-q" from `tramp-login-args'
 +      in order to see error messages for failed logins.
 +
 +2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * diff.el (diff-sentinel):
 +
 +      * epg.el (epg--make-temp-file, epg-decrypt-string)
 +      (epg-verify-string, epg-sign-string, epg-encrypt-string):
 +
 +      * jka-compr.el (jka-compr-partial-uncompress)
 +      (jka-compr-call-process, jka-compr-write-region, jka-compr-load):
 +
 +      * server.el (server-sentinel): Use delete-file's new FORCE arg
 +      (Bug#6070).
 +
 +2010-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Use define-minor-mode where applicable.
 +      * view.el (view-mode):
 +      * type-break.el (type-break-query-mode)
 +      (type-break-mode-line-message-mode):
 +      * textmodes/reftex.el (reftex-mode):
 +      * term/vt100.el (vt100-wide-mode):
 +      * tar-mode.el (tar-subfile-mode):
 +      * savehist.el (savehist-mode):
 +      * ibuf-ext.el (ibuffer-auto-mode):
 +      * composite.el (auto-composition-mode):
 +      * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
 +      Use define-minor-mode.
 +      (vhdl-mode): Use static mode-line format.
 +      (vhdl-mode-line-update): Delete.
 +      (vhdl-create-mode-menu, vhdl-activate-customizations)
 +      (vhdl-hs-minor-mode): Don't bother calling it.
 +
 +2010-05-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (with-wrapper-hook): Move.
 +      (buffer-substring-filters): Mark obsolete.
 +      (filter-buffer-substring-functions): New variable.
 +      (filter-buffer-substring): Use it.  Remove unused arg `noprops'.
 +
 +      Use a mode-line spec rather than a static string in Semantic.
 +      * cedet/semantic/util-modes.el:
 +      (semantic-minor-modes-format): New var to replace...
 +      (semantic-minor-modes-status): Remove.
 +      (semantic-mode-line-update): Construct a mode-line spec rather than
 +      a static string so that mouse buttons can be used on individual minor
 +      modes and so that semantic-mode-line-update only needs to be called
 +      when global settings are changed.
 +      (semantic-add-minor-mode, semantic-toggle-minor-mode-globally):
 +      Call semantic-mode-line-update.
 +      (semantic-toggle-minor-mode-globally): Don't assume mode is on
 +      minor-mode-alist, check semantic-minor-mode-alist as well.
 +      (semantic-stickyfunc-mode, semantic-show-parser-state-auto-marker)
 +      (semantic-show-parser-state-marker, semantic-show-parser-state-mode)
 +      (semantic-show-unmatched-syntax-mode, semantic-highlight-edits-mode):
 +      * cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
 +      * cedet/semantic/idle.el (semantic-idle-scheduler-mode)
 +      (define-semantic-idle-service, semantic-idle-summary-mode):
 +      * cedet/semantic/decorate/mode.el (semantic-decoration-mode):
 +      Don't call semantic-mode-line-update any more.
 +
 +2010-05-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Use define-minor-mode in CEDET where applicable.
 +
 +      * cedet/srecode/mode.el (srecode-minor-mode,global-srecode-minor-mode):
 +      Use define-minor-mode.
 +
 +      * cedet/semantic/util-modes.el (semantic-add-minor-mode):
 +      Remove unused arg `keymap' and code redundant with define-minor-mode.
 +      (semantic-toggle-minor-mode-globally): Only handle arg -1 and 1.
 +      (semantic-stickyfunc-mode, global-semantic-show-unmatched-syntax-mode)
 +      (semantic-highlight-func-mode, global-semantic-show-parser-state-mode)
 +      (global-semantic-highlight-edits-mode, semantic-highlight-edits-mode)
 +      (semantic-show-unmatched-syntax-mode, semantic-show-parser-state-mode)
 +      (global-semantic-stickyfunc-mode, global-semantic-highlight-func-mode):
 +      Use define-minor-mode.
 +      (semantic-stickyfunc-mode-setup, semantic-highlight-edits-mode-setup)
 +      (semantic-show-unmatched-syntax-mode-setup)
 +      (semantic-show-parser-state-mode-setup)
 +      (semantic-highlight-func-mode-setup): Inline into sole caller.
 +
 +      * cedet/semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode)
 +      (semantic-mru-bookmark-mode): Use define-minor-mode.
 +      (semantic-mru-bookmark-mode-setup): Inline into sole caller.
 +
 +      * cedet/semantic/idle.el (define-semantic-idle-service):
 +      Use define-minor-mode and inline setup function into its sole caller.
 +      (semantic-idle-scheduler-mode-setup)
 +      (semantic-idle-summary-mode-setup): Inline into sole caller.
 +      (global-semantic-idle-scheduler-mode, semantic-idle-scheduler-mode):
 +      Use define-minor-mode.
 +
 +      * cedet/semantic/decorate/mode.el (global-semantic-decoration-mode)
 +      (semantic-decoration-mode): Use define-minor-mode.
 +      (semantic-decoration-mode-setup): Inline into sole caller.
 +
 +      * cedet/ede/dired.el (ede-dired-minor-mode): Initialize in declaration.
 +      (ede-dired-minor-mode): Use define-minor-mode and derived-mode-p.
 +      (ede-dired-add-to-target): Use dolist.
 +
 +2010-05-01  Toru TSUNEYOSHI  <t_tuneyosi@hotmail.com>
 +            Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Implement compression for inline methods.
 +
 +      * net/tramp.el (tramp-inline-compress-start-size): New defcustom.
 +      (tramp-copy-size-limit): Allow also nil.
 +      (tramp-inline-compress-commands): New defconst.
 +      (tramp-find-inline-compress, tramp-get-inline-compress)
 +      (tramp-get-inline-coding): New defuns.
 +      (tramp-get-remote-coding, tramp-get-local-coding): Remove,
 +      replaced by `tramp-get-inline-coding'.
 +      (tramp-handle-file-local-copy, tramp-handle-write-region)
 +      (tramp-method-out-of-band-p): Use `tramp-get-inline-coding'.
 +
 +2010-05-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * bindings.el (mode-line-abbrev-mode, mode-line-auto-fill-mode):
 +      Remove unused functions.
 +
 +      * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode.
 +      Set find-tag-default-function as a variable rather than a property.
 +
 +      * minibuffer.el (tags-completion-at-point-function): Move to etags.el.
 +      * progmodes/etags.el (tags-completion-at-point-function):
 +      Remove left over interactive spec.  Add autoloading stub.
 +      (complete-tag): Use tags-completion-at-point-function.
 +
 +2010-04-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * minibuffer.el (tags-completion-at-point-function): Fix return value.
 +
 +2010-04-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * ido.el (ido-init-completion-maps): Remove C-v binding.
 +      (ido-minibuffer-setup): Don't set cua-inhibit-cua-keys (Bug#5765).
 +
 +2010-04-29  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * minibuffer.el (tags-completion-at-point-function): New function.
 +      (completion-at-point-functions): Use it.
 +
 +      * cedet/semantic.el (semantic-completion-at-point-function): New function.
 +      (semantic-mode): Use semantic-completion-at-point-function for
 +      completion-at-point-functions instead.
 +
 +      * progmodes/etags.el (complete-tag): Revert last change.
 +
 +2010-04-29  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-mode.el (c-extend-region-for-CPP): Fix an
 +      off-by-one error (in end of macro position).
 +
 +2010-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * net/browse-url.el (browse-url-firefox-program): Use iceweasel if
 +      firefox is absent.  Don't autoload.
 +      (browse-url-galeon-program): Don't autoload.
 +
 +2010-04-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * bindings.el (complete-symbol): Move into minibuffer.el.
 +
 +      * minibuffer.el (complete-tag): Move from etags.el.  If tags
 +      completion cannot be performed, return nil instead of signalling
 +      an error.
 +      (completion-at-point): Make it an alias for complete-symbol.
 +      (complete-symbol): Move from bindings.el, and replace with the
 +      body of completion-at-point.
 +
 +      * progmodes/etags.el (complete-tag): Move to minibuffer.el.
 +
 +      * cedet/semantic.el (semantic-mode): When enabled, add
 +      semantic-ia-complete-symbol to completion-at-point-functions.
 +
 +      * cedet/semantic/ia.el (semantic-ia-complete-symbol): Return nil
 +      if Semantic is not active.
 +
 +2010-04-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-remote-selinux-p): New defun.
 +      (tramp-handle-file-selinux-context)
 +      (tramp-handle-set-file-selinux-context): Use it.
 +
 +2010-04-28  Sam Steingold  <sds@gnu.org>
 +
 +      * progmodes/bug-reference.el (bug-reference-url-format): Mark as
 +      `safe-local-variable' if the value is a string or a symbol with
 +      the property `bug-reference-url-format'.
 +
 +2010-04-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/bug-reference.el (bug-reference-url-format): Revert
 +      2010-04-27 change due to security risk.
 +
 +2010-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Make it possible to locally disable a globally enabled mode.
 +      * simple.el (fundamental-mode): Run fundamental-mode-hook.
 +      * emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
 +      rather than kill-all-local-variables so it runs fundamental-mode-hook.
 +      * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
 +      Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
 +      that subsequent hooks get a chance to disable it.
 +
 +2010-04-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
 +      Avoid re-enabling a minor mode after the user turned the minor mode
 +      off if MODE-enable-in-buffers is run twice (typically once from
 +      fundamental-mode's after-change-major-mode-hook and a second time from
 +      run-mode-hook's own after-change-major-mode-hook).
 +
 +      * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully.
 +
 +2010-04-27  Sam Steingold  <sds@gnu.org>
 +
 +      * progmodes/bug-reference.el (bug-reference-url-format): Mark as
 +      `safe-local-variable' if the value is a string or a function, as
 +      documented and implemented on 2010-04-02.
 +
 +2010-04-27  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * ido.el (ido-buffer-internal): Bind `ido-use-virtual-buffers' to nil
 +      when method is 'kill.
 +
 +2010-04-27  Agustín Martín  <agustin.martin@hispalinux.es>
 +
 +      * ispell.el (ispell-init-process): Fix personal dictionary condition
 +      in default directory check.
 +      (ispell-init-process,ispell-kill-ispell,kill-buffer-hook):
 +      Kill ispell process when killing its associated buffer.
 +
 +2010-04-27  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists,
 +      but we aren't using it.
 +
 +2010-04-25  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * tool-bar.el (tool-bar-local-item-from-menu): Revert unintended
 +      checkin in 2010-04-23T16:26:11Z!monnier@iro.umontreal.ca.
 +
 +2010-04-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/authors.el (authors-obsolete-files-regexps):
 +      Ignore VCS-ignore files, and deleted nextstep preferences files.
 +      (authors-ignored-files): Ignore deleted cedet test files, and "*.el".
 +      (authors-ambiguous-files): New list.
 +      (authors-valid-file-names): Add some deleted files.
 +      (authors-renamed-files-alist): Add font-setting.el, edt-user.doc.
 +      (authors-disambiguate-file-name): New function.  (Bug#5501)
 +      (authors-canonical-file-name): Doc fix.
 +      Don't warn about obsolete files.
 +      (authors-canonical-file-name, authors-scan-el):
 +      Use authors-disambiguate-file-name.
 +
 +      * hfy-cmap.el (htmlfontify-load-rgb-file, hfy-fallback-colour-values):
 +      Add autoload cookies.
 +      (htmlfontify-unload-rgb-file, hfy-fallback-colour-values): Add docs.
 +      (generated-autoload-file): Set file-local value to "htmlfontify.el".
 +      * htmlfontify.el (caddr, cadddr): Remove fallback definitions.
 +      They have definitions / compiler macros in cl.el.
 +      (htmlfontify-load-rgb-file, hfy-fallback-colour-values):
 +      Replace manual autoloads with generated ones.
 +      (htmlfontify-unload-rgb-file): Remove autoload.
 +      * Makefile.in (autoloads): Ensure htmlfontify.el is writable.
 +
 +2010-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/bytecomp.el (byte-compile-set-default): New function.
 +      (byte-compile-setq-default): Optimize for the
 +      single-var case and don't call byte-compile-form in this case to avoid
 +      inf-loop with byte-compile-set-default.
 +
 +      * progmodes/compile.el (compilation-start): Abbreviate default directory.
 +
 +2010-04-23  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Implement SELINUX backends.
 +
 +      * net/tramp.el (tramp-file-name-handler-alist):
 +      Add `file-selinux-context' and `set-file-selinux-context'.
 +      (tramp-handle-file-selinux-context)
 +      (tramp-handle-set-file-selinux-context): New defuns.
 +      (tramp-handle-copy-file, tramp-do-copy-or-rename-file):
 +      Handle PRESERVE-SELINUX-CONTEXT.
 +
 +      * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
 +      Add `file-selinux-context' and `set-file-selinux-context'.
 +      (tramp-gvfs-handle-file-selinux-context)
 +      (tramp-gvfs-handle-set-file-selinux-context): New defuns.
 +      (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT.
 +
 +      * net/ange-ftp.el (ange-ftp-copy-file):
 +      * net/tramp-fish.el (tramp-fish-handle-copy-file):
 +      * net/tramp-imap.el (tramp-imap-handle-copy-file):
 +      * net/tramp-smb.el (tramp-smb-handle-copy-file):
 +      Add PRESERVE-SELINUX-CONTEXT.
 +
 +2010-04-22  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Synchronize with Tramp repository.
 +
 +      * net/tramp.el (with-connection-property, tramp-completion-mode-p)
 +      (tramp-action-process-alive, tramp-action-out-of-band)
 +      (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote)
 +      (tramp-exists-file-name-handler): Fix docstring.
 +      (with-progress-reporter): New defmacro.
 +      (tramp-do-copy-or-rename-file, tramp-handle-dired-compress-file)
 +      (tramp-maybe-open-connection): Use it.
 +
 +2010-04-22  Noah Lavine  <noah549@gmail.com>  (tiny change)
 +
 +      Detect ssh 'ControlMaster' argument automatically in some cases.
 +
 +      * net/tramp.el (tramp-detect-ssh-controlmaster): New defun.
 +      (tramp-default-method): Use it.
 +
 +2010-04-22  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-handle-copy-file): Add new optional
 +      parameter `preserve-selinux-context'.
 +      (tramp-file-name-for-operation): Add `set-file-selinux-context'.
 +
 +2010-04-22  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-completion-handle-file-name-all-completions):
 +      Ensure, that non remote files are still checked.  Oops.
 +
 +2010-04-21  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Fix Bug#5840.
 +
 +      * icomplete.el (icomplete-completions): Use `non-essential'.
 +
 +      * net/tramp.el (tramp-connectable-p): New defun.
 +      (tramp-handle-expand-file-name)
 +      (tramp-completion-handle-file-name-all-completions)
 +      (tramp-completion-handle-file-name-completion): Use it.
 +
 +2010-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * emacs-lisp/lisp.el (lisp-completion-at-point): Try and handle errors.
 +
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items.
 +
 +      * tool-bar.el (tool-bar-setup): Add :label on some tool bar items.
 +
 +      * loadup.el: Load dynamic-setting.el if feature dynamic-setting
 +      is present.
 +
 +      * info.el (info-tool-bar-map): Add labels.
 +
 +      * cus-start.el (all): Add tool-bar-style and tool-bar-max-label-size.
 +
 +      * cus-edit.el (custom-commands): Add labels for tool bar.
 +      (custom-buffer-create-internal, Custom-mode): Adjust for
 +      labels in custom-commands.
 +
 +      * dynamic-setting.el: Renamed from font-setting.el.
 +
 +2010-04-21  John Wiegley  <jwiegley@gmail.com>
 +
 +      * ido.el (ido-init-completion-maps): For ido-switch-buffer, C-o
 +      toggles the use of virtual buffers.
 +      (ido-buffer-internal): Guard `ido-use-virtual-buffers' global
 +      value.
 +      (ido-toggle-virtual-buffers): New function.
 +
 +2010-04-21  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Use `define-derived-mode'; fix window selection; doc fixes.
 +      * play/tetris.el (tetris, tetris-update-speed-function)
 +      (tetris-tty-colors, tetris-x-colors, tetris-move-bottom)
 +      (tetris-move-left, tetris-move-right, tetris-rotate-prev)
 +      (tetris-rotate-next, tetris-end-game, tetris-start-game)
 +      (tetris-pause-game): Fix typos in docstrings.
 +      (tetris-mode-map, tetris-null-map):
 +      Move initialization into declaration.
 +      (tetris-mode): Define with `define-derived-mode';
 +      set show-trailing-whitespace to nil.
 +      (tetris): Prefer window already displaying the "*Tetris*" buffer.
 +
 +2010-04-21  Karel Klíč  <kklic@redhat.com>
 +
 +      * files.el (backup-buffer): Handle SELinux context, and return it
 +      if a backup was made by renaming.
 +      (backup-buffer-copy): Set SELinux context to the target file.
 +      (basic-save-buffer): Set SELinux context of the newly written file.
 +      (basic-save-buffer-1): Now it also returns any SELinux context.
 +      (basic-save-buffer-2): Set SELinux context of the newly created file,
 +      and return it.
 +      * net/tramp.el (tramp-file-name-for-operation):
 +      Add file-selinux-context.
 +
 +2010-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Make the log-edit comments use RFC822 format throughout.
 +
 +      * vc.el (vc-checkin, vc-modify-change-comment):
 +      Adjust to new vc-start/finish-logentry.
 +      (vc-find-conflicted-file): New command.
 +      (vc-transfer-file): Adjust to new vc-checkin.
 +      (vc-next-action): Improve scoping.
 +
 +      * vc-hg.el (vc-hg-log-edit-mode): Remove.
 +      (vc-hg-checkin): Remove extra arg.  Use log-edit-extract-headers.
 +
 +      * vc-git.el (vc-git-log-edit-mode): Remove.
 +      (vc-git-checkin): Remove extra arg.  Use log-edit-extract-headers.
 +      (vc-git-commits-coding-system): Rename from git-commits-coding-system.
 +
 +      * vc-dispatcher.el (vc-log-edit): Shorten names for log-edit-show-files.
 +      (vc-start-logentry): Remove argument `extra'.
 +      (vc-finish-logentry): Remove extra args.
 +
 +      * vc-bzr.el (vc-bzr-log-edit-mode): Remove.
 +      (vc-bzr-checkin): Remove extra arg.  Use log-edit-extract-headers.
 +      (vc-bzr-conflicted-files): New function.
 +
 +      * log-edit.el (log-edit-extra-flags)
 +      (log-edit-before-checkin-process): Remove.
 +      (log-edit-summary, log-edit-header, log-edit-unknown-header): New faces.
 +      (log-edit-headers-alist): New var.
 +      (log-edit-header-contents-regexp): New const.
 +      (log-edit-match-to-eoh): New function.
 +      (log-edit-font-lock-keywords): Use them.
 +      (log-edit): Insert a "Summary:" header as default.
 +      (log-edit-mode): Mark font-lock rules as case-insensitive.
 +      (log-edit-done): Cleanup headers.
 +      (log-view-process-buffer): Remove.
 +      (log-edit-extract-headers): New function to replace it.
 +
 +2010-04-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * subr.el (default-direction-reversed): Remove obsolescence info.
 +
 +2010-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-dispatcher.el (vc-finish-logentry): Don't mess so badly with the
 +      windows/frames.
 +
 +      * emacs-lisp/lisp.el (lisp-completion-at-point): Complete around point.
 +      I.e. include text after point in the completion region.
 +      Also, return nil when we're not after/in a symbol.
 +
 +      * international/mule-cmds.el (view-hello-file): Don't fiddle with the
 +      default enable-multibyte-characters.
 +
 +2010-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * international/mule.el: Help the user choose a valid coding-system.
 +      (read-buffer-file-coding-system): New function.
 +      (set-buffer-file-coding-system): Use it.  Prompt the user if the
 +      coding-system cannot encode all the chars.
 +
 +      * vc-bzr.el: Use standard *vc* and *vc-diff* buffers.
 +      (vc-bzr-shelve-show, vc-bzr-shelve-apply)
 +      (vc-bzr-shelve-apply-and-keep, vc-bzr-shelve-snapshot):
 +      Don't use *vc-bzr-shelve*.
 +
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cedet/ede/pmake.el (ede-proj-makefile-insert-variables):
 +      Don't destroy list before using it.
 +
 +2010-04-19  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix the version number for added files.
 +      * vc-hg.el (vc-hg-working-revision): Check if the file is
 +      registered after hg parent fails (Bug#5961).
 +
 +2010-04-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * htmlfontify.el (htmlfontify-buffer)
 +      (htmlfontify-copy-and-link-dir): Autoload entry points.
 +
 +2010-04-19  Magnus Henoch  <magnus.henoch@gmail.com>
 +
 +      * vc-hg.el (vc-hg-annotate-extract-revision-at-line): Expand file
 +      name relative to the project root (Bug#5960).
 +
 +2010-04-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc-git.el (vc-git-print-log): Doc fix.
 +
 +2010-04-19  Óscar Fuentes  <ofv@wanadoo.es>
 +
 +      * ido.el (ido-file-internal): Fix 2009-12-02 change.
 +
 +2010-04-19  Christoph  <cschol2112@googlemail.com>  (tiny change)
 +
 +      * progmodes/grep.el (grep-compute-defaults): Fix handling of host
 +      default settings (Bug#5928).
 +
 +2010-04-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/fortran.el (fortran-match-and-skip-declaration):
 +      New function.
 +      (fortran-font-lock-keywords-3): Use it.  (Bug#1385)
 +
 +2010-04-19  Kenichi Handa  <handa@m17n.org>
 +
 +      * language/indian.el (malayalam-composable-pattern): Fix previous
 +      change (add U+0D4D "SIGN VIRAMA").
 +      (oriya-composable-pattern): Add U+0B30 and fix typo in the regexp.
 +      (tamil-composable-pattern): Fix typo in the regexp.
 +      (telugu-composable-pattern): Fix U+0C4D and typo in the regexp.
 +      (kannada-composable-pattern): Fix U+0CB0 and typo in the regexp.
 +      (malayalam-composable-pattern): Fix U+0D4D and typo in the regexp.
 +
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * textmodes/tex-mode.el (latex-mode): Revert 2008-03-03 change to
 +      paragraph-separate (Bug#5821).
 +
 +2010-04-19  Juri Linkov  <juri@jurta.org>
 +
 +      Put breadcrumbs on overlay instead of inserting to buffer (bug#5809).
 +
 +      * info.el (Info-find-node-2): Comment out code that skips
 +      breadcrumbs line.
 +      (Info-mouse-follow-link): New command.
 +      (Info-link-keymap): New keymap.
 +      (Info-breadcrumbs): Rename from `Info-insert-breadcrumbs'.
 +      Return a string with links instead of inserting breadcrumbs
 +      to the Info buffer.
 +      (Info-fontify-node): Comment out code that inserts breadcrumbs.
 +      Instead of putting the `invisible' text property over the Info
 +      header, make an overlay over the Info header with the `invisible'
 +      property and `after-string' set to the string returned by
 +      `Info-breadcrumbs'.
 +
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * help.el (help-window-setup-finish): Doc fix (Bug#5830).
 +      Reported by monkey@sandpframing.com.
 +
 +2010-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * tmm.el (tmm-prompt): Remove obsolete call to x-popup-menu.
 +      (tmm-get-keymap): Add key-binding shortcuts now that they're not
 +      available in the "keyseq cache" any more.
 +
 +      * custom.el (defcustom): Add edebug spec.
 +
 +2010-04-18  Juri Linkov  <juri@jurta.org>
 +
 +      Test for special mode-class in view-buffer instead of view-file (bug#5513).
 +
 +      * view.el (view-file, view-buffer): Move test for special mode-class
 +      from view-file to view-buffer.
 +
 +      * tar-mode.el (tar-extract): Turn if's into one cond
 +      like in arc-mode.el.
 +
 +2010-04-18  Juri Linkov  <juri@jurta.org>
 +
 +      Add 7z archive format support (bug#5475).
 +
 +      * arc-mode.el (archive-zip-extract): Try to find 7z executable.
 +      (archive-7z-extract): New defcustom.
 +      (archive-find-type): Add magic string for 7z.
 +      (archive-extract-by-stdout): Add new optional arg `stderr-file'.
 +      If `stderr-file' is non-nil, use `(t stderr-file)' for the
 +      `buffer' arg of `call-process'.
 +      (archive-zip-extract): Check `archive-zip-extract' for "7z" and
 +      call the function `archive-7z-extract' with the variable
 +      `archive-7z-extract' let-bound to `archive-zip-extract'.
 +      (archive-7z-summarize, archive-7z-extract): New functions.
 +
 +      * international/mule.el (auto-coding-alist):
 +      * files.el (auto-mode-alist): Add 7z file extension.
 +
 +2010-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * loadup.el: Setup hash-cons for pure data.
 +
 +      Fix duplicate entries in cedet's loaddefs.el files.
 +      * emacs-lisp/autoload.el (autoload-file-load-name): Be more clever.
 +      Should make most file-local generated-autoload-file unnecessary.
 +      (print-readably): Silence warnings.
 +      (autoload-find-destination): Take load-name as an arg to make sure
 +      it's the same as the one that will be in the file.
 +      (autoload-generate-file-autoloads): Adjust to above changes.
 +      Try to make the dataflow a bit simpler.
 +
 +      * cvs-status.el (cvs-refontify): Remove unused.
 +
 +2010-04-18  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc.el (calc-mode-map): Bind "O" to `calc-missing-key'.
 +
 +      * calc-bin.el (calc-radix): Have the "O" option turn on
 +      twos-complement mode.
 +
 +2010-04-17  Jay Belanger  <jay.p.belanger@gmail.com>
 +
 +      * calc-ext.el (calc-init-extensions): Add keybinding for 'calc-option'.
 +      Add `calc-option-prefix-help' to calc-help autoloads.
 +      (calc-inverse): Add "Option" to message, as appropriate.
 +      (calc-hyperbolic): Add "Option" to message, as appropriate.
 +      (calc-option, calc-is-option): New functions.
 +
 +      * calc-help.el (calc-full-help): Add `calc-option-help'.
 +      (calc-option-prefix-help): New function.
 +
 +      * calc-misc.el (calc-help): Add "Option" entry.
 +
 +      * calc.el (calc-local-var-list): Add `calc-option-flag'.
 +      (calc-option-flag): New variable.
 +      (calc-do): Set `calc-option-flag to nil.
 +      (calc-set-mode-line): Add "Opt " as appropriate.
 +
 +2010-04-16  Juri Linkov  <juri@jurta.org>
 +
 +      Move scrolling commands from simple.el to window.el
 +      because their primitives are implemented in window.c.
 +
 +      * simple.el (scroll-error-top-bottom)
 +      (scroll-up-command, scroll-down-command, scroll-up-line)
 +      (scroll-down-line, scroll-other-window-down)
 +      (beginning-of-buffer-other-window, end-of-buffer-other-window):
 +      * window.el (scroll-error-top-bottom)
 +      (scroll-up-command, scroll-down-command, scroll-up-line)
 +      (scroll-down-line, scroll-other-window-down)
 +      (beginning-of-buffer-other-window, end-of-buffer-other-window):
 +      Move from simple.el to window.el because their primitives are
 +      implemented in window.c.
 +
 +2010-04-16  Juri Linkov  <juri@jurta.org>
 +
 +      * isearch.el (isearch-lookup-scroll-key): Check both
 +      `isearch-scroll' and `scroll-command' properties.
 +      (scroll-up, scroll-down): Remove `isearch-scroll' property.
 +
 +      * mwheel.el (mwheel-scroll): Remove `isearch-scroll' property.
 +
 +      * simple.el (scroll-up-command, scroll-down-command)
 +      (scroll-up-line, scroll-down-line): Remove `isearch-scroll' property.
 +
 +2010-04-15  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (scroll-up-command, scroll-down-command)
 +      (scroll-up-line, scroll-down-line): Put `scroll-command'
 +      property on the these symbols.  Remove them from
 +      `scroll-preserve-screen-position-commands'.
 +
 +      * mwheel.el (mwheel-scroll): Put `scroll-command' and
 +      `isearch-scroll' properties on the `mwheel-scroll' symbol.
 +      Remove it from `scroll-preserve-screen-position-commands'.
 +
 +      * isearch.el (isearch-allow-scroll): Doc fix.
 +
 +2010-04-15  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-error-with-buffer): Don't show the
 +      connection buffer when we are in completion mode.
 +      (tramp-file-name-handler): Catch the error for some operations
 +      when we are in completion mode.  This gives the user the chance to
 +      correct the file name in the minibuffer.
 +
 +2010-04-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/verilog-mode.el (verilog-forward-sexp): Avoid free variable.
 +
 +2010-04-15  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Simplify by using `define-derived-mode'.
 +      * info.el (Info-mode):
 +      * calendar/todo-mode.el (todo-mode):
 +      * play/gomoku.el (gomoku-mode): Define with `define-derived-mode'.
 +      (gomoku-mode-map): Move initialization into declaration.
 +
 +2010-04-14  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Fix Bug#5840.
 +      * ido.el (ido-file-name-all-completions-1):
 +      * minibuffer.el (minibuffer-completion-help):
 +      * net/tramp.el (tramp-completion-mode-p): Use `non-essential'.
 +
 +2010-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (non-essential): New var.
 +
 +      Add a new field `location' to bookmarks for non-file bookmarks.
 +      * bookmark.el (bookmark-location): Use the new field, if present.
 +      (bookmark-insert-location): Undo last change, not needed any more.
 +      * man.el (Man-bookmark-make-record):
 +      * woman.el (woman-bookmark-make-record): Add `location' field.
 +
 +2010-04-14  Juri Linkov  <juri@jurta.org>
 +
 +      * simple.el (scroll-error-top-bottom): New defcustom.
 +      (scroll-up-command, scroll-down-command): Use it.  Doc fix.
 +
 +      * emulation/pc-select.el (pc-select-override-scroll-error):
 +      Obsolete in favor of `scroll-error-top-bottom'.
 +
 +2010-04-14  Juri Linkov  <juri@jurta.org>
 +
 +      * tutorial.el (tutorial--default-keys): Rebind `C-v' to
 +      `scroll-up-command' and `M-v' to `scroll-down-command'.
 +
 +      * emulation/cua-rect.el (cua--init-rectangles):
 +      * forms.el (forms--change-commands):
 +      * image-mode.el (image-mode-map):
 +      Remap scroll-down-command and scroll-up-command
 +      in addition to scroll-down and scroll-up.
 +
 +2010-04-14  Juri Linkov  <juri@jurta.org>
 +
 +      * mwheel.el (scroll-preserve-screen-position-commands):
 +      Add mwheel-scroll to this list of commands.
 +
 +      * simple.el (scroll-preserve-screen-position-commands):
 +      Add scroll-up-command, scroll-down-command, scroll-up-line,
 +      scroll-down-line to this list of commands.
 +
 +2010-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * obsolete/complete.el: Move from lisp/complete.el.
 +
 +      * pcomplete.el (pcomplete-here*): Fix mistaken change (bug#5935).
 +
 +      * emacs-lisp/easy-mmode.el (define-minor-mode): Passing a nil argument
 +      to the minor mode function now turns the mode ON unconditionally.
 +
 +2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-dir.el (vc-dir-kill-line): New command.
 +      (vc-dir-mode-map): Bind it to C-k.
 +
 +      * bookmark.el (bookmark-insert-location): Handle a nil filename.
 +
 +      * woman.el: Add bookmark declarations to silence the compiler.
 +      (bookmark-prop-get): Use `man-args' rather than `filename' as a first
 +      step to compatibility between man and woman bookmarks.
 +      Adjust for Man-default-bookmark-title renaming.
 +      (woman-bookmark-jump): Adjust accordingly.  Don't forget to autoload.
 +
 +      * man.el: Add bookmark declarations to silence the compiler.
 +      (Man-name-local-regexp): Make it match NAME as well.
 +      (Man-getpage-in-background): Return the buffer.
 +      (Man-notify-when-ready): Use `case'.
 +      (man-set-default-bookmark-title): Rename to Man-default-bookmark-title.
 +      Don't hardcode "NAME".  Simplify.
 +      (Man-bookmark-make-record): Use Man-arguments rather than buffer-name.
 +      Rename from Man-bookmark-make-record.
 +      (Man-bookmark-jump): Rename from man-bookmark-jump.  Simplify now that
 +      we have the actual man-args.  Use Man-getpage-in-background rather
 +      than `man' since the arg is already processed.  Let bookmark.el do the
 +      window handling.  Only wait for the relevant process.
 +      Don't forget to autoload.
 +
 +      * bookmark.el (bookmark-default-file): Use locate-user-emacs-file.
 +
 +2010-04-12  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 +
 +      * woman.el (woman-bookmark-make-record, woman-bookmark-jump):
 +      New functions.
 +      (woman-mode): Setup bookmark support.
 +
 +      * man.el (man-set-default-bookmark-title, man-bookmark-make-record)
 +      (man-bookmark-jump): New functions.
 +      (Man-mode): Setup bookmark support.
 +
 +2010-04-10  Jari Aalto  <jari.aalto@cante.net>
 +
 +      * comint.el (comint-password-prompt-regexp): Use regexp-opt, and
 +      recognize ssh-keygen prompt (Bug#2817).
 +
 +2010-04-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter.
 +
 +2010-04-10  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      Synchronize with Tramp repository.
 +
 +      * net/tramp.el (tramp-completion-function-alist)
 +      (tramp-file-name-regexp, tramp-chunksize)
 +      (tramp-local-coding-commands, tramp-remote-coding-commands):
 +      Fix docstring.
 +      (tramp-remote-process-environment): Use `format' instead of `concat'.
 +      (tramp-handle-directory-files-and-attributes)
 +      (tramp-get-remote-path): Use `copy-tree'.
 +      (tramp-handle-file-name-all-completions): Backward/ XEmacs
 +      compatibility: Use `completion-ignore-case' if
 +      `read-file-name-completion-ignore-case' does not exist.
 +      (tramp-do-copy-or-rename-file-directly): Do not use
 +      `tramp-handle-file-remote-p'.
 +      (tramp-do-copy-or-rename-file-out-of-band):
 +      Use `tramp-compat-delete-directory'.
 +      (tramp-do-copy-or-rename-file-out-of-band)
 +      (tramp-compute-multi-hops, tramp-maybe-open-connection):
 +      Use `format-spec-make'.
 +      (tramp-find-foreign-file-name-handler)
 +      (tramp-advice-make-auto-save-file-name)
 +      (tramp-set-auto-save-file-modes): Remove superfluous check for
 +      `stringp'.  This is done inside `tramp-tramp-file-p'.
 +      (tramp-debug-outline-regexp): New defconst.
 +      (tramp-get-debug-buffer): Use it.
 +      (tramp-check-for-regexp): Use (forward-line 1).
 +      (tramp-set-auto-save-file-modes): Adapt version check.
 +
 +      * net/tramp-compat.el (tramp-advice-file-expand-wildcards):
 +      Wrap call of `featurep' for 2nd argument.
 +      (tramp-compat-make-temp-file): Simplify fallback implementation.
 +      (tramp-compat-copy-tree): Remove function.
 +      (tramp-compat-delete-directory): Provide implementation for older
 +      Emacsen.
 +
 +      * net/tramp-fish.el (tramp-fish-handle-directory-files-and-attributes):
 +      Do not use `tramp-fish-handle-file-attributes.
 +
 +      * net/trampver.el: Update release number.
 +
 +2010-04-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * progmodes/compile.el (compilation-save-buffers-predicate):
 +      Add missing :version tag.
 +
 +2010-04-09  Sam Steingold  <sds@gnu.org>
 +
 +      * progmodes/compile.el (compilation-save-buffers-predicate):
 +      Remove the "autoload" cookie.
 +
 +      * progmodes/bug-reference.el (turn-on-bug-reference-mode)
 +      (turn-on-bug-reference-prog-mode): Remove, `bug-reference-mode'
 +      and `bug-reference-prog-mode' can be used in hooks directly.
 +
 +2010-04-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add --author support to git commit.
 +      * vc-git.el (vc-git-checkin): Pass extra-args to the commit command.
 +      (vc-git-log-edit-mode): New minor mode.
 +      (log-edit-mode, log-edit-extra-flags, log-edit-mode):
 +      New declarations.
 +
 +2010-04-09  Eric Raymond  <esr@snark.thyrsus.com>
 +
 +      * vc-hooks.el, vc-git.el: Improve documentation comments.
 +
 +2010-04-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Fix some of the problems in defsubst* (bug#5728).
 +      * emacs-lisp/cl-macs.el (defsubst*): Don't substitute non-trivial args.
 +      (cl-defsubst-expand): Do the substitutions simultaneously (bug#5728).
 +
 +2010-04-07  Sam Steingold  <sds@gnu.org>
 +
 +      * progmodes/compile.el (compilation-save-buffers-predicate):
 +      New custom variable.
 +      (compile, recompile): Pass it to `save-some-buffers'.
 +
 +2010-04-07  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * wid-edit.el (widget-choose): Move cursor to the second line of
 +      the buffer (Bug#5695).
 +
 +2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add new VC methods: vc-log-incoming and vc-log-outgoing.
 +      * vc.el (vc-print-log-setup-buttons): New function split out from
 +      vc-print-log-internal.
 +      (vc-log-internal-common): New function, a parametrized version of
 +      vc-print-log-internal.
 +      (vc-print-log-internal): Just call vc-log-internal-common with the
 +      right arguments.
 +      (vc-incoming-outgoing-internal):
 +      (vc-log-incoming, vc-log-outgoing): New functions.
 +      (vc-log-view-type): New permanent local variable.
  
 -2010-04-26  Juanma Barranquero  <lekktu@gmail.com>
 +      * vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing.
  
 -      * abbrev.el (last-abbrev-text): Doc fix.
 -      (abbrev-prefix-mark): Don't escape parenthesis.
 +      * vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead
 +      of the dynamic bound vc-short-log.
 +      (vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions.
  
 -2010-04-24  Andreas Schwab  <schwab@linux-m68k.org>
 +      * vc-git.el (vc-git-log-outgoing): New function.
 +      (vc-git-log-view-mode): Use vc-log-view-type instead
 +      of the dynamic bound vc-short-log.
  
 -      * composite.el (find-composition): Doc fix.
 +      * vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead
 +      of the dynamic bound vc-short-log.  Highlight the tag.
 +      (vc-hg-log-incoming, vc-hg-log-outgoing): New functions.
 +      (vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode):
 +      (vc-hg-incoming-mode): Remove.
 +      (vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing.
  
 -2010-04-24  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * progmodes/sql.el (sql-electric-stuff): Fix typo in tag.
 -      (sql-oracle-program, sql-sqlite-options)
 -      (sql-query-placeholders-and-send): Doc fixes.
 -      (sql-set-product, sql-interactive-mode): Reflow docstrings.
 -      (sql-imenu-generic-expression, sql-buffer)
 -      (sql-mode-ansi-font-lock-keywords, sql-mode-oracle-font-lock-keywords)
 -      (sql-mode-postgres-font-lock-keywords, sql-mode-ms-font-lock-keywords)
 -      (sql-mode-sybase-font-lock-keywords)
 -      (sql-mode-informix-font-lock-keywords)
 -      (sql-mode-interbase-font-lock-keywords)
 -      (sql-mode-ingres-font-lock-keywords, sql-mode-solid-font-lock-keywords)
 -      (sql-mode-mysql-font-lock-keywords, sql-mode-sqlite-font-lock-keywords)
 -      (sql-mode-db2-font-lock-keywords, sql-mode-font-lock-keywords)
 -      (sql-product-feature, sql-highlight-product)
 -      (comint-line-beginning-position, sql-rename-buffer)
 -      (sql-toggle-pop-to-buffer-after-send-region)
 -      (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql, sql-solid)
 -      (sql-ingres, sql-ms, sql-postgres, sql-interbase, sql-db2, sql-linter):
 -      Fix typos in docstrings.
 +      Fix default-directory for vc-root-diff.
 +      * vc.el (vc-root-diff): Bind default-directory to the root
 +      directory for the diff command.
  
 -2010-04-23  Juri Linkov  <juri@jurta.org>
 +2010-04-07  Michael McNamara  <mac@mail.brushroad.com>
  
 -      * info.el (Info-fontify-node): Put Info-breadcrumbs to the `display'
 -      property instead of `invisible' and `after-string' (bug#5998).
 +      * progmodes/verilog-mode.el (verilog-forward-sexp):
 +      (verilog-calc-1): Support "disable fork" and "fork wait" multi
 +      word keywords, suggested by Steve Pearlmutter.
 +      (verilog-pretty-declarations): Support lineup of declarations in
 +      port lists.
 +      (verilog-skip-backward-comments, verilog-skip-forward-comment-p):
 +      fix bug for /* / comments
 +      (verilog-backward-syntactic-ws, verilog-forward-syntactic-ws):
 +      Speed up and simplfy as this is never called with a bound.
 +      (verilog-pretty-declarations): Enhance to line up declarations
 +      inside a parameter list, suggested by Alan Morgan.
 +      (verilog-pretty-expr): Tune assignment regular expression match
 +      string for corner cases; also use markers instead of character
 +      number as indent changes the later.
  
 -2010-04-23  Juri Linkov  <juri@jurta.org>
 +2010-04-07  Wilson Snyder  <wsnyder@wsnyder.org>
  
 -      * image-mode.el (image-mode-as-text): Fix typo in docstring.
 +      * progmodes/verilog-mode.el (verilog-type-keywords): Fix pulldown
 +      as missing keyword.
 +      (verilog-read-sub-decls-line): Fix comments in AUTO_TEMPLATE
 +      causing truncation of AUTOWIRE signals.  Reported by Bruce Tennant.
 +      (verilog-auto-inst, verilog-auto-inst-port): Add vl_mbits for
 +      AUTO_TEMPLATEs needing multiple array bits.  Suggested by Bruce
 +      Tennant.
 +      (verilog-keywords):
 +      (verilog-1800-2005-keywords, verilog-1800-2009-keywords): Add IEEE
 +      1800-2009 keywords, including "global.".
  
 -2010-04-23  Juanma Barranquero  <lekktu@gmail.com>
 +2010-04-06  John Wiegley  <jwiegley@gmail.com>
  
 -      * filecache.el (file-cache-add-directory-list)
 -      (file-cache-add-directory-recursively): Fix typos in docstrings.
 +      * ido.el (ido-add-virtual-buffers-to-list): Fix duplicated names
 +      appearing in buffer list (if a live buffer name matched a recentf
 +      file basename).  Should use uniquify to offer a real solution.
  
 -2010-04-22  Kenichi Handa  <handa@m17n.org>
 +2010-04-06  John Wiegley  <jwiegley@gmail.com>
 +
 +      * ido.el (ido-use-virtual-buffers, ido-virtual): Move a ChangeLog
 +      comment to code, and add a :version tag.
 +      (ido-virtual-buffers): Move defvar to fix byte-compiler warning.
  
 -      * language/indian.el (gurmukhi-composable-pattern): Fix typo.
 -      (gujarati-composable-pattern): Fix typo.
 +2010-04-06  Juanma Barranquero  <lekktu@gmail.com>
  
 -2010-04-20  Kenichi Handa  <handa@m17n.org>
 +      Enable recentf-mode if using virtual buffers.
 +      * ido.el (recentf-list): Declare for byte-compiler.
 +      (ido-virtual-buffers): Move up to silence byte-compiler.  Add docstring.
 +      (ido-make-buffer-list): Simplify.
 +      (ido-add-virtual-buffers-to-list): Simplify.  Enable recentf-mode.
  
 -      * language/indian.el (oriya-composable-pattern)
 -      (tamil-composable-pattern, malayalam-composable-pattern): Add
 -      two-part vowels to "v" (vowel sign).
 +2010-04-05  Juri Linkov  <juri@jurta.org>
  
 -2010-04-20  Chong Yidong  <cyd@stupidchicken.com>
 +      Scrolling commands which scroll a line instead of full screen.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
  
 -      * files.el (copy-directory): Handle symlinks (Bug#5982).
 +      * simple.el (scroll-up-line, scroll-down-line): New commands.
 +      Put property isearch-scroll=t on them.
  
 -      * progmodes/compile.el (compilation-next-error-function): Revert
 -      2009-10-12 change (Bug#5983).
 +      * emulation/ws-mode.el (scroll-down-line, scroll-up-line):
 +      Remove commands.
  
 -2010-04-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-04-05  Juri Linkov  <juri@jurta.org>
  
 -      * vc-hg.el (vc-hg-state): Use HGRCPATH, not HGRC.
 -      (vc-hg-working-revision): Likewise.  Use hg parents, not hg parent
 -      (Bug#5846).
 +      Scrolling commands which do not signal errors at top/bottom.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html
  
 -2010-04-20  Glenn Morris  <rgm@gnu.org>
 +      * simple.el (scroll-up-command, scroll-down-command): New commands.
 +      Put property isearch-scroll=t on them.
  
 -      * emacs-lisp/lisp.el (lisp-completion-at-point): Give it a doc string.
 +      * bindings.el (global-map): Rebind [prior] from `scroll-down' to
 +      `scroll-down-command' and [next] from `scroll-up' to
 +      `scroll-up-command'.
  
 -      * minibuffer.el (completion-at-point): Doc fix.
 +      * emulation/cua-base.el: Put property CUA=move on
 +      `scroll-up-command' and `scroll-down-command'.
 +      (cua--init-keymaps): Remap `scroll-up-command' to `cua-scroll-up'
 +      and `scroll-down-command' to `cua-scroll-down'.
  
 -2010-04-18  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-05  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * cedet/ede/pmake.el (ede-proj-makefile-insert-variables): Don't
 -      destroy list before using it.
 +      * help.el (describe-mode): Return nil.
  
 -2010-04-17  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-04-04  John Wiegley  <jwiegley@gmail.com>
  
 -      Fix the version number for added files.
 -      * vc-hg.el (vc-hg-working-revision): Check if the file is
 -      registered after hg parent fails (Bug#5961).
 +      * ido.el (ido-use-virtual-buffers): New variable to indicate
 +      whether "virtual buffer" support is enabled for IDO.
 +      (ido-virtual): Face used to indicate virtual buffers in the list.
 +      (ido-buffer-internal): If a buffer is chosen, and no such buffer
 +      exists, but a virtual buffer of that name does (which would be why
 +      it was in the list), recreate the buffer by reopening the file.
 +      (ido-make-buffer-list): If virtual buffers are being used, call
 +      `ido-add-virtual-buffers-to-list' before the make list hook.
 +      (ido-virtual-buffers): New variable which contains a copy of the
 +      current contents of the `recentf-list', albeit pared down for the
 +      sake of speed, and with proper faces applied.
 +      (ido-add-virtual-buffers-to-list): Using the `recentf-list',
 +      create a list of "virtual buffers" to present to the user in
 +      addition to the currently open set.  Note that this logic could
 +      get rather slow if that list is too large.  With the default
 +      `recentf-max-saved-items' of 200, there is little speed penalty.
  
 -2010-04-17  Glenn Morris  <rgm@gnu.org>
 +2010-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * htmlfontify.el (htmlfontify-buffer)
 -      (htmlfontify-copy-and-link-dir): Autoload entry points.
 +      * font-lock.el: Require CL when compiling.
 +      (font-lock-turn-on-thing-lock): Use `case'.
  
 -2010-04-17  Magnus Henoch  <magnus.henoch@gmail.com>
 +2010-04-03  Eli Zaretskii  <eliz@gnu.org>
  
 -      * vc-hg.el (vc-hg-annotate-extract-revision-at-line): Expand file
 -      name relative to the project root (Bug#5960).
 +      * emacs-lisp/authors.el (authors-fixed-entries): Add entry for Eli
 +      Zaretskii.
  
 -2010-04-16  Glenn Morris  <rgm@gnu.org>
 +2010-04-02  Juanma Barranquero  <lekktu@gmail.com>
  
 -      * vc-git.el (vc-git-print-log): Doc fix.
 +      * cedet/semantic/imenu.el (semantic-imenu-bucketize-type-members)
 +      (semantic-create-imenu-directory-index): Fix typos in docstrings.
 +      (semantic-imenu-goto-function): Reflow docstring.
  
 -2010-04-14  Óscar Fuentes  <ofv@wanadoo.es>
 +2010-04-02  Juri Linkov  <juri@jurta.org>
  
 -      * ido.el (ido-file-internal): Fix 2009-12-02 change.
 +      * ehelp.el (electric-help-orig-major-mode):
 +      New buffer-local variable.
 +      (electric-help-mode): Set it to original major-mode.  Doc fix.
 +      (with-electric-help): Use `electric-help-orig-major-mode' instead
 +      of (default-value 'major-mode).  Doc fix.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00069.html
  
 -2010-04-14  Christoph  <cschol2112@googlemail.com>  (tiny change)
 +2010-04-02  Sam Steingold  <sds@gnu.org>
  
 -      * progmodes/grep.el (grep-compute-defaults): Fix handling of host
 -      default settings (Bug#5928).
 +      * vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling
 +      `vc-hg-command' with a list of flags.
  
 -2010-04-10  Glenn Morris  <rgm@gnu.org>
 +      * progmodes/bug-reference.el (bug-reference-bug-regexp):
 +      Also accept "patch" and "RFE".
 +      (bug-reference-fontify): `bug-reference-url-format' can also be a
 +      function to be able to handle the bug kind.
 +      (turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode): Add.
  
 -      * progmodes/fortran.el (fortran-match-and-skip-declaration):
 -      New function.
 -      (fortran-font-lock-keywords-3): Use it.  (Bug#1385)
 +2010-04-02  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-04-07  Kenichi Handa  <handa@m17n.org>
 +      * tmm.el (tmm-get-keymap): Check with symbolp before passing
 +      value to fboundp, it may not be a symbol.
  
 -      * language/indian.el (malayalam-composable-pattern): Fix previous
 -      change (add U+0D4D "SIGN VIRAMA").
 -      (oriya-composable-pattern): Add U+0B30 and fix typo in the regexp.
 -      (tamil-composable-pattern): Fix typo in the regexp.
 -      (telugu-composable-pattern): Fix U+0C4D and typo in the regexp.
 -      (kannada-composable-pattern): Fix U+0CB0 and typo in the regexp.
 -      (malayalam-composable-pattern): Fix U+0D4D and typo in the regexp.
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
 -2010-04-06  Chong Yidong  <cyd@stupidchicken.com>
 +      * cus-edit.el (custom-buffer-sort-alphabetically): Update :version.
  
 -      * textmodes/tex-mode.el (latex-mode): Revert 2008-03-03 change to
 -      paragraph-separate (Bug#5821).
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -2010-04-05  Juri Linkov  <juri@jurta.org>
 +      * simple.el (next-line, previous-line): Re-throw a signal
 +      with `signal' instead of using `ding'.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html
  
 -      Put breadcrumbs on overlay instead of inserting to buffer (bug#5809).
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -      * info.el (Info-find-node-2): Comment out code that skips
 -      breadcrumbs line.
 -      (Info-mouse-follow-link): New command.
 -      (Info-link-keymap): New keymap.
 -      (Info-breadcrumbs): Rename from `Info-insert-breadcrumbs'.
 -      Return a string with links instead of inserting breadcrumbs
 -      to the Info buffer.
 -      (Info-fontify-node): Comment out code that inserts breadcrumbs.
 -      Instead of putting the `invisible' text property over the Info
 -      header, make an overlay over the Info header with the `invisible'
 -      property and `after-string' set to the string returned by
 -      `Info-breadcrumbs'.
 +      * simple.el (keyboard-escape-quit): Raise deselecting the active
 +      region higher than exiting the minibuffer.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html
  
 -2010-04-03  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Juri Linkov  <juri@jurta.org>
  
 -      * help.el (help-window-setup-finish): Doc fix (Bug#5830).
 -      Reported by monkey@sandpframing.com.
 +      * image.el (image-animated-p): Use `image-metadata' instead of
 +      `image-extension-data'.  Get GIF extenstion data from metadata
 +      property `extension-data'.
  
 -2010-04-02  Juanma Barranquero  <lekktu@gmail.com>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * cedet/semantic/imenu.el (semantic-imenu-bucketize-type-members)
 -      (semantic-create-imenu-directory-index): Fix typos in docstrings.
 -      (semantic-imenu-goto-function): Reflow docstring.
 +      * simple.el (append-to-buffer): Simplify.
  
 -2010-03-30  Tomas Abrahamsson  <tab@lysator.liu.se>
 +2010-03-31  Tomas Abrahamsson  <tab@lysator.liu.se>
  
        * textmodes/artist.el (artist-mode): Fix typo in docstring.
        Reported by Alex Schröder <kensanata@gmail.com>.  (Bug#5807)
  
 -2010-03-30  Kenichi Handa  <handa@m17n.org>
 +2010-03-31  Kenichi Handa  <handa@m17n.org>
  
        * language/sinhala.el (composition-function-table): Fix regexp for
        the new Unicode specification.
        (telugu-composable-pattern): New variables to cope with the new
        Unicode specification.  Use them in composition-function-table.
  
 -2010-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        Make tmm-menubar work for the Buffers menu again (bug#5726).
        * tmm.el (tmm-prompt): Also handle keymap entries in the form of
        vectors rather than cons cells, as used in menu-bar-update-buffers.
  
 -2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * progmodes/js.el (js-auto-indent-flag, js-mode-map)
        (js-insert-and-indent): Revert 2009-08-15 change, restoring
  
        * mail/sendmail.el (mail-default-directory): Doc fix.
  
 -2010-03-27  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * mail/sendmail.el (mail-default-directory): Doc fix.
  
 -2010-03-27  Eli Zaretskii  <eliz@gnu.org>
 +2010-03-31  Eli Zaretskii  <eliz@gnu.org>
  
        * subr.el (version-regexp-alist, version-to-list)
        (version-list-<, version-list-=, version-list-<=)
        (version-list-not-zero, version<, version<=, version=): Doc fix.
        (Bug#5744).
  
 -2010-03-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 -            Nick Roberts  <nickrob@snap.net.nz>
 -
 -      * progmodes/gdb-ui.el (gdb-apple-test): New function.
 -      (gdb-init-1): Use it.
 -
 -2010-02-10  Dan Nicolaescu  <dann@ics.uci.edu>
 +2010-02-31  Dan Nicolaescu  <dann@ics.uci.edu>
  
        * vc.el (vc-root-diff): Doc fix.
  
 -2010-03-25  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * vc.el (vc-print-log, vc-print-root-log): Doc fix.
  
        * simple.el (append-to-buffer): Fix last change.
  
 -2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * simple.el (append-to-buffer): Ensure that point is preserved if
        BUFFER is the current buffer.  Suggested by YAMAMOTO Mitsuharu.
        (Bug#5749)
  
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * files.el (auto-mode-case-fold): Change default to t.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * dired-x.el (dired-omit-mode): Doc fix.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (occur-accumulate-lines): Move occur-engine related
 +      functions `occur-accumulate-lines' and `occur-engine-add-prefix'
 +      to be located after `occur-engine'.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      Make occur handle multi-line matches cleanly with context.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html
 +
 +      * replace.el (occur-accumulate-lines): Add optional arg `pt'.
 +      (occur-engine): Add local variables `ret', `prev-after-lines',
 +      `prev-lines'.  Use more arguments for `occur-context-lines'.
 +      Set first elem of its returned list to `data', and the second elem
 +      to `prev-after-lines'.  Don't print the separator line.
 +      In the end, print remaining context after-lines.
 +      (occur-context-lines): Add new arguments `begpt', `endpt',
 +      `lines', `prev-lines', `prev-after-lines'.  Rewrite to combine
 +      after-lines of the previous match with before-lines of the
 +      current match and not overlap them.  Return a list with two
 +      values: the output line and the list of context after-lines.
 +
 +2010-03-30  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (occur-accumulate-lines): Fix a bug where the first
 +      context line at the beginning of the buffer was missing.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * files.el: Make bidi-display-reordering safe variable for boolean
 +      values.
 +
 +2010-03-29  Phil Hagelberg  <phil@evri.com>
 +            Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * subr.el: Extend progress reporters to perform "spinning".
 +      (progress-reporter-update, progress-reporter-do-update):
 +      Handle non-numeric value arguments.
 +      (progress-reporter--pulse-characters): New var.
 +
 +2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * progmodes/compile.el (compilation-start): Fix regexp detection
 +      of initial cd command (Bug#5771).
 +
 +2010-03-28  Stefan Guath  <stefan@automata.se>  (tiny change)
 +
 +      * find-dired.el (find-dired): Use read-directory-name (Bug#5777).
 +
 +2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
 +
 +      Restore GDB/MI fuctionality removed by 2009-12-29T07:15:34Z!nickrob@snap.net.nz.
 +      * lisp/progmodes/gdb-mi.el: Restore.
 +      * lisp/progmodes/gdb-ui.el: Remove.
 +      * lisp/progmodes/gud.el: Re-accommodate for gdb-mi.el.
 +
 +2010-03-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * desktop.el (desktop-save-buffer-p): Don't mistakenly include
 +      all dired buffers, even tramp ones.  (Bug#5755)
 +
 +2010-03-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Add "union tags" in mpc.el.
 +      * mpc.el: Remove backward compatibility code.
 +      (mpc-browser-tags): Change default.
 +      (mpc--find-memoize-union-tags): New var.
 +      (mpc-cmd-flush, mpc-cmd-special-tag-p): New fun.
 +      (mpc-cmd-find): Handle the case where the playlist does not exist.
 +      Handle union-tags.
 +      (mpc-cmd-list): Use mpc-cmd-special-tag-p.  Handle union-tags.
 +      (mpc-cmd-add): Use mpc-cmd-flush.
 +      (mpc-tagbrowser-tag-name): New fun.
 +      (mpc-tagbrowser-buf): Use it.
 +      (mpc-songs-refresh): Use cond.  Move to point-min as a fallback.
 +
  2010-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 +      Misc cleanup.
 +      * progmodes/make-mode.el (makefile-bsdmake-rule-action-regex):
 +      Use replace-regexp-in-string.
 +      (makefile-mode-abbrev-table): Merge defvar and define-abbrev-table.
 +      (makefile-imake-mode-syntax-table): Move init into defvar.
 +      (makefile-mode): Use define-derived-mode.
 +
        * progmodes/make-mode.el (makefile-rule-action-regex): Backtrack less.
        (makefile-make-font-lock-keywords): Adjust rule since submatch 1 may
        not be present any more.
  
        * cedet/srecode/table.el (srecode-template-table): Fix docstring typo.
  
 -2010-03-23  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * textmodes/flyspell.el (sgml-lexical-context): Autoload it (Bug#5752).
  
 -2010-03-21  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * indent.el (indent-for-tab-command): Doc fix.
  
 -2010-03-22  Juanma Barranquero  <lekktu@gmail.com>
 +2010-03-24  Alan Mackenzie  <acm@muc.de>
 +
 +      * progmodes/cc-engine.el (c-remove-stale-state-cache):
 +      Fix off-by-one error.  Fixes bug #5747.
 +
 +2010-03-24  Juanma Barranquero  <lekktu@gmail.com>
  
        * image-dired.el (image-dired-display-thumbs): Fix typo in docstring.
        (image-dired-read-comment): Doc fix.
        (reftex-cite-punctuation, reftex-search-unrecursed-path-first)
        (reftex-highlight-selection): Fix typos in docstrings.
  
 -2010-03-19  Juanma Barranquero  <lekktu@gmail.com>
 +2010-03-24  Juanma Barranquero  <lekktu@gmail.com>
  
        * minibuffer.el (completion-in-region-functions): Fix docstring typos.
  
 -2010-03-18  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * mail/rmail.el (rmail-highlight-face): Restore option deleted
        2008-02-13 without comment; mark it obsolete.
        (rmail-highlight-headers): Use rmail-highlight-face once more.
  
 -2010-03-16  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
  
        * woman.el (woman2-process-escapes): Only consume the newline if
        the filler character is on a line by itself (Bug#5729).
  
 -2010-03-16  Kenichi Handa  <handa@m17n.org>
 +2010-03-24  Kenichi Handa  <handa@m17n.org>
  
        * language/indian.el (devanagari-composable-pattern): Add more
        consonants.
  
 -2010-03-14  Michael Albinus  <michael.albinus@gmx.de>
 +2010-03-24  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/trampver.el: Update release number.
  
 -2010-03-13  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * Makefile.in (ELCFILES): Add cedet/semantic/imenu.el.
  
 -2010-03-13  Michael Albinus  <michael.albinus@gmx.de>
 +2010-03-24  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/tramp.el (tramp-find-executable):
        Use `tramp-get-connection-buffer'.  Make the regexp for checking
        (tramp-open-connection-setup-interactive-shell): Remove workaround
        for OpenSolaris bug, it is not needed anymore.
  
 -2010-03-13  Eric M. Ludlam  <zappo@gnu.org>
 +2010-03-24  Eric M. Ludlam  <zappo@gnu.org>
  
        * cedet/semantic/imenu.el: New file, from the CEDET repository
        (Bug#5412).
  
 -2010-03-12  Glenn Morris  <rgm@gnu.org>
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
  
        * emacs-lisp/cl-macs.el (defsubst*): Add autoload cookie.  (Bug#4427)
  
 -2010-03-11  Wilson Snyder  <wsnyder@wsnyder.org>
 +2010-03-24  Wilson Snyder  <wsnyder@wsnyder.org>
  
        * files.el (auto-mode-alist): Accept more verilog file patterns.
  
 +2010-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-dir.el (vc-dir-headers): Abbreviate the working dir.
 +
 +2010-03-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * vc-bzr.el (vc-bzr-log-edit-mode): Add --fixes support to
 +      log-edit-before-checkin-process.
 +
 +      * vc.el (vc-modify-change-comment): Pass MODE to vc-start-logentry.
 +
 +      * vc.el, vc-bzr.el, vc-hg.el (log-edit-mode): Declare.
 +
 +      * vc-dispatcher.el (vc-start-logentry): Doc fix.
 +      (log-view-process-buffer, log-edit-extra-flags): Declare.
 +
 +      * log-edit.el (log-edit-before-checkin-process): Doc fix.
 +
 +      * cedet/semantic/bovine/c.el (semantic-c-describe-environment):
 +      Consistently check ede-object is bound throughout.
 +
 +      * cedet/ede/project-am.el (ede-shell-run-something): Declare.
 +
 +2010-03-23  Sam Steingold  <sds@gnu.org>
 +
 +      Fix bug#5620: recalculate all markers on compilation buffer
 +      modifications, not on file modifications.
 +      * progmodes/compile.el (buffer-modtime): New buffer-local variable:
 +      the buffer modification time, for buffers not associated with files.
 +      (compilation-mode): Create it.
 +      (compilation-filter): Update it.
 +      (compilation-next-error-function): Use it instead of
 +      `visited-file-modtime' for timestamp.
 +
 +2010-03-23  Juri Linkov  <juri@jurta.org>
 +
 +      Implement Occur multi-line matches.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01044.html
 +
 +      * replace.el (occur): Doc fix.
 +      (occur-engine): Set `begpt' to the beginning of the first line.
 +      Set `endpt' to the end of the last match line.  At first, count
 +      line numbers between `origpt' and `begpt'.  Split out code from
 +      `out-line' variable to new let-bindings `match-prefix' and
 +      `match-str'.  In `out-line' add non-numeric prefix to all
 +      non-first lines of multi-line matches.  Finally, count lines
 +      between `begpt' and `endpt' and add to `lines'.
 +
 +2010-03-23  Juri Linkov  <juri@jurta.org>
 +
 +      * replace.el (occur-accumulate-lines, occur-engine):
 +      Use `occur-engine-line' instead of duplicate code.
 +      (occur-engine-line): New function created from duplicate code
 +      in `occur-accumulate-lines' and `occur-engine'.
 +
 +      * replace.el (occur-engine-line): Add optional arg `keep-props'.
 +      (occur-accumulate-lines, occur-engine): Add arg `keep-props'.
 +
 +2010-03-23  Juri Linkov  <juri@jurta.org>
 +
 +      * finder.el: Remove TODO tasks.
 +
 +      * info.el (Info-finder-find-node): Add node "all"
 +      with all package info.  Handle a list of multiple keywords
 +      separated by comma.
 +      (info-finder): In interactive use with a prefix argument,
 +      use `completing-read-multiple' to read a list of keywords
 +      separated by comma.
 +
 +2010-03-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Add a new completion style `substring'.
 +      * minibuffer.el (completion-basic--pattern): New function.
 +      (completion-basic-try-completion, completion-basic-all-completions):
 +      Use it.
 +      (completion-substring--all-completions)
 +      (completion-substring-try-completion)
 +      (completion-substring-all-completions): New functions.
 +      (completion-styles-alist): New style `substring'.
 +
 +2010-03-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Get rid of .elc files after removal of the corresponding .el.
 +      * Makefile.in (compile-clean): New target.
 +      (compile-main): Use it.
 +
 +2010-03-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * Makefile.in (compile-main): cd to $(lisp) in a sub-shell, so we
 +      don't do make there.  When compiling with separate object dir, there
 +      is no Makefile there.
 +
 +2010-03-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Get rid of the ELCFILES abomination, again.
 +      * Makefile.in (update-elclist, ELCFILES, compile-last): Remove.
 +      (all, compile): Don't call compile-last.
 +      (compile-main): Build the "elcfiles" list dynamically.
 +      (compile-targets): New (internal) target.
 +
 +2010-03-21  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (top_srcdir): Define.
 +      (abs_top_builddir): Define.
 +      (srcdir): Don't append `/..'.
 +      (EMACS): Use ${abs_top_builddir}.
 +      (all, compile, compile-always, compile-last): Don't set emacswd.
 +      (update-subdirs, update-authors): Use $(top_srcdir) instead of
 +      $(srcdir).
 +      (lisp): Use $(srcdir) instead of @srcdir@.
 +
 +2010-03-21  Juri Linkov  <juri@jurta.org>
 +
 +      Fix message of multi-line occur regexps and multi-buffer header lines.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00457.html
 +
 +      * replace.el (occur-1): Don't display regexp if it is longer
 +      than window-width.  Use `query-replace-descr' to display regexp.
 +      (occur-engine): Don't display regexp in the buffer header for
 +      multi-buffer occur.  Display a separate header line with total
 +      match count and regexp for multi-buffer occur.
 +      Use `query-replace-descr' to display regexp.
 +
 +2010-03-20  Teodor Zlatanov  <tzz@lifelogs.com>
 +
 +      * net/secrets.el: Fix parenthesis.
 +      (secrets-enabled): Fix parenthesis.
 +
 +2010-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Use more relative file and directory names.
 +      * Makefile.in (EMACS): Arrange for it to work when we chdir.
 +      (setwins, setwins_almost, setwins_for_subdirs):
 +      Don't `cd'; output relative names.
 +      (all, compile, compile-always, compile-last): Set emacswd.
 +      (custom-deps, finder-data, autoloads, update-subdirs, compile-last):
 +      Just cd to the lisp source dir so we can use relative file names.
 +
 +      * outline.el (hide-sublevels): Unfix the paren non-typo! (bug#5738).
 +
 +2010-03-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * textmodes/rst.el: Use faces for font-lock customization, and make the
 +      old -face variables obsolete.
 +      (rst-block, rst-external, rst-definition, rst-directive, rst-comment)
 +      (rst-emphasis1, rst-emphasis2, rst-literal, rst-reference): New faces.
 +      (rst-block-face, rst-external-face, rst-definition-face)
 +      (rst-directive-face, rst-comment-face, rst-emphasis1-face)
 +      (rst-emphasis2-face, rst-literal-face, rst-reference-face):
 +      Make obsolete.
 +      (rst-font-lock-keywords-function): Update for above changes.
 +
 +2010-03-20  Juri Linkov  <juri@jurta.org>
 +
 +      * s-region.el:
 +      * obsolete/s-region.el: Move to obsolete.
 +
 +2010-03-19  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * vc-dispatcher.el (vc-do-command): Remove reference to `vc-path'.
 +
 +2010-03-19  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vc-hooks.el (vc-path): Remove variable and obsolete declaration.
 +
 +2010-03-19  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add special markup processing for commit logs.
 +      * log-edit.el (log-edit-extra-flags): New variable.
 +      (log-edit): Add new argument MODE.  Use that mode when non-nil
 +      instead of the log-view-mode.
 +      (log-view-process-buffer): New function.
 +
 +      * vc.el: Document that the checkin method takes optional
 +      arguments.  Document new backend specific method: log-view-mode.
 +      (vc-default-log-edit-mode): New function.
 +      (vc-checkin): Use a backend specific log-view-mode.
 +      Pass extra arguments to the checkin method.
 +      (vc-modify-change-comment): Pass a dummy extra argument.
 +
 +      * vc-dispatcher.el (vc-log-edit): Add a mode argument, pass it to
 +      log-edit.
 +      (vc-start-logentry): Add a mode argument, pass it to vc-log-edit.
 +      (vc-finish-logentry): Process the log buffer before passing it
 +      down.  Pass log-edit-extra-flags.
 +
 +      * vc-bzr.el (vc-bzr-checkin): Pass extra arguments to the commit
 +      command.
 +      (log-edit-extra-flags, log-edit-before-checkin-process):
 +      New declarations.
 +
 +      * vc-hg.el (vc-hg-checkin): Pass extra arguments to the commit
 +      command.
 +      (log-edit-extra-flags, log-edit-before-checkin-process):
 +      New declarations.
 +      (vc-hg-log-edit-mode): New derived mode.
 +
 +      * vc-arch.el (vc-arch-checkin):
 +      * vc-cvs.el (vc-cvs-checkin):
 +      * vc-git.el (vc-git-checkin):
 +      * vc-mtn.el (vc-mtn-checkin):
 +      * vc-rcs.el (vc-rcs-checkin):
 +      * vc-sccs.el (vc-sccs-checkin):
 +      * vc-svn.el (vc-svn-checkin): Add an optional ignored argument.
 +
 +2010-03-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * outline.el (hide-sublevels): Don't hide trailing newline (and fix
 +      parent typo).
 +
 +2010-03-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * password-cache.el (password-cache, password-cache-expiry): Autoload.
 +
 +2010-03-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs-lisp/autoload.el (autoload-rubric): Doc fix.
 +
 +      * replace.el (query-replace-history): Give it a doc string.
 +      (map-query-replace-regexp): Use query-replace-from-history-variable
 +      and query-replace-to-history-variable.
 +
 +      * mail/hashcash.el (declare-function): Remove duplicate definition.
 +
 +      * mail/emacsbug.el (report-emacs-bug-pretest-address):
 +      Make it an obsolete alias for report-emacs-bug-address.
 +      (message-strip-special-text-properties): Declare.
 +      (report-emacs-bug): Remove test for a pretest bug address.
 +      Combine message-mode-specific code.
 +
 +      * mail/supercite.el: Don't require sendmail.
 +      (mh-in-header-p): Declare rather than using with-no-warnings.
 +      (sc-no-blank-line-or-header): Use rfc822-goto-eoh rather than
 +      mail-header-end.  Don't bind mysterious variable `kill-lines-magic'.
 +
 +      * calendar/cal-french.el: Convert to utf-8.
 +
 +      * files.el (interpreter-mode-alist): Use emacs-lisp-mode for
 +      Emacs scripts.
 +
 +2010-03-16  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/secrets.el (secrets-enabled): New variable.  Use it instead
 +      of a subfeature.
 +
 +2010-03-15  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * net/secrets.el (top): Register the D-Bus signals only when the
 +      service "org.freedesktop.secrets" can be pinged.
 +      Provide subfeature `enabled'.
 +
 +2010-03-14  Juri Linkov  <juri@jurta.org>
 +
 +      Add finder unknown keywords.
 +
 +      * finder.el (finder-unknown-keywords): New function.
 +
 +      * info.el (Info-finder-find-node): Use `finder-unknown-keywords'
 +      to create a Finder node with unknown keywords.
 +
 +2010-03-14  Juri Linkov  <juri@jurta.org>
 +
 +      * finder.el (finder-compile-keywords): Replace `princ' with
 +      `prin1' on a list of symbols interned from keyword strings.
 +
 +      * emacs-lisp/lisp-mnt.el (lm-keywords-list): If `keywords' contains
 +      a comma, then split keywords using a comma and optional whitespace.
 +      Otherwise, split by whitespace.
 +
 +      * complete.el:
 +      * face-remap.el:
 +      * log-view.el:
 +      * net/hmac-def.el:
 +      * net/hmac-md5.el:
 +      * net/netrc.el:
 +      * progmodes/mixal-mode.el: Fix keywords.
 +
 +2010-03-13  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * Makefile.in (ELCFILES): Add net/secrets.elc.
 +
 +      * net/secrets.el: New file.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * facemenu.el (list-colors-display, list-colors-print): New arg
 +      callback.  Use it to allow selecting colors.
 +
 +      * wid-edit.el (widget-image-insert): Insert image prop even if the
 +      current display is non-graphic.
 +      (widget-field-value-set): New fun.
 +      (editable-field): Use it.
 +      (widget-field-value-get): Clean up unused var.
 +      (widget-color-value-create, widget-color--choose-action):
 +      New funs.  Allow using list-colors-display to choose color.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el: Resort topmost custom groups.
 +      (custom-buffer-sort-alphabetically): Default to t.
 +      (customize-apropos): Use apropos-parse-pattern.
 +      (custom-search-field): New var.
 +      (custom-buffer-create-internal): Add custom-apropos search field.
 +      (custom-add-parent-links): Don't display parent doc.
 +      (custom-group-value-create): Don't sort top-level custom group.
 +      (custom-magic-value-create): Show visibility button before option name.
 +
 +      (custom-variable-state): New fun, from custom-variable-state-set.
 +      (custom-variable-state-set): Use it.
 +      (custom-group-value-create): Hide options with standard values
 +      using the :hidden-states property.  Use progress reporter.
 +
 +      (custom-show): Simplify.
 +      (custom-visibility): Disable images by default.
 +      (custom-variable): New property :hidden-states.
 +      (custom-variable-value-create): Enable images for
 +      custom-visibility widgets.  Use :hidden-states property to
 +      determine initial visibility.
 +
 +      * wid-edit.el (widget-image-find): Give images center ascent.
 +      (visibility): Add :on-image and :off-image properties.
 +      (widget-visibility-value-create): Use them.
 +
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cus-edit.el (processes): Remove from development group.
 +      (oop, hypermedia): Delete group.
 +      (comm): Promote to top-level group.
 +
 +      * net/browse-url.el (browse-url):
 +      * net/xesam.el (xesam):
 +      * net/tramp.el (tramp):
 +      * net/goto-addr.el (goto-address):
 +      * net/ange-ftp.el (ange-ftp): Put in comm group.
 +
 +      * view.el (view): Remove from editing group.
 +
 +      * uniquify.el (uniquify): Put in files group.
 +
 +      * net/browse-url.el (browse-url):
 +      * ps-print.el (postscript): Put in external group.
 +
 +      * cus-edit.el (outlines):
 +      * textmodes/text-mode.el (text-mode-hook):
 +      * textmodes/table.el (table):
 +      * textmodes/picture.el (picture):
 +      * outline.el (outlines): Put in wp group.
 +
 +      * nxml/nxml-mode.el (nxml): Remove from wp group.
 +
 +      * net/tramp-imap.el (tramp-imap): Put in tramp group.
 +
 +      * mail/metamail.el (metamail): Remove from hypermedia group.
 +
 +      * cus-edit.el (abbrev):
 +      * whitespace.el (whitespace):
 +      * vcursor.el (vcursor):
 +      * reveal.el (reveal):
 +      * hl-line.el (hl-line): Put in convenience group.
 +
 +      * epg-config.el (epg): Put in data group.
 +
 +      * emulation/pc-select.el (pc-select): Put in emulations group.
 +
 +      * calculator.el (calculator): Put in applications group.
 +
 +2010-03-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add .dir-locals.el support for file-less buffers.
 +      * files.el (hack-local-variables): Split out code to apply local
 +      variable settings ...
 +      (hack-local-variables-apply): ... here.  New function.
 +      (hack-dir-local-variables): Use the default directory for when the
 +      buffer does not have an associated file.
 +      (hack-dir-local-variables-non-file-buffer): New function.
 +      * diff-mode.el (diff-mode):
 +      * vc-annotate.el (vc-annotate-mode):
 +      * vc-dir.el (vc-dir-mode):
 +      * log-edit.el (log-edit-mode):
 +      * log-view.el (log-view-mode): Call hack-dir-local-variables-non-file-buffer.
 +
 +2010-03-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Add support for shelving snapshots and for showing shelves.
 +      * vc-bzr.el (vc-bzr-shelve-show, vc-bzr-shelve-show-at-point)
 +      (vc-bzr-shelve-apply-and-keep-at-point, vc-bzr-shelve-snapshot):
 +      New functions.
 +      (vc-bzr-shelve-map, vc-bzr-shelve-menu-map)
 +      (vc-bzr-extra-menu-map): Map them.
 +
 +2010-03-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * cus-edit.el (customize-changed-options-previous-release):
 +      Bump to 23.1.
 +
 +      * image.el (image-animate-max-time): Fix :version tag.
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
 +2010-03-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * vc-git.el (vc-git-revision-table): Include remote branches.
 +
 +2010-03-10  Kim F. Storm  <storm@cua.dk>
 +
 +      Animated image API.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00211.html
 +
 +      * image.el (image-animate-max-time): New defcustom.
 +      (image-animated-types): New defconst.
 +      (create-animated-image, image-animate-timer)
 +      (image-animate-start, image-animate-stop, image-animate-timeout)
 +      (image-animated-p): New functions.
 +
 +      * image-mode.el (image-toggle-display-image):
 +      Replace `create-image' with `create-animated-image'.
 +
  2010-03-09  Miles Bader  <miles@gnu.org>
  
        * vc-git.el (vc-git-print-log): Use "tformat:" for shortlog,
  
  2010-03-07  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
  
 -      * vc-git.el (vc-git-annotate-extract-revision-at-line): Use
 -      vc-git-root as default directory for revision path (Bug#5657).
 +      * vc-git.el (vc-git-annotate-extract-revision-at-line):
 +      Use vc-git-root as default directory for revision path (Bug#5657).
  
  2010-03-06  Chong Yidong  <cyd@stupidchicken.com>
  
  2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
  
        * net/dbus.el (dbus-introspect, dbus-get-property)
 -      (dbus-set-property, dbus-get-all-properties): Use
 -      `dbus-call-method' when noninteractive.  (Bug#5645)
 +      (dbus-set-property, dbus-get-all-properties):
 +      Use `dbus-call-method' when noninteractive.  (Bug#5645)
  
  2010-02-28  Chong Yidong  <cyd@stupidchicken.com>
  
  
  2009-12-18  Ulf Jasper  <ulf.jasper@web.de>
  
 -      * calendar/icalendar.el (icalendar--convert-tz-offset): Fixed
 -      timezone names.
 -      (icalendar--convert-tz-offset): Fixed the "last-day-problem".
 +      * calendar/icalendar.el (icalendar--convert-tz-offset):
 +      Fix timezone names.
 +      (icalendar--convert-tz-offset): Fix the "last-day-problem".
        (icalendar--add-diary-entry): Remove the trailing blank that
        diary-make-entry inserts.
  
        (tramp-advice-file-expand-wildcards): Remove it.
  
        * net/tramp-compat.el (top): Autoload `tramp-handle-file-remote-p'.
 -      (tramp-advice-file-expand-wildcards): Moved from tramp.el.
 +      (tramp-advice-file-expand-wildcards): Move from tramp.el.
        Activate advice for older GNU Emacs versions.  (Bug#5237)
  
  2009-12-17  Juanma Barranquero  <lekktu@gmail.com>
  
        * files.el (hack-local-variables-filter): While ignoring duplicates,
        don't take `mode' into account.
 -      (hack-local-variables-filter, hack-dir-local-variables): Don't
 -      remove duplicate `mode' from local-variables-alist (like `eval').
 +      (hack-local-variables-filter, hack-dir-local-variables):
 +      Don't remove duplicate `mode' from local-variables-alist (like `eval').
  
  2009-12-17  Juri Linkov  <juri@jurta.org>
  
 -      Make `dired-diff' more safe.  (Bug#5225)
 +      Make `dired-diff' safer.  (Bug#5225)
  
        * dired-aux.el (dired-diff): Signal an error when `file' equals to
        `current' or when `file' is a directory of the `current' file.
  
  2009-12-10  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
  
 -      * whitespace.el (whitespace-display-char-on): Ensure
 -      `buffer-display-table' is unique when two or more windows are
 +      * whitespace.el (whitespace-display-char-on):
 +      Ensure `buffer-display-table' is unique when two or more windows are
        visible.  Reported by Martin Pohlack <mp26@os.inf.tu-dresden.de>.
        New version 12.1.
  
  
  2009-12-09  Vivek Dasmohapatra  <vivek@etla.org>
  
 -      Drop some properties to avoid surprises.
 +      Drop some properties to avoid surprises (bug#5002).
        * htmlfontify.el (hfy-ignored-properties): New defcustom.
        (hfy-fontify-buffer): Use it.
  
        * Makefile.in (ELCFILES): Adapt to subword.el move.
  
  2009-11-21  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 -          Stefan Monnier  <monnier@iro.umontreal.ca>
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * bookmark.el (bookmark-bmenu-bookmark-column): Remove var.
        (bookmark-bmenu-list): Save name on `bookmark-name-prop' text-prop.
        indent buffer only if called interactively (Bug#4452).
  
  2009-09-19  Juanma Barranquero  <lekktu@gmail.com>
 -          Eli Zaretskii  <eliz@gnu.org>
 +            Eli Zaretskii  <eliz@gnu.org>
  
        This fixes bug#4197 (merged to bug#865, though not identical).
        * server.el (server-auth-dir): Add docstring note about FAT32.
        Don't call substitute-in-file-name on diary-file.
  
  2009-09-03  Eduard Wiebe  <usenet@pusto.de>
 -          Stefan Monnier  <monnier@iro.umontreal.ca>
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
  
        * mail/footnote.el (footnote-prefix): Make it a defcustom.
        (footnote-mode-map): Move initialization into the declaration.
        * progmodes/hideshow.el (hs-special-modes-alist): Add js-mode entry.
  
  2009-08-14  Daniel Colascione  <dan.colascione@gmail.com>
 -          Karl Landstrom  <karl.landstrom@brgeight.se>
 +            Karl Landstrom  <karl.landstrom@brgeight.se>
  
        * progmodes/js.el: New file.
  
        XZ is the successor to LZMA: <http://tukaani.org/xz/>
  
  2009-06-22  Dmitry Dzhus  <dima@sphinx.net.ru>
 -          Nick Roberts  <nickrob@snap.net.nz>
 +            Nick Roberts  <nickrob@snap.net.nz>
  
        * progmodes/gdb-mi.el: Pull further modified changes from Dmitry's
        repository (http://sphinx.net.ru/hg/gdb-mi/).
diff --combined lisp/simple.el
@@@ -401,7 -401,8 +401,7 @@@ location.
  Other major modes are defined by comparison with this one."
    (interactive)
    (kill-all-local-variables)
 -  (unless delay-mode-hooks
 -    (run-hooks 'after-change-major-mode-hook)))
 +  (run-mode-hooks 'fundamental-mode-hook))
  
  ;; Special major modes to view specially formatted data rather than files.
  
    "Parent major mode from which special major modes should inherit."
    (setq buffer-read-only t))
  
 +;; Major mode meant to be the parent of programming modes.
 +
 +(define-derived-mode prog-mode fundamental-mode "Prog"
 +  "Major mode for editing programming language source code."
 +  (set (make-local-variable 'require-final-newline) mode-require-final-newline)
 +  (set (make-local-variable 'parse-sexp-ignore-comments) t))
 +
  ;; Making and deleting lines.
  
  (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard))
@@@ -844,78 -838,6 +844,78 @@@ Don't use this command in Lisp programs
         (overlay-recenter (point))
         (recenter -3))))
  
 +(defcustom delete-active-region t
 +  "Whether single-char deletion commands delete an active region.
 +This has an effect only if Transient Mark mode is enabled, and
 +affects `delete-forward-char' and `delete-backward-char', though
 +not `delete-char'.
 +
 +If the value is the symbol `kill', the active region is killed
 +instead of deleted."
 +  :type '(choice (const :tag "Delete active region" t)
 +                 (const :tag "Kill active region" kill)
 +                 (const :tag "Do ordinary deletion" nil))
 +  :group 'editing
 +  :version "24.1")
 +
 +(defun delete-backward-char (n &optional killflag)
 +  "Delete the previous N characters (following if N is negative).
 +If Transient Mark mode is enabled, the mark is active, and N is 1,
 +delete the text in the region and deactivate the mark instead.
 +To disable this, set `delete-active-region' to nil.
 +
 +Optional second arg KILLFLAG, if non-nil, means to kill (save in
 +kill ring) instead of delete.  Interactively, N is the prefix
 +arg, and KILLFLAG is set if N is explicitly specified.
 +
 +In Overwrite mode, single character backward deletion may replace
 +tabs with spaces so as to back over columns, unless point is at
 +the end of the line."
 +  (interactive "p\nP")
 +  (unless (integerp n)
 +    (signal 'wrong-type-argument (list 'integerp n)))
 +  (cond ((and (use-region-p)
 +            delete-active-region
 +            (= n 1))
 +       ;; If a region is active, kill or delete it.
 +       (if (eq delete-active-region 'kill)
 +           (kill-region (region-beginning) (region-end))
 +         (delete-region (region-beginning) (region-end))))
 +      ;; In Overwrite mode, maybe untabify while deleting
 +      ((null (or (null overwrite-mode)
 +                 (<= n 0)
 +                 (memq (char-before) '(?\t ?\n))
 +                 (eobp)
 +                 (eq (char-after) ?\n)))
 +       (let* ((ocol (current-column))
 +              (val (delete-char (- n) killflag)))
 +         (save-excursion
 +           (insert-char ?\s (- ocol (current-column)) nil))))
 +      ;; Otherwise, do simple deletion.
 +      (t (delete-char (- n) killflag))))
 +
 +(defun delete-forward-char (n &optional killflag)
 +  "Delete the previous N characters (following if N is negative).
 +If Transient Mark mode is enabled, the mark is active, and N is 1,
 +delete the text in the region and deactivate the mark instead.
 +To disable this, set `delete-active-region' to nil.
 +
 +Optional second arg KILLFLAG non-nil means to kill (save in kill
 +ring) instead of delete.  Interactively, N is the prefix arg, and
 +KILLFLAG is set if N was explicitly specified."
 +  (interactive "p\nP")
 +  (unless (integerp n)
 +    (signal 'wrong-type-argument (list 'integerp n)))
 +  (cond ((and (use-region-p)
 +            delete-active-region
 +            (= n 1))
 +       ;; If a region is active, kill or delete it.
 +       (if (eq delete-active-region 'kill)
 +           (kill-region (region-beginning) (region-end))
 +         (delete-region (region-beginning) (region-end))))
 +      ;; Otherwise, do simple deletion.
 +      (t (delete-char n killflag))))
 +
  (defun mark-whole-buffer ()
    "Put point at beginning and mark at end of buffer.
  You probably should not use this function in Lisp programs;
@@@ -2149,11 -2071,7 +2149,11 @@@ to `shell-command-history'.
  
  Like `shell-command' but if COMMAND doesn't end in ampersand, adds `&'
  surrounded by whitespace and executes the command asynchronously.
 -The output appears in the buffer `*Async Shell Command*'."
 +The output appears in the buffer `*Async Shell Command*'.
 +
 +In Elisp, you will often be better served by calling `start-process'
 +directly, since it offers more control and does not impose the use of a
 +shell (with its need to quote arguments)."
    (interactive
     (list
      (read-shell-command "Async shell command: " nil nil
@@@ -2214,11 -2132,7 +2214,11 @@@ If the optional third argument ERROR-BU
  or buffer name to which to direct the command's standard error output.
  If it is nil, error output is mingled with regular output.
  In an interactive call, the variable `shell-command-default-error-buffer'
 -specifies the value of ERROR-BUFFER."
 +specifies the value of ERROR-BUFFER.
 +
 +In Elisp, you will often be better served by calling `call-process' or
 +`start-process' directly, since it offers more control and does not impose
 +the use of a shell (with its need to quote arguments)."
  
    (interactive
     (list
@@@ -2775,60 -2689,6 +2775,60 @@@ These commands include \\[set-mark-comm
    (reset-this-command-lengths)
    (restore-overriding-map))
  \f
 +;; This function is here rather than in subr.el because it uses CL.
 +(defmacro with-wrapper-hook (var args &rest body)
 +  "Run BODY wrapped with the VAR hook.
 +VAR is a special hook: its functions are called with a first argument
 +which is the \"original\" code (the BODY), so the hook function can wrap
 +the original function, or call it any number of times (including not calling
 +it at all).  This is similar to an `around' advice.
 +VAR is normally a symbol (a variable) in which case it is treated like
 +a hook, with a buffer-local and a global part.  But it can also be an
 +arbitrary expression.
 +ARGS is a list of variables which will be passed as additional arguments
 +to each function, after the initial argument, and which the first argument
 +expects to receive when called."
 +  (declare (indent 2) (debug t))
 +  ;; We need those two gensyms because CL's lexical scoping is not available
 +  ;; for function arguments :-(
 +  (let ((funs (make-symbol "funs"))
 +        (global (make-symbol "global"))
 +        (argssym (make-symbol "args")))
 +    ;; Since the hook is a wrapper, the loop has to be done via
 +    ;; recursion: a given hook function will call its parameter in order to
 +    ;; continue looping.
 +    `(labels ((runrestofhook (,funs ,global ,argssym)
 +                 ;; `funs' holds the functions left on the hook and `global'
 +                 ;; holds the functions left on the global part of the hook
 +                 ;; (in case the hook is local).
 +                 (lexical-let ((funs ,funs)
 +                               (global ,global))
 +                   (if (consp funs)
 +                       (if (eq t (car funs))
 +                           (runrestofhook
 +                            (append global (cdr funs)) nil ,argssym)
 +                         (apply (car funs)
 +                                (lambda (&rest ,argssym)
 +                                (runrestofhook (cdr funs) global ,argssym))
 +                                ,argssym))
 +                     ;; Once there are no more functions on the hook, run
 +                     ;; the original body.
 +                     (apply (lambda ,args ,@body) ,argssym)))))
 +       (runrestofhook ,var
 +                      ;; The global part of the hook, if any.
 +                      ,(if (symbolp var)
 +                           `(if (local-variable-p ',var)
 +                                (default-value ',var)))
 +                      (list ,@args)))))
 +
 +(defvar filter-buffer-substring-functions nil
 +  "Wrapper hook around `filter-buffer-substring'.
 +The functions on this special hook are called with 4 arguments:
 +  NEXT-FUN BEG END DELETE
 +NEXT-FUN is a function of 3 arguments (BEG END DELETE)
 +that performs the default operation.  The other 3 arguments are like
 +the ones passed to `filter-buffer-substring'.")
 +
  (defvar buffer-substring-filters nil
    "List of filter functions for `filter-buffer-substring'.
  Each function must accept a single argument, a string, and return
@@@ -2838,34 -2698,46 +2838,34 @@@ the next.  The return value of the las
  return value of `filter-buffer-substring'.
  
  If this variable is nil, no filtering is performed.")
 +(make-obsolete-variable 'buffer-substring-filters
 +                        'filter-buffer-substring-functions "24.1")
  
 -(defun filter-buffer-substring (beg end &optional delete noprops)
 +(defun filter-buffer-substring (beg end &optional delete)
    "Return the buffer substring between BEG and END, after filtering.
 -The buffer substring is passed through each of the filter
 -functions in `buffer-substring-filters', and the value from the
 -last filter function is returned.  If `buffer-substring-filters'
 -is nil, the buffer substring is returned unaltered.
 +The filtering is performed by `filter-buffer-substring-functions'.
  
  If DELETE is non-nil, the text between BEG and END is deleted
  from the buffer.
  
 -If NOPROPS is non-nil, final string returned does not include
 -text properties, while the string passed to the filters still
 -includes text properties from the buffer text.
 -
 -Point is temporarily set to BEG before calling
 -`buffer-substring-filters', in case the functions need to know
 -where the text came from.
 -
  This function should be used instead of `buffer-substring',
  `buffer-substring-no-properties', or `delete-and-extract-region'
  when you want to allow filtering to take place.  For example,
 -major or minor modes can use `buffer-substring-filters' to
 +major or minor modes can use `filter-buffer-substring-functions' to
  extract characters that are special to a buffer, and should not
  be copied into other buffers."
 -  (cond
 -   ((or delete buffer-substring-filters)
 -    (save-excursion
 -      (goto-char beg)
 -      (let ((string (if delete (delete-and-extract-region beg end)
 -                    (buffer-substring beg end))))
 -      (dolist (filter buffer-substring-filters)
 -        (setq string (funcall filter string)))
 -      (if noprops
 -          (set-text-properties 0 (length string) nil string))
 -      string)))
 -   (noprops
 -    (buffer-substring-no-properties beg end))
 -   (t
 -    (buffer-substring beg end))))
 +  (with-wrapper-hook filter-buffer-substring-functions (beg end delete)
 +    (cond
 +     ((or delete buffer-substring-filters)
 +      (save-excursion
 +        (goto-char beg)
 +        (let ((string (if delete (delete-and-extract-region beg end)
 +                        (buffer-substring beg end))))
 +          (dolist (filter buffer-substring-filters)
 +            (setq string (funcall filter string)))
 +          string)))
 +     (t
 +      (buffer-substring beg end)))))
  
  
  ;;;; Window system cut and paste hooks.
@@@ -2977,27 -2849,24 +2977,27 @@@ argument should still be a \"useful\" s
      (if yank-handler
        (signal 'args-out-of-range
                (list string "yank-handler specified for empty string"))))
 -  (when (and kill-do-not-save-duplicates
 -             (equal string (car kill-ring)))
 -    (setq replace t))
 -  (if (fboundp 'menu-bar-update-yank-menu)
 -      (menu-bar-update-yank-menu string (and replace (car kill-ring))))
 +  (unless (and kill-do-not-save-duplicates
 +             (equal string (car kill-ring)))
 +    (if (fboundp 'menu-bar-update-yank-menu)
 +      (menu-bar-update-yank-menu string (and replace (car kill-ring)))))
    (when save-interprogram-paste-before-kill
      (let ((interprogram-paste (and interprogram-paste-function
                                     (funcall interprogram-paste-function))))
        (when interprogram-paste
 -        (if (listp interprogram-paste)
 -            (dolist (s (nreverse interprogram-paste))
 -              (push s kill-ring))
 -            (push interprogram-paste kill-ring)))))
 -  (if (and replace kill-ring)
 -      (setcar kill-ring string)
 -    (push string kill-ring)
 -    (if (> (length kill-ring) kill-ring-max)
 -      (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil)))
 +        (dolist (s (if (listp interprogram-paste)
 +                     (nreverse interprogram-paste)
 +                   (list interprogram-paste)))
 +        (unless (and kill-do-not-save-duplicates
 +                     (equal s (car kill-ring)))
 +          (push s kill-ring))))))
 +  (unless (and kill-do-not-save-duplicates
 +             (equal string (car kill-ring)))
 +    (if (and replace kill-ring)
 +      (setcar kill-ring string)
 +      (push string kill-ring)
 +      (if (> (length kill-ring) kill-ring-max)
 +        (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))))
    (setq kill-ring-yank-pointer kill-ring)
    (if interprogram-cut-function
        (funcall interprogram-cut-function string (not replace))))
@@@ -3599,18 -3468,18 +3599,18 @@@ START and END specify the portion of th
    (interactive
     (list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t))
         (region-beginning) (region-end)))
 -  (let ((oldbuf (current-buffer)))
 -    (let* ((append-to (get-buffer-create buffer))
 -           (windows (get-buffer-window-list append-to t t))
 -           point)
 -      (save-excursion
 -      (with-current-buffer append-to
 -        (setq point (point))
 -        (barf-if-buffer-read-only)
 -        (insert-buffer-substring oldbuf start end)
 -        (dolist (window windows)
 -          (when (= (window-point window) point)
 -            (set-window-point window (point)))))))))
 +  (let* ((oldbuf (current-buffer))
 +         (append-to (get-buffer-create buffer))
 +         (windows (get-buffer-window-list append-to t t))
 +         point)
 +    (save-excursion
 +      (with-current-buffer append-to
 +        (setq point (point))
 +        (barf-if-buffer-read-only)
 +        (insert-buffer-substring oldbuf start end)
 +        (dolist (window windows)
 +          (when (= (window-point window) point)
 +            (set-window-point window (point))))))))
  
  (defun prepend-to-buffer (buffer start end)
    "Prepend to specified buffer the text of the region.
@@@ -3666,7 -3535,7 +3666,7 @@@ a mistake; see the documentation of `se
        (marker-position (mark-marker))
      (signal 'mark-inactive nil)))
  
 -(defcustom select-active-regions nil
 +(defcustom select-active-regions t
    "If non-nil, an active region automatically becomes the window selection."
    :type 'boolean
    :group 'killing
@@@ -3687,7 -3556,6 +3687,7 @@@ This function also runs `deactivate-mar
         mark-active
         (display-selections-p)
         (x-selection-owner-p 'PRIMARY)
 +       (not (eq (region-beginning) (region-end)))
         (x-set-selection 'PRIMARY (buffer-substring-no-properties
                                    (region-beginning) (region-end))))
      (if (and (null force)
@@@ -3761,10 -3629,9 +3761,9 @@@ point otherwise.
  This is used by commands that act specially on the region under
  Transient Mark mode.
  
- The return value is t provided Transient Mark mode is enabled and
- the mark is active; and, when `use-empty-active-region' is
- non-nil, provided the region is empty.  Otherwise, the return
- value is nil.
+ The return value is t if Transient Mark mode is enabled and the
+ mark is active; furthermore, if `use-empty-active-region' is nil,
+ the region must not be empty.  Otherwise, the return value is nil.
  
  For some commands, it may be appropriate to ignore the value of
  `use-empty-active-region'; in that case, use `region-active-p'."
@@@ -4074,14 -3941,6 +4073,14 @@@ the current accessible part of the buff
  If `widen-automatically' is nil, these commands will do something else
  as a fallback, and won't change the buffer bounds.")
  
 +(defvar non-essential nil
 +  "Whether the currently executing code is performing an essential task.
 +This variable should be non-nil only when running code which should not
 +disturb the user.  E.g. it can be used to prevent Tramp from prompting the
 +user for a password when we are simply scanning a set of files in the
 +background or displaying possible completions before the user even asked
 +for it.")
 +
  (defun pop-global-mark ()
    "Pop off global mark ring and jump to the top location."
    (interactive)
@@@ -4145,10 -4004,9 +4144,10 @@@ and more reliable (no dependence on goa
            (insert (if use-hard-newlines hard-newline "\n")))
        (line-move arg nil nil try-vscroll))
      (if (called-interactively-p 'interactive)
 -      (condition-case nil
 +      (condition-case err
            (line-move arg nil nil try-vscroll)
 -        ((beginning-of-buffer end-of-buffer) (ding)))
 +        ((beginning-of-buffer end-of-buffer)
 +         (signal (car err) (cdr err))))
        (line-move arg nil nil try-vscroll)))
    nil)
  
@@@ -4176,10 -4034,9 +4175,10 @@@ to use and more reliable (no dependenc
    (interactive "^p\np")
    (or arg (setq arg 1))
    (if (called-interactively-p 'interactive)
 -      (condition-case nil
 +      (condition-case err
          (line-move (- arg) nil nil try-vscroll)
 -      ((beginning-of-buffer end-of-buffer) (ding)))
 +      ((beginning-of-buffer end-of-buffer)
 +       (signal (car err) (cdr err))))
      (line-move (- arg) nil nil try-vscroll))
    nil)
  
@@@ -4617,9 -4474,6 +4616,9 @@@ rests.
               (let ((goal-column 0)
                     (line-move-visual nil))
                 (and (line-move arg t)
 +                    ;; With bidi reordering, we may not be at bol,
 +                    ;; so make sure we are.
 +                    (skip-chars-backward "^\n")
                      (not (bobp))
                      (progn
                        (while (and (not (bobp)) (invisible-p (1- (point))))
@@@ -4882,7 -4736,52 +4881,7 @@@ This also turns on `word-wrap' in the b
  (define-globalized-minor-mode global-visual-line-mode
    visual-line-mode turn-on-visual-line-mode
    :lighter " vl")
 -\f
 -(defun scroll-other-window-down (lines)
 -  "Scroll the \"other window\" down.
 -For more details, see the documentation for `scroll-other-window'."
 -  (interactive "P")
 -  (scroll-other-window
 -   ;; Just invert the argument's meaning.
 -   ;; We can do that without knowing which window it will be.
 -   (if (eq lines '-) nil
 -     (if (null lines) '-
 -       (- (prefix-numeric-value lines))))))
 -
 -(defun beginning-of-buffer-other-window (arg)
 -  "Move point to the beginning of the buffer in the other window.
 -Leave mark at previous position.
 -With arg N, put point N/10 of the way from the true beginning."
 -  (interactive "P")
 -  (let ((orig-window (selected-window))
 -      (window (other-window-for-scrolling)))
 -    ;; We use unwind-protect rather than save-window-excursion
 -    ;; because the latter would preserve the things we want to change.
 -    (unwind-protect
 -      (progn
 -        (select-window window)
 -        ;; Set point and mark in that window's buffer.
 -        (with-no-warnings
 -         (beginning-of-buffer arg))
 -        ;; Set point accordingly.
 -        (recenter '(t)))
 -      (select-window orig-window))))
 -
 -(defun end-of-buffer-other-window (arg)
 -  "Move point to the end of the buffer in the other window.
 -Leave mark at previous position.
 -With arg N, put point N/10 of the way from the true end."
 -  (interactive "P")
 -  ;; See beginning-of-buffer-other-window for comments.
 -  (let ((orig-window (selected-window))
 -      (window (other-window-for-scrolling)))
 -    (unwind-protect
 -      (progn
 -        (select-window window)
 -        (with-no-warnings
 -         (end-of-buffer arg))
 -        (recenter '(t)))
 -      (select-window orig-window))))
 +
  \f
  (defun transpose-chars (arg)
    "Interchange characters around point, moving forward one character.
@@@ -5245,7 -5144,7 +5244,7 @@@ Some major modes set this."
  (put 'auto-fill-function 'safe-local-variable 'null)
  ;; FIXME: turn into a proper minor mode.
  ;; Add a global minor mode version of it.
 -(defun auto-fill-mode (&optional arg)
 +(define-minor-mode auto-fill-mode
    "Toggle Auto Fill mode.
  With ARG, turn Auto Fill mode on if and only if ARG is positive.
  In Auto Fill mode, inserting a space at a column beyond `current-fill-column'
@@@ -5253,7 -5152,14 +5252,7 @@@ automatically breaks the line at a prev
  
  The value of `normal-auto-fill-function' specifies the function to use
  for `auto-fill-function' when turning Auto Fill mode on."
 -  (interactive "P")
 -  (prog1 (setq auto-fill-function
 -             (if (if (null arg)
 -                     (not auto-fill-function)
 -                     (> (prefix-numeric-value arg) 0))
 -                 normal-auto-fill-function
 -                 nil))
 -    (force-mode-line-update)))
 +  :variable (eq auto-fill-function normal-auto-fill-function))
  
  ;; This holds a document string used to document auto-fill-mode.
  (defun auto-fill-function ()
@@@ -5352,7 -5258,7 +5351,7 @@@ if long lines are truncated.
  (defvar overwrite-mode-binary (purecopy " Bin Ovwrt")
    "The string displayed in the mode line when in binary overwrite mode.")
  
 -(defun overwrite-mode (arg)
 +(define-minor-mode overwrite-mode
    "Toggle overwrite mode.
  With prefix argument ARG, turn overwrite mode on if ARG is positive,
  otherwise turn it off.  In overwrite mode, printing characters typed
@@@ -5361,9 -5267,14 +5360,9 @@@ it to the right.  At the end of a line
  Before a tab, such characters insert until the tab is filled in.
  \\[quoted-insert] still inserts characters in overwrite mode; this
  is supposed to make it easier to insert characters when necessary."
 -  (interactive "P")
 -  (setq overwrite-mode
 -      (if (if (null arg) (not overwrite-mode)
 -            (> (prefix-numeric-value arg) 0))
 -          'overwrite-mode-textual))
 -  (force-mode-line-update))
 +  :variable (eq overwrite-mode 'overwrite-mode-textual))
  
 -(defun binary-overwrite-mode (arg)
 +(define-minor-mode binary-overwrite-mode
    "Toggle binary overwrite mode.
  With prefix argument ARG, turn binary overwrite mode on if ARG is
  positive, otherwise turn it off.  In binary overwrite mode, printing
@@@ -5376,7 -5287,13 +5375,7 @@@ replaces the text at the cursor, just a
  Note that binary overwrite mode is not its own minor mode; it is a
  specialization of overwrite mode, entered by setting the
  `overwrite-mode' variable to `overwrite-mode-binary'."
 -  (interactive "P")
 -  (setq overwrite-mode
 -      (if (if (null arg)
 -              (not (eq overwrite-mode 'overwrite-mode-binary))
 -            (> (prefix-numeric-value arg) 0))
 -          'overwrite-mode-binary))
 -  (force-mode-line-update))
 +  :variable (eq overwrite-mode 'overwrite-mode-binary))
  
  (define-minor-mode line-number-mode
    "Toggle Line Number mode.
@@@ -5402,26 -5319,6 +5401,26 @@@ With ARG, turn Size Indication mode on 
  otherwise turn it off.  When Size Indication mode is enabled, the
  size of the accessible part of the buffer appears in the mode line."
    :global t :group 'mode-line)
 +
 +(define-minor-mode auto-save-mode
 +  "Toggle auto-saving of contents of current buffer.
 +With prefix argument ARG, turn auto-saving on if positive, else off."
 +  :variable ((and buffer-auto-save-file-name
 +                  ;; If auto-save is off because buffer has shrunk,
 +                  ;; then toggling should turn it on.
 +                  (>= buffer-saved-size 0))
 +             . (lambda (val)
 +                 (setq buffer-auto-save-file-name
 +                       (cond
 +                        ((null val) nil)
 +                        ((and buffer-file-name auto-save-visited-file-name
 +                              (not buffer-read-only))
 +                         buffer-file-name)
 +                        (t (make-auto-save-file-name))))))
 +  ;; If -1 was stored here, to temporarily turn off saving,
 +  ;; turn it back on.
 +  (and (< buffer-saved-size 0)
 +       (setq buffer-saved-size 0)))
  \f
  (defgroup paren-blinking nil
    "Blinking matching of parens and expressions."
@@@ -5594,12 -5491,12 +5593,12 @@@ cancel the use of the current buffer (f
  or go back to just one window (by deleting all but the selected window)."
    (interactive)
    (cond ((eq last-command 'mode-exited) nil)
 +      ((region-active-p)
 +       (deactivate-mark))
        ((> (minibuffer-depth) 0)
         (abort-recursive-edit))
        (current-prefix-arg
         nil)
 -      ((region-active-p)
 -       (deactivate-mark))
        ((> (recursion-depth) 0)
         (exit-recursive-edit))
        (buffer-quit-function
@@@ -6525,7 -6422,6 +6524,7 @@@ call `normal-erase-is-backspace-mode' (
         (if (if (eq normal-erase-is-backspace 'maybe)
                 (and (not noninteractive)
                      (or (memq system-type '(ms-dos windows-nt))
 +                      (memq window-system '(ns))
                          (and (memq window-system '(x))
                               (fboundp 'x-backspace-delete-keys-p)
                               (x-backspace-delete-keys-p))
               normal-erase-is-backspace)
             1 0)))))
  
 -(defun normal-erase-is-backspace-mode (&optional arg)
 +(define-minor-mode normal-erase-is-backspace-mode
    "Toggle the Erase and Delete mode of the Backspace and Delete keys.
  
  With numeric ARG, turn the mode on if and only if ARG is positive.
@@@ -6567,10 -6463,13 +6566,10 @@@ probably not turn on this mode on a tex
  have both Backspace, Delete and F1 keys.
  
  See also `normal-erase-is-backspace'."
 -  (interactive "P")
 -  (let ((enabled (or (and arg (> (prefix-numeric-value arg) 0))
 -                   (not (or arg
 -                              (eq 1 (terminal-parameter
 -                                    nil 'normal-erase-is-backspace)))))))
 -    (set-terminal-parameter nil 'normal-erase-is-backspace
 -                          (if enabled 1 0))
 +  :variable (eq (terminal-parameter
 +                 nil 'normal-erase-is-backspace) 1)
 +  (let ((enabled (eq 1 (terminal-parameter
 +                        nil 'normal-erase-is-backspace))))
  
      (cond ((or (memq window-system '(x w32 ns pc))
               (memq system-type '(ms-dos windows-nt)))
             (keyboard-translate ?\C-h ?\C-h)
             (keyboard-translate ?\C-? ?\C-?))))
  
 -    (run-hooks 'normal-erase-is-backspace-hook)
      (if (called-interactively-p 'interactive)
        (message "Delete key deletes %s"
                 (if (eq 1 (terminal-parameter nil 'normal-erase-is-backspace))
@@@ -6642,6 -6542,52 +6641,6 @@@ the first N arguments are fixed at the 
  was called."
    (lexical-let ((fun fun) (args1 args))
      (lambda (&rest args2) (apply fun (append args1 args2)))))
 -
 -;; This function is here rather than in subr.el because it uses CL.
 -(defmacro with-wrapper-hook (var args &rest body)
 -  "Run BODY wrapped with the VAR hook.
 -VAR is a special hook: its functions are called with a first argument
 -which is the \"original\" code (the BODY), so the hook function can wrap
 -the original function, or call it any number of times (including not calling
 -it at all).  This is similar to an `around' advice.
 -VAR is normally a symbol (a variable) in which case it is treated like
 -a hook, with a buffer-local and a global part.  But it can also be an
 -arbitrary expression.
 -ARGS is a list of variables which will be passed as additional arguments
 -to each function, after the initial argument, and which the first argument
 -expects to receive when called."
 -  (declare (indent 2) (debug t))
 -  ;; We need those two gensyms because CL's lexical scoping is not available
 -  ;; for function arguments :-(
 -  (let ((funs (make-symbol "funs"))
 -        (global (make-symbol "global"))
 -        (argssym (make-symbol "args")))
 -    ;; Since the hook is a wrapper, the loop has to be done via
 -    ;; recursion: a given hook function will call its parameter in order to
 -    ;; continue looping.
 -    `(labels ((runrestofhook (,funs ,global ,argssym)
 -                 ;; `funs' holds the functions left on the hook and `global'
 -                 ;; holds the functions left on the global part of the hook
 -                 ;; (in case the hook is local).
 -                 (lexical-let ((funs ,funs)
 -                               (global ,global))
 -                   (if (consp funs)
 -                       (if (eq t (car funs))
 -                           (runrestofhook
 -                            (append global (cdr funs)) nil ,argssym)
 -                         (apply (car funs)
 -                                (lambda (&rest ,argssym)
 -                                (runrestofhook (cdr funs) global ,argssym))
 -                                ,argssym))
 -                     ;; Once there are no more functions on the hook, run
 -                     ;; the original body.
 -                     (apply (lambda ,args ,@body) ,argssym)))))
 -       (runrestofhook ,var
 -                      ;; The global part of the hook, if any.
 -                      ,(if (symbolp var)
 -                           `(if (local-variable-p ',var)
 -                                (default-value ',var)))
 -                      (list ,@args)))))
  \f
  ;; Minibuffer prompt stuff.
  
diff --combined lisp/vc/vc.el
@@@ -6,7 -6,7 +6,7 @@@
  
  ;; Author:     FSF (see below for full credits)
  ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 -;; Keywords: tools
 +;; Keywords: vc tools
  
  ;; This file is part of GNU Emacs.
  
  ;; although you might prefer to use C-c C-a (i.e. `log-edit-insert-changelog')
  ;; from the commit buffer instead or to set `log-edit-setup-invert'.
  ;;
 -;; The vc code maintains some internal state in order to reduce expensive
 -;; version-control operations to a minimum.  Some names are only computed
 -;; once.  If you perform version control operations with the backend while
 -;; vc's back is turned, or move/rename master files while vc is running,
 -;; vc may get seriously confused.  Don't do these things!
 +;; When using SCCS, RCS, CVS: be careful not to do repo surgery, or
 +;; operations like registrations and deletions and renames, outside VC
 +;; while VC is running. The support for these systems was designed
 +;; when disks were much slower, and the code maintains a lot of
 +;; internal state in order to reduce expensive operations to a
 +;; minimum. Thus, if you mess with the repo while VC's back is turned,
 +;; VC may get seriously confused.
 +;;
 +;; When using Subversion or a later system, anything you do outside VC
 +;; *through the VCS tools* should safely interlock with VC
 +;; operations. Under these VC does little state caching, because local
 +;; operations are assumed to be fast.  The dividing line is
  ;;
  ;; ADDING SUPPORT FOR OTHER BACKENDS
  ;;
  ;;
  ;;   Return non-nil if FILE is unchanged from the working revision.
  ;;   This function should do a brief comparison of FILE's contents
 -;;   with those of the repository master of the working revision.  If
 +;;   with those of the repository copy of the working revision.  If
  ;;   the backend does not have such a brief-comparison feature, the
  ;;   default implementation of this function can be used, which
  ;;   delegates to a full vc-BACKEND-diff.  (Note that vc-BACKEND-diff
  ;;
  ;; * checkin (files rev comment)
  ;;
 -;;   Commit changes in FILES to this backend.  If REV is non-nil, that
 -;;   should become the new revision number (not all backends do
 -;;   anything with it).  COMMENT is used as a check-in comment.  The
 -;;   implementation should pass the value of vc-checkin-switches to
 -;;   the backend command.  (Note: in older versions of VC, this
 -;;   command took a single file argument and not a list.)
 +;;   Commit changes in FILES to this backend.  REV is a historical artifact
 +;;   and should be ignored.  COMMENT is used as a check-in comment.
 +;;   The implementation should pass the value of vc-checkin-switches to
 +;;   the backend command.
  ;;
  ;; * find-revision (file rev buffer)
  ;;
  ;;   revision.  At this point START-REVISION is only required to work
  ;;   in conjunction with LIMIT = 1.
  ;;
 +;; * log-outgoing (backend remote-location)
 +;;
 +;;   Insert in BUFFER the revision log for the changes that will be
 +;;   sent when performing a push operation to REMOTE-LOCATION.
 +;;
 +;; * log-incoming (backend remote-location)
 +;;
 +;;   Insert in BUFFER the revision log for the changes that will be
 +;;   received when performing a pull operation from REMOTE-LOCATION.
 +;;
  ;; - log-view-mode ()
  ;;
  ;;   Mode to use for the output of print-log.  This defaults to
  ;;   Return the revision number that follows REV for FILE, or nil if no such
  ;;   revision exists.
  ;;
 +;; - log-edit-mode ()
 +;;
 +;;   Turn on the mode used for editing the check in log.  This
 +;;   defaults to `log-edit-mode'.  If changed, it should use a mode
 +;;   derived from`log-edit-mode'.
 +;;
  ;; - check-headers ()
  ;;
  ;;   Return non-nil if the current buffer contains any version headers.
  ;;   makes it possible to provide menu entries for functionality that
  ;;   is specific to a backend and which does not map to any of the VC
  ;;   generic concepts.
 +;;
 +;; - conflicted-files (dir)
 +;;
 +;;   Return the list of files where conflict resolution is needed in
 +;;   the project that contains DIR.
 +;;   FIXME: what should it do with non-text conflicts?
  
  ;;; Todo:
  
  ;;   display the branch name in the mode-line. Replace
  ;;   vc-cvs-sticky-tag with that.
  ;;
 -;; - vc-create-tag and vc-retrieve-tag should update the
 -;;   buffers that might be visiting the affected files.
 -;;
  ;;;; Internal cleanups:
  ;;
  ;; - backends that care about vc-stay-local should try to take it into
@@@ -791,7 -767,7 +791,7 @@@ is sensitive to blank lines.
  (defcustom vc-checkout-carefully (= (user-uid) 0)
    "Non-nil means be extra-careful in checkout.
  Verify that the file really is not locked
 -and that its contents match what the master file says."
 +and that its contents match what the repository version says."
    :type 'boolean
    :group 'vc)
  (make-obsolete-variable 'vc-checkout-carefully
@@@ -913,16 -889,6 +913,16 @@@ Within directories, only files already 
      (nreverse flattened)))
  
  (defvar vc-dir-backend)
 +(defvar log-view-vc-backend)
 +(defvar diff-vc-backend)
 +
 +(defun vc-deduce-backend ()
 +  (cond ((derived-mode-p 'vc-dir-mode)   vc-dir-backend)
 +      ((derived-mode-p 'log-view-mode) log-view-vc-backend)
 +      ((derived-mode-p 'diff-mode)     diff-vc-backend)
 +      ((derived-mode-p 'dired-mode)
 +       (vc-responsible-backend default-directory))
 +      (vc-mode (vc-backend buffer-file-name))))
  
  (declare-function vc-dir-current-file "vc-dir" ())
  (declare-function vc-dir-deduce-fileset "vc-dir" (&optional state-model-only-files))
@@@ -1064,7 -1030,8 +1064,7 @@@ merge in the changes into your working 
           (state (nth 3 vc-fileset))
           ;; The backend should check that the checkout-model is consistent
           ;; among all the `files'.
 -       (model (nth 4 vc-fileset))
 -       revision)
 +       (model (nth 4 vc-fileset)))
  
      ;; Do the right thing
      (cond
        (cond
         (verbose
        ;; go to a different revision
 -      (setq revision (read-string "Branch, revision, or backend to move to: "))
 -      (let ((revision-downcase (downcase revision)))
 +      (let* ((revision
 +                (read-string "Branch, revision, or backend to move to: "))
 +               (revision-downcase (downcase revision)))
          (if (member
               revision-downcase
 -             (mapcar (lambda (arg) (downcase (symbol-name arg))) vc-handled-backends))
 +             (mapcar (lambda (arg) (downcase (symbol-name arg)))
 +                       vc-handled-backends))
              (let ((vsym (intern-soft revision-downcase)))
                (dolist (file files) (vc-transfer-file file vsym)))
            (dolist (file files)
            (message "No files remain to be committed")
          (if (not verbose)
              (vc-checkin ready-for-commit backend)
 -          (setq revision (read-string "New revision or backend: "))
 -          (let ((revision-downcase (downcase revision)))
 +          (let* ((revision (read-string "New revision or backend: "))
 +                   (revision-downcase (downcase revision)))
              (if (member
                   revision-downcase
                   (mapcar (lambda (arg) (downcase (symbol-name arg)))
@@@ -1376,7 -1341,7 +1376,7 @@@ Type \\[vc-next-action] to check in cha
  (defun vc-checkin (files backend &optional rev comment initial-contents)
    "Check in FILES.
  The optional argument REV may be a string specifying the new revision
 -level (if nil increment the current level).  COMMENT is a comment
 +level (strongly deprecated).  COMMENT is a comment
  string; if omitted, a buffer is popped up to accept a comment.  If
  INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents
  of the log entry buffer.
@@@ -1390,30 -1355,26 +1390,30 @@@ Runs the normal hooks `vc-before-checki
    (lexical-let
     ((backend backend))
     (vc-start-logentry
 -    files rev comment initial-contents
 +    files comment initial-contents
      "Enter a change comment."
      "*VC-log*"
 -    (lambda (files rev comment)
 -      (message "Checking in %s..." (vc-delistify files))
 -      ;; "This log message intentionally left almost blank".
 -      ;; RCS 5.7 gripes about white-space-only comments too.
 -      (or (and comment (string-match "[^\t\n ]" comment))
 -        (setq comment "*** empty log message ***"))
 -      (with-vc-properties
 -       files
 -       ;; We used to change buffers to get local value of vc-checkin-switches,
 -       ;; but 'the' local buffer is not a well-defined concept for filesets.
 -       (progn
 -       (vc-call-backend backend 'checkin files rev comment)
 -       (mapc 'vc-delete-automatic-version-backups files))
 -       `((vc-state . up-to-date)
 -       (vc-checkout-time . ,(nth 5 (file-attributes file)))
 -       (vc-working-revision . nil)))
 -      (message "Checking in %s...done" (vc-delistify files)))
 +    (lambda ()
 +      (vc-call-backend backend 'log-edit-mode))
 +    (lexical-let ((rev rev))
 +      (lambda (files comment)
 +        (message "Checking in %s..." (vc-delistify files))
 +        ;; "This log message intentionally left almost blank".
 +        ;; RCS 5.7 gripes about white-space-only comments too.
 +        (or (and comment (string-match "[^\t\n ]" comment))
 +            (setq comment "*** empty log message ***"))
 +        (with-vc-properties
 +            files
 +          ;; We used to change buffers to get local value of
 +          ;; vc-checkin-switches, but 'the' local buffer is
 +          ;; not a well-defined concept for filesets.
 +          (progn
 +            (vc-call-backend backend 'checkin files rev comment)
 +            (mapc 'vc-delete-automatic-version-backups files))
 +          `((vc-state . up-to-date)
 +            (vc-checkout-time . ,(nth 5 (file-attributes file)))
 +            (vc-working-revision . nil)))
 +        (message "Checking in %s...done" (vc-delistify files))))
      'vc-checkin-hook)))
  
  ;;; Additional entry points for examining version histories
  ;;          (vc-call-backend ',(vc-backend f)
  ;;                           'diff (list ',f) ',rev1 ',rev2))))))
  
+ (defvar vc-coding-system-inherit-eol t
+   "When non-nil, inherit the EOL format for reading Diff output from the file.
+ Used in `vc-coding-system-for-diff' to determine the EOL format to use
+ for reading Diff output for a file.  If non-nil, the EOL format is
+ inherited from the file itself.
+ Set this variable to nil if your Diff tool might use a different
+ EOL.  Then Emacs will auto-detect the EOL format in Diff output, which
+ gives better results.") ;; Cf. bug#4451.
  (defun vc-coding-system-for-diff (file)
    "Return the coding system for reading diff output for FILE."
    (or coding-system-for-read
        ;; use the buffer's coding system
        (let ((buf (find-buffer-visiting file)))
          (when buf (with-current-buffer buf
-                   buffer-file-coding-system)))
+                   (if vc-coding-system-inherit-eol
+                       buffer-file-coding-system
+                     ;; Don't inherit the EOL part of the coding-system,
+                     ;; because some Diff tools may choose to use
+                     ;; a different one.  bug#4451.
+                     (coding-system-base buffer-file-coding-system)))))
        ;; otherwise, try to find one based on the file name
        (car (find-operation-coding-system 'insert-file-contents file))
        ;; and a final fallback
@@@ -1538,7 -1514,7 +1553,7 @@@ returns t if the buffer had changes, ni
                    (not (string= (vc-working-revision file) "0")))
                (push file filtered)
              ;; This file is added but not yet committed;
 -            ;; there is no master file to diff against.
 +            ;; there is no repository version to diff against.
              (if (or rev1 rev2)
                  (error "No revisions of %s exist" file)
                ;; We regard this as "changed".
            (message "%s" (cdr messages))
            nil)
        (diff-mode)
 +      (set (make-local-variable 'diff-vc-backend) (car vc-fileset))
 +      (set (make-local-variable 'revert-buffer-function)
 +         `(lambda (ignore-auto noconfirm)
 +            (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
        ;; Make the *vc-diff* buffer read only, the diff-mode key
        ;; bindings are nicer for read only buffers. pcl-cvs does the
        ;; same thing.
@@@ -1667,20 -1639,18 +1682,20 @@@ saving the buffer.
        ;; that's not what we want here, we want the diff for the VC root dir.
        (call-interactively 'vc-version-diff)
      (when buffer-file-name (vc-buffer-sync not-urgent))
 -    (let ((backend
 -         (cond ((derived-mode-p 'vc-dir-mode)  vc-dir-backend)
 -               ((derived-mode-p 'dired-mode) (vc-responsible-backend default-directory))
 -               (vc-mode (vc-backend buffer-file-name))))
 +    (let ((backend (vc-deduce-backend))
          rootdir working-revision)
        (unless backend
        (error "Buffer is not version controlled"))
        (setq rootdir (vc-call-backend backend 'root default-directory))
        (setq working-revision (vc-working-revision rootdir))
 -      (vc-diff-internal
 -       t (list backend (list rootdir) working-revision) nil nil
 -       (called-interactively-p 'interactive)))))
 +      ;; VC diff for the root directory produces output that is
 +      ;; relative to it.  Bind default-directory to the root directory
 +      ;; here, this way the *vc-diff* buffer is setup correctly, so
 +      ;; relative file names work.
 +      (let ((default-directory rootdir))
 +      (vc-diff-internal
 +       t (list backend (list rootdir) working-revision) nil nil
 +       (called-interactively-p 'interactive))))))
  
  ;;;###autoload
  (defun vc-revision-other-window (rev)
@@@ -1784,19 -1754,17 +1799,19 @@@ The headers are reset to their non-expa
  
  (defun vc-modify-change-comment (files rev oldcomment)
    "Edit the comment associated with the given files and revision."
 -  (vc-start-logentry
 -   files rev oldcomment t
 -   "Enter a replacement change comment."
 -   "*VC-log*"
 -   (lambda (files rev comment)
 -     (vc-call-backend
 -      ;; Less of a kluge than it looks like; log-view mode only passes
 -      ;; this function a singleton list.  Arguments left in this form in
 -      ;; case the more general operation ever becomes meaningful.
 -      (vc-responsible-backend (car files))
 -      'modify-change-comment files rev comment))))
 +  ;; Less of a kluge than it looks like; log-view mode only passes
 +  ;; this function a singleton list.  Arguments left in this form in
 +  ;; case the more general operation ever becomes meaningful.
 +  (let ((backend (vc-responsible-backend (car files))))
 +    (vc-start-logentry
 +     files oldcomment t
 +     "Enter a replacement change comment."
 +     "*VC-log*"
 +     (lambda () (vc-call-backend backend 'log-edit-mode))
 +     (lexical-let ((rev rev))
 +       (lambda (files comment)
 +         (vc-call-backend backend
 +                          'modify-change-comment files rev comment))))))
  
  ;;;###autoload
  (defun vc-merge ()
@@@ -1857,31 -1825,6 +1872,31 @@@ See Info node `Merging'.
  ;;;###autoload
  (defalias 'vc-resolve-conflicts 'smerge-ediff)
  
 +;; TODO: This is OK but maybe we could integrate it better.
 +;; E.g. it could be run semi-automatically (via a prompt?) when saving a file
 +;; that was conflicted (i.e. upon mark-resolved).
 +;; FIXME: should we add an "other-window" version?  Or maybe we should
 +;; hook it inside find-file so it automatically works for
 +;; find-file-other-window as well.  E.g. find-file could use a new
 +;; `default-next-file' variable for its default file (M-n), and
 +;; we could then set it upon mark-resolve, so C-x C-s C-x C-f M-n would
 +;; automatically offer the next conflicted file.
 +(defun vc-find-conflicted-file ()
 +  "Visit the next conflicted file in the current project."
 +  (interactive)
 +  (let* ((backend (or (if buffer-file-name (vc-backend buffer-file-name))
 +                      (vc-responsible-backend default-directory)
 +                      (error "No VC backend")))
 +         (files (vc-call-backend backend
 +                                 'conflicted-files default-directory)))
 +    ;; Don't try and visit the current file.
 +    (if (equal (car files) buffer-file-name) (pop files))
 +    (if (null files)
 +        (message "No more conflicted files")
 +      (find-file (pop files))
 +      (message "%s more conflicted files after this one"
 +               (if files (length files) "No")))))
 +
  ;; Named-configuration entry points
  
  (defun vc-tag-precondition (dir)
@@@ -1907,22 -1850,13 +1922,22 @@@ the named configuration.  If the prefi
  given, the tag is made as a new branch and the files are
  checked out in that new branch."
    (interactive
 -   (list (read-file-name "Directory: " default-directory default-directory t)
 -         (read-string "New tag name: ")
 -       current-prefix-arg))
 +   (let ((granularity
 +        (vc-call-backend (vc-responsible-backend default-directory)
 +                         'revision-granularity)))
 +     (list
 +      (if (eq granularity 'repository)
 +        ;; For VC's that do not work at file level, it's pointless
 +        ;; to ask for a directory, branches are created at repository level.
 +        default-directory
 +      (read-file-name "Directory: " default-directory default-directory t))
 +      (read-string (if current-prefix-arg "New branch name: " "New tag name: "))
 +      current-prefix-arg)))
    (message "Making %s... " (if branchp "branch" "tag"))
    (when (file-directory-p dir) (setq dir (file-name-as-directory dir)))
    (vc-call-backend (vc-responsible-backend dir)
                   'create-tag dir name branchp)
 +  (vc-resynch-buffer dir t t t)
    (message "Making %s... done" (if branchp "branch" "tag")))
  
  ;;;###autoload
@@@ -1933,16 -1867,8 +1948,16 @@@ If locking is used for the files in DIR
  locked files at or below DIR (but if NAME is empty, locked files are
  allowed and simply skipped)."
    (interactive
 -   (list (read-file-name "Directory: " default-directory default-directory t)
 -         (read-string "Tag name to retrieve (default latest revisions): ")))
 +   (let ((granularity
 +        (vc-call-backend (vc-responsible-backend default-directory)
 +                         'revision-granularity)))
 +     (list
 +      (if (eq granularity 'repository)
 +        ;; For VC's that do not work at file level, it's pointless
 +        ;; to ask for a directory, branches are created at repository level.
 +        default-directory
 +      (read-file-name "Directory: " default-directory default-directory t))
 +      (read-string "Tag name to retrieve (default latest revisions): "))))
    (let ((update (yes-or-no-p "Update any affected buffers? "))
        (msg (if (or (not name) (string= name ""))
                 (format "Updating %s... " (abbreviate-file-name dir))
      (message "%s" msg)
      (vc-call-backend (vc-responsible-backend dir)
                     'retrieve-tag dir name update)
 +    (vc-resynch-buffer dir t t t)
      (message "%s" (concat msg "done"))))
  
 +
  ;; Miscellaneous other entry points
  
  ;; FIXME: this should be a defcustom
@@@ -1967,31 -1891,9 +1982,31 @@@ If it contains `directory' then if the 
  If it contains `file' then show short logs for files.
  Not all VC backends support short logs!")
  
 -(defvar log-view-vc-backend)
  (defvar log-view-vc-fileset)
  
 +(defun vc-print-log-setup-buttons (working-revision is-start-revision limit pl-return)
 +  (when (and limit (not (eq 'limit-unsupported pl-return))
 +           (not is-start-revision))
 +    (goto-char (point-max))
 +    (lexical-let ((working-revision working-revision)
 +                (limit limit))
 +      (widget-create 'push-button
 +                   :notify (lambda (&rest ignore)
 +                             (vc-print-log-internal
 +                              log-view-vc-backend log-view-vc-fileset
 +                              working-revision nil (* 2 limit)))
 +                   :help-echo "Show the log again, and double the number of log entries shown"
 +                   "Show 2X entries")
 +      (widget-insert "    ")
 +      (widget-create 'push-button
 +                   :notify (lambda (&rest ignore)
 +                             (vc-print-log-internal
 +                              log-view-vc-backend log-view-vc-fileset
 +                              working-revision nil nil))
 +                   :help-echo "Show the log again, showing all entries"
 +                   "Show unlimited entries"))
 +    (widget-setup)))
 +
  (defun vc-print-log-internal (backend files working-revision
                                        &optional is-start-revision limit)
    ;; Don't switch to the output buffer before running the command,
    ;; buffer can be accessed by the command.
    (let ((dir-present nil)
        (vc-short-log nil)
 +      (buffer-name "*vc-change-log*")
 +      type
        pl-return)
      (dolist (file files)
        (when (file-directory-p file)
          (not (null (if dir-present
                         (memq 'directory vc-log-short-style)
                       (memq 'file vc-log-short-style)))))
 -
 -    (setq pl-return (vc-call-backend
 -                   backend 'print-log files "*vc-change-log*"
 -                   vc-short-log (when is-start-revision working-revision) limit))
 -    (pop-to-buffer "*vc-change-log*")
 +    (setq type (if vc-short-log 'short 'long))
 +    (lexical-let
 +      ((working-revision working-revision)
 +       (limit limit)
 +       (shortlog vc-short-log)
 +       (is-start-revision is-start-revision))
 +      (vc-log-internal-common
 +       backend buffer-name files type
 +       (lambda (bk buf type-arg files-arg)
 +       (vc-call-backend bk 'print-log files-arg buf
 +                        shortlog (when is-start-revision working-revision) limit))
 +       (lambda (bk files-arg ret)
 +       (vc-print-log-setup-buttons working-revision
 +                                   is-start-revision limit ret))
 +       (lambda (bk)
 +       (vc-call-backend bk 'show-log-entry working-revision))))))
 +
 +(defvar vc-log-view-type nil
 +  "Set this to differentiate the different types of logs.")
 +(put 'vc-log-view-type 'permanent-local t)
 +
 +(defun vc-log-internal-common (backend
 +                             buffer-name
 +                             files
 +                             type
 +                             backend-func
 +                             setup-buttons-func
 +                             goto-location-func)
 +  (let (retval)
 +    (with-current-buffer (get-buffer-create buffer-name)
 +      (set (make-local-variable 'vc-log-view-type) type))
 +    (setq retval (funcall backend-func backend buffer-name type files))
 +    (pop-to-buffer buffer-name)
      (let ((inhibit-read-only t))
        ;; log-view-mode used to be called with inhibit-read-only bound
        ;; to t, so let's keep doing it, just in case.
 -      (vc-call-backend backend 'log-view-mode))
 -    (set (make-local-variable 'log-view-vc-backend) backend)
 -    (set (make-local-variable 'log-view-vc-fileset) files)
 -
 +      (vc-call-backend backend 'log-view-mode)
 +      (set (make-local-variable 'log-view-vc-backend) backend)
 +      (set (make-local-variable 'log-view-vc-fileset) files))
      (vc-exec-after
       `(let ((inhibit-read-only t))
 -      (when (and ,limit (not ,(eq 'limit-unsupported pl-return))
 -                 (not ,is-start-revision))
 -        (goto-char (point-max))
 -        (widget-create 'push-button
 -                       :notify (lambda (&rest ignore)
 -                                 (vc-print-log-internal
 -                                  ',backend ',files ',working-revision nil (* 2 ,limit)))
 -                       :help-echo "Show the log again, and double the number of log entries shown"
 -                       "Show 2X entries")
 -        (widget-insert "    ")
 -        (widget-create 'push-button
 -                       :notify (lambda (&rest ignore)
 -                                 (vc-print-log-internal
 -                                  ',backend ',files ',working-revision nil nil))
 -                       :help-echo "Show the log again, showing all entries"
 -                       "Show unlimited entries")
 -        (widget-setup))
 -
 +      (funcall ',setup-buttons-func ',backend ',files ',retval)
        (shrink-window-if-larger-than-buffer)
 -      ;; move point to the log entry for the working revision
 -      (vc-call-backend ',backend 'show-log-entry ',working-revision)
 +      (funcall ',goto-location-func ',backend)
        (setq vc-sentinel-movepoint (point))
        (set-buffer-modified-p nil)))))
  
 +(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
 +  (vc-log-internal-common
 +   backend buffer-name nil type
 +   (lexical-let
 +       ((remote-location remote-location))
 +     (lambda (bk buf type-arg files)
 +       (vc-call-backend bk type-arg buf remote-location)))
 +   (lambda (bk files-arg ret))
 +   (lambda (bk)
 +     (goto-char (point-min)))))
 +
  ;;;###autoload
  (defun vc-print-log (&optional working-revision limit)
    "List the change log of the current fileset in a window.
@@@ -2115,7 -1995,10 +2130,7 @@@ When called interactively with a prefi
         (list lim)))
      (t
       (list (when (> vc-log-show-limit 0) vc-log-show-limit)))))
 -  (let ((backend
 -       (cond ((derived-mode-p 'vc-dir-mode)  vc-dir-backend)
 -             ((derived-mode-p 'dired-mode) (vc-responsible-backend default-directory))
 -             (vc-mode (vc-backend buffer-file-name))))
 +  (let ((backend (vc-deduce-backend))
        rootdir working-revision)
      (unless backend
        (error "Buffer is not version controlled"))
      (setq working-revision (vc-working-revision rootdir))
      (vc-print-log-internal backend (list rootdir) working-revision nil limit)))
  
 +;;;###autoload
 +(defun vc-log-incoming (&optional remote-location)
 +  "Show a log of changes that will be received with a pull operation from REMOTE-LOCATION."
 +  (interactive "sRemote location (empty for default): ")
 +  (let ((backend (vc-deduce-backend))
 +      rootdir working-revision)
 +    (unless backend
 +      (error "Buffer is not version controlled"))
 +    (vc-incoming-outgoing-internal backend remote-location "*vc-incoming*" 'log-incoming)))
 +
 +;;;###autoload
 +(defun vc-log-outgoing (&optional remote-location)
 +  "Show a log of changes that will be sent with a push operation to REMOTE-LOCATION."
 +  (interactive "sRemote location (empty for default): ")
 +  (let ((backend (vc-deduce-backend))
 +      rootdir working-revision)
 +    (unless backend
 +      (error "Buffer is not version controlled"))
 +    (vc-incoming-outgoing-internal backend remote-location "*vc-outgoing*" 'log-outgoing)))
 +
  ;;;###autoload
  (defun vc-revert ()
    "Revert working copies of the selected fileset to their repository contents.
@@@ -2377,7 -2240,7 +2392,7 @@@ backend to NEW-BACKEND, and unregister 
                (if unmodified-file
                    (copy-file unmodified-file file
                               'ok-if-already-exists 'keep-date)
 -                (when (y-or-n-p "Get base revision from master? ")
 +                (when (y-or-n-p "Get base revision from repository? ")
                    (vc-revert-file file))))
              (vc-call-backend new-backend 'receive-file file rev))
          (when modified-file
  
  ;;;###autoload
  (defun vc-rename-file (old new)
 -  "Rename file OLD to NEW, and rename its master file likewise."
 +  "Rename file OLD to NEW in both work area and repository."
    (interactive "fVC rename file: \nFRename to: ")
    ;; in CL I would have said (setq new (merge-pathnames new old))
    (let ((old-base (file-name-nondirectory old)))
@@@ -2588,10 -2451,6 +2603,10 @@@ to provide the `find-revision' operatio
  
  (defalias 'vc-default-check-headers 'ignore)
  
 +(declare-function log-edit-mode "log-edit" ())
 +
 +(defun vc-default-log-edit-mode (backend) (log-edit-mode))
 +
  (defun vc-default-log-view-mode (backend) (log-view-mode))
  
  (defun vc-default-show-log-entry (backend rev)
diff --combined src/ChangeLog
+ 2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
+       * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*.
+       * xterm.c (handle_one_xevent): Pass event to x_menubar_window_to_frame.
+       * xmenu.c (x_activate_menubar): Revert previous fix for Bug#6499,
+       i.e. don't put back ButtonRelease (Bug#6608).
+       * xfns.c (x_menubar_window_to_frame): Take XEvent as second parameter
+       instead of Window.  Call xg_event_is_for_menubar when
+       USE_GTK (Bug#6499).
+       * gtkutil.h (xg_event_is_for_menubar): Declare.
+       * gtkutil.c (xg_event_is_for_menubar): New function (Bug#6499).
+ 2010-07-14  Eli Zaretskii  <eliz@gnu.org>
+       * w32fns.c (x_set_foreground_color): Fix setting the cursor color
+       when it's the same as the old foreground.  (Bug#6609)
 +2010-07-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (free_frame_menubar): Only call x_set_window_size if
 +      widget is non-null (Bug#6645).
 +
 +2010-07-15  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xterm.c (x_fully_uncatch_errors, x_trace_wire, x_check_font):
 +      Convert old-style definition.
 +
 +      * xmenu.c (create_and_show_popup_menu, xmenu_show): Fix type of
 +      timestamp argument.
 +
 +2010-07-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.c (update_window_fringes): Restore mistakenly reverted
 +      code from 2010-04-17T12:33:05Z!eliz@gnu.org merged in 2010-04-20T13:31:28Z!eliz@gnu.org.
 +
 +2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (xm_scroll_callback, x_process_timeouts): K&R => prototype.
 +      (SET_SAVED_KEY_EVENT): Remove (not used).
 +      (SET_SAVED_MENU_EVENT): Rename to SET_SAVED_BUTTON_EVENT and
 +      remove size parameter.
 +      (handle_one_xevent): Check popup_activated () for menu for Xt also.
 +      Remove #ifdef USE_GTK around finish = X_EVENT_DROP.
 +      Remove #ifdef USE_MOTIF code that did SET_SAVED_BUTTON_EVENT for
 +      ButtonRelease.
 +      (x_set_window_size_1): scroll_bar_actual_width is always
 +      SCROLL_BAR_COLS * COLUMN_WIDTH for the purpose of frame sizing.
 +
 +      * xdisp.c (pending_menu_activation): Remove extern declaration.
 +      (prepare_menu_bars): Remove setting of pending_menu_activation.
 +
 +      * xmenu.c (pending_menu_activation): Remove.
 +      (x_activate_menubar): Set popup_activated_flag for Xt also. Remove
 +      setting of pending_menu_activation.
 +      (set_frame_menubar): Remove check of pending_menu_activation.
 +      Declare menubar_size before code.  Correct spelling in comment.
 +
 +2010-07-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (font_open_entity): Cancel previous change.
 +      (Ffont_get): Don't check FONT_ENTITY_INDEX of a font-object.
 +
 +2010-07-13  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Remove subprocesses #ifdefs.
 +      * process.c <inhibit_sentinels>: Move to the common part.
 +      (Fwaiting_for_user_input_p): Move to the common part; return nil
 +      if async subprocesses aren't supported.
 +      * sysdep.c (wait_for_termination) [!MSDOS]: Don't compile on
 +      MS-DOS.  Remove "#ifdef subprocesses".
 +      (sys_subshell, sys_select): Remove "#ifdef subprocesses".
 +      (gettimeofday): Remove "#ifdef subprocesses".
 +      (wait_without_blocking): Remove function.
 +      (flush_pending_output, child_setup_tty): Don't compile on MS-DOS.
 +      Remove "#ifdef subprocesses".
 +      (child_setup_tty): Use WINDOWSNT instead of DOS_NT, since not
 +      compiled on MS-DOS.
 +      * callproc.c (Fcall_process) [!MSDOS]: Don't call
 +      wait_for_termination on MS-DOS.
 +      * emacs.c (shut_down_emacs): Remove "#ifndef subprocesses" from
 +      initialization of inhibit_sentinels.
 +      * keyboard.c (record_asynch_buffer_change): Remove "#ifdef
 +      subprocesses" conditional.
 +      * callproc.c (Fcall_process) [!subprocesses]: Don't call
 +      wait_for_termination, since `buffer' cannot be an integer when
 +      async subprocesses are not supported
 +      * xdisp.c (decode_mode_spec): Use `MSDOS' instead of `subprocesses'
 +      for ifdefing away the call to Fprocess_status.
 +
 +      * process.c (add_keyboard_wait_descriptor) [!subprocesses]: Ifdef
 +      away the entire body of the function.
 +
 +2010-07-13  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove subprocesses #ifdefs from term.c.
 +      * process.c (add_keyboard_wait_descriptor)
 +      (delete_keyboard_wait_descriptor): Move to common section, do
 +      nothing when subprocesses is not defined.
 +      * term.c (Fsuspend_tty, Fresume_tty, init_tty): Remove subprocesses #ifdefs.
 +
 +      Convert maybe_fatal to standard C.
 +      * lisp.h (verror): Declare.
 +      * eval.c (verror): New function containing the code from ...
 +      (error): ... this.  Call verror.
 +      * term.c (vfatal): New function containing the code from ...
 +      (fatal): ... this.  Call vfatal.
 +      (maybe_fatal): Convert to standard C, use variable number of
 +      arguments.  Declare as non-return.
 +      (init_tty): Fix maybe_fatal call.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xterm.c (x_scroll_bar_set_handle, x_scroll_bar_expose)
 +      (_scroll_bar_note_movement): Convert definitions to standard C.
 +      * xmenu.c (menu_help_callback, pop_down_menu, xmenu_show):
 +      * xfns.c (hack_wm_protocols, x_window, x_window): Likewise.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xterm.c (x_frame_of_widget, x_alloc_nearest_color_for_widget)
 +      (x_alloc_lighter_color_for_widget, cvt_string_to_pixel)
 +      (cvt_pixel_dtor, x_window_to_menu_bar, xt_action_hook)
 +      (xaw_jump_callback, xaw_scroll_callback)
 +      (x_create_toolkit_scroll_bar, x_set_toolkit_scroll_bar_thumb)
 +      (x_wm_set_size_hint, x_activate_timeout_atimer): Convert
 +      definitions to standard C.
 +      * xmenu.c (menubar_id_to_frame, popup_get_selection)
 +      (popup_activate_callback, popup_deactivate_callback)
 +      (menu_highlight_callback, menubar_selection_callback)
 +      (apply_systemfont_to_dialog, apply_systemfont_to_menu)
 +      (free_frame_menubar, popup_selection_callback, as)
 +      (create_and_show_popup_menu, dialog_selection_callback)
 +      (create_and_show_dialog):
 +      * xfns.c (hack_wm_protocols, x_window):
 +      * xfaces.c (x_update_menu_appearance):
 +      * widget.c (get_default_char_pixel_size, pixel_to_char_size)
 +      (char_to_pixel_size, round_size_to_char, get_wm_shell)
 +      (set_frame_size, update_wm_hints, setup_frame_gcs)
 +      (update_various_frame_slots, update_from_various_frame_slots)
 +      (EmacsFrameInitialize, EmacsFrameRealize, EmacsFrameResize)
 +      (EmacsFrameSetValues, EmacsFrameQueryGeometry)
 +      (EmacsFrameSetCharSize, widget_store_internal_border): Likewise.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * dbusbind.c (xd_initialize): Don't compare boolean with a
 +      constant.
 +
 +2010-07-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (setup_process_coding_systems): Move to the part
 +      shared by non-subprocesses systems, and make its body empty when
 +      subprocesses is not defined.
 +      (close_process_descs): Move to the part shared by non-subprocesses
 +      systems.
 +      (wait_reading_process_output) [!subprocesses]: Convert arg list to
 +      ANSI C.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * editfns.c (transpose_markers): Convert old-style definition.
 +      * emacs.c (abort, shut_down_emacs, fixup_locale)
 +      (synchronize_system_time_locale)
 +      (synchronize_system_messages_locale, syms_of_emacs): Likewise.
 +      * floatfns.c (extract_float, matherr, init_floatfns)
 +      (syms_of_floatfns): Likewise.
 +      * fns.c (make_hash_table): Likewise.
 +      * ftfont.c (ftfont_get_otf, ftfont_otf_features)
 +      (ftfont_otf_capability, ftfont_get_glyph_id, ftfont_get_metrics)
 +      (ftfont_drive_otf, ftfont_shape_by_flt, ftfont_shape)
 +      (ftfont_variation_glyphs): Likewise.
 +      * gtkutil.c (xg_create_widget, xg_modify_menubar_widgets): Likewise.
 +      * keymap.c (describe_map_tree, describe_map, describe_vector): Likewise.
 +      * lread.c (read_filtered_event): Likewise.
 +      * minibuf.c (read_minibuf_noninteractive, read_minibuf): Likewise.
 +      * process.c (wait_reading_process_output): Likewise.
 +      * scroll.c (do_line_insertion_deletion_costs): Likewise.
 +      * search.c (search_buffer, boyer_moore): Likewise.
 +      * syntax.c (scan_sexps_forward): Likewise.
 +      * xdisp.c (try_scrolling): Likewise.
 +      * xfaces.c (face_at_buffer_position, face_for_overlay_string)
 +      (face_at_string_position): Likewise.
 +      * xfns.c (x_default_scroll_bar_color_parameter): Likewise.
 +      * xselect.c (x_get_window_property, receive_incremental_selection)
 +      (x_get_window_property_as_lisp_data, lisp_data_to_selection_data):
 +      Likewise.
 +      * xterm.c (x_draw_relief_rect, x_draw_box_rect): Likewise.
 +
 +2010-07-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * callproc.c (child_setup): Remove subprocesses conditional.
 +      Remove code dealing with SET_EMACS_PRIORITY, unused.
 +
 +      * buffer.c (Fset_buffer_multibyte): Remove subprocesses conditional.
 +      * process.c (close_process_descs): Use DOS_NT instead of WINDOWSNT.
 +
 +      * emacs.c (__do_global_ctors, __do_global_ctors_aux)
 +      (__do_global_dtors, __main): Use void in definition.
 +      (main): Remove code dealing with SET_EMACS_PRIORITY, unused.
 +      Remove SYMS_MACHINE code, unused.  Remove SYMS_SYSTEM, inline
 +      the only users from ...
 +      * s/ms-w32.h (SYMS_SYSTEM): ... here and ...
 +      * s/msdos.h (SYMS_SYSTEM): ... here.  Remove.
 +      (HAVE_VOLATILE): Remove, unused.
 +
 +      Convert more function definitions to standard C.
 +      * xdisp.c (window_box_edges, handle_single_display_spec)
 +      (display_string): Convert definition to standard C.
 +      * scroll.c (do_direct_scrolling, scrolling_1):
 +      * dispnew.c (allocate_matrices_for_frame_redisplay)
 +      (mirrored_line_dance):
 +      * coding.c (code_convert_string):
 +      * charset.c (map_charset_chars):
 +      * ccl.c (Fccl_program_p, Fccl_execute, Fccl_execute_on_string)
 +      (Fregister_ccl_program, Fregister_code_conversion_map):
 +      * keyboard.c (kbd_buffer_nr_stored): Likewise.
 +      (head_table): Make static and const.
 +
 +2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS)
 +      (PROFILING_LDFLAGS): Set from substitution.
 +      (ALL_CFLAGS): Add C_WARNINGS_SWITCH and PROFILING_CFLAGS, put
 +      CFLAGS last.
 +
 +2010-07-12  Kenichi Handa  <handa@m17n.org>
 +
 +      * Makefile.in (lisp): Change hebrew.el to hebrew.elc.
 +      (shortlisp): Likewise.
 +
 +      * font.h (enum font_property_index): New member FONT_ENTITY_INDEX.
 +
 +      * font.c (font_open_entity): Record ENTITY in FONT_OBJECT's slot
 +      of FONT_ENTITY_INDEX.
 +      (Ffont_get): If KEY is :otf and the font-object doesn't have the
 +      property, get the property value dynamically.
 +      (Ffont_put): Accept font-entity and font-object too.
 +      (Ffont_get_glyhphs): Renamed from Fget_font_glyphs.  Arguments and
 +      return value changed.
 +      (syms_of_font): Adjusted for the above change.
 +
 +2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * blockinput.h: Remove obsolete comment.
 +
 +      * lisp.h: Include <stddef.h>.
 +      (OFFSETOF): Don't define.
 +      (VECSIZE): Use offsetof instead of OFFSETOF.
 +      (PSEUDOVECSIZE): Likewise.
 +      * process.c (conv_sockaddr_to_lisp): Likewise.
 +      * alloc.c: Don't include <stddef.h>.
 +      * buffer.h (PER_BUFFER_VAR_OFFSET): Use offsetof.
 +
 +      * process.c: Remove obsolete comment.
 +
 +2010-07-11  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfaces.c (Vface_remapping_alist): Doc fix (Bug#6091).
 +
 +2010-07-11  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * callint.c (Fcall_interactively): Use strchr, strrchr instead of
 +      index, rindex.
 +      * doc.c (get_doc_string, Fsnarf_documentation): Likewise.
 +      * editfns.c (Fuser_full_name, Fformat): Likewise.
 +      * emacs.c (argmatch, sort_args, decode_env_path): Likewise.
 +      * fileio.c (Ffile_symlink_p): Likewise.
 +      * filelock.c (current_lock_owner): Likewise.
 +      * font.c (font_parse_name, font_parse_family_registry): Likewise.
 +      * fontset.c (fontset_pattern_regexp): Likewise.
 +      * lread.c (read1): Likewise.
 +      * sysdep.c (init_system_name): Likewise.
 +      * xfns.c (select_visual): Likewise.
 +      * s/hpux10-20.h (index, rindex): Don't define.
 +      * s/ms-w32.h (index): Likewise.
 +      * s/usg5-4.h: Likewise.
 +
 +      * callproc.c (relocate_fd): Use F_DUPFD if defined.
 +
 +      * alloc.c (pending_malloc_warning, malloc_warning): Add const.
 +      * callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
 +      (egetenv): Likewise.
 +      * doprnt.c (doprnt): Likewise.
 +      * editfns.c (set_time_zone_rule, format2): Likewise.
 +      * emacs.c (decode_env_path): Likewise.
 +      * eval.c (signal_error, error): Likewise.
 +      * insdel.c (replace_range_2): Likewise.
 +      * keyboard.c (cmd_error_internal): Likewise.
 +      * lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
 +      * print.c (write_string, write_string_1, print_error_message):
 +      Likewise.
 +      * vm-limit.c (warn_function, memory_warnings): Likewise.
 +      * xdisp.c (message1, message1_nolog, message_with_string)
 +      (vmessage, message, message_nolog): Likewise.
 +      * emacs.c: Remove duplicate declaration.
 +      * keyboard.h: Likewise.
 +      * lisp.h: Update prototypes.
 +
 +      * eval.c: Fix indentation problem.
 +
 +      * keyboard.c: Include "process.h"
 +
 +      * eval.c: Remove obsolete noinline declaration.
 +      * fns.c: Likewise.
 +
 +2010-07-11  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * doprnt.c (doprnt): Take a va_list argument instead of count and
 +      pointer.
 +      * eval.c (error): Change to a standard-C variadic function.
 +      * xdisp.c (vmessage): Renamed from message, made static, and
 +      changed to take a va_list argument.
 +      (message): New variadic wrapper.
 +      (message_nolog): Now a variadic function, calling vmessage.
 +      * lisp.h: Include stdarg.h for va_list.
 +      (doprnt, error, message, message_nolog): Decls updated.
 +
 +2010-07-11  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (syms_of_process) <delete-exited-processes>: Define
 +      even if !subprocesses.
 +      (delete_exited_processes): Ditto.
 +
 +      * msdos.c (syms_of_msdos) <delete-exited-processes>: Remove DEFVAR.
 +      (delete_exited_processes): Don't define.
 +
  2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
  
 -      * xfaces.c (realize_face): Garbage the frame if a face is removed
 -      (Bug#6593).
 +      * frame.c (make_frame): Initialize menu_bar_lines and
 +      tool_bar_lines members.
 +      (make_initial_frame, make_terminal_frame): Initialize
 +      menu_bar_lines using value of menu-bar-mode.
  
 -2010-07-05  Andreas Schwab  <schwab@linux-m68k.org>
 +      * msdos.c (IT_set_frame_parameters): Don't set menu-bar-lines.
  
 -      * keyboard.c: Remove duplicate <setjmp.h>.
 -      (read_key_sequence): Remove volatile qualifiers.
 +2010-07-10  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-07-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +      * process.c: Reshuffle #include's.  Condition some of the global
 +      and static variables on `subprocesses'.
 +      (hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p):
 +      Leave only one implementation.
 +      (Fget_buffer_process, Fprocess_inherit_coding_system_flag)
 +      (kill_buffer_processes, Flist_system_processes)
 +      (Fprocess_attributes, init_process, syms_of_process): Unify the
 +      implementations for with subprocesses and without them.
  
 -      * dispextern.h (FRINGE_HEIGHT_BITS): New define.
 -      (struct glyph_row): New members left_fringe_offset and
 -      right_fringe_offset.
 +2010-07-09  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (set_frame_menubar): Must realize menubar_widget to get the
 +      correct size for Motif.
 +      (free_frame_menubar): Call x_set_window_size to update frame size.
 +
 +      * xfns.c (x_window): Set borderWidth to 0 for pane and
 +      EmacsFrame.  Frame size calculation is wrong otherwise.
 +
 +2010-07-09  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * dbusbind.c (xd_initialize): Add new argument RAISE_ERROR, which
 +      allows to suppress errors when polling in Emacs' main loop.
 +      (Fdbus_init_bus, Fdbus_get_unique_name, Fdbus_call_method)
 +      (Fdbus_call_method_asynchronously, Fdbus_method_return_internal)
 +      (Fdbus_method_error_internal, Fdbus_send_signal)
 +      (xd_get_dispatch_status, xd_read_message, Fdbus_register_signal)
 +      (Fdbus_register_method): Use it.  (Bug#6579)
 +
 +2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * alloc.c: Convert DEFUNs to standard C.
 +      * buffer.c:
 +      * bytecode.c:
 +      * callint.c:
 +      * callproc.c:
 +      * casefiddle.c:
 +      * casetab.c:
 +      * category.c:
 +      * character.c:
 +      * charset.c:
 +      * chartab.c:
 +      * cmds.c:
 +      * coding.c:
 +      * composite.c:
 +      * data.c:
 +      * dbusbind.c:
 +      * dired.c:
 +      * dispnew.c:
 +      * doc.c:
 +      * dosfns.c:
 +      * editfns.c:
 +      * emacs.c:
 +      * eval.c:
 +      * fileio.c:
 +      * filelock.c:
 +      * floatfns.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * fringe.c:
 +      * image.c:
 +      * indent.c:
 +      * insdel.c:
 +      * keyboard.c:
 +      * keymap.c:
 +      * lread.c:
 +      * macros.c:
 +      * marker.c:
 +      * menu.c:
 +      * minibuf.c:
 +      * msdos.c:
 +      * nsfns.m:
 +      * nsmenu.m:
 +      * nsselect.m:
 +      * print.c:
 +      * process.c:
 +      * search.c:
 +      * sound.c:
 +      * syntax.c:
 +      * term.c:
 +      * terminal.c:
 +      * textprop.c:
 +      * undo.c:
 +      * w16select.c:
 +      * w32console.c:
 +      * w32fns.c:
 +      * w32font.c:
 +      * w32menu.c:
 +      * w32proc.c:
 +      * w32select.c:
 +      * window.c:
 +      * xdisp.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xmenu.c:
 +      * xselect.c:
 +      * xsettings.c:
 +      * xsmfns.c: Likewise.
 +
 +
 +2010-07-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * process.c (kbd_is_on_hold, hold_keyboard_input)
 +      (unhold_keyboard_input, kbd_on_hold_p) [!subprocesses]: Define.
 +
 +2010-07-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
 +      (create_and_show_dialog): Don't call apply_systemfont_to_(menu|dialog)
 +      unless USE_LUCID.
 +
 +2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xdisp.c (store_mode_line_noprop_char): Remove K&R alternative declaration.
 +
 +      Clean up include guards.
 +      * tparam.c: Remove include guards for config.h, string.h and code
 +      that assumes #ifndef emacs.
 +      * termcap.c:
 +      * unexalpha.c:
 +      * sysdep.c:
 +      * filemode.c:
 +      * filelock.c:
 +      * bidi.c: Likewise.
 +
 +      Remove prefix-args.c
 +      * prefix-args.c: Remove file.
 +      * autodeps.mk (ALLOBJS): Remove reference to prefix-args.
 +      * Makefile.in (temacs${EXEEXT}): Remove references to
 +      PRE_EDIT_LDFLAGS and POST_EDIT_LDFLAGS.
 +      (mostlyclean): Remove reference to prefix-args.
 +      (prefix-args): Remove.
 +
 +      Simplify cstart_of_data, start_of_code and related code.
 +      * mem-limits.h: Remove !emacs and _LIBC conditional code.
 +      (start_of_data): Merge into start_of_data function.
 +      * sysdep.c (start_of_text): Remove.  Move simplified versions of
 +      it in the only users: unexaix.c and unexec.c.
 +      (read_input_waiting): Remove local declaration of quit_char.
 +      (start, etext): Remove declarations.
 +      (start_of_data): Merge with the version in mem-limits.h and move
 +      to vm-limits.c.
 +      * vm-limit.c (start_of_data): Merged and simplified version of the
 +      code formerly in mem-limits.h and sysdep.c.
 +      * unexec.c (start): New declaration, moved from sysdep.c.
 +      (start_of_text): Simplified version of the code formerly in sysdep.c.
 +      * unexaix.c (start_of_text): Simplified version of the code
 +      formerly in sysdep.c.
 +      * m/alpha.h (HAVE_TEXT_START): Remove.
 +      (TEXT_START): Move ...
 +      * unexalpha.c (TEXT_START): ... here.
 +      * s/hpux10-20.h (TEXT_START): Remove.
 +      * s/darwin.h (TEXT_START):
 +      * m/mips.h (TEXT_START):
 +      * m/macppc.h (HAVE_TEXT_START):
 +      * m/m68k.h (TEXT_START):
 +      * m/iris4d.h (TEXT_START):
 +      * m/intel386.h (TEXT_START):
 +      * m/ibmrs6000.h (TEXT_START):
 +      * m/ia64.h (HAVE_TEXT_START):
 +      * s/msdos.h (TEXT_START): Likewise.
 +
 +2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * alloc.c (overrun_check_malloc, overrun_check_realloc)
 +      (overrun_check_free, xstrdup, allocate_string)
 +      (allocate_string_data, compact_small_strings, Fmake_string)
 +      (make_unibyte_string, make_multibyte_string)
 +      (make_string_from_bytes, make_specified_string, make_float)
 +      (Fcons, allocate_terminal, allocate_frame, make_pure_string)
 +      (Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
 +      memcpy, memmove, memset, memcmp.
 +      * atimer.c (start_atimer, set_alarm): Likewise.
 +      * buffer.c (clone_per_buffer_values, report_overlay_modification)
 +      (mmap_realloc, init_buffer_once): Likewise.
 +      * callint.c (Fcall_interactively): Likewise.
 +      * callproc.c (Fcall_process, Fcall_process_region, child_setup)
 +      (getenv_internal_1): Likewise.
 +      * casefiddle.c (casify_object): Likewise.
 +      * ccl.c (ccl_driver): Likewise.
 +      * character.c (str_as_multibyte, str_to_multibyte): Likewise.
 +      * charset.c (load_charset_map_from_file)
 +      (load_charset_map_from_file, load_charset_map_from_vector)
 +      (Fdefine_charset_internal): Likewise.
 +      * cm.c (Wcm_clear): Likewise.
 +      * coding.c (decode_eol, decode_coding_object)
 +      (Fset_coding_system_priority, make_subsidiaries): Likewise.
 +      * data.c (Faset): Likewise.
 +      * dired.c (directory_files_internal, file_name_completion_stat):
 +      Likewise.
 +      * dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
 +      (clear_glyph_row, copy_row_except_pointers)
 +      (copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
 +      (save_current_matrix, restore_current_matrix)
 +      (build_frame_matrix_from_leaf_window, mirrored_line_dance)
 +      (mirror_line_dance, scrolling_window): Likewise.
 +      * doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
 +      Likewise.
 +      * doprnt.c (doprnt): Likewise.
 +      * editfns.c (Fuser_full_name, make_buffer_string_both)
 +      (Fmessage_box, Fformat, Ftranspose_regions): Likewise.
 +      * emacs.c (sort_args): Likewise.
 +      * eval.c (Fapply, Ffuncall): Likewise.
 +      * fileio.c (Ffile_name_directory, make_temp_name)
 +      (Fexpand_file_name, search_embedded_absfilename)
 +      (Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
 +      (auto_save_error): Likewise.
 +      * fns.c (Fstring_equal, Fcopy_sequence, concat)
 +      (string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
 +      (internal_equal, Fclear_string, larger_vector, copy_hash_table)
 +      (Fmake_hash_table): Likewise.
 +      * fringe.c (Fdefine_fringe_bitmap): Likewise.
 +      * ftfont.c (ftfont_text_extents): Likewise.
 +      * getloadavg.c (getloadavg): Likewise.
 +      * image.c (define_image_type, make_image, make_image_cache)
 +      (x_create_x_image_and_pixmap, xbm_image_p)
 +      (w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
 +      (xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
 +      (init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
 +      (png_image_p, png_read_from_memory, png_load, jpeg_image_p)
 +      (tiff_image_p, tiff_read_from_memory, gif_image_p)
 +      (gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
 +      Likewise.
 +      * indent.c (scan_for_column, compute_motion): Likewise.
 +      * insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
 +      (insert_1_both, insert_from_gap, replace_range_2): Likewise.
 +      * intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
 +      * keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
 +      (kbd_buffer_store_event_hold, apply_modifiers_uncached)
 +      (store_user_signal_events, menu_bar_items, tool_bar_items)
 +      (process_tool_bar_item, append_tool_bar_item)
 +      (read_char_minibuf_menu_prompt, read_key_sequence)
 +      (Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
 +      Likewise.
 +      * keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
 +      Likewise.
 +      * lisp.h (STRING_COPYIN): Likewise.
 +      * lread.c (Fload, read1, oblookup): Likewise.
 +      * msdos.c (Frecent_doskeys): Likewise.
 +      * nsfns.m (Fx_create_frame): Likewise.
 +      * nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
 +      Likewise.
 +      * nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
 +      (EmacsImage-initForXPMWithDepth:width:height:flip:length:):
 +      Likewise.
 +      * nsmenu.m (ns_update_menubar): Likewise.
 +      * nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
 +      * print.c (print_unwind, printchar, strout, print_string)
 +      (print_error_message): Likewise.
 +      * process.c (conv_lisp_to_sockaddr, set_socket_option)
 +      (Fmake_network_process, Fnetwork_interface_list)
 +      (Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
 +      (init_process): Likewise.
 +      * ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
 +      * regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
 +      Likewise.
 +      * scroll.c (do_scrolling, do_direct_scrolling)
 +      (scrolling_max_lines_saved): Likewise.
 +      * search.c (search_buffer, wordify, Freplace_match): Likewise.
 +      * sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
 +      * syntax.c (skip_chars, skip_syntaxes): Likewise.
 +      * sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
 +      (emacs_set_tty): Likewise.
 +      * term.c (encode_terminal_code, calculate_costs)
 +      (produce_special_glyphs, create_tty_output, init_tty, delete_tty):
 +      Likewise.
 +      * termcap.c (tgetst1, gobble_line): Likewise.
 +      * termhooks.h (EVENT_INIT): Likewise.
 +      * tparam.c (tparam1): Likewise.
 +      * unexalpha.c (unexec): Likewise.
 +      * unexec.c (write_segment): Likewise.
 +      * unexmacosx.c (unexec_write_zero): Likewise.
 +      * w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
 +      (Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
 +      * w32font.c (w32font_list_family, w32font_text_extents)
 +      (w32font_list_internal, w32font_match_internal)
 +      (w32font_open_internal, compute_metrics, Fx_select_font):
 +      Likewise.
 +      * w32menu.c (set_frame_menubar, add_menu_item)
 +      (w32_menu_display_help, w32_free_submenu_strings): Likewise.
 +      * w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
 +      * w32uniscribe.c (uniscribe_list_family): Likewise.
 +      * w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
 +      * window.c (make_window, replace_window, set_window_buffer)
 +      (Fsplit_window): Likewise.
 +      * xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
 +      (add_to_log, message3, x_consider_frame_title)
 +      (append_space_for_newline, extend_face_to_end_of_line)
 +      (decode_mode_spec_coding, init_glyph_string): Likewise.
 +      * xfaces.c (x_create_gc, get_lface_attributes_no_remap)
 +      (Finternal_copy_lisp_face, Finternal_merge_in_global_face)
 +      (face_attr_equal_p, make_realized_face, make_face_cache)
 +      (free_realized_faces, lookup_named_face, smaller_face)
 +      (face_with_height, lookup_derived_face)
 +      (x_supports_face_attributes_p, Finternal_set_font_selection_order)
 +      (Finternal_set_font_selection_order, realize_default_face)
 +      (compute_char_face, face_at_buffer_position)
 +      (face_for_overlay_string, face_at_string_position, merge_faces):
 +      Likewise.
 +      * xfns.c (xic_create_fontsetname, Fx_create_frame)
 +      (Fx_window_property, x_create_tip_frame)
 +      (Fx_backspace_delete_keys_p): Likewise.
 +      * xfont.c (xfont_list, xfont_match, xfont_list_family)
 +      (xfont_text_extents): Likewise.
 +      * xmenu.c (set_frame_menubar, xmenu_show): Likewise.
 +      * xrdb.c (magic_file_p, x_get_resource): Likewise.
 +      * xselect.c (x_queue_event, x_get_window_property)
 +      (receive_incremental_selection): Likewise.
 +      * xsmfns.c (x_session_check_input): Likewise.
 +      * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
 +      (handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
 +      Likewise.
 +      * character.h (BCOPY_SHORT): Removed.
 +      * config.in: Regenerate.
 +      * dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
 +      * emacs.c (main) [PROFILING]: Don't declare
 +      dump_opcode_frequencies.
 +      * lisp.h (safe_bcopy): Remove declaration.
 +      (memset) [!HAVE_MEMSET]: Declare.
 +      (memcpy) [!HAVE_MEMCPY]: Likewise.
 +      (memmove) [!HAVE_MEMMOVE]: Likewise.
 +      (memcmp) [!HAVE_MEMCMP]: Likewise.
 +      * s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
 +      (BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
 +      Don't define.
 +      (HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
 +      * s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
 +      (BCOPY_DOWNWARD_SAFE): Don't define.
 +      * sysdep.c (memset) [!HAVE_MEMSET]: Define.
 +      (memcpy) [!HAVE_MEMCPY]: Define.
 +      (memmove) [!HAVE_MEMMOVE]: Define.
 +      (memcmp) [!HAVE_MEMCMP]: Define.
 +
 +2010-07-07  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * process.c (kbd_is_on_hold): New variable.
 +      (hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p): New
 +      functions.
 +      (wait_reading_process_output): If kbd_on_hold_p returns non-zero,
 +      select on empty input mask.
 +      (init_process): Initialize kbd_is_on_hold to 0.
 +
 +      * process.h (hold_keyboard_input, unhold_keyboard_input)
 +      (kbd_on_hold_p): Declare.
 +
 +      * keyboard.c (input_available_signal): Declare.
 +      (kbd_buffer_nr_stored): New function.
 +      (kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns
 +      more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571).
 +      (kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored
 +      returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571).
 +      (tty_read_avail_input): If input is on hold, return.
 +      Don't read more that free slots in kbd_buffer (Bug#6571).
 +
 +2010-07-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * msdos.h:
 +      * msdos.c:
 +      * dosfns.c:
 +      * w16select.c: Convert function definitions to ANSI C.
 +
 +      * msdos.h (ctrl_break_func, install_ctrl_break_check): Remove
 +      unused prototypes.
 +
 +2010-07-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * coding.c, sysdep.c: Convert some more functions to standard C.
 +
 +2010-07-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * coding.c (decode_coding_gap, encode_coding_gap, decode_coding_object)
 +      (encode_coding_object): Use SPECPDL_INDEX.
 +      (syms_of_coding): Use DOS_NT.
 +
 +2010-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * intervals.h (interval): Use EMACS_UINT instead of unsigned EMACS_INT.
 +
 +      Make the function member of Lisp_Subr use standard C prototypes.
 +      * lisp.h (struct Lisp_Subr): Use a union for the function member.
 +      (DECL_ALIGN): Add a cast for the function.
 +      * eval.c (Feval, Ffuncall): Use the proper type for each type
 +      function call.
 +
 +2010-07-06  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * fringe.c (draw_fringe_bitmap_1): Use lookup_named_face to get
 +      fringe face id, so face-remapping-alist works (Bug#6091).
 +
 +2010-07-06  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32.c, w32console.c, w32fns.c, w32font.c, w32heap.c, w32inevt.c
 +      * w32menu.c, w32proc.c, w32reg.c, w32select.c, w32term.c
 +      * w32uniscribe.c, w32xfns.c: Convert function definitions to standard C.
 +
 +2010-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * xterm.c (x_get_keysym_name): Change type of parameter to int.
 +      * lisp.h: Declare x_get_keysym_name.
 +      * keyboard.c (modify_event_symbol): Don't declare
 +      x_get_keysym_name here.
 +
 +2010-07-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * ecrt0.c: Revert conversion to standard C.
 +
 +2010-07-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * vm-limit.c (memory_warnings):
 +      * keyboard.c (modify_event_symbol):
 +      * floatfns.c (rounding_driver, ceiling2, floor2, truncate2)
 +      (round2, emacs_rint):
 +      * process.c (send_process, old_sigpipe): Convert function
 +      definitions and declarations to standard C.
 +
 +2010-07-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * buffer.c, cm.c, eval.c, keyboard.c, process.c, term.c, vm-limit.c,
 +      * xdisp.c: Convert function definitions to standard C.
 +
 +      * cm.c (cmputc): Arg C is now int, not char.
 +      * process.c (Fmake_network_process): Cast sockaddr_in* to sockaddr*.
 +
 +2010-07-05  James Cloos  <cloos@jhcloos.com>
 +
 +      * xterm.h (Xatom_net_wm_name, Xatom_net_wm_icon_name): New.
 +
 +      * xterm.c (x_term_init): Intern the _NET_WM_NAME and
 +      _NET_WM_ICON_NAME atoms.
 +
 +      * xfns.c (x_set_name_internal): Set the EWMH _NET_WM_NAME
 +      and _NET_WM_ICON_NAME properties, too, matching what is
 +      done in the Gtk+ case.
 +
 +2010-07-05  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (XTring_bell, XTset_terminal_window): Fix wrong prototype.
 +
 +      * xsmfns.c (SSDATA): New macro.
 +      (smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
 +      passed to strlen/strcpy/strcat.
 +      (create_client_leader_window): Surround with #ifndef USE_GTK.  Cast
 +      7:th arg to XChangeProperty to (unsigned char *)
 +
 +      * xsettings.c (something_changedCB, parse_settings)
 +      (apply_xft_settings): Reformat prototype.
 +      (something_changedCB, init_gconf): Remove unused variable i.
 +      (read_settings): Remove unused variable long_len.
 +
 +      * gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
 +      (xg_get_image_for_pixmap, create_dialog)
 +      (xg_get_file_with_selection, xg_get_file_name, update_cl_data)
 +      (menuitem_highlight_callback, make_menu_item)
 +      (xg_create_one_menuitem, create_menus, xg_update_menu_item)
 +      (xg_create_scroll_bar, xg_update_scrollbar_pos)
 +      (xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
 +      (xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
 +      (xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
 +      (xg_tool_bar_item_expose_callback): Reformat prototype.
 +      (xg_update_menubar): GList *group => GSList *group.
 +      (xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
 +      before use.
 +      (update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
 +      to GTK_IMAGE (wimage).
 +
 +2010-07-05  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * atimer.c: Use "" instead of <> for local includes for
 +      consistency with the rest of the code.
 +
 +      * xsmfns.c (smc_save_yourself_CB, smc_error_handler):
 +      * xrdb.c (get_system_name):
 +      * window.c (shrink_windows):
 +      * syntax.c (forw_comment):
 +      * scroll.c (calculate_scrolling, calculate_direct_scrolling)
 +      (ins_del_costs):
 +      * mem-limits.h (start_of_data):
 +      * lread.c (readevalloop):
 +      * gtkutil.c (xg_dialog_response_cb, xg_get_file_with_chooser)
 +      (xg_get_file_with_selection, xg_update_menubar, xg_update_submenu):
 +      * frame.c (x_get_focus_frame):
 +      * floatfns.c (fmod_float):
 +      * fileio.c (choose_write_coding_system):
 +      * emacs.c (fatal_error_signal, init_cmdargs, argmatch)
 +      (malloc_initialize_hook, sort_args, synchronize_locale):
 +      * doprnt.c (doprnt):
 +      * dired.c (compile_pattern):
 +      * data.c (fmod_float):
 +      * chartab.c (map_sub_char_table, map_sub_char_table_for_charset)
 +      (map_char_table_for_charset):
 +      * charset.c (define_charset_internal):
 +      * alloc.c (Fgarbage_collect): Convert declarations or definitions
 +      to standard C.
 +
 +2010-07-04  Tetsurou Okazaki  <okazaki@be.to>  (tiny change)
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (read1): Fix up last change to not mess up `c'.
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * strftime.c: Revert conversion to standard C (2010-07-04T07:50:25Z!dann@ics.uci.edu).
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Fix prototypes.
 +
 +      * atimer.c (start_atimer): Use EMACS_TIME, not struct timeval.
 +      * dired.c (file_name_completion_stat): Use DIRENTRY, not struct dirent.
 +      * fileio.c (read_non_regular, read_non_regular_quit): Add Lisp_Object
 +      arg, as required by internal_condition_case_1.
 +      * print.c (strout): Use const char* for arg PTR.
 +      * regex.c (bcmp_translate): Use RE_TRANSLATE_TYPE, not Lisp_Object.
 +      (analyse_first): Fix "const const".
 +      * sysdep.c (set_file_times): Use EMACS_TIME, not struct timeval.
 +      * unexelf.c (round_up, find_section): Use ElfW macro for arguments.
 +      * xgselect.c (xg_select): Use SELECT_TYPE, EMACS_TIME.
 +
 +2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * alloc.c: Convert function definitions to standard C.
 +      * atimer.c:
 +      * bidi.c:
 +      * bytecode.c:
 +      * callint.c:
 +      * callproc.c:
 +      * casefiddle.c:
 +      * casetab.c:
 +      * category.c:
 +      * ccl.c:
 +      * character.c:
 +      * charset.c:
 +      * chartab.c:
 +      * cmds.c:
 +      * coding.c:
 +      * composite.c:
 +      * data.c:
 +      * dbusbind.c:
 +      * dired.c:
 +      * dispnew.c:
 +      * doc.c:
 +      * doprnt.c:
 +      * ecrt0.c:
 +      * editfns.c:
 +      * fileio.c:
 +      * filelock.c:
 +      * filemode.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * fringe.c:
 +      * ftfont.c:
 +      * ftxfont.c:
 +      * gtkutil.c:
 +      * indent.c:
 +      * insdel.c:
 +      * intervals.c:
 +      * keymap.c:
 +      * lread.c:
 +      * macros.c:
 +      * marker.c:
 +      * md5.c:
 +      * menu.c:
 +      * minibuf.c:
 +      * prefix-args.c:
 +      * print.c:
 +      * ralloc.c:
 +      * regex.c:
 +      * region-cache.c:
 +      * scroll.c:
 +      * search.c:
 +      * sound.c:
 +      * strftime.c:
 +      * syntax.c:
 +      * sysdep.c:
 +      * termcap.c:
 +      * terminal.c:
 +      * terminfo.c:
 +      * textprop.c:
 +      * tparam.c:
 +      * undo.c:
 +      * unexelf.c:
 +      * window.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xfont.c:
 +      * xftfont.c:
 +      * xgselect.c:
 +      * xmenu.c:
 +      * xrdb.c:
 +      * xselect.c:
 +      * xsettings.c:
 +      * xsmfns.c:
 +      * xterm.c: Likewise.
 +
 +2010-07-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * msdos.c (IT_set_frame_parameters): Fix setting of colors in
 +      frames other than the initial one.  Fix reversal of colors when
 +      `reverse' is specified in the frame parameters.  Call
 +      update_face_from_frame_parameter instead of
 +      internal-set-lisp-face-attribute.  Initialize screen colors from
 +      initial_screen_colors[] when f->default_face_done_p is zero,
 +      instead of depending on being called with default-frame-alist as
 +      the alist argument.
 +
 +      * xfaces.c (update_face_from_frame_parameter): Move out of
 +      HAVE_WINDOW_SYSTEM portion.  Condition window-system only parts
 +      with HAVE_WINDOW_SYSTEM.
 +
 +      * msdos.c (IT_set_frame_parameters): Set menu-bar-lines according
 +      to menu-bar-mode, if not set in the frame parameters or in
 +      default-frame-alist.
 +
 +      * w32console.c (sys_tputs): Adjust argument list to prototype in
 +      term.c.
 +
 +2010-07-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * lisp.h (memory_warnings): Fix prototype.
 +
 +      * cm.h (evalcost): Fix prototype.
 +
 +      * cm.c (evalcost): Fix arg type.
 +
 +2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * term.c (term_clear_mouse_face, Fidentity):
 +      * syssignal.h (signal_handler_t):
 +      * lisp.h (memory_warnings):
 +      * coding.h (preferred_coding_system):
 +      * cm.h (evalcost):
 +      * blockinput.h (reinvoke_input_signal): Convert to standard C prototypes.
 +
 +2010-07-02  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dosfns.h (msdos_stdcolor_idx, msdos_stdcolor_name): Remove P_
 +      from prototypes.
 +
 +      * msdos.h (load_pixmap): Don't define away.
 +
 +2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * lisp.h:
 +      * atimer.h: Remove define for P_.
 +
 +      * alloc.c: Remove __P and P_ from .c and .m files.
 +      * atimer.c:
 +      * buffer.c:
 +      * callint.c:
 +      * category.c:
 +      * charset.c:
 +      * chartab.c:
 +      * cm.c:
 +      * coding.c:
 +      * composite.c:
 +      * data.c:
 +      * dired.c:
 +      * dispnew.c:
 +      * doc.c:
 +      * editfns.c:
 +      * emacs.c:
 +      * eval.c:
 +      * fileio.c:
 +      * filelock.c:
 +      * fns.c:
 +      * font.c:
 +      * fontset.c:
 +      * frame.c:
 +      * ftfont.c:
 +      * ftxfont.c:
 +      * gmalloc.c:
 +      * gtkutil.c:
 +      * image.c:
 +      * indent.c:
 +      * intervals.c:
 +      * keyboard.c:
 +      * keymap.c:
 +      * lread.c:
 +      * marker.c:
 +      * menu.c:
 +      * minibuf.c:
 +      * print.c:
 +      * process.c:
 +      * scroll.c:
 +      * search.c:
 +      * sound.c:
 +      * strftime.c:
 +      * syntax.c:
 +      * sysdep.c:
 +      * term.c:
 +      * terminal.c:
 +      * textprop.c:
 +      * unexalpha.c:
 +      * w32console.c:
 +      * w32fns.c:
 +      * w32font.c:
 +      * w32menu.c:
 +      * w32term.c:
 +      * w32uniscribe.c:
 +      * window.c:
 +      * xdisp.c:
 +      * xfaces.c:
 +      * xfns.c:
 +      * xfont.c:
 +      * xftfont.c:
 +      * xmenu.c:
 +      * xselect.c:
 +      * xterm.c: Likewise.
 +
 +      Remove P_ and __P macros.
 +      * atimer.h: Remove P_ and __P macros.
 +      * buffer.h:
 +      * category.h:
 +      * ccl.h:
 +      * character.h:
 +      * charset.h:
 +      * cm.h:
 +      * coding.h:
 +      * composite.h:
 +      * dispextern.h:
 +      * disptab.h:
 +      * dosfns.h:
 +      * font.h:
 +      * fontset.h:
 +      * frame.h:
 +      * gtkutil.h:
 +      * indent.h:
 +      * intervals.h:
 +      * keyboard.h:
 +      * keymap.h:
 +      * lisp.h:
 +      * macros.h:
 +      * md5.h:
 +      * menu.h:
 +      * msdos.h:
 +      * nsterm.h:
 +      * puresize.h:
 +      * region-cache.h:
 +      * syntax.h:
 +      * syssignal.h:
 +      * systime.h:
 +      * termhooks.h:
 +      * w32font.h:
 +      * w32term.h:
 +      * widget.h:
 +      * window.h:
 +      * xgselect.h:
 +      * xsettings.h:
 +      * xterm.h: Likewise.
 +
 +2010-07-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * lisp.h: Document that USE_LISP_UNION_TYPE is now enabled using autoconf.
 +
 +      Cleanup old code.
 +      * dired.c (BSD4_3): Remove all uses, redundant with BSD4_2.
 +      * syssignal.h: Remove code for Lynx, not supported anymore.
 +      * vm-limit.c: Remove unused code the depends on emacs not being
 +      defined and NO_LIM_DATA being defined.
 +      * mem-limits.h: Remove dead code.
 +
 +2010-07-01  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * window.c (Fwindow_absolute_pixel_edges): Doc fix.
 +
 +      * window.c (calc_absolute_offset, Fwindow_absolute_pixel_edges)
 +      (Fwindow_inside_absolute_pixel_edges): New functions (bug#5721).
 +
 +      * nsfns.m (compute_tip_xy): Do not convert coordinates from frame
 +      parameters, they are already absolute.
 +
 +      * nsterm.m (x_set_window_size, initFrameFromEmacs): Renamed
 +      FRAME_NS_TOOLBAR_HEIGHT to FRAME_TOOLBAR_HEIGHT.
 +
 +      * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGH
 +
 +      * nsmenu.m (update_frame_tool_bar, free_frame_tool_bar): Update
 +      FRAME_TOOLBAR_HEIGHT.
 +
 +      * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Add
 +      BLOCK/UNBLOCK_INPUT so asserts don't trigger.
 +
 +2010-06-30  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (get_future_frame_param, Fmake_terminal_frame): Don't
 +      check default-frame-alist.
 +
 +2010-06-30  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * process.c (create_process): Avoid using invalid file descriptors.
 +
 +      * callproc.c (child_setup): Avoid closing a file descriptor twice.
 +
 +2010-06-30  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
 +      Improve documentation.  Return font regardless of use_system_font.
 +      (syms_of_xsettings): Improve documentation for font-use-system-font.
 +
 +2010-07-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfaces.c (realize_face): Garbage the frame if a face is removed
 +      (Bug#6593).
 +
 +2010-07-05  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * keyboard.c: Remove duplicate <setjmp.h>.
 +      (read_key_sequence): Remove volatile qualifiers.
 +
 +2010-07-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * dispextern.h (FRINGE_HEIGHT_BITS): New define.
 +      (struct glyph_row): New members left_fringe_offset and
 +      right_fringe_offset.
 +
 +      * xterm.c (x_draw_fringe_bitmap): Don't clip bottom aligned bitmap
 +      specially.
 +      * w32term.c (w32_draw_fringe_bitmap): Likewise.
 +      * nsterm.m (ns_draw_fringe_bitmap): Likewise.
 +
 +      * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here.
 +      Take account of bitmap offset.
 +      (draw_window_fringes): Take account of window vscroll.
 +      (update_window_fringes): Likewise.  Extend top-aligned top indicator
 +      or bottom-aligned bottom indicator to adjacent rows if it doesn't fit
 +      in one row.  Don't set redraw_fringe_bitmaps_p outside row comparison.
 +      Set left_fringe_offset and right_fringe_offset (Bug#5634, Bug#6325).
 +
 +2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * w32fns.c (Qtooltip): Declare.
 +      Suggested by Andy Moreton <andrewjmoreton@gmail.com>.
 +
 +2010-07-03  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (x_activate_menubar): Send Press/Release for Gtk+ to avoid
 +      grab on just Press (Bug#6499).
 +
 +2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * frame.c (Qtooltip): New var.
 +      (delete_frame): Use it.  Fix faulty if statement.  Don't update
 +      mode line for tooltip frames.  Suggested by Martin Rudalics.
 +
 +      * xfns.c (x_create_tip_frame):
 +      * w32fns.c (x_create_tip_frame): Use it.
 +
 +2010-06-17  Naohiro Aota  <naota@elisp.net>  (tiny change)
 +
 +      * xftfont.c (xftfont_open): Check font width one by one also when
 +      spacing is dual.
 +
 +      * ftfont.c (ftfont_open): Ditto.
 +
 +2010-06-30  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/sol2-6.h (INHIBIT_X11R6_XIM): Remove, handled by configure now.
 +
 +      * Makefile.in (CANNOT_DUMP): Update for configure name change.
 +
 +      * s/freebsd.h (USE_MMAP_FOR_BUFFERS):
 +      * s/irix6-5.h (USE_MMAP_FOR_BUFFERS):
 +      * s/darwin.h (SYSTEM_MALLOC):
 +      * s/sol2-10.h (SYSTEM_MALLOC): Move to configure.
 +
 +2010-06-29  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * nsfns.m: extern declare Vmenu_bar_mode, Vtool_bar_mode.
 +      (ns_get_screen): Don't assign integer to f.
 +      (Fx_display_color_cells): Declarations before statements.
 +
 +2010-06-28  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (x_default_font_parameter): Remove got_from_system
 +      (Bug#6526).
 +
 +      * xterm.h (gtk_widget_get_window, gtk_widget_get_mapped)
 +      (gtk_adjustment_get_page_size, gtk_adjustment_get_upper): New
 +      defines based on what configure finds.
 +
 +      * xterm.c (XTflash): Use gtk_widget_get_window.
 +      (xg_scroll_callback): Use gtk_adjustment_get_upper and
 +      gtk_adjustment_get_page_size.
 +      (handle_one_xevent): Use gtk_widget_get_mapped.
 +      (x_term_init): Remove HAVE_GTK_MULTIDISPLAY and associated error
 +      messages.
 +
 +      * xmenu.c (create_and_show_popup_menu): Call gtk_widget_get_mapped.
 +
 +      * gtkutil.h: Replace HAVE_GTK_FILE_BOTH with
 +      HAVE_GTK_FILE_SELECTION_NEW.
 +
 +      * gtkutil.c (xg_display_open, xg_display_close): Remove
 +      HAVE_GTK_MULTIDISPLAY, it is always defined.
 +      (xg_display_open): Return type is void.
 +      (gtk_widget_set_has_window)
 +      (gtk_dialog_get_action_area, gtk_dialog_get_content_area)
 +      (gtk_widget_get_sensitive, gtk_adjustment_set_page_size)
 +      (gtk_adjustment_set_page_increment)
 +      (gtk_adjustment_get_step_increment): #define these if not found
 +      by configure.
 +      (remove_submenu): New define based on Gtk+ version.
 +      (xg_set_cursor, xg_frame_resized, xg_event_is_for_scrollbar): Use
 +      gtk_widget_get_window.
 +      (xg_frame_resized, xg_update_frame_menubar): Use gtk_widget_get_mapped.
 +      (xg_create_frame_widgets): Use gtk_widget_set_has_window.
 +      (create_dialog): Use gtk_dialog_get_action_area and
 +      gtk_dialog_get_content_area.
 +      (xg_uses_old_file_dialog, xg_get_file_name): Remove HAVE_GTK_FILE_BOTH
 +      and HAVE_GTK_FILE_CHOOSER_DIALOG_NEW.  File chooser is always
 +      available, so checking for HAVE_GTK_FILE_SELECTION_NEW is enough.
 +      (xg_update_menubar, xg_update_submenu, xg_show_toolbar_item): Use
 +      g_object_ref and g_object_unref.
 +      (xg_update_menu_item, xg_tool_bar_menu_proxy): Use
 +      gtk_widget_get_sensitive.
 +      (xg_update_submenu): Use remove_submenu.
 +      (xg_update_scrollbar_pos): Don't use GtkFixedChild, use child
 +      properties instead to get old x and y position.
 +      (xg_set_toolkit_scroll_bar_thumb): Use gtk_adjustment_get_page_size,
 +      gtk_adjustment_get_step_increment, gtk_adjustment_set_page_size,
 +      gtk_adjustment_set_step_increment and gtk_adjustment_set_page_increment.
 +      (xg_get_tool_bar_widgets): New function.
 +      (xg_tool_bar_menu_proxy, xg_show_toolbar_item)
 +      (update_frame_tool_bar): Call xg_get_tool_bar_widgets.
 +      (toolbar_set_orientation): New #define based on if configure
 +      finds gtk_orientable_set_orientation.
 +      (xg_create_tool_bar): Call toolbar_set_orientation.
 +      (xg_make_tool_item, xg_show_toolbar_item): Call gtk_box_pack_start
 +      instead of gtk_box_pack_start_defaults.
 +
 +2010-06-28  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * cmds.c (Fdelete_backward_char): Move into Lisp.
 +
 +2010-06-27  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/freebsd.h (BSD4_2): Remove redundant definition.
 +      bsd-common.h defines it already.
 +
 +2010-06-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfns.c (Fx_create_frame): Don't consult X resouces when setting
 +      menu-bar-lines and tool-bar-lines.  Use menu-bar-mode and
 +      tool-bar-mode, which are now set using these X resources at
 +      startup, to determine the defaults (Bug#2249).
 +
 +      * w32fns.c (Fx_create_frame):
 +      * nsfns.m (Fx_create_frame): Likewise.
 +
 +      * frame.c (Vmenu_bar_mode, Vtool_bar_mode): New vars.
 +
 +2010-06-24  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * gtkutil.c (xg_update_scrollbar_pos):
 +      Avoid C99 mid-block variable declaration.
 +
 +2010-06-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (x_scroll_bar_create): Remove call to xg_show_scroll_bar.
 +
 +      * gtkutil.h (xg_show_scroll_bar): Remove.
 +
 +      * gtkutil.c (xg_update_scrollbar_pos): Show/hide scroll bar as needed
 +      if height is less than scroll bar min size.
 +      (xg_show_scroll_bar): Remove, show moved to xg_update_scrollbar_pos.
 +
 +      * xfns.c (x_default_font_parameter): Try to open font from system
 +      before using it (bug#6478).  Rename got_from_gconf to got_from_system.
 +
 +2010-06-22  Keith Packard <keithp@keithp.com> (tiny change)
 +
 +      * font.c (font_parse_fcname): Allow . for sizes like 7.5 (bug#6437).
 +
 +2010-06-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (try_scrolling): When scroll-conservatively is set to
 +      most-positive-fixnum, be extra accurate when scrolling window
 +      start, to avoid missing the cursor line.
 +
 +2010-06-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (try_scrolling): Compute the limit for searching point
 +      in forward scroll from scroll_max, instead of an arbitrary limit
 +      of 10 screen lines.  See
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html
 +      and
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html
 +      for details.
 +
 +2010-06-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * editfns.c (Fbyte_to_string): Pacify compiler.
 +
 +2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * lread.c (read1): Phase out old-style backquotes a bit more.
 +
 +2010-06-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and
 +      bidimirror.h.
 +
 +      * deps.mk (bidi.o): Depend on biditype.h and bidimirror.h.
 +
 +      * bidi.c (bidi_initialize): Remove explicit initialization of
 +      bidi_type_table; include biditype.h instead.  Don't support
 +      entries whose second codepoint is zero.  Initialize bidi_mirror_table.
 +      (bidi_mirror_char): Use bidi_mirror_table.
 +
 +      * biditype.h: New file.
 +
 +      * bidimirror.h: New file.
 +
 +      * window.c (syms_of_window): Doc fix (bug#6409).
 +
 +2010-06-12  Romain Francoise  <romain@orebokech.com>
 +
 +      * Makefile.in (lisp, shortlisp): Use new location of vc-hooks and
 +      ediff-hook.
 +
 +2010-06-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * editfns.c (Fbyte_to_string): Pacify compiler.
 +
 +      * m/ibms390x.h: Rather than duplicating ibms390.h, just include it.
 +
 +2010-06-26  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * alloc.c (Fmake_byte_code): Don't access undefined argument
 +      (Bug#6517).
 +
 +2010-06-25  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (next_element_from_image): Ensure that after-strings are
 +      read the next time we hit handle_stop (Bug#1336).
 +
 +2010-06-23  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * lread.c (read1): Signal error if #s is not followed by paren.
 +
 +2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.c (free_image): Mark frame as garbaged (Bug#6426).
 +
 +      * keymap.c (Fdefine_key): Doc fix (Bug#6460).
 +
 +2010-06-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * editfns.c (Fbyte_to_string): Pacify compiler.
 +
 +2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string.
 +      Check `object's type before accessing its guts.
 +
 +2010-06-09  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/usg5-4.h: Fix previous change.
 +      Suggested by Lawrence Mitchell <wence@gmx.li>
 +
 +2010-06-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * minibuf.c (Fall_completions): Add more checks.
 +
 +2010-06-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * minibuf.c (Fall_completions): Check COLLECTION's size (bug#6378).
 +
 +2010-06-08  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * lread.c (X_OK): Remove, unused.
 +
 +      * dispnew.c: Remove obsolete comment.
 +
 +      Remove INCLUDED_FCNTL.
 +      * xterm.c (INCLUDED_FCNTL):
 +      * callproc.c (INCLUDED_FCNTL):
 +      * alloc.c (INCLUDED_FCNTL):
 +      * systty.h (INCLUDED_FCNTL): Remove all uses, not needed anymore.
 +      (emacs_get_tty, emacs_set_tty): Declare unconditionally.
 +
 +2010-06-07  Martin Rudalics  <rudalics@gmx.at>
 +
 +      * window.c (Fselect_window): Move `record_buffer' up to the
 +      beginning of this function, so the buffer gets recorded
 +      even if the selected window does not change.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html
 +
 +2010-06-07  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings.
 +      (Fforward_line, Fbeginning_of_line): Reflow docstrings.
 +
 +2010-06-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove BSTRING related code, all platforms define it.
 +      * s/usg5-4.h (BSTRING): Remove definition.
 +      * s/template.h (BSTRING):
 +      * s/msdos.h (BSTRING):
 +      * s/ms-w32.h (BSTRING):
 +      * s/hpux10-20.h (BSTRING):
 +      * s/gnu-linux.h (BSTRING):
 +      * s/darwin.h (BSTRING):
 +      * s/cygwin.h (BSTRING):
 +      * s/bsd-common.h (BSTRING):
 +      * s/aix4-2.h (BSTRING): Likewise.
 +      * sysdep.c: Remove code depending on BSTRING not being defined.
 +
 +2010-06-05  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Remove obsolete macro BASE_LEADING_CODE_P.
 +      * character.h (BASE_LEADING_CODE_P): Remove.
 +      * regex.c [!emacs] (BASE_LEADING_CODE_P): Remove.
 +      * buffer.c (Fset_buffer_multibyte):
 +      * indent.c (scan_for_column, compute_motion):
 +      * insdel.c (count_combining_before, count_combining_after):
 +      Use LEADING_CODE_P instead of BASE_LEADING_CODE_P.
 +
 +2010-06-04  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Turn `directory-sep-char' into a noop.
 +
 +      * lisp.h [WINDOWSNT] (Vdirectory_sep_char): Don't declare.
 +      (DIRECTORY_SEP): Define unconditionally.
 +
 +      * s/ms-w32.h (DIRECTORY_SEP): Remove.
 +
 +      * emacs.c (decode_env_path): Don't check DIRECTORY_SEP,
 +      call dostounix_filename directly.
 +
 +      * fileio.c (CORRECT_DIR_SEPS): Remove.
 +      (Ffile_name_directory, directory_file_name, Fexpand_file_name)
 +      (Fsubstitute_in_file_name): Use dostounix_filename instead.
 +      (file_name_as_directory): Use dostounix_filename, DIRECTORY_SEP.
 +      (syms_of_fileio) <directory-sep-char>: Move to subr.el.
 +
 +      * w32proc.c (CORRECT_DIR_SEPS): Remove.
 +      (Fw32_short_file_name, Fw32_long_file_name): Use dostounix_filename.
 +
 +2010-06-03  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * process.c (conv_lisp_to_sockaddr): Fix conversion of IPv4
 +      address.  (Bug#6346)
 +
 +2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * ccl.c (Fccl_program_p): Fix typo in docstring.
 +
 +2010-06-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Move UNEXEC definition to autoconf.
 +      * s/usg5-4.h (UNEXEC): Remove, move to configure.in.
 +      * s/sol2-10.h (UNEXEC):
 +      * s/irix6-5.h (UNEXEC):
 +      * s/hpux10-20.h (UNEXEC):
 +      * s/gnu-linux.h (UNEXEC):
 +      * s/darwin.h (UNEXEC):
 +      * s/cygwin.h (UNEXEC):
 +      * s/bsd-common.h (UNEXEC):
 +      * s/aix4-2.h (UNEXEC):
 +      * m/alpha.h (UNEXEC): Likewise.
 +      * Makefile.in (UNEXEC_OBJ): Define using @UNEXEC_OBJ@.
 +
 +2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      Remove obsolete pre-unicode2 macros.
 +      * character.h (MULTIBYTE_FORM_LENGTH, PARSE_MULTIBYTE_SEQ): Remove.
 +      * composite.c (composition_reseat_it):
 +      * data.c (Faset):
 +      * fns.c (Ffillarray):
 +      * regex.c (re_search_2): Use BYTES_BY_CHAR_HEAD.
 +      [!emacs] (BYTES_BY_CHAR_HEAD): Define instead of MULTIBYTE_FORM_LENGTH.
 +
 +2010-06-03  Juri Linkov  <juri@jurta.org>
 +
 +      * buffer.c (Fother_buffer): Add CHECK_FRAME.
 +      (Fswitch_to_buffer): Remove unused variable `err'.
 +
 +2010-06-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * m/template.h (NO_SOCK_SIGIO): Remove, no longer used.
 +
 +      * m/hp800.h (alloca) [__NetBSD__ && __GNUC__]: No need to define it,
 +      now that AH_BOTTOM does it.
 +
 +      * m/hp800.h (HAVE_ALLOCA):
 +      * m/ibms390x.h (HAVE_ALLOCA): Do not define, no longer needed.
 +
 +      * m/ia64.h, s/gnu-linux.h, s/gnu.h, s/netbsd.h, s/usg5-4.h:
 +      Remove NOT_C_CODE tests, it is always true now.
 +
 +2010-06-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Fix config.h includes.
 +      * xsettings.c:
 +      * xgselect.c:
 +      * nsterm.m:
 +      * nsselect.m:
 +      * nsimage.m:
 +      * nsfont.m:
 +      * nsfns.m:
 +      * dbusbind.c: Use #include <config.h> instead of "config.h" as all
 +      other files do.
 +
 +      * gmalloc.c: Remove BROKEN_PROTOTYPES reference, unused.
 +
 +      * s/sol2-6.h: Remove obsolete comments.
 +
 +      Remove unnecessary alloca.h includes.
 +      * keymap.c: Do not include alloca.h, config.h does that.
 +      * sysdep.c: Likewise.  Do not define fwrite, not used.
 +
 +2010-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * sysdep.c (child_setup_tty): Move the non-canonical initialization to
 +      the HAVE_TERMIO where it belongs (bug#6149).
 +
 +2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * keymap.c (Fwhere_is_internal): Fix handling of remapping (in thread
 +      of bug#6305).
 +
 +2010-05-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_move_to_visually_next): Make sure the sentinel
 +      state is always cached (bug#6306).
 +
 +2010-05-29  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix cursor motion in bidi-reordered continued lines.
 +      * xdisp.c (try_cursor_movement): Backup to non-continuation line
 +      only after finding point's row.  Fix the logic.  Rewrite the loop
 +      over continuation lines in bidi-reordered buffers.  Return
 +      CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row,
 +      rather than CURSOR_MOVEMENT_CANNOT_BE_USED.
 +
 +2010-05-28  Michael Albinus  <michael.albinus@gmx.de>
 +
 +      * fileio.c (Fdelete_file): Pass TRASH arg to handler call.
 +
 +2010-05-28  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (font_delete_unmatched): Check Vface_ignored_fonts.
 +      Don't sheck SPEC if it is nil.
 +      (font_list_entities): Call font_delete_unmatched if
 +      Vface_ignored_fonts is non-nil.  (Bug#6287)
 +
 +2010-05-28  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBES): Remove $LOADLIBES, it is never set.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * fileio.c (Fdelete_file): Change meaning of optional arg to mean
 +      whether to trash.
 +      (internal_delete_file, Frename_file): Callers changed.
 +      (delete_by_moving_to_trash): Doc fix.
 +      (Fdelete_directory_internal): Don't move to trash.
 +
 +      * callproc.c (delete_temp_file):
 +      * buffer.c (Fkill_buffer): Callers changed.
 +
 +      * lisp.h: Update prototype.
 +
 +2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (redisplay_window): After redisplay, check if point is
 +      still valid before setting it (Bug#6177).
 +
 +2010-05-27  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in, autodeps.mk, deps.mk, ns.mk:
 +      Convert comments to Makefile format.
 +
 +      * Makefile.in (bootstrap-clean): No more Makefile.c.
 +
 +2010-05-26  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (YMF_PASS_LDFLAGS): Remove.
 +      (temacs${EXEEXT}): Use PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS.
 +
 +      * Makefile.in (NS_IMPL_GNUSTEP_INC, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS):
 +      Remove.
 +      (TEMACS_LDFLAGS): Do not use NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
 +
 +2010-05-26  Kenichi Handa  <handa@m17n.org>
 +
 +      * composite.c (composition_compute_stop_pos): Fix condition for
 +      backward scanning.
 +
 +2010-05-25  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (@NS_IMPL_GNUSTEP_INC@, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS):
 +      Move before TEMACS_LDFLAGS.
 +      (TEMACS_LDFLAGS): Use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
 +      (temacs${EXEEXT}): Do not use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
 +
 +      * Makefile.in (NOT_C_CODE): No longer define.
 +      (config.h): No longer include.
 +
 +      * Makefile.in (LD_SWITCH_SYSTEM_TEMACS): Move definition after some
 +      variables it may reference.
 +
 +      * Makefile.in (LD_SWITCH_SYSTEM_EXTRA): Remove.
 +      (TEMACS_LDFLAGS): Remove LD_SWITCH_SYSTEM_EXTRA.
 +
 +2010-05-25  Kenichi Handa  <handa@m17n.org>
 +
 +      * dispextern.h (struct composition_it): New members rule_idx and
 +      charpos.
 +
 +      * xdisp.c (set_iterator_to_next): While scanning backward, assume
 +      that the character positions of IT point the last character of the
 +      current grapheme cluster.
 +      (next_element_from_composition): Don't change character positions
 +      of IT.
 +      (append_composite_glyph): Set glyph->charpos to
 +      it->cmp_it.charpos.
 +
 +      * composite.c (autocmp_chars): Change the first argument to RULE,
 +      and try composition with RULE only.
 +      (composition_compute_stop_pos): Record the index number of the
 +      composition rule in CMP_IT->rule_idx.
 +      (composition_reseat_it): Call autocmp_chars repeatedly until the
 +      correct rule of the composition is found.
 +      (composition_update_it): Set CMP_IT->charpos.  Assume the CHARPOS
 +      is at the last character of the current grapheme cluster when
 +      CMP_IT->reversed_p is nonzero.
 +
 +2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * editfns.c (Fbyte_to_string): New function.
 +
 +2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * process.c (Fmake_network_process): Set :host to nil if it's not used.
 +      Suggested by Masatake YAMATO <yamato@redhat.com>.
 +
 +2010-05-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * dispextern.h (init_iterator): Sync prototype with changed definition.
 +
 +2010-05-20  enami tsugutomo  <tsugutomo.enami@jp.sony.com>
 +
 +      * s/netbsd.h: If terminfo is found, use it in preference to
 +      termcap.  (Bug#6190)  [Backport from trunk]
 +
 +2010-05-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Redesign and reimplement bidi-aware edge positions of glyph rows.
 +
 +      * dispextern.h (struct glyph_row): New members minpos and maxpos.
 +      (MATRIX_ROW_START_CHARPOS, MATRIX_ROW_START_BYTEPOS)
 +      (MATRIX_ROW_END_CHARPOS, MATRIX_ROW_END_BYTEPOS): Reference minpos
 +      and maxpos members instead of start.pos and end.pos, respectively.
 +
 +      * xdisp.c (display_line): Compare IT_CHARPOS with the position in
 +      row->start.pos, rather than with MATRIX_ROW_START_CHARPOS.
 +      (cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS.
 +      (try_window_reusing_current_matrix, try_window_id):
 +      Use ROW->minpos rather than ROW->start.pos.
 +      (init_from_display_pos, init_iterator): Use EMACS_INT for
 +      character and byte positions.
 +      (find_row_edges): Rename from find_row_end.  Accept additional
 +      arguments for minimum and maximum buffer positions seen by
 +      display_line for this row.  Don't use iterator to find the
 +      position following the maximum one; instead, increment the
 +      position found by display_line directly.  Fix logic; eol_pos
 +      should be tested before the rest.  Handle the case of characters
 +      delivered from display vector (bug#6036).  Fix tests related to
 +      it->method.  Handle the truncated_on_right_p rows.
 +      (RECORD_MAX_MIN_POS): New macro.
 +      (display_line): Use it to record the minimum and maximum buffer
 +      positions for glyphs in the row being assembled.  Record the
 +      position of the newline that terminates the line.  If word wrap is
 +      in effect, restore minimum and maximum positions seen up to the
 +      wrap point, when iterator returns to it.
 +      (try_window_reusing_current_matrix): Give up if in bidi-reordered
 +      row and cursor not already at point.  Restore original pre-bidi
 +      code for unidirectional buffers.
 +
 +      * dispnew.c (increment_row_positions, check_matrix_invariants):
 +      Increment and check row->start.pos and row->end.pos, in addition
 +      to MATRIX_ROW_START_CHARPOS and MATRIX_ROW_END_CHARPOS.
 +
 +      * .gdbinit (prowlims): Display row->minpos and row->maxpos.
 +      Display truncated_on_left_p and truncated_on_right_p flags.
 +      Formatting fixes.
 +      (pmtxrows): Display the ordinal number of each row.  Don't display
 +      rows beyond the last one.
 +
 +      * bidi.c (bidi_cache_iterator_state): Don't zero out new_paragraph:
 +      it is not copied by bidi_copy_it.
 +
 +2010-05-22  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32.c (sys_write): Break writes into chunks smaller than 32MB.
 +      (Bug#6237)
 +
 +2010-05-22  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * image.c (Fimage_flush): Rename from image-refresh.
 +
 +2010-05-21  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (redisplay_internal): Clear caches even if redisplaying
 +      just one window.
 +
 +      * image.c (Vimage_cache_eviction_delay): Decrease to 300.
 +      (clear_image_cache): If the number of cached images is unusually
 +      large, decrease the cache eviction delay (Bug#6230).
 +
 +2010-05-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (${ns_appdir}, ${ns_appbindir}Emacs, ns-app):
 +      Move these rules to ns.mk.
 +      * ns.mk: New file.
 +
 +      * Makefile.in (../src/$(OLDXMENU), $(OLDXMENU)): Always define rules.
 +
 +      * Makefile.in (CANNOT_DUMP): New, set by configure.
 +      (emacs${EXEEXT}, bootstrap-emacs${EXEEXT}): Use $CANNOT_DUMP.
 +
 +2010-05-20  Juri Linkov  <juri@jurta.org>
 +
 +      * fileio.c (Fdelete_file): Change interative spec to use
 +      `read-file-name' like in `find-file-read-args' where the default
 +      value is `default-directory' instead of `buffer-file-name'.
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00533.html
 +
 +2010-05-20  Kevin Ryde  <user42@zip.com.au>
 +
 +      * keyboard.c (Vlast_command, Vkeyboard_translate_table)
 +      (Voverriding_terminal_local_map, Vsystem_key_alist)
 +      (Vlocal_function_key_map): Fix manual link in docstring (Bug#6224).
 +
 +2010-05-20  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (DEPDIR): New constant.
 +      (DEPFLAGS): Set with configure, not cpp.
 +      (MKDEPDIR): New, set by configure.
 +      (.c.o, .m.o, ecrt0.o): Use $MKDEPDIR.
 +      (clean): Use $DEPDIR.
 +      (deps_frag): Include from configure.
 +      Move static/dynamic dependency stuff to deps.mk/autodeps.mk.
 +      * deps.mk, autodeps.mk: New files, extracted from Makefile.in.
 +
 +      * bidi.c (bidi_cache_shrink, bidi_cache_iterator_state): Fix
 +      reallocation of the cache.  (Bug#6210)
 +
 +2010-05-19  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/msdos.h (ORDINARY_LINK): Move to sed2v2.inp.
 +
 +      * Makefile.in (LD, YMF_PASS_LDFLAGS): Set with configure, not cpp.
 +      (GNULIB_VAR): Remove.
 +      (LIBES): Use LIB_GCC instead of GNULIB_VAR.
 +
 +      * m/ibms390x.h (LINKER):
 +      * m/macppc.h (LINKER) [GNU_LINUX]:
 +      * s/aix4-2.h (ORDINARY_LINK):
 +      * s/cygwin.h (LINKER):
 +      * s/darwin.h (ORDINARY_LINK):
 +      * s/gnu.h (ORDINARY_LINK):
 +      * s/netbsd.h (LINKER):
 +      * s/usg5-4.h (ORDINARY_LINK):
 +      Move to configure.
 +
 +      * s/aix4-2.h (LINKER): Remove; this file sets ORDINARY_LINK.
 +
 +2010-05-18  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
 +      prevent stack overflow if number of arguments is too large
 +      (Bug#6214).
 +
 +2010-05-18  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * charset.c (load_charset_map_from_file): Don't call close after fclose.
 +
 +2010-05-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-linux.h: Combine two conditionals.
 +
 +      * Makefile.in (otherobj): Include $(VMLIMIT_OBJ) separately from
 +      $(POST_ALLOC_OBJ).
 +
 +      * Makefile.in (RALLOC_OBJ): New, set by configure.
 +      (rallocobj): Replace with the previous variable.
 +      (otherobj): Use $RALLOC_OBJ.
 +
 +      * s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]:
 +      * s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure.
 +
 +      * Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure.
 +      (gmallocobj, vmlimitobj): Replace with previous two variables.
 +      (otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ.
 +
 +2010-05-17  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU_DEPS): New, set by configure.
 +      (stamp-oldxmenu): Use $OLDXMENU_DEPS.
 +
 +2010-05-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (${ns_appbindir}Emacs, ns-app): Always define these rules.
 +
 +      * Makefile.in (clean): Get rid of HAVE_NS conditional.
 +
 +      * Makefile.in (ns_appdir, ns_appbindir): Now configure adds the
 +      trailing "/".
 +
 +      * Makefile.in (TEMACS_LDFLAGS2): New, set by configure.
 +      (temacs${EXEEXT}): Combine the NS_IMPL_GNUSTEP case with the default.
 +
 +      * Makefile.in (GNUSTEP_SYSTEM_LIBRARIES): Remove, unused.
 +      (NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): New, set by configure.
 +      (LD) [NS_IMPL_GNUSTEP]: Set to $(CC) -rdynamic.
 +      (temacs${EXEEXT}): Remove $LOCALCPP, never defined or referenced.
 +      Make most of the NS_IMPL_GNUSTEP case the same as the default case.
 +
 +      * Makefile.in (temacs${EXEEXT}) [!NS_IMPL_GNUSTEP]:
 +      Remove ${STARTFLAGS}, nothing ever sets it.
 +
 +2010-05-16  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/ia64.h (UNEXEC): Remove, set in s/*.h.
 +
 +2010-05-16  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBX_BASE): Always define.
 +
 +      * Makefile.in (LIBX_OTHER): Move out of cpp section.
 +
 +      * Makefile.in (LIBXT): Always define.
 +
 +2010-05-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU, LIBXMENU, LIBX_OTHER): Always define.
 +
 +      * Makefile.in (FONT_DRIVERS): Remove, replace with $FONT_OBJ.
 +      (obj, SOME_MACHINE_OBJECTS): Use $FONT_OBJ.
 +
 +2010-05-15  Ken Raeburn  <raeburn@raeburn.org>
 +
 +      * lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue.  (Bug#5916)
 +      (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise.
 +
 +      * emacs.c (main): Initialize initial-environment and
 +      process-environment before generating from env, not after.
 +
 +      Handle --version reasonably in CANNOT_DUMP configuration.
 +      * emacs.c (emacs_version, emacs_copyright): New string variables.
 +      (Vemacs_version, Vemacs_copyright): New Lisp_Object variables.
 +      (syms_of_emacs): Defvar them, and initialize them from the C
 +      string variables.
 +      (main): If initialization hasn't been done, print initial version
 +      info from the C strings, instead of starting an interactive session.
 +
 +2010-05-15  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_paragraph_init): Don't leave alone garbage values
 +      of bidi_it->paragraph_dir.  Call bidi_initialize if needed.
 +      (bidi_paragraph_init): Remove redundant assertion that we are at
 +      the beginning of a line after call to bidi_find_paragraph_start.
 +
 +      * xdisp.c (Fcurrent_bidi_paragraph_direction): New function.
 +      (syms_of_xdisp): Defsubr it.
 +
 +      * cmds.c (Fforward_char, Fbackward_char): Doc fix.
 +
 +      * Makefile.in: Fix MSDOS-related comments.
 +
 +2010-05-15  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (OLDXMENU_TARGET): New, set by configure.
 +      (really-lwlib, really-oldXMenu): Always define.
 +      ($OLDXMENU): Depend on $OLDXMENU_TARGET.
 +
 +      * Makefile.in: Simplify cpp conditional.
 +
 +      * Makefile.in (${ns_appdir}): Simplify using umask.
 +
 +      * Makefile.in (${ns_appdir}): Remove references to CVS-related files.
 +
 +2010-05-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (specbind): Remove left-over duplicate test.
 +      Disallow let-binding frame-local vars.  Add comment.
 +
 +2010-05-14  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Make the cache of bidi iterator states dynamically allocated.
 +      * bidi.c (bidi_cache_shrink): New function.
 +      (bidi_init_it): Call it.
 +      (bidi_cache_iterator_state): Enlarge the cache if needed.
 +
 +      * bidi.c (bidi_move_to_visually_next): Rename from
 +      bidi_get_next_char_visually.  All callers changed.
 +
 +2010-05-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * dispextern.h (struct composition_it): New member reversed_p.
 +
 +      * composite.c (composition_compute_stop_pos): Search backward if
 +      ENDPOS < CHARPOS.
 +      (composition_reseat_it): Handle the case that ENDPOS < CHARPOS.
 +      Set CMP_IT->reversed_p.
 +      (composition_update_it): Pay attention to CMP_IT->reversed_p.
 +
 +      * xdisp.c (set_iterator_to_next):
 +      Call composition_compute_stop_pos with negative ENDPOS if we are
 +      scanning backward.  Call composition_compute_stop_pos if scan
 +      direction is changed.
 +      (next_element_from_buffer): Call composition_compute_stop_pos with
 +      negative ENDPOS if we are scanning backward.
 +      (next_element_from_composition): Pay attention to
 +      IT->cmp_it.reversed_p.
 +
 +2010-05-14  Kenichi Handa  <handa@m17n.org>
 +
 +      * font.c (font_range): Return the range for the font found at first.
 +
 +2010-05-14  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Always define.
 +
 +      * Makefile.in (mktime, X11, register): Move undefs to configure.
 +
 +      * Makefile.in (MSDOS_OBJ): Default to empty, let msdos scripts set it.
 +      (MSDOS_X_OBJ): New variable.
 +      (MSDOS_SUPPORT_REAL): New constant.
 +      (MSDOS_SUPPORT): Set as a variable, not with cpp.
 +      (obj): Use MSDOS_X_OBJ.
 +      (lisp): Use MSDOS_SUPPORT as a variable.
 +
 +      * Makefile.in (REAL_MOUSE_SUPPORT): New constant.
 +      (GPM_MOUSE_SUPPORT): Now it's a constant.
 +      (MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): Set with configure,
 +      not cpp.
 +
 +      * Makefile.in (@NS_IMPL_GNUSTEP_INC@): Use in place of #ifdef.
 +      (ns_appresdir): Remove, unused.
 +
 +      * Makefile.in (SHELL): Move outside cpp section.
 +
 +      * s/netbsd.h (AMPERSAND_FULL_NAME): Remove (defined in AH_BOTTOM).
 +
 +2010-05-13  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (FONT_DRIVERS): Place with other HAVE_X_WINDOWS stuff.
 +      (TOOLTIP_SUPPORT): Place with other HAVE_WINDOW_SYSTEM stuff.
 +
 +      * Makefile.in (FONT_DRIVERS): If HAVE_X_WINDOWS is defined,
 +      HAVE_WINDOW_SYSTEM must be too.
 +
 +      * Makefile.in (WINNT_SUPPORT): Remove, nt build does not use this file.
 +      (lisp): Remove WINNT_SUPPORT.
 +
 +      * Makefile.in (OLDXMENU, LIBXMENU) [!HAVE_MENUS]:
 +      Let configure set these variables (to empty) in this case as well.
 +
 +      * Makefile.in (LD_SWITCH_X_SITE): Define as a variable, not via cpp.
 +      (LIBX_BASE): Use $LD_SWITCH_X_SITE.
 +
 +      * Makefile.in (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD)
 +      (LIB_MATH, FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS)
 +      (FREETYPE_LIBS, LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS)
 +      (M17N_FLT_LIBS, GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBGPM)
 +      (LIBRESOLV, UNEXEC_OBJ): For clarity, define variables to hold
 +      the values output by configure.
 +      (ALL_CFLAGS, obj, LIBES, temacs${EXEEXT}): Use the above variables.
 +
 +2010-05-12  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (YMF_PASS_LDFLAGS, LD, LINKER): Simplify the logic.
 +      (LINKER_WAS_SPECIFIED): Remove.
 +
 +      * Makefile.in (LIB_GCC): Set using configure, not cpp.
 +      (GNULIB_VAR) [!ORDINARY_LINK]: Always set to $LIB_GCC.
 +      * m/arm.h (LIB_GCC) [GNU_LINUX]:
 +      * s/cygwin.h (LIB_GCC):
 +      * s/freebsd.h (LIB_GCC):
 +      * s/gnu-linux.h (LIB_GCC):
 +      * s/msdos.h (LIB_GCC):
 +      * s/netbsd.h (LIB_GCC):
 +      Move to configure.
 +
 +2010-05-11  Karel Klic  <kklic@redhat.com>
 +
 +      * ftfont.c: Fix incorrect parentheses of #if condition for
 +      definining M17N_FLT_USE_NEW_FEATURE.
 +
 +2010-05-11  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBS_SYSTEM) [MSDOS]: Do not reset.
 +      * s/msdos.h (MSDOS_LIBS_SYSTEM): Remove.
 +
 +2010-05-10  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (init_iterator): Don't turn on bidi reordering in
 +      unibyte buffers.  See
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html.
 +
 +2010-05-10  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBS_SYSTEM): Set using configure, not cpp.
 +      (LIBS_SYSTEM) [MSDOS]: Reset with MSDOS_LIBS_SYSTEM.
 +      (LIBES): Use LIBS_SYSTEM as a variable.
 +      * s/msdos.h (LIBS_SYSTEM): Rename to MSDOS_LIBS_SYSTEM.  Always define.
 +      * s/aix4-2.h (LIBS_SYSTEM):
 +      * s/freebsd.h (LIBS_SYSTEM):
 +      * s/hpux10-20.h (LIBS_SYSTEM):
 +      * s/sol2-6.h (LIBS_SYSTEM):
 +      * s/unixware.h (LIBS_SYSTEM):
 +      Move to configure.
 +
 +      * s/aix4-2.h (MAIL_USE_LOCKF):
 +      * s/bsd-common.h (MAIL_USE_FLOCK):
 +      * s/darwin.h (MAIL_USE_FLOCK):
 +      * s/gnu-linux.h (MAIL_USE_FLOCK):
 +      * s/irix6-5.h (MAIL_USE_FLOCK):
 +      * s/template.h (MAIL_USE_FLOCK):
 +      Move to configure.
 +
 +2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Version 23.2 released.
 +
 +2010-05-08  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * composite.c (autocmp_chars): Save point as marker before calling
 +      auto-composition-function (Bug#5984).
 +
 +      * lisp.h (restore_point_unwind): Add prototype.
 +
 +      * fileio.c (restore_point_unwind): Remove static attribute.
 +
 +2010-05-08  Kenichi Handa  <handa@m17n.org>
 +
 +      * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the
 +      new feature of libotf and m17n-flt.
 +      (ftfont_check_otf) [M17N_FLT_USE_NEW_FEATURE]:
 +      Call OTF_check_features even if no specific feature is given.
 +      (PACK_OTF_TAG) [M17N_FLT_USE_NEW_FEATURE]: New macro.
 +      (ftfont_drive_otf) [M17N_FLT_USE_NEW_FEATURE]: Handle the case
 +      that OUT is NULL.  Use OTF_drive_gsub_with_log and
 +      OTF_drive_gpos_with_log instead of OTF_drive_gsub and
 +      OTF_drive_gpos.
 +      (ftfont_try_otf) [M17N_FLT_USE_NEW_FEATURE]: New function.
 +      (ftfont_shape_by_flt) [M17N_FLT_USE_NEW_FEATURE]:
 +      Setup mflt_enable_new_feature and mflt_try_otf.
 +
 +2010-05-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (Ftool_bar_get_system_style): Correct comment.
 +
 +      * gtkutil.c (xg_pack_tool_bar): Change show_all to show for handle
 +      box and toolbar (Bug #6139).
 +      (xg_create_tool_bar): Remove comment (Bug #6139).
 +      (xg_make_tool_item): Remove gtk_widget_show_all (Bug #6139).
 +      (xg_show_toolbar_item): Add gtk_widget_show for weventbox (Bug #6139).
 +
 +2010-05-08  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/eval.$(O), $(BLD)/w32fns.$(O)):
 +      Update dependencies.
 +
 +2010-05-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * fringe.c (update_window_fringes): Set up truncation bitmaps for
 +      R2L lines.
 +
 +2010-05-08  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (THIS_IS_MAKEFILE): Remove, unused.
 +
 +      * Makefile.in (LIBS_TERMCAP): Set with configure, not cpp.
 +      (TERMCAP_OBJ): New, set by configure, replacing termcapobj.
 +      (termcapobj): Replace with TERMCAP_OBJ.
 +      (otherobj): Use $TERMCAP_OBJ instead of $termcapobj.
 +      (LIBES): Use LIBS_TERMCAP as a variable.
 +
 +      * s/freebsd.h (osreldate.h): No longer include, since this file
 +      does not use __FreeBSD_version any more.
 +
 +      * s/aix4-2.h (TERMINFO):
 +      * s/cygwin.h (TERMINFO):
 +      * s/darwin.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]:
 +      * s/freebsd.h (TERMINFO, LIBS_TERMCAP):
 +      * s/gnu-linux.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]:
 +      * s/gnu.h (TERMINFO, LIBS_TERMCAP) [HAVE_LIBNCURSES]:
 +      * s/hpux10-20.h (TERMINFO, LIBS_TERMCAP):
 +      * s/irix6-5.h (TERMINFO):
 +      * s/netbsd.h (LIBS_TERMCAP):
 +      * s/openbsd.h (TERMINFO, LIBS_TERMCAP):
 +      * s/sol2-6.h (LIBS_TERMCAP) [!TERMINFO]:
 +      * s/usg5-4.h (TERMINFO):
 +      Move to configure.
 +
 +2010-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * eval.c (unbind_to): Don't unbind a local binding into the global
 +      binding when the local binding disappeared.  Inversely, don't unbind
 +      a global binding into a newly created local binding.
 +      * data.c (set_internal): Make its `buf' arg into a `where' arg so we
 +      can specify the frame to use, when applicable.  Adjust callers.
 +
 +2010-05-07  Vincent Belaïche  <vincent.belaiche@gmail.com>
 +            Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * floatfns.c (Fisnan, Fcopysign, Ffrexp, Fldexp): New functions.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * w32fns.c: Include w32.h.
 +      (Fw32_shell_execute): Decode the error message before passing it
 +      to `error'.  (Bug#6126)
 +
 +      * msdos.c (dos_set_window_size):
 +      * w16select.c (Fx_selection_exists_p): Use `Fsymbol_value (foo)'
 +      instead of `XSYMBOL (foo)->value'.
 +
 +2010-05-07  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix the MS-DOS build, broken by autoconfiscation.
 +
 +      * Makefile.in: Don't use Make-style comments past the "start of
 +      cpp stuff" line.
 +      (MSDOS_OBJ): Remove xmenu.o (it is now defined by XMENU_OBJ).
 +
 +      * s/msdos.h (UNEXEC): Don't define (@unexec@ in Makefile.in is
 +      edited directly by msdos/sed1v2.inp).
 +
 +2010-05-07  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LD_SWITCH_SYSTEM): Set with configure, not cpp.
 +      (LD_SWITCH_SYSTEM_EXTRA): New variable, set by configure.
 +      (TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM and $LD_SWITCH_SYSTEM_EXTRA,
 +      move out of cpp section.
 +      * s/freebsd.h (LD_SWITCH_SYSTEM):
 +      * s/gnu-linux.h (LD_SWITCH_SYSTEM):
 +      * s/netbsd.h (LD_SWITCH_SYSTEM):
 +      * s/openbsd.h (LD_SWITCH_SYSTEM): Move to configure.in.
 +
 +2010-05-07  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Define LIB_STANDARD and START_FILES using autoconf.
 +      * s/usg5-4.h (LIB_STANDARD):
 +      * s/netbsd.h (START_FILES):
 +      * s/irix6-5.h (LIB_STANDARD):
 +      * s/hpux10-20.h (LIB_STANDARD, START_FILES):
 +      * s/gnu-linux.h (START_FILES, LIB_STANDARD):
 +      * s/freebsd.h (START_FILES):
 +      * s/darwin.h (START_FILES):
 +      * s/cygwin.h (START_FILES):
 +      * s/aix4-2.h (LIB_STANDARD):
 +      * m/ibmrs6000.h (START_FILES): Remove, move logic to configure.in.
 +      * Makefile.in (STARTFILES): Rename to START_FILES, define using
 +      autoconf, not cpp.
 +
 +2010-05-06  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove NEED_BSDTTY and NEED_UNISTD_H.
 +      * s/hpux10-20.h (NEED_BSDTTY): Remove.
 +      * s/aix4-2.h (NEED_UNISTD_H): Remove.
 +      * systty.h: Simplify conditionals for including <sys/bsdtty.h>,
 +      <sys/ptyio.h> and <unistd.h>.
 +
 +      * emacs.c (main): Remove NO_DIR_LIBRARY conditional, unused.
 +
 +      * Makefile.in (STARTFILES): Conditionally define to make the usage clear.
 +      * s/gnu.h (START_FILES): Remove empty definition.
 +
 +2010-05-06  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xterm.c (x_draw_image_relief): Move declaration of extra to beginning.
 +
 +2010-05-06  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (CPP, LN_S): Remove unused variables.
 +
 +2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * syntax.c (Fchar_syntax): Check the arg is a character (bug#6080).
 +
 +2010-05-05  Lawrence Mitchell  <wence@gmx.li>
 +
 +      * m/sparc.h: Fix typo in earlier change.
 +
 +2010-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Misc tweaks.
 +      * eval.c (Fdefvaralias): Remove unintended nested if.
 +      (internal_condition_case_2, internal_condition_case_n): Use ANSI type.
 +
 +2010-05-04  Bernhard Herzog  <bh@intevation.de>  (tiny change)
 +
 +      * xsmfns.c (smc_save_yourself_CB): strlen(client_id) => strlen(cwd).
 +
 +2010-05-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove BSD_PGRPS.
 +      * s/bsd-common.h (BSD_PGRPS): Remove undef.
 +      * s/gnu-linux.h (BSD_PGRPS): Remove.
 +      * term.c (dissociate_if_controlling_tty):
 +      * sysdep.c (narrow_foreground_group, widen_foreground_group)
 +      (init_sys_modes, reset_sys_modes):
 +      * emacs.c (main):
 +      * callproc.c (Fcall_process, child_setup): Remove code depending
 +      on BSD_PGRPS.
 +
 +      Remove POSIX_SIGNALS.
 +      * s/usg5-4.h (POSIX_SIGNALS):
 +      * s/netbsd.h (POSIX_SIGNALS):
 +      * s/msdos.h (POSIX_SIGNALS):
 +      * s/ms-w32.h (POSIX_SIGNALS):
 +      * s/hpux11.h (POSIX_SIGNALS):
 +      * s/gnu.h (POSIX_SIGNALS):
 +      * s/gnu-linux.h (POSIX_SIGNALS):
 +      * s/freebsd.h (POSIX_SIGNALS):
 +      * s/darwin.h (POSIX_SIGNALS):
 +      * s/cygwin.h (POSIX_SIGNALS):
 +      * s/aix4-2.h (POSIX_SIGNALS): Remove definition.
 +      * s/unixware.h:
 +      * s/sol2-6.h: Remove comments on POSIX_SIGNALS.
 +      * process.c (create_process):
 +      * syssignal.h:
 +      * sysdep.c (wait_for_termination, init_signals):
 +      * process.c (create_process):
 +      * msdos.c: POSIX_SIGNALS is always defined on all platforms,
 +      remove all code that assumes the contrary.
 +
 +2010-05-04  Glenn Morris  <rgm@gnu.org>
 +
 +      * s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell
 +      variable.
 +      * s/netbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
 +      (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH.
 +      * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
 +      (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH instead of
 +      LD_SWITCH_SYSTEM_tmp.
 +      * Makefile.in (LD_SWITCH_X_SITE_AUX, LD_SWITCH_X_SITE_AUX_RPATH):
 +      New variables, set by configure.
 +
 +      * s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
 +      * s/darwin.h (HEADERPAD_EXTRA, LIBS_NSGUI): Remove.
 +      (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
 +      * Makefile.in (LD_SWITCH_SYSTEM_TEMACS): New variable, set by configure.
 +      (TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM_TEMACS.
 +
 +      * s/aix4-2.h (C_SWITCH_SYSTEM):
 +      * m/alpha.h (C_SWITCH_MACHINE):
 +      Move to configure.in.
 +      * Makefile.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM):
 +      New variables, set by configure.
 +      (ALL_CFLAGS): Use $C_SWITCH_MACHINE and $C_SWITCH_SYSTEM in place of
 +      $c_switch_machine and $c_switch_system.
 +
 +2010-05-04  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/hpux10-20.h (LIB_STANDARD): New definition.
 +      * Makefile.in (ORDINARY_LINK): Remove setting LIB_STANDARD based
 +      on it, not used anymore.
 +
 +2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * eval.c (internal_condition_case_n): Rename from
 +      internal_condition_case_2.
 +      (internal_condition_case_2): New function.
 +
 +      * xdisp.c (safe_call): Use internal_condition_case_n.
 +
 +      * fileio.c (Fdelete_file, internal_delete_file): New arg FORCE.
 +      (internal_delete_file, Frename_file): Callers changed.
 +
 +      * buffer.c (Fkill_buffer):
 +      * callproc.c (delete_temp_file): Callers changed (Bug#6070).
 +
 +      * lisp.h: Update prototypes.
 +
 +2010-05-03  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBX_EXTRA, LIBX_BASE): New variables.
 +      (LIBXT_OTHER, LIBX_OTHER): New, set by configure.
 +      (LIBXT): Set with configure, not cpp.
 +      (LIBX): Remove.
 +      (LIBES): Replace $LIBX with $LIBX_BASE and $LIBX_OTHER.
 +
 +2010-05-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/amdx86-64.h (START_FILES, LIB_STANDARD): Remove.
 +      The FreeBSD is not needed, the default works, Solaris version is
 +      not needed, and the remaining case is not supported by configure.
 +
 +2010-05-02  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsmfns.c (CHDIR_OPT): New define.
 +      (smc_save_yourself_CB): Add CHDIR_OPT to options to use when
 +      restarting emacs.
 +
 +      * xterm.c (x_connection_closed): Call Fkill_emacs instead of
 +      shut_down_emacs.
 +
 +      * emacs.c (USAGE1): Mention --chdir.
 +      (main): Handle --chdir.
 +      (standard_args): Add --chdir.
 +      (fatal_error_signal): Call Fkill_emacs for SIGTERM and SIGHUP (Bug
 +      #5552).
 +
 +2010-05-01  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove LD_SWITCH_MACHINE.
 +      * Makefile.in (LD_SWITCH_MACHINE): Remove definition, unused.
 +      (TEMACS_LDFLAGS): Do not use LD_SWITCH_MACHINE.
 +
 +      Clean up IRIX code.
 +      * m/iris4d.h (TERMINFO, FIRST_PTY_LETTER): Move definitions ...
 +      * s/irix6-5.h (TERMINFO, FIRST_PTY_LETTER): ... here.
 +
 +      Clean up AIX code.
 +      * m/ibmrs6000.inp: Remove file, unused.
 +      * m/ibmrs6000.h (IBMR2AIX): Remove, unused.
 +      (LD_SWITCH_MACHINE): Rename to LD_SWITCH_SYSTEM_TEMACS, and move
 +      definition ...
 +      * s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): ... here.
 +
 +      * sysdep.c (child_setup_tty, init_sys_modes): Remove !IBMR2AIX code,
 +      unused.
 +
 +2010-05-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Emulate POSIX_SIGNALS on MS-Windows.
 +
 +      * s/ms-w32.h (POSIX_SIGNALS, struct sigaction, SIG_BLOCK)
 +      (SIG_SETMASK, SIG_UNBLOCK): Define.
 +
 +      * sysdep.c (sys_signal) [WINDOWSNT]: #ifdef away.
 +      (wait_for_termination) [WINDOWSNT]: Move MS-Windows specific code
 +      from non-POSIX_SIGNALS section to POSIX_SIGNALS section.
  
 -      * xterm.c (x_draw_fringe_bitmap): Don't clip bottom aligned bitmap
 -      specially.
 -      * w32term.c (w32_draw_fringe_bitmap): Likewise.
 -      * nsterm.m (ns_draw_fringe_bitmap): Likewise.
 +      * w32.c (sigemptyset, sigaddset, sigfillset, sigprocmask):
 +      New stubs.
  
 -      * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here.
 -      Take account of bitmap offset.
 -      (draw_window_fringes): Take account of window vscroll.
 -      (update_window_fringes): Likewise.  Extend top-aligned top indicator
 -      or bottom-aligned bottom indicator to adjacent rows if it doesn't fit
 -      in one row.  Don't set redraw_fringe_bitmaps_p outside row comparison.
 -      Set left_fringe_offset and right_fringe_offset (Bug#5634, Bug#6325).
 +      Miscellaneous fixes of bidi display.
  
 -2010-07-04  Juanma Barranquero  <lekktu@gmail.com>
 +      * xdisp.c (find_row_end): New function, refactored from display_line.
 +      (display_line): Use it.
 +      (extend_face_to_end_of_line): In almost-filled rows, extend only
 +      if the row is R2L and not continued.
 +      (display_line): Fix prepending of truncation glyphs to R2L rows.
 +      Preserve overlay and string info in row->end.
 +      (insert_left_trunc_glyphs): Support addition of left truncation
 +      glyphs to R2L rows.
 +      (set_cursor_from_row): Don't place cursor on the vertical border
 +      glyph between adjacent windows.  Fix a crash when a display string
 +      is continued to the next line.  Don't return zero if cursor was
 +      found by `cursor' property of a display string.
 +      (try_cursor_movement): Don't assume that row->end == (row+1)->start,
 +      test for that explicitly.
  
 -      * w32fns.c (Qtooltip): Declare.
 -      Suggested by Andy Moreton <andrewjmoreton@gmail.com>.
 +2010-05-01  Glenn Morris  <rgm@gnu.org>
  
 -2010-07-03  Jan Djärv  <jan.h.d@swipnet.se>
 +      * Makefile.in (gmallocobj, rallocobj, vmlimitobj): Initialize to null,
 +      for clarity.
 +      (OTHER_OBJ): Remove.
 +      (PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New, set by configure.
 +      (otherobj): Use PRE_ALLOC_OBJ, POST_ALLOC_OBJ rather than OTHER_OBJ.
  
 -      * xmenu.c (x_activate_menubar): Send Press/Release for Gtk+ to avoid
 -      grab on just Press (Bug#6499).
 +2010-05-01  Karel Klíč  <kklic@redhat.com>
  
 -2010-07-02  Chong Yidong  <cyd@stupidchicken.com>
 +      * fileio.c (Ffile_selinux_context): Context functions may return null.
  
 -      * frame.c (Qtooltip): New var.
 -      (delete_frame): Use it.  Fix faulty if statement.  Don't update
 -      mode line for tooltip frames.  Suggested by Martin Rudalics.
 +2010-04-30  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * xfns.c (x_create_tip_frame):
 -      * w32fns.c (x_create_tip_frame): Use it.
 +      * s/gnu.h (POSIX_SIGNALS, START_FILES): New definitions.
  
 -2010-06-30  Naohiro Aota  <naota@elisp.net>  (tiny change)
 +2010-04-30  Glenn Morris  <rgm@gnu.org>
  
 -      * xftfont.c (xftfont_open): Check font width one by one also when
 -      spacing is dual.
 +      * Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable.  (Bug#6065)
 +      (OTHER_OBJ): Define as a separate variable, for clarity.
  
 -      * ftfont.c (ftfont_open): Ditto.
 +2010-04-30  Jan Djärv  <jan.h.d@swipnet.se>
  
 -2010-06-26  Andreas Schwab  <schwab@linux-m68k.org>
 +      * xsettings.c: include limits.h and update file comment.
  
 -      * alloc.c (Fmake_byte_code): Don't access undefined argument
 -      (Bug#6517).
 +2010-04-30  Glenn Morris  <rgm@gnu.org>
  
 -2010-06-25  Chong Yidong  <cyd@stupidchicken.com>
 +      * Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]:
 +      Set with configure, not cpp.
 +      (LIBW): Remove, replace with $TOOLKIT_LIBW.
  
 -      * xdisp.c (next_element_from_image): Ensure that after-strings are
 -      read the next time we hit handle_stop (Bug#1336).
 +      * Makefile.in (mallocobj): Remove.
 +      (otherobj): Simplify using @OTHER_OBJ@.
  
 -2010-06-23  Andreas Schwab  <schwab@linux-m68k.org>
 +      * Makefile.in (dispnew.o, frame.o, fringe.o, font.o, fontset.o)
 +      (keyboard.o, window.o, xdisp.o, xfaces.o, menu.o):
 +      Don't bother making nsgui.h dependency platform-specific.
  
 -      * lread.c (read1): Signal error if #s is not followed by paren.
 +      * Makefile.in (nsfns.o): Remove duplicate nsgui.h dependency.
  
 -2010-06-19  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * image.c (free_image): Mark frame as garbaged (Bug#6426).
 +      * process.c (read_process_output, exec_sentinel): Don't burp if the
 +      sentinel/filter kills the current buffer (bug#6060).
  
 -      * keymap.c (Fdefine_key): Doc fix (Bug#6460).
 +      Fix wrong-docstring problem introduced with hash-consing.  (Bug#6008)
 +      * eval.c (Fautoload): Set doc to a unique number rather than to 0.
 +      Remove unused var `args'.
 +      * lisp.h (XSETCARFASTINT, XSETCDRFASTINT): Remove.
 +      (LOADHIST_ATTACH): Wrap with do...while to avoid surprises for callers.
 +      * doc.c (store_function_docstring): Use XSETCAR.
  
 -2010-06-15  Glenn Morris  <rgm@gnu.org>
 +2010-04-28  Glenn Morris  <rgm@gnu.org>
  
 -      * editfns.c (Fbyte_to_string): Pacify compiler.
 +      * Makefile.in (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT): New variables.
 +      (WINDOW_SUPPORT) [HAVE_WINDOW_SYSTEM]: Use them.
  
 -2010-06-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 +      * Makefile.in (CYGWIN_OBJ): Set with configure, not cpp.
  
 -      * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string.
 -      Check `object's type before accessing its guts.
 +      * Makefile.in (GPM_MOUSE_SUPPORT): New, set by configure.
 +      (MOUSE_SUPPORT) [!HAVE_MOUSE]: Use $GPM_MOUSE_SUPPORT.
  
 -2010-06-08  Andreas Schwab  <schwab@linux-m68k.org>
 +      * Makefile.in (FONT_OBJ): New, set by configure.
 +      (FONT_DRIVERS): Use $FONT_OBJ.
  
 -      * minibuf.c (Fall_completions): Add more checks.
 +      * Makefile.in (LIBXMU): Set with configure, not cpp.
 +      * s/aix4-2.h (LIBXMU):
 +      * s/hpux10-20.h (LIBXMU):
 +      Remove definition, now set in configure.
  
 -2010-06-08  Juanma Barranquero  <lekktu@gmail.com>
 +      * Makefile.in (NS_OBJ, NS_SUPPORT): Set with configure, not cpp.
  
 -      * minibuf.c (Fall_completions): Check COLLECTION's size (bug#6378).
 +      * m/amdx86-64.h [i386]: Move this test to configure.in.
  
 -2010-06-03  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-27  Glenn Morris  <rgm@gnu.org>
  
 -      * process.c (conv_lisp_to_sockaddr): Fix conversion of IPv4
 -      address.  (Bug#6346)
 +      * Makefile.in (LIBXTR6): Set with configure, not cpp.
 +      * s/unixware.h (NEED_LIBW): Remove definition.
  
 -2010-06-03  Juanma Barranquero  <lekktu@gmail.com>
 +      * Makefile.in (LUCID_LIBW, MOTIF_LIBW): Remove, replacing by...
 +      (TOOLKIT_LIBW): New, set by configure.
 +      (@X_TOOLKIT_TYPE@): No longer define it.
  
 -      * ccl.c (Fccl_program_p): Fix typo in docstring.
 +      * Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW.
 +      (MOTIF_LIBW): Set with configure, not cpp.
 +      * s/aix4-2.h (LIB_MOTIF):
 +      * s/gnu-linux.h (LIB_MOTIF):
 +      * s/unixware.h (LIB_MOTIF): Move to configure.in.
  
 -2010-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-27  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * keymap.c (Fwhere_is_internal): Fix handling of remapping (in thread
 -      of bug#6305).
 +      Reduce CPP usage.
 +      * Makefile.in (LIB_X11_LIB): Remove, inline in the only user.
 +      (obj): Use autoconf for unexec instead of cpp.
 +      (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove
 +      definitions and undefs.  Inline definitions in the only user.
 +      (ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf.
  
 -2010-05-27  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-27  Glenn Morris  <rgm@gnu.org>
  
 -      * xdisp.c (redisplay_window): After redisplay, check if point is
 -      still valid before setting it (Bug#6177).
 +      * m/amdx86-64.h (START_FILES, LIB_STANDARD): Change the logic around,
 +      since the defaults (set by the system file) are fine in most cases.
 +      [GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__]: Remove sections.
 +      * m/ibms390x.h (START_FILES, LIB_STANDARD):
 +      * m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]:
 +      * m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]:
 +      Remove definitions, since they are set correctly in s/gnu-linux.h.
 +      * s/freebsd.h (START_FILES, LIB_STANDARD):
 +      * s/gnu-linux.h (START_FILES, LIB_STANDARD):
 +      * s/hpux10-20.h (START_FILES):
 +      * s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1):
 +      Use $CRT_DIR in place of fixed /usr/lib, /lib directories.
  
 -2010-05-20  enami tsugutomo  <tsugutomo.enami@jp.sony.com>
 +      * Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
 +      (MOTIF_LIBW): Use $LIBXP.
 +      (otherobj): Use $WIDGET_OBJ.
  
 -      * s/netbsd.h: If terminfo is found, use it in preference to
 -      termcap.  (Bug#6190)  [Backport from trunk]
 +2010-04-26  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -2010-05-20  Kevin Ryde  <user42@zip.com.au>
 +      * Makefile.in (LIBS_MACHINE): Remove, unused.
  
 -      * keyboard.c (Vlast_command, Vkeyboard_translate_table)
 -      (Voverriding_terminal_local_map, Vsystem_key_alist)
 -      (Vlocal_function_key_map): Fix manual link in docstring (Bug#6224).
 +      Use autoconf instead of cpp for LIB_MATH.
 +      * s/darwin.h (LIB_MATH): Do not define here, move to configure.
 +      * s/cygwin.h (LIB_MATH): Likewise.
 +      * Makefile.in (LIB_MATH): Do not define with cpp.
 +      (LIBES): Use autoconf for LIB_MATH.
  
 -2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 +2010-04-26  Kenichi Handa  <handa@m17n.org>
  
 -      * editfns.c (Fbyte_to_string): New function.
 +      * composite.c (Ffind_composition_internal): Fix the return value
 +      for an automatic composition.
  
 -2010-05-18  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-25  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
 -      prevent stack overflow if number of arguments is too large
 -      (Bug#6214).
 +      Remove all NO_ARG_ARRAY uses.
 +      * fns.c (concat2, concat3, nconc2):
 +      * eval.c (apply1, call1, call2, call3, call4, call5, call6)
 +      (call7): Remove NO_ARG_ARRAY usage, assume it's always true.
 +      * m/xtensa.h (NO_ARG_ARRAY):
 +      * m/template.h (NO_ARG_ARRAY):
 +      * m/sparc.h (NO_ARG_ARRAY):
 +      * m/sh3.h (NO_ARG_ARRAY):
 +      * m/mips.h (NO_ARG_ARRAY):
 +      * m/macppc.h (NO_ARG_ARRAY):
 +      * m/iris4d.h (NO_ARG_ARRAY):
 +      * m/intel386.h (NO_ARG_ARRAY):
 +      * m/ibms390x.h (NO_ARG_ARRAY):
 +      * m/ibms390.h (NO_ARG_ARRAY):
 +      * m/ibmrs6000.h (NO_ARG_ARRAY):
 +      * m/ia64.h (NO_ARG_ARRAY):
 +      * m/hp800.h (NO_ARG_ARRAY):
 +      * m/arm.h (NO_ARG_ARRAY):
 +      * m/amdx86-64.h (NO_ARG_ARRAY):
 +      * m/alpha.h (NO_ARG_ARRAY): Remove definition.
  
 -2010-05-11  Eli Zaretskii  <eliz@gnu.org>
 +2010-04-25  Eli Zaretskii  <eliz@gnu.org>
  
 -      * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(SRC)/w32.h.
 +      * xdisp.c (display_line): Don't assume 2nd call to
 +      get_next_display_element cannot return zero.  (Bug#6030)
 +      (iterate_out_of_display_property): New function, body from pop_it.
 +      (pop_it): Use it.
  
 -      * w32fns.c: Include w32.h.
 -      (Fw32_shell_execute): Decode the error message before passing it
 -      to `error'.  (Bug#6126)
 +2010-04-24  Glenn Morris  <rgm@gnu.org>
  
 -2010-05-11  Karel Klic  <kklic@redhat.com>
 +      * m/amdx86-64.h (START_FILES, LIB_STANDARD) [__OpenBSD__]:
 +      For clarity, revert to using fixed /usr/lib rather than $CRT_DIR.
 +      (START_FILES, LIB_STANDARD) [__FreeBSD__]: Merge into the generic case,
 +      since CRT_DIR defaults to /usr/lib.  Suggested by Dan Nicolaescu.
  
 -      * ftfont.c: Fix incorrect parentheses of #if condition for
 -      definining M17N_FLT_USE_NEW_FEATURE.
 +2010-04-24  Eli Zaretskii  <eliz@gnu.org>
  
 -2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 +      * xdisp.c (display_line): Use `reseat' instead of `reseat_1', and
 +      use `get_next_display_element' and `set_iterator_to_next' to
 +      advance to the next character, when looking for the character that
 +      begins the next row.
 +
 +      * .gdbinit: Add a "set Fmake_symbol" line to force GDB to load the
 +      definition of "struct Lisp_Symbol".
 +
 +2010-04-24  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (CRT_DIR): New variable, set by configure.
 +      * m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
 +      Use $CRT_DIR rather than HAVE_LIB64_DIR.  (Bug#5655)
 +
 +2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in: Remove C_SWITCH_X_MACHINE, unused.
 +
 +      * s/cygwin.h (LIBS_DEBUG): Remove, unused.
 +
 +      Remove redundant flags.
 +      * s/freebsd.h (C_SWITCH_SYSTEM):
 +      * s/hpux10-20.h (C_SWITCH_X_SYSTEM, LD_SWITCH_X_DEFAULT):
 +      * s/netbsd.h (C_SWITCH_SYSTEM):
 +      * s/openbsd.h (LD_SWITCH_X_DEFAULT): Remove, configure takes care
 +      of these.
 +
 +      Simplify m/intel386.h.
 +      * m/intel386.h (CRT0_DUMMIES): Remove, inline value in the only
 +      user: ecrt0.c.
 +      (SOLARIS2): Remove LOAD_AVE_TYPE, LOAD_AVE_CVT, LIBS_MACHINE, unused.
 +      (USG5_4): Move LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE definitions to
 +      the only user: s/unixware.h.
 +      * ecrt0.c: Remove #ifndef static.  Inline CRT0_DUMMIES definition
 +      from m/intel386.h.
 +      * s/unixware.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE): Definitions
 +      moved here from m/intel386.h.
 +
 +      * m/mips.h: Remove #if 0 code.
 +
 +2010-04-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix display of composed characters from L2R scripts in bidi buffers.
 +      * xdisp.c (set_iterator_to_next, next_element_from_composition):
 +      After advancing IT past the composition, resync the bidi iterator
 +      with IT's position.  (Bug#5977)
 +
 +2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (LD_SWITCH_MACHINE_TEMACS): Remove, unused.
 +      (TEMACS_LDFLAGS): Don't use LD_SWITCH_SYSTEM_TEMACS.
 +
 +2010-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * gtkutil.c: Include xsettings.h for Ftool_bar_get_system_style.
 +
 +2010-04-23  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Support `display' text properties and overlay strings in bidi buffers.
 +      * xdisp.c (pop_it): When the stack is popped after displaying
 +      from a string, bidi-iterate to exit from the text portion covered
 +      by the `display' property or overlay.  (Bug#5988, bug#5920)
 +
 +2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/macppc.h (LD_SWITCH_SYSTEM_TEMACS): Remove #undef.
 +      (LD_SWITCH_MACHINE_TEMACS): Remove, configure sets nocombreloc.
 +
 +      * s/netbsd.h (LD_SWITCH_SYSTEM_TEMACS): Remove, configure sets nocombreloc.
 +      * s/openbsd.h (LD_SWITCH_SYSTEM_TEMACS): Remove.
 +
 +      Simplify STARTFILES definition.
 +      * s/hpux10-20.h (START_FILES): Explicitly define here instead of
 +      relying on Makefile.in to define it.
 +      * s/cygwin.h (START_FILES): Likewise.
 +      * Makefile.in (STARTFILES): Remove conditional code, not needed anymore.
 +
 +      Clean up Solaris code.
 +      * s/sol2-6.h (LD_SWITCH_SYSTEM_TEMACS, C_SWITCH_X_SYSTEM)
 +      (LIB_MOTIF): Remove, configure takes care of this.
 +      (NOT_USING_MOTIF): Remove, unused.
 +      * xrdb.c: Remove #if 0-ed #include.
 +      (SYSV): Remove conditional for old SysV.
 +      * sysdep.c (closedir): Remove conditional code for Solaris,
 +      Solaris has closedir.
  
 -      * Version 23.2 released.
 +2010-04-22  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (read_and_apply_settings): Check if current_font is
 +      NULL before strcmp (Bug#6001).
  
 -2010-04-30  Andreas Schwab  <schwab@linux-m68k.org>
 +2010-04-21  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * composite.c (autocmp_chars): Save point as marker before calling
 -      auto-composition-function (Bug#5984).
 +      Clean up HP-UX files.
 +      * m/hp800.h (NO_REMAP, VIRT_ADDR_VARIES, DATA_SEG_BITS)
 +      (DATA_START, TEXT_START, LOAD_AVE_TYPE, LOAD_AVE_CVT)
 +      (LDAV_SYMBOL, index, rindex): Move definitions only used in HP-UX ...
 +      * s/hpux10-20.h: ... to the only user, here.
  
 -      * lisp.h (restore_point_unwind): Add prototype.
 +2010-04-21  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_find_paragraph_start, bidi_at_paragraph_end): Don't
 +      use buffer-local values of paragraph-start and paragraph-separate.
 +      <paragraph_start_re, paragraph_separate_re>: Rename from
 +      fallback_paragraph_start_re and fallback_paragraph_separate_re.
 +      (Bug#5992)
  
 -      * fileio.c (restore_point_unwind): Remove static attribute.
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c: Qmonospace_font_name, Qtool_bar_style and
 +      current_tool_bar_style are new.
 +      (store_config_changed_event): Rename from store_font_changed_event.
 +      (XSETTINGS_TOOL_BAR_STYLE): New define.
 +      (SEEN_FONT, SEEN_TB_STYLE): New enum values.
 +      (struct xsettings): Add font and tb_style, set xft stuff inside #ifdef
 +      HAVE_XFT.
 +      (something_changedCB): store_font_changed_event is now
 +      store_config_changed_event
 +      (parse_settings): Rename from parse_xft_settings.  Read
 +      non-xft xsettings outside #ifdef HAVE_XFT.
 +      (read_settings): Renamed from read_xft_settings.
 +      (apply_xft_settings): Take current settings as parameter.  Do not
 +      call read_(xft)_settings.
 +      (read_and_apply_settings): New function.
 +      (xft_settings_event): Do non-xft stuff out of HAVE_XFT.  Call
 +      read_and_apply_settings if there are settings to be read.
 +      (init_xsettings): Renamed from init_xfd_settings.
 +      Call read_and_apply_settings unconditionally.
 +      (xsettings_initialize): Call init_xsettings.
 +      (Ftool_bar_get_system_style): New function.
 +      (syms_of_xsettings): Define Qmonospace_font_name and
 +      Qtool_bar_style.  Initialize current_tool_bar_style to nil.
 +      defsubr Stool_bar_get_system_style.  Fprovide on
 +      dynamic-setting.
 +      Move misplaced HAVE_GCONF
  
 -2010-04-23  Kenichi Handa  <handa@m17n.org>
 +      * xsettings.h (Ftool_bar_get_system_style): Declare.
  
 -      * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the
 -      new feature of libotf and m17n-flt.
 -      (ftfont_check_otf) [M17N_FLT_USE_NEW_FEATURE]: Call
 -      OTF_check_features even if no specific feature is given.
 -      (PACK_OTF_TAG) [M17N_FLT_USE_NEW_FEATURE]: New macro.
 -      (ftfont_drive_otf) [M17N_FLT_USE_NEW_FEATURE]: Handle the case
 -      that OUT is NULL.  Use OTF_drive_gsub_with_log and
 -      OTF_drive_gpos_with_log instead of OTF_drive_gsub and
 -      OTF_drive_gpos.
 -      (ftfont_try_otf) [M17N_FLT_USE_NEW_FEATURE]: New function.
 -      (ftfont_shape_by_flt) [M17N_FLT_USE_NEW_FEATURE]: Setup
 -      mflt_enable_new_feature and mflt_try_otf.
 +      * xdisp.c: Vtool_bar_style, tool_bar_max_label_size,
 +      Qtext, Qboth, Qboth_horiz are new.
 +      (syms_of_xdisp): Intern Qtext, Qboth, Qboth_horiz, DEFVAR
 +      Vtool_bar_style, tool_bar_max_label_size.
 +
 +      * lisp.h: Extern declare Qtext, Qboth, Qboth_horiz.
 +
 +      * keyboard.c: QClabel is new.
 +      (parse_tool_bar_item): Take out QClabel from tool bar items.
 +      Try to construct a label if ther is no QClabel.
 +      (syms_of_keyboard): Intern :label as QClabel.
 +
 +      * dispextern.h (tool_bar_item_idx): TOOL_BAR_ITEM_LABEL is new.
 +      (Vtool_bar_style, tool_bar_max_label_size, DEFAULT_TOOL_BAR_LABEL_SIZE):
 +      New.
 +
 +      * Makefile.in (SOME_MACHINE_LISP): font-setting.el renamed to
 +      dynamic-setting.el.
 +
 +      * gtkutil.c (xg_tool_bar_menu_proxy): Handle label in tool bar item.
 +      (xg_make_tool_item, xg_show_toolbar_item): New function.
 +      (update_frame_tool_bar): Take label from TOOL_BAR_ITEM_LABEL.
 +      Call xg_make_tool_item to make a tool bar item.
 +      Call xg_show_toolbar_item.  Use wtoolbar instead of x->toolbar_widget.
 +
 +      * xterm.c (x_draw_image_relief): Take Vtool_bar_button_margin
 +      into account for toolbars.
 +
 +2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * data.c (make_blv): Declarations before code (Bug#5993).
 +
 +2010-04-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (DBUS_OBJ, GTK_OBJ, XMENU_OBJ, XOBJ):
 +      Define using autoconf, not cpp.
 +      (LIBXSM): New variable, set by autoconf.
 +      (LIBXT): Use $LIBXSM.
 +
 +2010-04-21  Dan Nicolaescu  <local_user@dannlt>
 +
 +      Remove NOMULTIPLEJOBS, unused.
 +      * s/template.h (NOMULTIPLEJOBS):
 +      * s/msdos.h (NOMULTIPLEJOBS): Remove, unused.
 +
 +      Simplify LD_SWITCH_SYSTEM_TEMACS usage.
 +      * s/freebsd.h (LD_SWITCH_SYSTEM_TEMACS):
 +      * s/gnu-linux.h (LD_SWITCH_SYSTEM_TEMACS): Remove, configure
 +      detects -znocombreloc and passes it to the linker
 +      * s/hpux10-20.h (LD_SWITCH_SYSTEM_TEMACS): Remove, empty.
 +
 +2010-04-21  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBSELINUX_LIBS): Move out of #ifdef.
 +
 +2010-04-21  Karel Klíč  <kklic@redhat.com>
 +
 +      * Makefile.in (LIBSELINUX_LIBS): New.
 +      (LIBES): Add $LIBSELINUX_LIBS.
 +      * eval.c, lisp.h (call7): New function.
 +      * fileio.c [HAVE_LIBSELINUX]: Include selinux headers.
 +      (Ffile_selinux_context, Fset_file_selinux_context):
 +      New functions.
 +      (Fcopy_file): New parameter preserve-selinux-context.
 +      (Frename_file): Preserve selinux context when renaming by copy-file.
 +
 +2010-04-21  Juanma Barranquero  <lekktu@gmail.com>
 +            Eli Zaretskii  <eliz@gnu.org>
 +
 +      Don't depend on cm.c or termcap.c on Windows, use stubs.
 +      * makefile.w32-in (OBJ1): Remove cm.$(O) and termcap.$(O).
 +      ($(BLD)/cm.$(O), $(BLD)/termcap.$(O)): Remove.
 +      * w32console.c (current_tty, cost): New vars; lifted from cm.c.
 +      (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear)
 +      (sys_tputs, sys_tgetstr): New stubs.
 +      * s/ms-w32.h (chcheckmagic, cmcostinit, cmgoto, cmputc, Wcm_clear)
 +      (tputs, tgetstr): New; define to sys_*.
 +
 +2010-04-20  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * buffer.c (syms_of_buffer) <bidi-display-reordering>: Doc fix.
 +
 +2010-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
 +      Just signal a warning rather than an error when inside a let.
 +      (Fmake_variable_frame_local): Add the same test.
 +
 +      * font.c (syms_of_font): Make the style table vars read-only.
 +
 +      * buffer.h (struct buffer): Remove unused var `direction_reversed'.
 +      * buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization.
 +
 +      * bidi.c (bidi_initialize): Simplify fallback_paragraph_*_re init.
 +
 +2010-04-20  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix R2L paragraph display on TTY.
 +
 +      * xdisp.c (unproduce_glyphs): New function.
 +      (display_line): Use it when produced glyphs are discarded from R2L
 +      glyph rows.
 +      (append_composite_glyph): In R2L rows, prepend the glyph rather
 +      than appending it.
 +
 +      * term.c (append_composite_glyph): In R2L rows, prepend the glyph
 +      rather than append it.  Set up the resolved_level and bidi_type
 +      attributes of the appended glyph.
 +      (produce_special_glyphs): Mirror the backslash continuation
 +      character in R2L lines.
 +
 +      Implement display of R2L paragraphs in GUI sessions.
 +
 +      * xdisp.c [HAVE_WINDOW_SYSTEM]: Add prototype for
 +      append_stretch_glyph.
 +      (set_cursor_from_row) <cursor_x>: Remove unused variable.  Fix
 +      off-by-one error in computing x at end of text in the row.
 +      (append_stretch_glyph): In reversed row, prepend the glyph rather
 +      than append it.  Set resolved_level and bidi_type of the glyph.
 +      (extend_face_to_end_of_line): If the row is reversed, prepend a
 +      stretch glyph whose width is such that the rightmost glyph will be
 +      drawn at the right margin of the window.  Fix off-by-one error on
 +      TTY frames in testing whether a line needs face extension.  Fix
 +      face extension at ZV.  If this is the last glyph row, use
 +      DEFAULT_FACE_ID, to avoid painting the rest of the window with the
 +      region face.
 +      (set_cursor_from_row, display_line): Use
 +      MATRIX_ROW_CONTINUATION_LINE_P instead of testing value of
 +      row->continuation_lines_width.
 +      (next_element_from_buffer): Don't call bidi_paragraph_init if we
 +      are at ZV.  Fixes a crash when reseated to ZV by
 +      try_window_reusing_current_matrix.
 +      (display_and_set_cursor, erase_phys_cursor): Handle negative HPOS,
 +      which happens with R2L glyph rows.  Fixes a crash when inserting a
 +      character at end of an R2L line.
 +      (set_cursor_from_row): Don't be fooled by truncated rows: don't
 +      treat them as having zero-width characters.  Improve comments.
 +      Don't reverse pos_before and pos_after for reversed glyph rows.
 +      Set cursor.x to negative value when the cursor might be on the
 +      left fringe.
 +      (IT_OVERFLOW_NEWLINE_INTO_FRINGE): For R2L lines, consider the
 +      left fringe, not the right one.
 +      (notice_overwritten_cursor, draw_phys_cursor_glyph)
 +      (erase_phys_cursor): For reversed cursor_row, support cursor on
 +      the left fringe.
 +
 +      * fringe.c (update_window_fringes): For R2L rows, swap the bitmaps
 +      of continuation indicators on the fringes.
 +      (draw_fringe_bitmap): For reversed glyph rows, allow cursor on the
 +      left fringe.
 +
 +      * w32term.c (w32_draw_window_cursor): For reversed glyph rows,
 +      draw cursor on the left fringe.
 +
 +      * xterm.c (x_draw_window_cursor): For reversed glyph rows, draw
 +      cursor on the left fringe.
 +
 +      * dispnew.c (update_text_area): Handle reversed desired rows when
 +      the cursor is on the left fringe.
 +      (set_window_cursor_after_update): Limit cursor's hpos by -1 from
 +      below, not by 0, for when the cursor is on the left fringe.
 +
 +2010-04-20  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_event_is_for_scrollbar): Check if grabbed
 +      widget is a scrollbar.
 +
 +2010-04-20  Kenichi Handa  <handa@m17n.org>
 +
 +      * charset.c (char_charset): Consider Vcharset_non_preferred_head
 +      only when the arg CHARSET_LIST is nil.
 +
 +2010-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Make variable forwarding explicit rather the using special values.
 +      Basically, this makes the structure of buffer-local values and object
 +      forwarding explicit in the type of Lisp_Symbols rather than use
 +      special Lisp_Objects for that.  This tends to lead to slightly more
 +      verbose code, but is more C-like, simpler, and makes it easier to make
 +      sure we handled all cases, among other things by letting the compiler
 +      help us check it.
 +      * lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
 +      Removing forwarding objects.
 +      (enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
 +      (struct Lisp_Symbol): Make the various forms of variable-forwarding
 +      explicit rather than hiding them inside Lisp_Object "values".
 +      (XFWDTYPE): New macro.
 +      (XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
 +      (XBUFFER_LOCAL_VALUE): Remove.
 +      (SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
 +      (SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
 +      (SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
 +      (struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
 +      (struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
 +      Remove the Lisp_Misc_* header.
 +      (struct Lisp_Buffer_Local_Value): Redefine.
 +      (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
 +      (struct Lisp_Misc_Any): Add filler to get the right size.
 +      (struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
 +      Lisp_Intfwd.
 +      (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
 +      (DEFVAR_KBOARD): Allocate a forwarding object.
 +      * data.c (do_blv_forwarding, store_blv_forwarding): New macros.
 +      (let_shadows_global_binding_p): New function.
 +      (union Lisp_Val_Fwd): New type.
 +      (make_blv): New function.
 +      (swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
 +      (store_symval_forwarding, swap_in_global_binding, Fboundp)
 +      (swap_in_symval_forwarding, find_symbol_value, Fset)
 +      (let_shadows_buffer_binding_p, set_internal, default_value)
 +      (Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
 +      (Fkill_local_variable, Fmake_variable_frame_local)
 +      (Flocal_variable_p, Flocal_variable_if_set_p)
 +      (Fvariable_binding_locus):
 +      * xdisp.c (select_frame_for_redisplay):
 +      * lread.c (Fintern, Funintern, init_obarray, defvar_int)
 +      (defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
 +      * frame.c (store_frame_param):
 +      * eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
 +      * bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
 +      value structure.
 +      * buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
 +      (clone_per_buffer_values): Only adjust markers into the current buffer.
 +      (reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
 +      (Fbuffer_local_value, set_buffer_internal_1)
 +      (swap_out_buffer_local_variables):
 +      Adapt to the new symbol value structure.
 +      (DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
 +      (defvar_per_buffer): Take a new arg for the fwd object.
 +      (buffer_lisp_local_variables): Return a proper alist (different fix
 +      for bug#4138).
 +      * alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
 +      (Fgarbage_collect): Don't handle buffer_defaults specially.
 +      (mark_object): Handle new symbol value structure rather than the old
 +      special Lisp_Misc_* objects.
 +      (gc_sweep) <symbols>: Free also the buffer-local-value objects.
 +      * term.c (set_tty_color_mode):
 +      * bidi.c (bidi_initialize): Don't access the ->value field directly.
 +      * buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
 +      a buffer_local_flags.
 +      * print.c (print_object): Get rid of impossible forwarding objects.
 +
 +2010-04-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_get_type, bidi_get_category)
 +      (bidi_at_paragraph_end, bidi_resolve_weak, bidi_resolve_neutral)
 +      (bidi_type_of_next_char, bidi_level_of_next_char):
 +      Declare static.  Use `INLINE' rather than `inline'.
  
  2010-04-19  Juanma Barranquero  <lekktu@gmail.com>
  
        * dired.c (Ffile_attributes): Fix typo in docstring.
  
 -2010-04-13  Adrian Robert  <Adrian.B.Robert@gmail.com>
 +2010-04-19  Adrian Robert  <Adrian.B.Robert@gmail.com>
  
        * nsmenu.m (EmacsDialog-runDialogAt:): Declare ret as
        NSInteger (Bug#5811).
  
 -2010-04-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-04-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        * s/darwin.h (PTY_ITERATION, PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF)
        (PTY_OPEN): New defines.  Use openpty (Bug#726, Bug#5819).
  
 -2010-04-08  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-04-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        * frame.h (FRAME_LINE_TO_PIXEL_Y): Add missing parenthesis.
  
 +2010-04-19  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xdisp.c (prepare_menu_bars): Don't call ns_set_doc_edited for
 +      terminal frames (Bug#5837).
 +
 +2010-04-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * .gdbinit (xsubchartable): New command.
 +
 +2010-04-19  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (display_line): Don't write beyond the last glyph row in
 +      the desired matrix.  Fixes a crash in "emacs -nw" (bug#5972), see
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00075.html
 +      and
 +      http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00213.html
 +
 +2010-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * alloc.c (Fpurecopy): Hash-cons if requested.
 +      (syms_of_alloc): Update purify-flag docstring.
 +
 +2010-04-18  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_set_geometry): Set size in geometry string also.
 +      (x_wm_set_size_hint): Set USER_POS in hint_flags (Bug#5968).
 +
 +2010-04-17  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Fix a crash when an NSM character is inserted at BEGV.
 +
 +      * bidi.c (bidi_init_it): Fix initialization of bidi_it->prev.
 +      (bidi_resolve_weak): Don't use prev.type_after_w1 if it is
 +      NEUTRAL_B or UNKNOWN_BT.
 +
 +2010-04-16  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (set_cursor_from_row): Don't consider possibility of
 +      other rows with cursor unless they are different from this row and
 +      this row is part of a continued line.  (Bug#5943)
 +
 +2010-04-16  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/freebsd.h: Restore osreldate.h include.
 +      Suggested by Naohiro Aota.
 +
 +2010-04-16  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (apply_systemfont_to_menu): *childs was incorrectly used.
 +
 +2010-04-16  Ken Brown  <kbrown@cornell.edu>  (tiny change)
 +
 +      * s/cygwin.h: Avoid linking against static libgcc.
 +
 +2010-04-15  Juri Linkov  <juri@jurta.org>
 +
 +      * window.c: Add Qscroll_command.
 +      Remove Vscroll_preserve_screen_position_commands.
 +      (window_scroll_pixel_based, window_scroll_line_based): Check the
 +      `scroll-command' property on the last command instead of searching
 +      the last command in Vscroll_preserve_screen_position_commands.
 +      (syms_of_window): Initialize and staticpro `Qscroll_command'.
 +      Put Qscroll_command property on Qscroll_up and Qscroll_down.
 +      (scroll-preserve-screen-position): Doc fix.
 +      (Vscroll_preserve_screen_position_commands): Remove variable.
 +
 +2010-04-15  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xdisp.c (message): Do not use NO_ARG_ARRAY.
 +
 +2010-04-14  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Reduce cpp use in Makefile.in.
 +      * Makefile.in (DBUS_CFLAGS, DBUS_LIBS, GCONF_CFLAGS, GCONF_LIBS)
 +      (LIBSOUND, CFLAGS_SOUND, RSVG_LIBS, RSVG_CFLAGS, INTERVALS_H)
 +      (GETLOADAVG_LIBS, RUN_TEMACS): Move to the autoconf section.
 +      (ORDINARY_LINK): Remove, defined in src/s/gnu.h.
 +      (CRT0_COMPILE): Remove, inline it in the only user.
 +
 +2010-04-14  Juri Linkov  <juri@jurta.org>
 +
 +      * window.c (keys_of_window): Rebind `C-v' from `scroll-up' to
 +      `scroll-up-command' and `M-v' from `scroll-down' to
 +      `scroll-down-command'.
 +
 +2010-04-14  Juri Linkov  <juri@jurta.org>
 +
 +      * window.c (Vscroll_preserve_screen_position_commands): New variable
 +      with the default value as the list of Qscroll_down and Qscroll_up.
 +      (window_scroll_pixel_based, window_scroll_line_based): Search the
 +      last command in the list Vscroll_preserve_screen_position_commands
 +      instead of comparing with Qscroll_up and Qscroll_down.
 +
 +2010-04-13  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
 +      (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry
 +      does that.
 +
 +      * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width
 +      to zero.
 +
 +2010-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * term.c (init_tty): Move common text outside of #ifdef TERMINFO.
 +
 +      Try to solve the problem of spurious EOF chars in long lines of text
 +      sent to interactive subprocesses.
 +      * sysdep.c (child_setup_tty): Do not enable ICANON any more.
 +      (system_process_attributes): Remove unused var `ttotal'.
 +      * process.c (send_process): Don't bother breaking long line with EOF
 +      chars when talking to ttys any more.
 +      (wait_reading_process_output): Output a warning when called in such
 +      a way that it could block without being interruptible.
 +
 +      Try to detect file modification within the same second.
 +      * buffer.h (struct buffer): New field modtime_size.
 +      * buffer.c (reset_buffer): Initialize it.
 +      * fileio.c (Finsert_file_contents, Fwrite_region): Set it.
 +      (Fverify_visited_file_modtime): Check it.
 +      (Fclear_visited_file_modtime, Fset_visited_file_modtime): Clear it.
 +      (Fset_visited_file_modtime): Set (or clear) it.
 +
 +2010-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * process.c (status_notify): Remove unused var `ro'.
 +
 +2010-04-12  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (select_visual): Don't call error if XGetVisualInfo returns
 +      more than one visual (Bug#5938).
 +
 +2010-04-12  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * Makefile.in (C_SWITCH_SYSTEM,C_SWITCH_MACHINE,C_SWITCH_X_SITE):
 +      Undefine.
 +
 +2010-04-11  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove C_SWITCH_SYSTEM_TEMACS.
 +      * s/darwin.h (C_SWITCH_SYSTEM_TEMACS): Remove.
 +      (malloc, realloc, free): Use emacs, not temacs for conditional
 +      definition.
 +
 +      * Makefile.in (C_SWITCH_SYSTEM_TEMACS): Remove.
 +      (ALL_CFLAGS): Do not use C_SWITCH_SYSTEM_TEMACS.
 +
 +      Use autoconf, not cpp for some variables.
 +      * Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE)
 +      (C_SWITCH_X_SITE): Define using autoconf, not cpp.
 +      (ALL_CFLAGS): Use them as make variables.
 +      (really-lwlib, really-oldXMenu): Do not pass them.
 +
 +2010-04-11  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xmenu.c (apply_systemfont_to_dialog): New.
 +      (create_and_show_dialog): Call apply_systemfont_to_dialog if HAVE_XFT.
 +
 +2010-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * process.c (exec_sentinel): Preserve current-buffer.
 +
 +      * process.c (read_process_output): Move the save-current-buffer to
 +      apply to both the filter and the non-filter branches.
 +
 +2010-04-10  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/msdos.h (UNEXEC): New definition.
 +
 +2010-04-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * dispextern.h (TRY_WINDOW_CHECK_MARGINS)
 +      (TRY_WINDOW_IGNORE_FONTS_CHANGE): New defines.
 +
 +      * xdisp.c (try_window): Change arg from CHECK_MARGINS to FLAGS.
 +      Don't abort with fonts change if TRY_WINDOW_IGNORE_FONTS_CHANGE is
 +      set in FLAGS.  Callers with non-zero CHECK_MARGINS changed to use
 +      TRY_WINDOW_CHECK_MARGINS.
 +
 +      * xfns.c (Fx_show_tip): Undo last change.  Call try_window with
 +      TRY_WINDOW_IGNORE_FONTS_CHANGE (Bug#2423).  Subtract last glyph's
 +      width only when it is for padding.
 +
 +2010-04-09  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (Fx_show_tip): Call try_window in a loop until
 +      fonts_changed_p is zero (Bug#2423).
 +
 +2010-04-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (set_cursor_from_row): Don't dereference glyphs beyond
 +      the end of TEXT_AREA.  (Bug#5856)
 +
 +2010-04-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (XSETTINGS_FONT_NAME): Move XSETTINGS_FONT_NAME out of
 +      HAVE_GCONF.
 +
 +2010-04-08  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_resolve_weak): Use prev.type_after_w1, instead of
 +      prev.orig_type, for resolving type of NSM.  (Bug#5858)
 +
 +2010-04-08  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
 +      (parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
 +      in current_font.
 +      (init_gconf): Read value of SYSTEM_FONT and save it in current_font.
 +      (Ffont_get_system_normal_font, xsettings_get_system_normal_font):
 +      New functions.
 +      (syms_of_xsettings): Initialize current_font.
 +      defsubr Sfont_get_system_normal_font.
 +
 +      * xsettings.h (Ffont_get_system_normal_font,
 +      xsettings_get_system_normal_font): Declare.
 +
 +      * xfns.c (extern xlwmenu_default_font): Remove.
 +      (Fx_create_frame): Remove setting of xlwmenu_default_font, moved
 +      to xlwmenu.c.
 +
 +      * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
 +      menu items in UTF-8.
 +
 +      * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
 +      (apply_systemfont_to_menu): New function.
 +      (set_frame_menubar, create_and_show_popup_menu): Call
 +      apply_systemfont_to_menu.
 +
  2010-04-07  Jan Djärv  <jan.h.d@swipnet.se>
  
        * frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use
        * xterm.c (x_set_window_size_1): Don't add border_width/height to
        pixelwidth/height.
  
 -2010-04-05  Chong Yidong  <cyd@stupidchicken.com>
 +2010-04-07  Dan Nicolaescu  <dann@ics.uci.edu>
  
 -      * xdisp.c (prepare_menu_bars): Don't call ns_set_doc_edited for
 -      terminal frames (Bug#5837).
 +      Simplify code for HP machines.
 +      * m/hp800.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, NO_REMAP): Do not define
 +      for GNU_LINUX, not needed.
 +      (UNEXEC, NEED_BSDTTY): Move definitions...
 +      * s/hpux10-20.h (UNEXEC, NEED_BSDTTY): ... here.
 +
 +      * m/iris4d.h (UNEXEC): Move definition ...
 +      * s/irix6-5.h (UNEXEC): ... here.
 +
 +2010-04-04  Jan Djärv  <jan.h.d@swipnet.se>
 +
 +      * xfns.c (set_machine_and_pid_properties): New function.
 +      (Fx_create_frame): Call set_machine_and_pid_properties.
 +
 +2010-04-03  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_resolve_explicit, bidi_level_of_next_char): Check
 +      bidi_it->bytepos against ZV_BYTE instead of bidi_it->ch against
 +      BIDI_EOB.  Fixes infloop with vertical cursor motion at ZV.
 +
 +      * w32fns.c (x_create_tip_frame): Copy `parms' before we modify it
 +      in this function.  (Bug#5703)
 +
 +2010-04-03  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * nsterm.h: Fix last change.
 +
 +2010-04-03  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/intel386.h (NO_REMAP): Move definition ...
 +      * s/msdos.h (NO_REMAP): ... here.
 +
 +      * m/vax.h (CRT0_DUMMIES): Remove, unused.
 +
 +      * ecrt0.c: Remove MSDOS, m68k and __sparc__ conditionals, file not
 +      used on those platforms.
 +
 +2010-04-02  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove extern errno declarations.
 +      * xterm.c:
 +      * xrdb.c:
 +      * w32term.c:
 +      * unexec.c:
 +      * unexaix.c:
 +      * sysdep.c:
 +      * process.c:
 +      * lread.c:
 +      * keyboard.c:
 +      * floatfns.c:
 +      * filelock.c:
 +      * fileio.c:
 +      * emacs.c (main):
 +      * ecrt0.c:
 +      * dispnew.c:
 +      * callproc.c:
 +      * buffer.c: Remove errno extern declarations.
 +      * s/netbsd.h (NEED_ERRNO): Remove.
 +
 +2010-04-01  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove all uses of LIBX11_SYSTEM.
 +      * Makefile.in (LIBX11_SYSTEM): Remove.
 +      * s/msdos.h (LIBX11_SYSTEM): Do not define, define LIBS_SYSTEM
 +      instead.
 +
 +2010-04-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Remove support for DJGPP v1.x (bug#5813).
 +
 +      * w16select.c (__dpmi_int): Remove DJGPP v1.x compatibility.
 +      * s/msdos.h:
 +      * unexec.c (make_hdr, copy_text_and_data):
 +      * sysdep.c (wait_for_termination, sys_subshell):
 +      * msdos.c (dos_set_window_size, msdos_set_cursor_shape)
 +      (IT_set_terminal_modes, __write, _rename, gethostname)
 +      (gettimeofday, alarm, fork, kill, dos_ttraw, dos_ttcooked)
 +      (run_msdos_command, abort): Remove DJGPP v1.x code and tests of
 +      the value of __DJGPP__.
 +      (nice, pause, sigsetmask, sigblock): Remove DJGPP v1.x
 +      compatibility code.
 +      * lread.c:
 +      * gmalloc.c (memalign):
 +      * fileio.c (Fcopy_file, check_executable, Ffile_modes):
 +      * emacs.c (main):
 +      * dosfns.c (init_dosfns):
 +      * dired.c (file_name_completion_stat): Remove tests of __DJGPP__.
 +
 +2010-04-01  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (set_cursor_from_row): Fix cursor positioning when the
 +      string with `cursor' property comes from an `after-string'
 +      overlay.  (Bug#5816)
 +
 +2010-04-01  Glenn Morris  <rgm@gnu.org>
 +
 +      * Makefile.in (LIBTIFF, LIBJPEG, LIBPNG, LIBGIF, LIBXPM, XFT_LIBS):
 +      Define as Makefile variables.
 +      (LIBX): Use above variables rather than directly using autoconf.
 +
 +2010-03-31  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Clean up BSD_SYSTEM use.
 +      * xterm.c:
 +      * process.c:
 +      * emacs.c: Use HAVE_SYS_IOCTL_H instead of BSD_SYSTEM as a guard
 +      for including <sys/ioctl.h>.
 +      * sysdep.c (wait_without_blocking): Remove BSD_SYSTEM case, this
 +      code is only used for MSDOS.
 +
 +2010-03-31  Juri Linkov  <juri@jurta.org>
 +
 +      * image.c: Add `Qextension_data'.
 +      (syms_of_image): Initialize and staticpro `Qextension_data'.
 +      (Fimage_metadata): Rename from `Fimage_extension_data'.
 +      (gif_load): Put GIF extension data to the property
 +      `Qextension_data'.
  
  2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
  
  2010-03-31  Eli Zaretskii  <eliz@gnu.org>
  
 -      * w32fns.c (x_create_tip_frame): Copy `parms' before we modify it
 -      in this function.  (Bug#5703)
 +      * xdisp.c (highlight_trailing_whitespace): Support highlight of
 +      trailing whitespace in right-to-left rows.
  
 -2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
  
 -      * nsterm.h: Fix last change.
 +      Get rid of the direct_output optimizations.
 +      * keyboard.c (nonundocount): Remove extern declaration.
 +      (command_loop_1): Remove brittle optimisation for cheap and
 +      common operations.
 +      * xdisp.c (redisplay_internal): Don't bother checking
 +      redisplay_performed_directly_p any more.
 +      * sysdep.c (init_sys_modes): Don't call direct_output_forward_char
 +      any more.
 +      * dispnew.c (redisplay_performed_directly_p)
 +      (direct_output_for_insert, direct_output_forward_char):
 +      * dispextern.h (redisplay_performed_directly_p)
 +      (direct_output_for_insert, direct_output_forward_char): Remove.
 +      * cmds.c (nonundocount): Make it static.
  
 -2010-03-30  Bernhard Herzog  <bh@intevation.de>  (tiny change)
 +2010-03-31  Bernhard Herzog  <bh@intevation.de>  (tiny change)
  
        * menu.c (Fx_popup_menu): Use last_event_timestamp (Bug#4930).
  
 -2010-03-30  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-03-31  Jan Djärv  <jan.h.d@swipnet.se>
  
        * xdisp.c (note_mouse_highlight): Don't do highlight if pointer is
        invisible (Bug#5766).
  
 -2010-03-29  Adrian Robert  <adrian.b.robert@gmail.com>
 +2010-03-31  Adrian Robert  <adrian.b.robert@gmail.com>
  
 -      * xdisp.c (x_consider_frame_title, update_window_cursor): Remove
 -      HAVE_NS conditionals.
 +      * xdisp.c (x_consider_frame_title, update_window_cursor):
 +      Remove HAVE_NS conditionals.
        (prepare_menu_bars) [HAVE_NS]: Call ns_set_doc_edited.
  
        * nsfns.m (x_implicitly_set_name): If frame-title-format is t, use
  
        * nsterm.m: Remove unneeded prototype.
  
 -2010-03-28  Glenn Morris  <rgm@gnu.org>
 +2010-03-31  Glenn Morris  <rgm@gnu.org>
  
        * Makefile.in (SOME_MACHINE_OBJECTS): Ensure dbus stuff is always
        in the DOC file.  (Bug#5336)
  
 -2010-03-24  Chong Yidong  <cyd@stupidchicken.com>
 +2010-03-31  Chong Yidong  <cyd@stupidchicken.com>
  
        * xdisp.c (pos_visible_p): Revert 2008-01-25 change (Bug#5730).
  
 -2010-03-20  Jan Djärv  <jan.h.d@swipnet.se>
 +2010-03-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * window.c (keys_of_window): Remove redundant/overridden bindings.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * xdisp.c (BUFFER_POS_REACHED_P, move_it_in_display_line_to):
 +      Restore original behavior when the iterator is not bidi_p.
 +
 +2010-03-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * xdisp.c (syms_of_xdisp): Use intern_c_string instead of intern.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      * bidi.c (bidi_cache_iterator_state): Invalidate the cache if we
 +      are outside the range of cached character positions.
 +
 +2010-03-30  Juanma Barranquero  <lekktu@gmail.com>
 +
 +      * makefile.w32-in ($(BLD)/bidi.$(O)): Add dependency on w32gui.h.
 +
 +2010-03-30  Eli Zaretskii  <eliz@gnu.org>
 +
 +      Initial support for bidirectional editing.
 +
 +      * Makefile.in (obj): Include bidi.o.
 +      (bidi.o): New target.
 +
 +      * makefile.w32-in (OBJ1): Add $(BLD)/bidi.$(O).
 +      ($(BLD)/bidi.$(O)): New target.
 +
 +      * bidi.c: New file.
 +
 +      * buffer.h (struct buffer): New members bidi_display_reordering
 +      and bidi_paragraph_direction.
 +
 +      * buffer.c (init_buffer_once): Initialize bidi_display_reordering
 +      and bidi_paragraph_direction.
 +      (syms_of_buffer): Declare Lisp variables bidi-display-reordering
 +      and bidi-paragraph-direction.
 +      (Fbuffer_swap_text): Swap the values of
 +      bidi_display_reordering and bidi_paragraph_direction.
 +
 +      * dispextern.h (BIDI_MAXLEVEL, BIDI_AT_BASE_LEVEL): New macros.
 +      (bidi_type_t, bidi_dir_t): New types.
 +      (bidi_saved_info, bidi_stack, bidi_it): New structures.
 +      (struct it): New members bidi_p, bidi_it, paragraph_embedding,
 +      prev_stop, base_level_stop, and eol_pos.
 +      (bidi_init_it, bidi_get_next_char_visually): New prototypes.
 +      (IT_STACK_SIZE): Enlarge to 5.
 +      (struct glyph_row): New member reversed_p.
 +      <string_buffer_position>: Update prototype.
 +      (PRODUCE_GLYPHS): Set the reversed_p flag in the iterator's
 +      glyph_row if bidi_it.paragraph_dir == R2L.
 +      (struct glyph): New members resolved_level and bidi_type.
 +
 +      * dispnew.c (direct_output_forward_char): Give up if we need bidi
 +      processing or buffer's direction is right-to-left.
 +      (prepare_desired_row): Preserve the reversed_p flag.
 +      (row_equal_p): Compare the reversed_p attributes as well.
 +
 +      * xdisp.c (init_iterator): Initialize it->bidi_p.  Call
 +      bidi_init_it and set it->paragraph_embedding from the current
 +      buffer's value of bidi_paragraph_direction.
 +      (reseat_1): Initialize bidi_it.first_elt.
 +      (set_iterator_to_next, next_element_from_buffer): Use the value of
 +      paragraph_embedding to determine the paragraph direction.
 +      (set_iterator_to_next): Under bidi reordering, call
 +      bidi_get_next_char_visually.  Call bidi_paragraph_init if the
 +      new_paragraph flag is set in the bidi iterator.
 +      (next_element_from_buffer): If bidi_it.first_elt is set,
 +      initialize paragraph direction and find the first character to
 +      display in the visual order.  If reseated to a middle of a line,
 +      prime the bidi iterator starting at the line's beginning.  Handle
 +      the situation where we overstepped stop_charpos due to
 +      non-linearity of the bidi iteration.  Likewise for when we back up
 +      beyond the previous stop_charpos.  When moving across stop_charpos,
 +      record it in prev_stop.
 +      (display_line): Set row->end and it->start for the next row to the
 +      next character in logical order.  Always extend reversed_p rows to
 +      the end of line, even if they end at ZV.  Copy the reversed_p flag
 +      to the next glyph row.  Keep calling set_cursor_from_row for
 +      bidi-reordered rows even if we already have a possible candidate
 +      for cursor position.  Set row_end after all the row's glyphs have
 +      been produced, by looping over the glyphs.  Record the position
 +      after EOL in it->eol_pos, and use it to set end_pos of the last
 +      row produced for a continued line.
 +      <Qright_to_left, Qleft_to_right>: New variables.
 +      (syms_of_xdisp): Initialize and staticpro them.
 +      (string_buffer_position_lim): New function.
 +      (string_buffer_position): Most of code moved to
 +      string_buffer_position_lim.  Last argument and return value are
 +      now EMACS_INT; all callers changed.
 +      (set_cursor_from_row): Rewritten to support bidirectional text and
 +      reversed glyph rows.
 +      (text_outside_line_unchanged_p, try_window_id): Disable
 +      optimizations if we are reordering bidirectional text and the
 +      paragraph direction can be affected by the change.
 +      (append_glyph, append_composite_glyph)
 +      (produce_image_glyph, append_stretch_glyph): Set the
 +      resolved_level and bidi_type members of each glyph.
 +      (append_glyph): If the glyph row is reversed, prepend the glyph
 +      rather than appending it.
 +      (handle_stop_backwards): New function.
 +      (reseat_1, pop_it, push_it): Set prev_stop and base_level_stop.
 +      (reseat): call handle_stop_backwards to recompute prev_stop and
 +      base_level_stop for the new position.
 +      (handle_invisible_prop): Under bidi iteration, skip invisible text
 +      using bidi_get_next_char_visually.  If we are `reseat'ed, init the
 +      paragraph direction.  Update IT->prev_stop after skipping
 +      invisible text.
 +      (move_it_in_display_line_to): New variables prev_method
 +      and prev_pos.  Compare for strict equality in
 +      BUFFER_POS_REACHED_P.
 +      (try_cursor_movement): Examine all the candidate rows that occlude
 +      point, to return the best match.  If rows are bidi-reordered
 +      and point moved backwards, back up to the row that is not a
 +      continuation line, and start looking for a suitable row from
 +      there.
 +
 +      * term.c (append_glyph): Reverse glyphs by pre-pending them,
 +      rather than appending, if the glyph_row's reversed_p flag is set.
 +      Set the resolved_level and bidi_type members of each glyph.
 +
 +      * .gdbinit (pbiditype): New command.
 +      (pgx): Use it to display bidi level and type of the glyph.
 +      (pitx): Display some bidi information about the iterator.
 +      (prowlims, pmtxrows): New commands.
 +
 +2010-03-30  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove all uses of C_DEBUG_SWITCH and LIBS_DEBUG.
 +      * s/usg5-4.h (LIBS_DEBUG):
 +      * s/irix6-5.h (C_DEBUG_SWITCH):
 +      * s/gnu-linux.h (LIBS_DEBUG):
 +      * s/darwin.h (LIBS_DEBUG):
 +      * s/bsd-common.h (LIBS_DEBUG):
 +      * s/aix4-2.h (LIBS_DEBUG, C_DEBUG_SWITCH):
 +      * m/iris4d.h (LIBS_DEBUG):
 +      * m/hp800.h (LIBS_DEBUG): Remove definitions.
 +
 +      * Makefile.in (LIBES): Remove reference to LIBS_DEBUG.
 +      (LIBS_DEBUG): Remove definition.
 +
 +2010-03-27  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * process.c (Fmake_network_process): Don't apply Bug#5173 fix for
 +      Windows.
 +
 +2010-03-25  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +
 +      * process.c (Fmake_network_process): Don't call turn_on_atimers around
 +      `connect' (Bug#5723).
 +
 +2010-03-25  Helmut Eller  <eller.helmut@gmail.com>
 +
 +      * process.c (Fmake_network_process): Call `select' for interrupted
 +      `connect' rather than creating new socket (Bug#5173).
 +
 +2010-03-24  Jan Djärv  <jan.h.d@swipnet.se>
  
        * frame.c (x_get_arg): Handle RES_TYPE_BOOLEAN_NUMBER (bug #5736).
  
  
        * dispextern.h (resource_types): RES_TYPE_BOOLEAN_NUMBER is new.
  
 -2010-03-20  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +2010-03-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        * xfns.c (Fx_create_frame) [USE_LUCID]: Add BLOCK_INPUT around
        XLoadQueryFont.
  
 -2010-03-16  Kenichi Handa  <handa@m17n.org>
 +2010-03-24  Kenichi Handa  <handa@m17n.org>
  
        * coding.c (decode_coding_ccl): Fix previous change for the
        multibyte case.
        case that the output buffer is fullfilled.
        (encode_coding): Setup ccl program here.
  
 -2010-03-15  Andreas Politz  <politza@fh-trier.de>  (tiny change)
 +2010-03-23  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * s/gnu-linux.h (LIBS_SYSTEM): Remove, same as default.
 +
 +      Simplify LIBS_MACHINE definitions.
 +      * m/hp800.h (LIBS_MACHINE): Remove, same as default.
 +      * m/iris4d.h (LIBS_MACHINE): Likewise.
 +      * m/ibmrs6000.h (LIBS_MACHINE): Rename to LIBS_SYSTEM and move ...
 +      * s/aix4-2.h (LIBS_SYSTEM): ... here.
 +      * s/netbsd.h: Remove commented out code.
 +
 +2010-03-22  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove dead code dealing with POSIX_SIGNALS.
 +      * atimer.c (set_alarm): Remove dead code, all USG systems define
 +      POSIX_SIGNALS.
 +      * data.c (arith_error): Likewise.
 +      * keyboard.c (input_available_signal, handle_user_signal)
 +      (interrupt_signal): Likewise.
 +      * process.c (sigchld_handler): Likewise.
 +      (create_process): Remove if 0 code.  Remove HPUX conditional when
 +      !defined (POSIX_SIGNALS), it cannot be true.
 +      * syssignal.h: Remove USG5_4 and USG conditionals when
 +      !POSIX_SIGNALS, they cannot be true.
 +
 +      * keyboard.c (Fset_input_interrupt_mode): Remove code depending on
 +      NO_SOCK_SIGIO, not used anymore.
 +
 +2010-03-21  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      * m/vax.h (BSD_SYSTEM, BSD4_2): Remove conditionals, we only
 +      support vax on BSDs.
 +
 +      * m/ibmrs6000.h (ORDINARY_LINK): Move definition ...
 +      * s/aix4-2.h (ORDINARY_LINK): ... here.
 +
 +2010-03-21  Andreas Schwab  <schwab@linux-m68k.org>
 +
 +      * Makefile.in (abs_builddir): Define.
 +      (bootstrap_exe): Use it.
 +      (VPATH): Use $(srcdir) instead of @srcdir@.
 +
 +2010-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * Makefile.in (bootstrap_exe): Use an absolute name.
 +
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove support for old GNU/Linux using libc version 5.
 +      * m/alpha.h (LINUX_SBRK_BUG): Remove definition.
 +      * emacs.c (main): Remove code depending on LINUX_SBRK_BUG.
 +
 +      Consolidate redundant definitions in s/bsd-common.h.
 +      * s/bsd-common.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Define (or undefine) here instead of
 +      doing it in all files that include this one.
 +      * s/gnu.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Remove.
 +      * s/freebsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Remove.
 +      * s/netbsd.h (BSD4_2, TABDLY, TAB3, HAVE_TERMIOS, NO_TERMIO)
 +      (LIBS_DEBUG, SYSV_SYSTEM_DIR, UNEXEC, NARROWPROTO, BSD_PGRPS)
 +      (LDAV_SYMBOL, KERNEL_FILE): Remove.
 +
 +      Consolidate redundant definitions.
 +      * s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
 +      it's undefined in all files that include this one.
 +      (POSIX_SIGNALS): Define here instead of doing it in all files that
 +      include this one.
 +      * s/irix6-5.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
 +      (POSIX_SIGNALS): Do not define.
 +      * s/sol2-6.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
 +      (POSIX_SIGNALS): Do not define.
 +      * s/unixware.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
 +      (POSIX_SIGNALS): Do not define.
 +
 +      Remove support for old UNIX System V systems.
 +      * s/unixware.h: Add the contents of s/usg-5-4-2.h.
 +      * s/usg-5-4-2.h: Remove.
 +
 +      Remove support for Solaris on PPC and for old versions.
 +      * s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h.
 +      (LD_SWITCH_SYSTEM, USE_MMAP_FOR_BUFFERS): Remove #defines/#undef
 +      that cancel each other.
 +      * s/sol2-3.h:
 +      * s/sol2-4.h:
 +      * s/sol2-5.h: Remove.
 +      * m/ibmrs6000.h: Remove code for USG5_4, this file is only used on AIX.
 +      (NO_REMAP): Remove, unused.
 +      (UNEXEC): Move definition ...
 +      * s/aix4-2.h (UNEXEC): ... here.
 +
 +      * s/openbsd.h: Remove support for non-ELF and for systems that do
 +      not support shared libraries.
 +      * s/netbsd.h:
 +      * s/freebsd.h: Likewise.
 +
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove non-working support for lynxos 3.0.
 +      * s/lynxos.h: Remove file.
 +
 +      * unexec.c (unexec, adjust_lnnoptrs): Do not depend on
 +      COFF_BSD_SYMBOLS, nothing defines it anymore.
 +
 +2010-03-20  Dan Nicolaescu  <dann@ics.uci.edu>
 +
 +      Remove obsolete uses of HAVE_SHM.
 +      * emacs.c (standard_args):
 +      (Fdump_emacs):
 +      (syms_of_emacs): Remove code depending on HAVE_SHM.
 +
 +      * alloc.c: Remove HAVE_SHM dependent definition.
 +
 +      * Makefile.in (RUN_TEMACS): Do not depend on HAVE_SHM.
 +
 +2010-03-18  Glenn Morris  <rgm@gnu.org>
 +
 +      * emacs.c (USAGE4): Hard-code bug address.
 +      (REPORT_EMACS_BUG_ADDRESS, REPORT_EMACS_BUG_PRETEST_ADDRESS): Remove.
 +      (bug_reporting_address): Remove.
 +      (main): Don't call bug_reporting_address.
 +
 +      * Makefile.in (XFT_LIBS, LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF)
 +      (LIBGPM, LIBRESOLV): Set using autoconf rather than cpp.
 +
 +2010-03-15  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfns.c (Fx_create_frame):
 +      * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars
 +      on left.
 +
 +2010-03-13  Andreas Politz  <politza@fh-trier.de>  (tiny change)
  
        * editfns.c (Fformat): Account for string precision when computing
        field width (Bug#5710).
  
 +2010-03-12  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * xfns.c (Fx_create_frame): Set default to Qright.
 +
 +      * frame.c (Vdefault_frame_scroll_bars): Set default to Qright for
 +      all window systems.
 +
 +2010-03-12  Eli Zaretskii  <eliz@gnu.org>
 +
 +      These changes remove termcap.c from the build on Posix platforms.
 +      * Makefile.in (termcapobj): Move termcap.o from here...
 +      (MSDOS_OBJ): ...to here.
 +      (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
 +      now identical to when LIBS_TERMCAP is defined.
 +
 +      * term.c: Remove (ifdef'ed away) inclusion of termcap.h.
 +
 +      * cm.c: Remove (ifdef'ed away) inclusion of termcap.h.
 +
 +      * config.in: Regenerated.  (See top-level ChangeLog.)
 +
 +2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
 +
 +      * Branch for 23.2.
 +
 +2010-03-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      Cleanup setup of gl_state in various parts of the code.
 +      * syntax.h (SETUP_BUFFER_SYNTAX_TABLE): New macro.
 +      (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
 +      * syntax.c (find_defun_start, Fchar_syntax, Fmatching_paren)
 +      (skip_chars):
 +      * regex.c (regex_compile): Use it.
 +      (re_compile_pattern): Don't set gl_state.current_syntax_table since
 +      it's now set in regex_compile when/if we need it.
 +
  2010-03-05  Stefan Monnier  <monnier@iro.umontreal.ca>
  
        Make it possible to C-g in a tight bytecode loop again (bug#5680).
        * xterm.h: Rename x_non_menubar_window_to_frame to
        x_menubar_window_to_frame.
  
 -      * xterm.c: Remove declarations also in xterm.h
 +      * xterm.c: Remove declarations also in xterm.h.
        (XTmouse_position): Do not return valid positions
        for clicks in the menubar and the toolbar for Gtk+.
  
  2009-07-04  Eli Zaretskii  <eliz@gnu.org>
  
        Emulation of `getloadavg' on MS-Windows.
 -      * w32.c: Include float.h
 +      * w32.c: Include float.h.
        (g_b_init_get_native_system_info, g_b_init_get_system_times)
        (GetNativeSystemInfo_Proc, GetSystemTimes_Proc): Declare.
        (get_native_system_info, get_system_times): New functions.
        <after-change-functions>: Reflow docstrings.
  
  2008-08-04  Adrian Robert  <Adrian.B.Robert@gmail.com>
 -          Ken Raeburn  <raeburn@gnu.org>
 +            Ken Raeburn  <raeburn@gnu.org>
  
        Dock menu customization, based on a patch by Ken Raeburn, plus some
        other fixes.
        batch-compiling for bootstrap).
  
  2008-07-15  Chris Hall  <chris@web.workinglinux.com>  (tiny change)
 -          YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 +            YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
  
        (make_initial_frame): Call init_frame_faces(f) in CANNOT_DUMP case --
        fix crash due to different init order.
  2008-07-10  Dan Nicolaescu  <dann@ics.uci.edu>
  
        * fileio.c:
 -      * sysdep.c
 +      * sysdep.c:
        * systty.h:
        * m/ibmrs6000.h:
        * m/iris4d.h:
        (USG_SHARED_LIBRARIES): Remove duplicate definition.
  
  2008-06-26  Juanma Barranquero  <lekktu@gmail.com>
 -          Eli Zaretskii  <eliz@gnu.org>
 +            Eli Zaretskii  <eliz@gnu.org>
  
        * makefile.w32-in (LOCAL_FLAGS):
        Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
        the property of LFACE_FONT of LFACE (if any).
  
  2008-06-21  Seiji Zenitani  <zenitani@mac.com>
 -          Ryo Yoshitake  <ryo@shiftmode.net>
 +            Ryo Yoshitake  <ryo@shiftmode.net>
  
        * xterm.c (x_set_frame_alpha): Add x_catch_errors for bug#437.
  
        definitions from xmenu.c.  Suggested by Adrian Robert.
  
        * xmenu.c: Remove platform-independent menu definitions.
 -      (menu_items menu_items_inuse, menu_items_allocated)
 +      (menu_items, menu_items_inuse, menu_items_allocated)
        (menu_items_used, menu_items_n_panes)
        (menu_items_submenu_depth): Move to keyboard.h.
        (init_menu_items, finish_menu_items, unuse_menu_items)
        * xterm.c (x_set_frame_alpha): Move declarations before statements.
  
  2008-05-21  Seiji Zenitani  <zenitani@mac.com>
 -          Ryo Yoshitake  <ryo@shiftmode.net>
 +            Ryo Yoshitake  <ryo@shiftmode.net>
  
        * frame.c (Qalpha): Add a new frame parameter `alpha'.
        (Vframe_alpha_lower_limit): New variable.
        Report an error when image size is invalid.
        Read two bytes at a time when raw images have max_color_idx above 255.
  
 -2008-04-05  Eli Zaretskii  <eliz@gnu.org>
 -
 -      * w32.c (readdir): If FindFirstFile/FindNextFile return in
 -      cFileName a file name that includes `?' characters, use the 8+3
 -      alias in cAlternateFileName instead.
 -
  2008-04-05  Kenichi Handa  <handa@ni.aist.go.jp>
  
        * ccl.c (ccl_driver): If ccl->quit_silently is nonzero, don't
diff --combined src/gtkutil.c
@@@ -35,7 -35,6 +35,7 @@@ along with GNU Emacs.  If not, see <htt
  #include "charset.h"
  #include "coding.h"
  #include <gdk/gdkkeysyms.h>
 +#include "xsettings.h"
  
  #ifdef HAVE_XFT
  #include <X11/Xft/Xft.h>
  /* Avoid "differ in sign" warnings */
  #define SSDATA(x)  ((char *) SDATA (x))
  
 +#ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW
 +#define gtk_widget_set_has_window(w, b) \
 +  (gtk_fixed_set_has_window (GTK_FIXED (w), b))
 +#endif
 +#ifndef HAVE_GTK_DIALOG_GET_ACTION_AREA
 +#define gtk_dialog_get_action_area(w) ((w)->action_area)
 +#define gtk_dialog_get_content_area(w) ((w)->vbox)
 +#endif
 +#ifndef HAVE_GTK_WIDGET_GET_SENSITIVE
 +#define gtk_widget_get_sensitive(w) (GTK_WIDGET_SENSITIVE (w))
 +#endif
 +#ifndef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE
 +#define gtk_adjustment_set_page_size(w, s) ((w)->page_size = (s))
 +#define gtk_adjustment_set_page_increment(w, s) ((w)->page_increment = (s))
 +#define gtk_adjustment_get_step_increment(w) ((w)->step_increment)
 +#define gtk_adjustment_set_step_increment(w, s) ((w)->step_increment = (s))
 +#endif
 +#if GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION > 11
 +#define remove_submenu(w) gtk_menu_item_set_submenu ((w), NULL)
 +#else
 +#define remove_submenu(w) gtk_menu_item_remove_submenu ((w))
 +#endif
 +
  \f
  /***********************************************************************
                        Display handling functions
   ***********************************************************************/
  
 -#ifdef HAVE_GTK_MULTIDISPLAY
 -
  /* Keep track of the default display, or NULL if there is none.  Emacs
     may close all its displays.  */
  
@@@ -85,7 -63,9 +85,7 @@@ static GdkDisplay *gdpy_def
     W can be a GtkMenu or a GtkWindow widget.  */
  
  static void
 -xg_set_screen (w, f)
 -     GtkWidget *w;
 -     FRAME_PTR f;
 +xg_set_screen (GtkWidget *w, FRAME_PTR f)
  {
    if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ())
      {
  }
  
  
 -#else /* not HAVE_GTK_MULTIDISPLAY */
 -
 -/* Make some defines so we can use the GTK 2.2 functions when
 -   compiling with GTK 2.0.  */
 -
 -#define xg_set_screen(w, f)
 -#define gdk_xid_table_lookup_for_display(dpy, w)    gdk_xid_table_lookup (w)
 -#define gdk_pixmap_foreign_new_for_display(dpy, p)  gdk_pixmap_foreign_new (p)
 -#define gdk_cursor_new_for_display(dpy, c)          gdk_cursor_new (c)
 -#define gdk_x11_lookup_xdisplay(dpy)                0
 -#define GdkDisplay                                  void
 -
 -#endif /* not HAVE_GTK_MULTIDISPLAY */
 -
  /* Open a display named by DISPLAY_NAME.  The display is returned in *DPY.
     *DPY is set to NULL if the display can't be opened.
  
     be opened, and less than zero if the GTK version doesn't support
     multipe displays.  */
  
 -int
 -xg_display_open (display_name, dpy)
 -     char *display_name;
 -     Display **dpy;
 +void
 +xg_display_open (char *display_name, Display **dpy)
  {
 -#ifdef HAVE_GTK_MULTIDISPLAY
    GdkDisplay *gdpy;
  
    gdpy = gdk_display_open (display_name);
      }
  
    *dpy = gdpy ? GDK_DISPLAY_XDISPLAY (gdpy) : NULL;
 -  return gdpy != NULL;
 -
 -#else /* not HAVE_GTK_MULTIDISPLAY */
 -
 -  return -1;
 -#endif /* not HAVE_GTK_MULTIDISPLAY */
  }
  
  
  void
  xg_display_close (Display *dpy)
  {
 -#ifdef HAVE_GTK_MULTIDISPLAY
    GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy);
  
    /* If this is the default display, try to change it before closing.
    /* This seems to be fixed in GTK 2.10. */
    gdk_display_close (gdpy);
  #endif
 -#endif /* HAVE_GTK_MULTIDISPLAY */
  }
  
  \f
@@@ -176,7 -181,7 +176,7 @@@ static int malloc_cpt
     Return a pointer to the allocated structure.  */
  
  widget_value *
 -malloc_widget_value ()
 +malloc_widget_value (void)
  {
    widget_value *wv;
    if (widget_value_free_list)
     by malloc_widget_value, and no substructures.  */
  
  void
 -free_widget_value (wv)
 -     widget_value *wv;
 +free_widget_value (widget_value *wv)
  {
    if (wv->free_list)
      abort ();
     scroll bars on display DPY.  */
  
  GdkCursor *
 -xg_create_default_cursor (dpy)
 -     Display *dpy;
 +xg_create_default_cursor (Display *dpy)
  {
    GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy);
    return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR);
  /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel.  */
  
  static GdkPixbuf *
 -xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap)
 -     GdkPixmap *gpix;
 -     GdkPixmap *gmask;
 -     GdkColormap *cmap;
 +xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix,
 +                                 GdkPixmap *gmask,
 +                                 GdkColormap *cmap)
  {
    int width, height;
    GdkPixbuf *icon_buf, *tmp_buf;
  }
  
  static Lisp_Object
 -file_for_image (image)
 -     Lisp_Object image;
 +file_for_image (Lisp_Object image)
  {
    Lisp_Object specified_file = Qnil;
    Lisp_Object tail;
     If OLD_WIDGET is not NULL, that widget is modified.  */
  
  static GtkWidget *
 -xg_get_image_for_pixmap (f, img, widget, old_widget)
 -     FRAME_PTR f;
 -     struct image *img;
 -     GtkWidget *widget;
 -     GtkImage *old_widget;
 +xg_get_image_for_pixmap (FRAME_PTR f,
 +                         struct image *img,
 +                         GtkWidget *widget,
 +                         GtkImage *old_widget)
  {
    GdkPixmap *gpix;
    GdkPixmap *gmask;
     and it is those widgets that are visible.  */
  
  static void
 -xg_set_cursor (w, cursor)
 -     GtkWidget *w;
 -     GdkCursor *cursor;
 +xg_set_cursor (GtkWidget *w, GdkCursor *cursor)
  {
 -  GList *children = gdk_window_peek_children (w->window);
 +  GdkWindow *window = gtk_widget_get_window(w);
 +  GList *children = gdk_window_peek_children (window);
  
 -  gdk_window_set_cursor (w->window, cursor);
 +  gdk_window_set_cursor (window, cursor);
  
    /* The scroll bar widget has more than one GDK window (had to look at
       the source to figure this out), and there is no way to set cursor
@@@ -435,7 -446,8 +435,7 @@@ xg_list_remove (xg_list_node *list, xg_
     with g_free.  */
  
  static char *
 -get_utf8_string (str)
 -     char *str;
 +get_utf8_string (char *str)
  {
    char *utf8_str = str;
  
     F is the frame we shall set geometry for.  */
  
  static void
 -xg_set_geometry (f)
 -     FRAME_PTR f;
 +xg_set_geometry (FRAME_PTR f)
  {
 -  if (f->size_hint_flags & USPosition)
 +  if (f->size_hint_flags & (USPosition | PPosition))
      {
        int left = f->left_pos;
        int xneg = f->size_hint_flags & XNegative;
  
        sprintf (geom_str, "=%dx%d%c%d%c%d",
                 FRAME_PIXEL_WIDTH (f),
 -               FRAME_TOTAL_PIXEL_HEIGHT (f),
 +               FRAME_PIXEL_HEIGHT (f),
                 (xneg ? '-' : '+'), left,
                 (yneg ? '-' : '+'), top);
  
                                        geom_str))
          fprintf (stderr, "Failed to parse: '%s'\n", geom_str);
      }
 -  else if (f->size_hint_flags & PPosition)
 -    gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
 -                     f->left_pos, f->top_pos);
  }
  
  /* Clear under internal border if any.  As we use a mix of Gtk+ and X calls
     and use a GtkFixed widget, this doesn't happen automatically.  */
  
  static void
 -xg_clear_under_internal_border (f)
 -     FRAME_PTR f;
 +xg_clear_under_internal_border (FRAME_PTR f)
  {
    if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
      {
     PIXELWIDTH, PIXELHEIGHT is the new size in pixels.  */
  
  void
 -xg_frame_resized (f, pixelwidth, pixelheight)
 -     FRAME_PTR f;
 -     int pixelwidth, pixelheight;
 +xg_frame_resized (FRAME_PTR f, int pixelwidth, int pixelheight)
  {
    int rows, columns;
  
    if (pixelwidth == -1 && pixelheight == -1)
      {
 -      if (FRAME_GTK_WIDGET (f) && GTK_WIDGET_MAPPED (FRAME_GTK_WIDGET (f)))
 -          gdk_window_get_geometry (FRAME_GTK_WIDGET (f)->window, 0, 0,
 +      if (FRAME_GTK_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_WIDGET (f)))
 +          gdk_window_get_geometry (gtk_widget_get_window (FRAME_GTK_WIDGET (f)),
 +                                   0, 0,
                                     &pixelwidth, &pixelheight, 0);
        else return;
      }
     COLUMNS/ROWS is the size the edit area shall have after the resize.  */
  
  void
 -xg_frame_set_char_size (f, cols, rows)
 -     FRAME_PTR f;
 -     int cols;
 -     int rows;
 +xg_frame_set_char_size (FRAME_PTR f, int cols, int rows)
  {
    int pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows)
      + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
     The policy is to keep the number of editable lines.  */
  
  static void
 -xg_height_changed (f)
 -     FRAME_PTR f;
 +xg_height_changed (FRAME_PTR f)
  {
    gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
                       FRAME_PIXEL_WIDTH (f), FRAME_TOTAL_PIXEL_HEIGHT (f));
     Return 0 if no widget match WDESC.  */
  
  GtkWidget *
 -xg_win_to_widget (dpy, wdesc)
 -     Display *dpy;
 -     Window wdesc;
 +xg_win_to_widget (Display *dpy, Window wdesc)
  {
    gpointer gdkwin;
    GtkWidget *gwdesc = 0;
     W is the widget that color will be used for.  Used to find colormap.  */
  
  static void
 -xg_pix_to_gcolor (w, pixel, c)
 -     GtkWidget *w;
 -     unsigned long pixel;
 -     GdkColor *c;
 +xg_pix_to_gcolor (GtkWidget *w, long unsigned int pixel, GdkColor *c)
  {
    GdkColormap *map = gtk_widget_get_colormap (w);
    gdk_colormap_query_color (map, pixel, c);
     Return 0 if creation failed, non-zero otherwise.  */
  
  int
 -xg_create_frame_widgets (f)
 -     FRAME_PTR f;
 +xg_create_frame_widgets (FRAME_PTR f)
  {
    GtkWidget *wtop;
    GtkWidget *wvbox;
    FRAME_GTK_WIDGET (f) = wfixed;
    f->output_data.x->vbox_widget = wvbox;
  
 -  gtk_fixed_set_has_window (GTK_FIXED (wfixed), TRUE);
 +  gtk_widget_set_has_window (wfixed, TRUE);
  
    gtk_container_add (GTK_CONTAINER (wtop), wvbox);
    gtk_box_pack_end (GTK_BOX (wvbox), wfixed, TRUE, TRUE, 0);
     flag (this is useful when FLAGS is 0).  */
  
  void
 -x_wm_set_size_hint (f, flags, user_position)
 -     FRAME_PTR f;
 -     long flags;
 -     int user_position;
 +x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position)
  {
    /* Must use GTK routines here, otherwise GTK resets the size hints
       to its own defaults.  */
    else if (win_gravity == StaticGravity)
      size_hints.win_gravity = GDK_GRAVITY_STATIC;
  
 -  if (flags & PPosition) hint_flags |= GDK_HINT_POS;
 -  if (flags & USPosition) hint_flags |= GDK_HINT_USER_POS;
 -  if (flags & USSize) hint_flags |= GDK_HINT_USER_SIZE;
 -
    if (user_position)
      {
        hint_flags &= ~GDK_HINT_POS;
     BG is the pixel value to change to.  */
  
  void
 -xg_set_background_color (f, bg)
 -     FRAME_PTR f;
 -     unsigned long bg;
 +xg_set_background_color (FRAME_PTR f, long unsigned int bg)
  {
    if (FRAME_GTK_WIDGET (f))
      {
     functions so GTK does not overwrite the icon.  */
  
  void
 -xg_set_frame_icon (f, icon_pixmap, icon_mask)
 -     FRAME_PTR f;
 -     Pixmap icon_pixmap;
 -     Pixmap icon_mask;
 +xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask)
  {
      GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
      GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap);
@@@ -1030,7 -1070,10 +1030,7 @@@ get_dialog_title (char key
     Returns TRUE to end propagation of event.  */
  
  static gboolean
 -dialog_delete_callback (w, event, user_data)
 -     GtkWidget *w;
 -     GdkEvent *event;
 -     gpointer user_data;
 +dialog_delete_callback (GtkWidget *w, GdkEvent *event, gpointer user_data)
  {
    gtk_widget_unmap (w);
    return TRUE;
     Returns the GTK dialog widget.  */
  
  static GtkWidget *
 -create_dialog (wv, select_cb, deactivate_cb)
 -     widget_value *wv;
 -     GCallback select_cb;
 -     GCallback deactivate_cb;
 +create_dialog (widget_value *wv,
 +               GCallback select_cb,
 +               GCallback deactivate_cb)
  {
    char *title = get_dialog_title (wv->name[0]);
    int total_buttons = wv->name[1] - '0';
    int button_nr = 0;
    int button_spacing = 10;
    GtkWidget *wdialog = gtk_dialog_new ();
 +  GtkDialog *wd = GTK_DIALOG (wdialog);
 +  GtkBox *cur_box = GTK_BOX (gtk_dialog_get_action_area (wd));
    widget_value *item;
 -  GtkBox *cur_box;
    GtkWidget *wvbox;
    GtkWidget *whbox_up;
    GtkWidget *whbox_down;
    gtk_window_set_title (GTK_WINDOW (wdialog), title);
    gtk_widget_set_name (wdialog, "emacs-dialog");
  
 -  cur_box = GTK_BOX (GTK_DIALOG (wdialog)->action_area);
  
    if (make_two_rows)
      {
  
        if (item->name && strcmp (item->name, "message") == 0)
          {
 +          GtkBox *wvbox = GTK_BOX (gtk_dialog_get_content_area (wd));
            /* This is the text part of the dialog.  */
            w = gtk_label_new (utf8_label);
 -          gtk_box_pack_start (GTK_BOX (GTK_DIALOG (wdialog)->vbox),
 -                              gtk_label_new (""),
 -                              FALSE, FALSE, 0);
 -          gtk_box_pack_start (GTK_BOX (GTK_DIALOG (wdialog)->vbox), w,
 -                              TRUE, TRUE, 0);
 +          gtk_box_pack_start (wvbox, gtk_label_new (""), FALSE, FALSE, 0);
 +          gtk_box_pack_start (wvbox, w, TRUE, TRUE, 0);
            gtk_misc_set_alignment (GTK_MISC (w), 0.1, 0.5);
  
            /* Try to make dialog look better.  Must realize first so
               the widget can calculate the size it needs.  */
            gtk_widget_realize (w);
            gtk_widget_size_request (w, &req);
 -          gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (wdialog)->vbox),
 -                               req.height);
 +          gtk_box_set_spacing (wvbox, req.height);
          if (item->value && strlen (item->value) > 0)
              button_spacing = 2*req.width/strlen (item->value);
          }
@@@ -1161,9 -1208,12 +1161,9 @@@ struct xg_dialog_dat
     USER_DATA is what we passed in to g_signal_connect.  */
  
  static void
 -xg_dialog_response_cb (w,
 -                       response,
 -                       user_data)
 -     GtkDialog *w;
 -     gint response;
 -     gpointer user_data;
 +xg_dialog_response_cb (GtkDialog *w,
 +                     gint response,
 +                     gpointer user_data)
  {
    struct xg_dialog_data *dd = (struct xg_dialog_data *)user_data;
    dd->response = response;
  /*  Destroy the dialog.  This makes it pop down.  */
  
  static Lisp_Object
 -pop_down_dialog (arg)
 -     Lisp_Object arg;
 +pop_down_dialog (Lisp_Object arg)
  {
    struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
    struct xg_dialog_data *dd = (struct xg_dialog_data *) p->pointer;
      We pass in DATA as gpointer* so we can use this as a callback.  */
  
  static gboolean
 -xg_maybe_add_timer (data)
 -     gpointer data;
 +xg_maybe_add_timer (gpointer data)
  {
    struct xg_dialog_data *dd = (struct xg_dialog_data *) data;
    EMACS_TIME next_time = timer_check (1);
     The dialog W is not destroyed when this function returns.  */
  
  static int
 -xg_dialog_run (f, w)
 -     FRAME_PTR f;
 -     GtkWidget *w;
 -
 +xg_dialog_run (FRAME_PTR f, GtkWidget *w)
  {
    int count = SPECPDL_INDEX ();
    struct xg_dialog_data dd;
     Return zero if not.  */
  
  int
 -xg_uses_old_file_dialog ()
 +xg_uses_old_file_dialog (void)
  {
 -#ifdef HAVE_GTK_FILE_BOTH
 +#ifdef HAVE_GTK_FILE_SELECTION_NEW
    extern int x_gtk_use_old_file_dialog;
    return x_gtk_use_old_file_dialog;
 -#else /* ! HAVE_GTK_FILE_BOTH */
 -
 -#ifdef HAVE_GTK_FILE_SELECTION_NEW
 -  return 1;
  #else
    return 0;
  #endif
 -
 -#endif /* ! HAVE_GTK_FILE_BOTH */
  }
  
  
 -typedef char * (*xg_get_file_func) P_ ((GtkWidget *));
 -
 -#ifdef HAVE_GTK_FILE_CHOOSER_DIALOG_NEW
 +typedef char * (*xg_get_file_func) (GtkWidget *);
  
  /* Return the selected file for file chooser dialog W.
     The returned string must be free:d.  */
  
  static char *
 -xg_get_file_name_from_chooser (w)
 -     GtkWidget *w;
 +xg_get_file_name_from_chooser (GtkWidget *w)
  {
    return gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (w));
  }
     WIDGET is the toggle widget, DATA is the file chooser dialog.  */
  
  static void
 -xg_toggle_visibility_cb (widget, data)
 -     GtkWidget *widget;
 -     gpointer data;
 +xg_toggle_visibility_cb (GtkWidget *widget, gpointer data)
  {
    GtkFileChooser *dialog = GTK_FILE_CHOOSER (data);
    gboolean visible;
     changes that property by right clicking in the file list.  */
  
  static void
 -xg_toggle_notify_cb (gobject, arg1, user_data)
 -     GObject *gobject;
 -     GParamSpec *arg1;
 -     gpointer user_data;
 +xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data)
  {
    extern int x_gtk_show_hidden_files;
  
     Returns the created widget.  */
  
  static GtkWidget *
 -xg_get_file_with_chooser (f, prompt, default_filename,
 -                          mustmatch_p, only_dir_p, func)
 -     FRAME_PTR f;
 -     char *prompt;
 -     char *default_filename;
 -     int mustmatch_p, only_dir_p;
 -     xg_get_file_func *func;
 +xg_get_file_with_chooser (FRAME_PTR f,
 +                        char *prompt,
 +                        char *default_filename,
 +                        int mustmatch_p, int only_dir_p,
 +                        xg_get_file_func *func)
  {
    char message[1024];
  
    *func = xg_get_file_name_from_chooser;
    return filewin;
  }
 -#endif /* HAVE_GTK_FILE_CHOOSER_DIALOG_NEW */
  
  #ifdef HAVE_GTK_FILE_SELECTION_NEW
  
     The returned string must be free:d.  */
  
  static char *
 -xg_get_file_name_from_selector (w)
 -     GtkWidget *w;
 +xg_get_file_name_from_selector (GtkWidget *w)
  {
    GtkFileSelection *filesel = GTK_FILE_SELECTION (w);
    return xstrdup ((char*) gtk_file_selection_get_filename (filesel));
     Returns the created widget.  */
  
  static GtkWidget *
 -xg_get_file_with_selection (f, prompt, default_filename,
 -                            mustmatch_p, only_dir_p, func)
 -     FRAME_PTR f;
 -     char *prompt;
 -     char *default_filename;
 -     int mustmatch_p, only_dir_p;
 -     xg_get_file_func *func;
 +xg_get_file_with_selection (FRAME_PTR f,
 +                            char *prompt,
 +                            char *default_filename,
 +                            int mustmatch_p, int only_dir_p,
 +                            xg_get_file_func *func)
  {
    GtkWidget *filewin;
    GtkFileSelection *filesel;
     The returned string must be freed by the caller.  */
  
  char *
 -xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p)
 -     FRAME_PTR f;
 -     char *prompt;
 -     char *default_filename;
 -     int mustmatch_p, only_dir_p;
 +xg_get_file_name (FRAME_PTR f,
 +                  char *prompt,
 +                  char *default_filename,
 +                  int mustmatch_p,
 +                  int only_dir_p)
  {
    GtkWidget *w = 0;
    char *fn = 0;
    sigblock (sigmask (__SIGRTMIN));
  #endif /* HAVE_GTK_AND_PTHREAD */
  
 -#ifdef HAVE_GTK_FILE_BOTH
 +#ifdef HAVE_GTK_FILE_SELECTION_NEW
  
    if (xg_uses_old_file_dialog ())
      w = xg_get_file_with_selection (f, prompt, default_filename,
      w = xg_get_file_with_chooser (f, prompt, default_filename,
                                    mustmatch_p, only_dir_p, &func);
  
 -#else /* not HAVE_GTK_FILE_BOTH */
 -
 -#ifdef HAVE_GTK_FILE_SELECTION_NEW
 -  w = xg_get_file_with_selection (f, prompt, default_filename,
 -                                  mustmatch_p, only_dir_p, &func);
 -#endif
 -#ifdef HAVE_GTK_FILE_CHOOSER_DIALOG_NEW
 +#else /* not HAVE_GTK_FILE_SELECTION_NEW */
    w = xg_get_file_with_chooser (f, prompt, default_filename,
                                  mustmatch_p, only_dir_p, &func);
 -#endif
 -
 -#endif /* HAVE_GTK_FILE_BOTH */
 +#endif /* not HAVE_GTK_FILE_SELECTION_NEW */
  
    gtk_widget_set_name (w, "emacs-filedialog");
  
     DEFAULT_NAME, if non-zero, is the default font name.  */
  
  char *
 -xg_get_font_name (f, default_name)
 -     FRAME_PTR f;
 -     char *default_name;
 +xg_get_font_name (FRAME_PTR f, char *default_name)
  {
    GtkWidget *w;
    char *fontname = NULL;
@@@ -1631,7 -1716,10 +1631,7 @@@ static xg_list_node xg_menu_item_cb_lis
     allocated xg_menu_cb_data if CL_DATA is NULL.  */
  
  static xg_menu_cb_data *
 -make_cl_data (cl_data, f, highlight_cb)
 -     xg_menu_cb_data *cl_data;
 -     FRAME_PTR f;
 -     GCallback highlight_cb;
 +make_cl_data (xg_menu_cb_data *cl_data, FRAME_PTR f, GCallback highlight_cb)
  {
    if (! cl_data)
      {
     creating the menu bar.  */
  
  static void
 -update_cl_data (cl_data, f, highlight_cb)
 -     xg_menu_cb_data *cl_data;
 -     FRAME_PTR f;
 -     GCallback highlight_cb;
 +update_cl_data (xg_menu_cb_data *cl_data,
 +                FRAME_PTR f,
 +                GCallback highlight_cb)
  {
    if (cl_data)
      {
     If reference count is zero, free CL_DATA.  */
  
  static void
 -unref_cl_data (cl_data)
 -     xg_menu_cb_data *cl_data;
 +unref_cl_data (xg_menu_cb_data *cl_data)
  {
    if (cl_data && cl_data->ref_count > 0)
      {
  /* Function that marks all lisp data during GC.  */
  
  void
 -xg_mark_data ()
 +xg_mark_data (void)
  {
    xg_list_node *iter;
  
     CLIENT_DATA points to the xg_menu_item_cb_data associated with the W.  */
  
  static void
 -menuitem_destroy_callback (w, client_data)
 -     GtkWidget *w;
 -     gpointer client_data;
 +menuitem_destroy_callback (GtkWidget *w, gpointer client_data)
  {
    if (client_data)
      {
     Returns FALSE to tell GTK to keep processing this event.  */
  
  static gboolean
 -menuitem_highlight_callback (w, event, client_data)
 -     GtkWidget *w;
 -     GdkEventCrossing *event;
 -     gpointer client_data;
 +menuitem_highlight_callback (GtkWidget *w,
 +                             GdkEventCrossing *event,
 +                             gpointer client_data)
  {
    GdkEvent ev;
    GtkWidget *subwidget;
     CLIENT_DATA points to the xg_menu_cb_data associated with W.  */
  
  static void
 -menu_destroy_callback (w, client_data)
 -     GtkWidget *w;
 -     gpointer client_data;
 +menu_destroy_callback (GtkWidget *w, gpointer client_data)
  {
    unref_cl_data ((xg_menu_cb_data*) client_data);
  }
     Returns the GtkHBox.  */
  
  static GtkWidget *
 -make_widget_for_menu_item (utf8_label, utf8_key)
 -     char *utf8_label;
 -     char *utf8_key;
 +make_widget_for_menu_item (char *utf8_label, char *utf8_key)
  {
    GtkWidget *wlbl;
    GtkWidget *wkey;
     but the MacOS X version doesn't either, so I guess that is OK.  */
  
  static GtkWidget *
 -make_menu_item (utf8_label, utf8_key, item, group)
 -     char *utf8_label;
 -     char *utf8_key;
 -     widget_value *item;
 -     GSList **group;
 +make_menu_item (char *utf8_label,
 +                char *utf8_key,
 +                widget_value *item,
 +                GSList **group)
  {
    GtkWidget *w;
    GtkWidget *wtoadd = 0;
@@@ -1912,7 -2010,7 +1912,7 @@@ static int xg_detached_menus
  /* Returns non-zero if there are detached menus.  */
  
  int
 -xg_have_tear_offs ()
 +xg_have_tear_offs (void)
  {
    return xg_detached_menus > 0;
  }
     CLIENT_DATA is not used.  */
  
  static void
 -tearoff_remove (widget, client_data)
 -     GtkWidget *widget;
 -     gpointer client_data;
 +tearoff_remove (GtkWidget *widget, gpointer client_data)
  {
    if (xg_detached_menus > 0) --xg_detached_menus;
  }
     CLIENT_DATA is not used.  */
  
  static void
 -tearoff_activate (widget, client_data)
 -     GtkWidget *widget;
 -     gpointer client_data;
 +tearoff_activate (GtkWidget *widget, gpointer client_data)
  {
    GtkWidget *menu = gtk_widget_get_parent (widget);
    if (gtk_menu_get_tearoff_state (GTK_MENU (menu)))
     Returns the created GtkWidget.  */
  
  static GtkWidget *
 -xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group)
 -     widget_value *item;
 -     FRAME_PTR f;
 -     GCallback select_cb;
 -     GCallback highlight_cb;
 -     xg_menu_cb_data *cl_data;
 -     GSList **group;
 +xg_create_one_menuitem (widget_value *item,
 +                        FRAME_PTR f,
 +                        GCallback select_cb,
 +                        GCallback highlight_cb,
 +                        xg_menu_cb_data *cl_data,
 +                        GSList **group)
  {
    char *utf8_label;
    char *utf8_key;
    return w;
  }
  
 -static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback,
 -                                  GCallback, GCallback, int, int, int,
 -                                  GtkWidget *, xg_menu_cb_data *, char *));
 -
  /* Create a full menu tree specified by DATA.
     F is the frame the created menu belongs to.
     SELECT_CB is the callback to use when a menu item is selected.
     This function calls itself to create submenus.  */
  
  static GtkWidget *
 -create_menus (data, f, select_cb, deactivate_cb, highlight_cb,
 -              pop_up_p, menu_bar_p, add_tearoff_p, topmenu, cl_data, name)
 -     widget_value *data;
 -     FRAME_PTR f;
 -     GCallback select_cb;
 -     GCallback deactivate_cb;
 -     GCallback highlight_cb;
 -     int pop_up_p;
 -     int menu_bar_p;
 -     int add_tearoff_p;
 -     GtkWidget *topmenu;
 -     xg_menu_cb_data *cl_data;
 -     char *name;
 +create_menus (widget_value *data,
 +              FRAME_PTR f,
 +              GCallback select_cb,
 +              GCallback deactivate_cb,
 +              GCallback highlight_cb,
 +              int pop_up_p,
 +              int menu_bar_p,
 +              int add_tearoff_p,
 +              GtkWidget *topmenu,
 +              xg_menu_cb_data *cl_data,
 +              char *name)
  {
    widget_value *item;
    GtkWidget *wmenu = topmenu;
     Returns the widget created.  */
  
  GtkWidget *
 -xg_create_widget (type, name, f, val,
 -                  select_cb, deactivate_cb, highlight_cb)
 -     char *type;
 -     char *name;
 -     FRAME_PTR f;
 -     widget_value *val;
 -     GCallback select_cb;
 -     GCallback deactivate_cb;
 -     GCallback highlight_cb;
 +xg_create_widget (char *type, char *name, FRAME_PTR f, widget_value *val,
 +                  GCallback select_cb, GCallback deactivate_cb,
 +                GCallback highlight_cb)
  {
    GtkWidget *w = 0;
    int menu_bar_p = strcmp (type, "menubar") == 0;
  /* Return the label for menu item WITEM.  */
  
  static const char *
 -xg_get_menu_item_label (witem)
 -     GtkMenuItem *witem;
 +xg_get_menu_item_label (GtkMenuItem *witem)
  {
    GtkLabel *wlabel = GTK_LABEL (gtk_bin_get_child (GTK_BIN (witem)));
    return gtk_label_get_label (wlabel);
  /* Return non-zero if the menu item WITEM has the text LABEL.  */
  
  static int
 -xg_item_label_same_p (witem, label)
 -     GtkMenuItem *witem;
 -     char *label;
 +xg_item_label_same_p (GtkMenuItem *witem, char *label)
  {
    int is_same = 0;
    char *utf8_label = get_utf8_string (label);
  /* Destroy widgets in LIST.  */
  
  static void
 -xg_destroy_widgets (list)
 -     GList *list;
 +xg_destroy_widgets (GList *list)
  {
    GList *iter;
  
     This function calls itself to walk through the menu bar names.  */
  
  static void
 -xg_update_menubar (menubar, f, list, iter, pos, val,
 -                   select_cb, deactivate_cb, highlight_cb, cl_data)
 -     GtkWidget *menubar;
 -     FRAME_PTR f;
 -     GList **list;
 -     GList *iter;
 -     int pos;
 -     widget_value *val;
 -     GCallback select_cb;
 -     GCallback deactivate_cb;
 -     GCallback highlight_cb;
 -     xg_menu_cb_data *cl_data;
 +xg_update_menubar (GtkWidget *menubar,
 +                 FRAME_PTR f,
 +                 GList **list,
 +                 GList *iter,
 +                 int pos,
 +                 widget_value *val,
 +                 GCallback select_cb,
 +                 GCallback deactivate_cb,
 +                 GCallback highlight_cb,
 +                 xg_menu_cb_data *cl_data)
  {
    if (! iter && ! val)
      return;
                  New:      A C
                Remove B.  */
  
 -          gtk_widget_ref (GTK_WIDGET (witem));
 +          g_object_ref (G_OBJECT (witem));
            gtk_container_remove (GTK_CONTAINER (menubar), GTK_WIDGET (witem));
            gtk_widget_destroy (GTK_WIDGET (witem));
  
                Insert X.  */
  
            int nr = pos;
 -          GList *group = 0;
 +          GSList *group = 0;
            GtkWidget *w = xg_create_one_menuitem (val,
                                                   f,
                                                   select_cb,
                  New:      A C B
                Move C before B  */
  
 -          gtk_widget_ref (GTK_WIDGET (witem2));
 +          g_object_ref (G_OBJECT (witem2));
            gtk_container_remove (GTK_CONTAINER (menubar), GTK_WIDGET (witem2));
            gtk_menu_shell_insert (GTK_MENU_SHELL (menubar),
                                   GTK_WIDGET (witem2), pos);
 -          gtk_widget_unref (GTK_WIDGET (witem2));
 +          g_object_unref (G_OBJECT (witem2));
  
            g_list_free (*list);
            *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
     CL_DATA is the data to set in the widget for menu invocation.  */
  
  static void
 -xg_update_menu_item (val, w, select_cb, highlight_cb, cl_data)
 -     widget_value *val;
 -     GtkWidget *w;
 -     GCallback select_cb;
 -     GCallback highlight_cb;
 -     xg_menu_cb_data *cl_data;
 +xg_update_menu_item (widget_value *val,
 +                     GtkWidget *w,
 +                     GCallback select_cb,
 +                     GCallback highlight_cb,
 +                     xg_menu_cb_data *cl_data)
  {
    GtkWidget *wchild;
    GtkLabel *wlbl = 0;
        if (! utf8_key)
          {
            /* Remove the key and keep just the label.  */
 -          gtk_widget_ref (GTK_WIDGET (wlbl));
 +          g_object_ref (G_OBJECT (wlbl));
            gtk_container_remove (GTK_CONTAINER (w), wchild);
            gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (wlbl));
 +          g_object_unref (G_OBJECT (wlbl));
            wkey = 0;
          }
  
    if (utf8_key && utf8_key != val->key) g_free (utf8_key);
    if (utf8_label && utf8_label != val->name) g_free (utf8_label);
  
 -  if (! val->enabled && GTK_WIDGET_SENSITIVE (w))
 +  if (! val->enabled && gtk_widget_get_sensitive (w))
      gtk_widget_set_sensitive (w, FALSE);
 -  else if (val->enabled && ! GTK_WIDGET_SENSITIVE (w))
 +  else if (val->enabled && ! gtk_widget_get_sensitive (w))
      gtk_widget_set_sensitive (w, TRUE);
  
    cb_data = (xg_menu_item_cb_data*) g_object_get_data (G_OBJECT (w),
  /* Update the toggle menu item W so it corresponds to VAL.  */
  
  static void
 -xg_update_toggle_item (val, w)
 -     widget_value *val;
 -     GtkWidget *w;
 +xg_update_toggle_item (widget_value *val, GtkWidget *w)
  {
    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected);
  }
  /* Update the radio menu item W so it corresponds to VAL.  */
  
  static void
 -xg_update_radio_item (val, w)
 -     widget_value *val;
 -     GtkWidget *w;
 +xg_update_radio_item (widget_value *val, GtkWidget *w)
  {
    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), val->selected);
  }
     was NULL.  */
  
  static GtkWidget *
 -xg_update_submenu (submenu, f, val,
 -                   select_cb, deactivate_cb, highlight_cb, cl_data)
 -     GtkWidget *submenu;
 -     FRAME_PTR f;
 -     widget_value *val;
 -     GCallback select_cb;
 -     GCallback deactivate_cb;
 -     GCallback highlight_cb;
 -     xg_menu_cb_data *cl_data;
 +xg_update_submenu (GtkWidget *submenu,
 +                 FRAME_PTR f,
 +                 widget_value *val,
 +                 GCallback select_cb,
 +                 GCallback deactivate_cb,
 +                 GCallback highlight_cb,
 +                 xg_menu_cb_data *cl_data)
  {
    GtkWidget *newsub = submenu;
    GList *list = 0;
          if (sub && ! cur->contents)
            {
              /* Not a submenu anymore.  */
 -            gtk_widget_ref (sub);
 -            gtk_menu_item_remove_submenu (witem);
 +            g_object_ref (G_OBJECT (sub));
 +            remove_submenu (witem);
              gtk_widget_destroy (sub);
            }
          else if (cur->contents)
     HIGHLIGHT_CB is the callback to call when entering/leaving menu items.  */
  
  void
 -xg_modify_menubar_widgets (menubar, f, val, deep_p,
 -                           select_cb, deactivate_cb, highlight_cb)
 -     GtkWidget *menubar;
 -     FRAME_PTR f;
 -     widget_value *val;
 -     int deep_p;
 -     GCallback select_cb;
 -     GCallback deactivate_cb;
 -     GCallback highlight_cb;
 +xg_modify_menubar_widgets (GtkWidget *menubar, FRAME_PTR f, widget_value *val,
 +                         int deep_p,
 +                           GCallback select_cb, GCallback deactivate_cb,
 +                         GCallback highlight_cb)
  {
    xg_menu_cb_data *cl_data;
    GList *list = gtk_container_get_children (GTK_CONTAINER (menubar));
            GList *iter;
            GtkWidget *sub = 0;
            GtkWidget *newsub;
 -          GtkMenuItem *witem;
 +          GtkMenuItem *witem = 0;
  
            /* Find sub menu that corresponds to val and update it.  */
            for (iter = list ; iter; iter = g_list_next (iter))
            /* sub may still be NULL.  If we just updated non deep and added
               a new menu bar item, it has no sub menu yet.  So we set the
               newly created sub menu under witem.  */
 -          if (newsub != sub)
 +          if (newsub != sub && witem != 0)
              {
                xg_set_screen (newsub, f);
                gtk_menu_item_set_submenu (witem, newsub);
     changed.  Value is non-zero if widgets were updated.  */
  
  int
 -xg_update_frame_menubar (f)
 -     FRAME_PTR f;
 +xg_update_frame_menubar (FRAME_PTR f)
  {
    struct x_output *x = f->output_data.x;
    GtkRequisition req;
  
 -  if (!x->menubar_widget || GTK_WIDGET_MAPPED (x->menubar_widget))
 +  if (!x->menubar_widget || gtk_widget_get_mapped (x->menubar_widget))
      return 0;
  
    if (x->menubar_widget && gtk_widget_get_parent (x->menubar_widget))
     This is used when deleting a frame, and when turning off the menu bar.  */
  
  void
 -free_frame_menubar (f)
 -     FRAME_PTR f;
 +free_frame_menubar (FRAME_PTR f)
  {
    struct x_output *x = f->output_data.x;
  
      }
  }
  
+ int
+ xg_event_is_for_menubar (FRAME_PTR f, XEvent *event)
+ {
+   struct x_output *x = f->output_data.x;
+   if (! x->menubar_widget) return 0;
+   if (! (event->xbutton.x >= 0
+          && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
+          && event->xbutton.y >= 0
+          && event->xbutton.y < f->output_data.x->menubar_height
+          && event->xbutton.same_screen))
+     return 0;
+   GList *list = gtk_container_get_children (GTK_CONTAINER (x->menubar_widget));
+   if (! list) return 0;
+   GList *iter;
+   GdkRectangle rec;
+   rec.x = event->xbutton.x;
+   rec.y = event->xbutton.y;
+   rec.width = 1;
+   rec.height = 1;
+   for (iter = list ; iter; iter = g_list_next (iter))
+     {
+       GtkWidget *w = GTK_WIDGET (iter->data);
+       if (GTK_WIDGET_MAPPED (w) && gtk_widget_intersect (w, &rec, NULL))
+         break;
+     }
+   g_list_free (list);
+   return iter == 0 ? 0 : 1;
+ }
  
  \f
  /***********************************************************************
@@@ -2886,7 -3052,8 +2918,7 @@@ static struc
  /* Store the widget pointer W in id_to_widget and return the integer index.  */
  
  static int
 -xg_store_widget_in_map (w)
 -     GtkWidget *w;
 +xg_store_widget_in_map (GtkWidget *w)
  {
    int i;
  
     Called when scroll bar is destroyed.  */
  
  static void
 -xg_remove_widget_from_map (idx)
 -     int idx;
 +xg_remove_widget_from_map (int idx)
  {
    if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0)
      {
  /* Get the widget pointer at IDX from id_to_widget. */
  
  static GtkWidget *
 -xg_get_widget_from_map (idx)
 -     int idx;
 +xg_get_widget_from_map (int idx)
  {
    if (idx < id_to_widget.max_size && id_to_widget.widgets[idx] != 0)
      return id_to_widget.widgets[idx];
     Return -1 if WID not in id_to_widget.  */
  
  int
 -xg_get_scroll_id_for_window (dpy, wid)
 -     Display *dpy;
 -     Window wid;
 +xg_get_scroll_id_for_window (Display *dpy, Window wid)
  {
    int idx;
    GtkWidget *w;
     We free pointer to last scroll bar values here and remove the index.  */
  
  static void
 -xg_gtk_scroll_destroy (widget, data)
 -     GtkWidget *widget;
 -     gpointer data;
 +xg_gtk_scroll_destroy (GtkWidget *widget, gpointer data)
  {
    int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */
    xg_remove_widget_from_map (id);
     to set resources for the widget.  */
  
  void
 -xg_create_scroll_bar (f, bar, scroll_callback, end_callback, scroll_bar_name)
 -     FRAME_PTR f;
 -     struct scroll_bar *bar;
 -     GCallback scroll_callback, end_callback;
 -     char *scroll_bar_name;
 +xg_create_scroll_bar (FRAME_PTR f,
 +                      struct scroll_bar *bar,
 +                      GCallback scroll_callback,
 +                      GCallback end_callback,
 +                      char *scroll_bar_name)
  {
    GtkWidget *wscroll;
    GtkWidget *webox;
    bar->x_window = scroll_id;
  }
  
 -/* Make the scroll bar represented by SCROLLBAR_ID visible.  */
 -
 -void
 -xg_show_scroll_bar (scrollbar_id)
 -     int scrollbar_id;
 -{
 -  GtkWidget *w = xg_get_widget_from_map (scrollbar_id);
 -  if (w)
 -    gtk_widget_show_all (gtk_widget_get_parent (w));
 -}
 -
  /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F.  */
  
  void
 -xg_remove_scroll_bar (f, scrollbar_id)
 -     FRAME_PTR f;
 -     int scrollbar_id;
 +xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id)
  {
    GtkWidget *w = xg_get_widget_from_map (scrollbar_id);
    if (w)
     WIDTH, HEIGHT is the size in pixels the bar shall have.  */
  
  void
 -xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height)
 -     FRAME_PTR f;
 -     int scrollbar_id;
 -     int top;
 -     int left;
 -     int width;
 -     int height;
 +xg_update_scrollbar_pos (FRAME_PTR f,
 +                         int scrollbar_id,
 +                         int top,
 +                         int left,
 +                         int width,
 +                         int height)
  {
  
    GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id);
      {
        GtkWidget *wfixed = f->output_data.x->edit_widget;
        GtkWidget *wparent = gtk_widget_get_parent (wscroll);
 -      GtkFixed *wf = GTK_FIXED (wfixed);
 +      gint msl;
  
        /* Clear out old position.  */
 -      GList *iter;
        int oldx = -1, oldy = -1, oldw, oldh;
 -      for (iter = wf->children; iter; iter = iter->next)
 -        if (((GtkFixedChild *)iter->data)->widget == wparent)
 -          {
 -            GtkFixedChild *ch = (GtkFixedChild *)iter->data;
 -            if (ch->x != left || ch->y != top)
 -              {
 -                oldx = ch->x;
 -                oldy = ch->y;
 -                gtk_widget_get_size_request (wscroll, &oldw, &oldh);
 -              }
 -            break;
 -          }
 +      if (gtk_widget_get_parent (wparent) == wfixed)
 +        {
 +          gtk_container_child_get (GTK_CONTAINER (wfixed), wparent,
 +                                   "x", &oldx, "y", &oldy, NULL);
 +          gtk_widget_get_size_request (wscroll, &oldw, &oldh);
 +        }
  
        /* Move and resize to new values.  */
        gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
 -      gtk_widget_set_size_request (wscroll, width, height);
 +      gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL);
 +      if (msl > height)
 +        {
 +          /* No room.  Hide scroll bar as some themes output a warning if
 +             the height is less than the min size.  */
 +          gtk_widget_hide (wparent);
 +          gtk_widget_hide (wscroll);
 +        }
 +      else
 +        {
 +          gtk_widget_show_all (wparent);
 +          gtk_widget_set_size_request (wscroll, width, height);
 +        }
        gtk_widget_queue_draw (wfixed);
        gdk_window_process_all_updates ();
 -      if (oldx != -1
 +      if (oldx != -1 && oldw > 0 && oldh > 0)
          {
            /* Clear under old scroll bar position.  This must be done after
               the gtk_widget_queue_draw and gdk_window_process_all_updates
     displaying PORTION out of a whole WHOLE, and our position POSITION.  */
  
  void
 -xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
 -     struct scroll_bar *bar;
 -     int portion, position, whole;
 +xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
 +                                 int portion,
 +                                 int position,
 +                                 int whole)
  {
    GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window);
  
        /* Assume all lines are of equal size.  */
        new_step = size / max (1, FRAME_LINES (f));
  
 -      if ((int) adj->page_size != size
 -          || (int) adj->step_increment != new_step)
 +      if ((int) gtk_adjustment_get_page_size (adj) != size
 +          || (int) gtk_adjustment_get_step_increment (adj) != new_step)
          {
 -          adj->page_size = size;
 -          adj->step_increment = new_step;
 +          gtk_adjustment_set_page_size (adj, size);
 +          gtk_adjustment_set_step_increment (adj, new_step);
            /* Assume a page increment is about 95% of the page size  */
 -          adj->page_increment = (int) (0.95*adj->page_size);
 +          gtk_adjustment_set_page_increment (adj,(int) (0.95*size));
            changed = 1;
          }
  
     Return non-zero if the event is for a scroll bar, zero otherwise.  */
  
  int
 -xg_event_is_for_scrollbar (f, event)
 -     FRAME_PTR f;
 -     XEvent *event;
 +xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event)
  {
    int retval = 0;
  
        /* Check if press occurred outside the edit widget.  */
        GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
        retval = gdk_display_get_window_at_pointer (gdpy, NULL, NULL)
 -        != f->output_data.x->edit_widget->window;
 +        != gtk_widget_get_window (f->output_data.x->edit_widget);
      }
    else if (f
             && ((event->type == ButtonRelease && event->xbutton.button < 4)
                 || event->type == MotionNotify))
      {
        /* If we are releasing or moving the scroll bar, it has the grab.  */
 -      retval = gtk_grab_get_current () != 0
 -        && gtk_grab_get_current () != f->output_data.x->edit_widget;
 +      GtkWidget *w = gtk_grab_get_current ();
 +      retval = w != 0 && GTK_IS_SCROLLBAR (w);
      }
    
    return retval;
     tool bar.  0 is the first button.  */
  
  static gboolean
 -xg_tool_bar_button_cb (widget, event, user_data)
 -    GtkWidget      *widget;
 -    GdkEventButton *event;
 -    gpointer        user_data;
 +xg_tool_bar_button_cb (GtkWidget *widget,
 +                       GdkEventButton *event,
 +                       gpointer user_data)
  {
    /* Casts to avoid warnings when gpointer is 64 bits and int is 32 bits */
    gpointer ptr = (gpointer) (EMACS_INT) event->state;
     tool bar.  0 is the first button.  */
  
  static void
 -xg_tool_bar_callback (w, client_data)
 -     GtkWidget *w;
 -     gpointer client_data;
 +xg_tool_bar_callback (GtkWidget *w, gpointer client_data)
  {
    /* The EMACS_INT cast avoids a warning. */
    int idx = (int) (EMACS_INT) client_data;
     tool bar.  0 is the first button.  */
  
  static void
 -xg_tool_bar_proxy_callback (w, client_data)
 -     GtkWidget *w;
 -     gpointer client_data;
 +xg_tool_bar_proxy_callback (GtkWidget *w, gpointer client_data)
  {
    GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w),
                                                        XG_TOOL_BAR_PROXY_BUTTON));
  
  
  static gboolean
 -xg_tool_bar_help_callback P_ ((GtkWidget *w,
 -                               GdkEventCrossing *event,
 -                               gpointer client_data));
 +xg_tool_bar_help_callback (GtkWidget *w,
 +                           GdkEventCrossing *event,
 +                           gpointer client_data);
  
  /* This callback is called when a help is to be shown for an item in
     the detached tool bar when the detached tool bar it is not expanded.  */
  
  static gboolean
 -xg_tool_bar_proxy_help_callback (w, event, client_data)
 -     GtkWidget *w;
 -     GdkEventCrossing *event;
 -     gpointer client_data;
 +xg_tool_bar_proxy_help_callback (GtkWidget *w,
 +                                 GdkEventCrossing *event,
 +                                 gpointer client_data)
  {
    GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w),
                                                        XG_TOOL_BAR_PROXY_BUTTON));
    return xg_tool_bar_help_callback (wbutton, event, client_data);
  }
  
 +static GtkWidget *
 +xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage)
 +{
 +  GList *clist = gtk_container_get_children (GTK_CONTAINER (vb));
 +  GtkWidget *c1 = (GtkWidget *) clist->data;
 +  GtkWidget *c2 = (GtkWidget *) clist->next->data;
 +  *wimage = GTK_IS_IMAGE (c1) ? c1 : c2;
 +  g_list_free (clist);
 +  return GTK_IS_LABEL (c1) ? c1 : c2;
 +}
 +
  
  /* This callback is called when a tool item should create a proxy item,
     such as for the overflow menu.  Also called when the tool bar is detached.
     blank.  */
  
  static gboolean
 -xg_tool_bar_menu_proxy (toolitem, user_data)
 -     GtkToolItem *toolitem;
 -     gpointer user_data;
 +xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data)
  {
    GtkWidget *weventbox = gtk_bin_get_child (GTK_BIN (toolitem));
    GtkButton *wbutton = GTK_BUTTON (gtk_bin_get_child (GTK_BIN (weventbox)));
 -  GtkWidget *wmenuitem = gtk_image_menu_item_new_with_label ("");
 +  GtkWidget *vb = gtk_bin_get_child (GTK_BIN (wbutton));
 +  GtkWidget *c1;
 +  GtkLabel *wlbl = GTK_LABEL (xg_get_tool_bar_widgets (vb, &c1));
 +  GtkImage *wimage = GTK_IMAGE (c1);
 +  GtkWidget *wmenuitem = gtk_image_menu_item_new_with_label
 +    (gtk_label_get_text (wlbl));
    GtkWidget *wmenuimage;
  
 +
    if (gtk_button_get_use_stock (wbutton))
      wmenuimage = gtk_image_new_from_stock (gtk_button_get_label (wbutton),
                                             GTK_ICON_SIZE_MENU);
    else
      {
 -      GtkImage *wimage = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (wbutton)));
        GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton));
        GtkImageType store_type = gtk_image_get_storage_type (wimage);
  
    g_object_set_data (G_OBJECT (wmenuitem), XG_TOOL_BAR_PROXY_BUTTON,
                       (gpointer) wbutton);
    gtk_tool_item_set_proxy_menu_item (toolitem, "Emacs toolbar item", wmenuitem);
 -  gtk_widget_set_sensitive (wmenuitem, GTK_WIDGET_SENSITIVE (wbutton));
 +  gtk_widget_set_sensitive (wmenuitem,
 +                            gtk_widget_get_sensitive (GTK_WIDGET (wbutton)));
  
    /* Use enter/leave notify to show help.  We use the events
       rather than the GtkButton specific signals "enter" and
     CLIENT_DATA is a pointer to the frame the tool bar belongs to.  */
  
  static void
 -xg_tool_bar_detach_callback (wbox, w, client_data)
 -     GtkHandleBox *wbox;
 -     GtkWidget *w;
 -     gpointer client_data;
 +xg_tool_bar_detach_callback (GtkHandleBox *wbox,
 +                             GtkWidget *w,
 +                             gpointer client_data)
  {
    FRAME_PTR f = (FRAME_PTR) client_data;
    extern int x_gtk_whole_detached_tool_bar;
     CLIENT_DATA is a pointer to the frame the tool bar belongs to.  */
  
  static void
 -xg_tool_bar_attach_callback (wbox, w, client_data)
 -     GtkHandleBox *wbox;
 -     GtkWidget *w;
 -     gpointer client_data;
 +xg_tool_bar_attach_callback (GtkHandleBox *wbox,
 +                             GtkWidget *w,
 +                             gpointer client_data)
  {
    FRAME_PTR f = (FRAME_PTR) client_data;
    g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL);
     Returns FALSE to tell GTK to keep processing this event.  */
  
  static gboolean
 -xg_tool_bar_help_callback (w, event, client_data)
 -     GtkWidget *w;
 -     GdkEventCrossing *event;
 -     gpointer client_data;
 +xg_tool_bar_help_callback (GtkWidget *w,
 +                           GdkEventCrossing *event,
 +                           gpointer client_data)
  {
    /* The EMACS_INT cast avoids a warning. */
    int idx = (int) (EMACS_INT) client_data;
     Returns FALSE to tell GTK to keep processing this event.  */
  
  static gboolean
 -xg_tool_bar_item_expose_callback (w, event, client_data)
 -     GtkWidget *w;
 -     GdkEventExpose *event;
 -     gpointer client_data;
 +xg_tool_bar_item_expose_callback (GtkWidget *w,
 +                                  GdkEventExpose *event,
 +                                  gpointer client_data)
  {
    gint width, height;
  
  /* Attach a tool bar to frame F.  */
  
  static void
 -xg_pack_tool_bar (f)
 -     FRAME_PTR f;
 +xg_pack_tool_bar (FRAME_PTR f)
  {
    struct x_output *x = f->output_data.x;
    int vbox_pos = x->menubar_widget ? 1 : 0;
  
    gtk_box_reorder_child (GTK_BOX (x->vbox_widget), x->handlebox_widget,
                           vbox_pos);
 -  gtk_widget_show_all (x->handlebox_widget);
 +
 +  gtk_widget_show (x->toolbar_widget);
 +  gtk_widget_show (x->handlebox_widget);
  }
  
  /* Create a tool bar for frame F.  */
 +#ifdef HAVE_GTK_ORIENTABLE_SET_ORIENTATION
 +#define toolbar_set_orientation(w, o) \
 +  gtk_orientable_set_orientation (GTK_ORIENTABLE (w), o)
 +#else
 +#define toolbar_set_orientation(w, o) \
 +  gtk_toolbar_set_orientation (GTK_TOOLBAR (w), o)
 +#endif
  
  static void
 -xg_create_tool_bar (f)
 -     FRAME_PTR f;
 +xg_create_tool_bar (FRAME_PTR f)
  {
    struct x_output *x = f->output_data.x;
  
  
    gtk_widget_set_name (x->toolbar_widget, "emacs-toolbar");
  
 -  /* We only have icons, so override any user setting.  We could
 -     use the caption property of the toolbar item (see update_frame_tool_bar
 -     below), but some of those strings are long, making the toolbar so
 -     long it does not fit on the screen.  The GtkToolbar widget makes every
 -     item equal size, so the longest caption determine the size of every
 -     tool bar item.  I think the creators of the GtkToolbar widget
 -     counted on 4 or 5 character long strings.  */
    gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS);
 -  gtk_toolbar_set_orientation (GTK_TOOLBAR (x->toolbar_widget),
 +  toolbar_set_orientation (x->toolbar_widget,
                                 GTK_ORIENTATION_HORIZONTAL);
  }
  
     Returns IMAGE if RTL is not found.  */
  
  static Lisp_Object
 -find_rtl_image (f, image, rtl)
 -     FRAME_PTR f;
 -     Lisp_Object image;
 -     Lisp_Object rtl;
 +find_rtl_image (FRAME_PTR f, Lisp_Object image, Lisp_Object rtl)
  {
    int i;
    Lisp_Object file, rtl_name;
    return image;
  }
  
 +static GtkToolItem *
 +xg_make_tool_item (FRAME_PTR f,
 +                   GtkWidget *wimage,
 +                   GtkWidget **wbutton,
 +                   char *label,
 +                   int i)
 +{
 +  GtkToolItem *ti = gtk_tool_item_new ();
 +  GtkWidget *vb = EQ (Vtool_bar_style, Qboth_horiz)
 +    ? gtk_hbox_new (FALSE, 0) : gtk_vbox_new (FALSE, 0);
 +  GtkWidget *wb = gtk_button_new ();
 +  GtkWidget *weventbox = gtk_event_box_new ();
 +
 +  if (wimage)
 +    gtk_box_pack_start (GTK_BOX (vb), wimage, TRUE, TRUE, 0);
 +
 +  gtk_box_pack_start (GTK_BOX (vb), gtk_label_new (label), TRUE, TRUE, 0);
 +  gtk_button_set_focus_on_click (GTK_BUTTON (wb), FALSE);
 +  gtk_button_set_relief (GTK_BUTTON (wb), GTK_RELIEF_NONE);
 +  gtk_container_add (GTK_CONTAINER (wb), vb);
 +  gtk_container_add (GTK_CONTAINER (weventbox), wb);
 +  gtk_container_add (GTK_CONTAINER (ti), weventbox);
 +
 +  if (wimage)
 +    {
 +      /* The EMACS_INT cast avoids a warning. */
 +      g_signal_connect (G_OBJECT (ti), "create-menu-proxy",
 +                        G_CALLBACK (xg_tool_bar_menu_proxy),
 +                        (gpointer) (EMACS_INT) i);
 +
 +      g_signal_connect (G_OBJECT (wb), "clicked",
 +                        G_CALLBACK (xg_tool_bar_callback),
 +                        (gpointer) (EMACS_INT) i);
 +
 +      g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f);
 +
 +      /* Catch expose events to overcome an annoying redraw bug, see
 +         comment for xg_tool_bar_item_expose_callback.  */
 +      g_signal_connect (G_OBJECT (ti),
 +                        "expose-event",
 +                        G_CALLBACK (xg_tool_bar_item_expose_callback),
 +                        0);
 +
 +      gtk_tool_item_set_homogeneous (ti, FALSE);
 +
 +      /* Callback to save modifyer mask (Shift/Control, etc).  GTK makes
 +         no distinction based on modifiers in the activate callback,
 +         so we have to do it ourselves.  */
 +      g_signal_connect (wb, "button-release-event",
 +                        G_CALLBACK (xg_tool_bar_button_cb),
 +                        NULL);
 +
 +      g_object_set_data (G_OBJECT (wb), XG_FRAME_DATA, (gpointer)f);
 +          
 +      /* Use enter/leave notify to show help.  We use the events
 +         rather than the GtkButton specific signals "enter" and
 +         "leave", so we can have only one callback.  The event
 +         will tell us what kind of event it is.  */
 +      /* The EMACS_INT cast avoids a warning. */
 +      g_signal_connect (G_OBJECT (weventbox),
 +                        "enter-notify-event",
 +                        G_CALLBACK (xg_tool_bar_help_callback),
 +                        (gpointer) (EMACS_INT) i);
 +      g_signal_connect (G_OBJECT (weventbox),
 +                        "leave-notify-event",
 +                        G_CALLBACK (xg_tool_bar_help_callback),
 +                        (gpointer) (EMACS_INT) i);
 +    }
 +  
 +  if (wbutton) *wbutton = wb;
 +
 +  return ti;
 +}
 +
 +static void
 +xg_show_toolbar_item (GtkToolItem *ti)
 +{
 +  Lisp_Object style = Ftool_bar_get_system_style ();
 +
 +  int show_label = EQ (style, Qboth)
 +    || EQ (style, Qboth_horiz) || EQ (style, Qtext);
 +  int show_image = ! EQ (style, Qtext);
 +  int horiz = EQ (style, Qboth_horiz);
 +
 +  GtkWidget *weventbox = gtk_bin_get_child (GTK_BIN (ti));
 +  GtkWidget *wbutton = gtk_bin_get_child (GTK_BIN (weventbox));
 +  GtkWidget *vb = gtk_bin_get_child (GTK_BIN (wbutton));
 +  GtkWidget *wimage;
 +  GtkWidget *wlbl = xg_get_tool_bar_widgets (vb, &wimage);
 +  GtkWidget *new_box = NULL;
 +
 +  if (GTK_IS_VBOX (vb) && horiz)
 +    new_box = gtk_hbox_new (FALSE, 0);
 +  else if (GTK_IS_HBOX (vb) && !horiz && show_label && show_image)
 +    new_box = gtk_vbox_new (FALSE, 0);
 +  if (new_box)
 +    {
 +      g_object_ref (G_OBJECT (wimage));
 +      g_object_ref (G_OBJECT (wlbl));
 +      gtk_container_remove (GTK_CONTAINER (vb), wimage);
 +      gtk_container_remove (GTK_CONTAINER (vb), wlbl);
 +      gtk_widget_destroy (GTK_WIDGET (vb));
 +      gtk_box_pack_start (GTK_BOX (new_box), wimage, TRUE, TRUE, 0);
 +      gtk_box_pack_start (GTK_BOX (new_box), wlbl, TRUE, TRUE, 0);
 +      gtk_container_add (GTK_CONTAINER (wbutton), new_box);
 +      g_object_unref (G_OBJECT (wimage));
 +      g_object_unref (G_OBJECT (wlbl));
 +      vb = new_box;
 +    }
 +
 +  if (show_label) gtk_widget_show (wlbl);
 +  else gtk_widget_hide (wlbl);
 +  if (show_image) gtk_widget_show (wimage);
 +  else gtk_widget_hide (wimage);
 +  gtk_widget_show (GTK_WIDGET (weventbox));
 +  gtk_widget_show (GTK_WIDGET (vb));
 +  gtk_widget_show (GTK_WIDGET (wbutton));
 +  gtk_widget_show (GTK_WIDGET (ti));
 +}
 +
 +
  /* Update the tool bar for frame F.  Add new buttons and remove old.  */
  
  extern Lisp_Object Qx_gtk_map_stock;
  
  void
 -update_frame_tool_bar (f)
 -     FRAME_PTR f;
 +update_frame_tool_bar (FRAME_PTR f)
  {
    int i;
    GtkRequisition old_req, new_req;
  
    wtoolbar = GTK_TOOLBAR (x->toolbar_widget);
    gtk_widget_size_request (GTK_WIDGET (wtoolbar), &old_req);
 -  dir = gtk_widget_get_direction (x->toolbar_widget);
 -
 +  dir = gtk_widget_get_direction (GTK_WIDGET (wtoolbar));
 +  
    for (i = 0; i < f->n_tool_bar_items; ++i)
      {
        int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P));
        GtkWidget *wbutton = NULL;
        GtkWidget *weventbox;
        Lisp_Object specified_file;
 -
 -      ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i);
 +      char *label = SSDATA (PROP (TOOL_BAR_ITEM_LABEL));
 +      
 +      ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), i);
  
        if (ti)
          {
            wbutton = gtk_bin_get_child (GTK_BIN (weventbox));
          }
  
 +
        image = PROP (TOOL_BAR_ITEM_IMAGES);
  
        /* Ignore invalid image specifications.  */
                  icon_size = gtk_toolbar_get_icon_size (wtoolbar);
              }
            else if (gtk_stock_lookup (SSDATA (stock), &stock_item))
 -              icon_size = gtk_toolbar_get_icon_size (wtoolbar);
 +            icon_size = gtk_toolbar_get_icon_size (wtoolbar);
            else
              {
                stock = Qnil;
  
            if (img->load_failed_p || img->pixmap == None)
              {
 -                if (ti)
 -                    gtk_widget_hide_all (GTK_WIDGET (ti));
 -                else
 +              if (ti)
 +                gtk_widget_hide_all (GTK_WIDGET (ti));
 +              else
                  {
 -                    /* Insert an empty (non-image) button */
 -                    weventbox = gtk_event_box_new ();
 -                    wbutton = gtk_button_new ();
 -                    gtk_button_set_focus_on_click (GTK_BUTTON (wbutton), FALSE);
 -                    gtk_button_set_relief (GTK_BUTTON (wbutton),
 -                                           GTK_RELIEF_NONE);
 -                    gtk_container_add (GTK_CONTAINER (weventbox), wbutton);
 -                    ti = gtk_tool_item_new ();
 -                    gtk_container_add (GTK_CONTAINER (ti), weventbox);
 -                    gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1);
 +                  /* Insert an empty (non-image) button */
 +                  ti = xg_make_tool_item (f, NULL, NULL, "", i);
 +                  gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, -1);
                  }
 -                continue;
 +              continue;
              }
          }
  
              }
  
            gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
 -          wbutton = gtk_button_new ();
 -          gtk_button_set_focus_on_click (GTK_BUTTON (wbutton), FALSE);
 -          gtk_button_set_relief (GTK_BUTTON (wbutton), GTK_RELIEF_NONE);
 -          gtk_container_add (GTK_CONTAINER (wbutton), w);
 -          weventbox = gtk_event_box_new ();
 -          gtk_container_add (GTK_CONTAINER (weventbox), wbutton);
 -          ti = gtk_tool_item_new ();
 -          gtk_container_add (GTK_CONTAINER (ti), weventbox);
 -          gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1);
 -
 -
 -          /* The EMACS_INT cast avoids a warning. */
 -          g_signal_connect (G_OBJECT (ti), "create-menu-proxy",
 -                            G_CALLBACK (xg_tool_bar_menu_proxy),
 -                            (gpointer) (EMACS_INT) i);
 -
 -          g_signal_connect (G_OBJECT (wbutton), "clicked",
 -                            G_CALLBACK (xg_tool_bar_callback),
 -                            (gpointer) (EMACS_INT) i);
 -
 -          gtk_widget_show_all (GTK_WIDGET (ti));
 -
 -
 -          g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f);
 -
 -          /* Catch expose events to overcome an annoying redraw bug, see
 -             comment for xg_tool_bar_item_expose_callback.  */
 -          g_signal_connect (G_OBJECT (ti),
 -                            "expose-event",
 -                            G_CALLBACK (xg_tool_bar_item_expose_callback),
 -                            0);
 -
 +          ti = xg_make_tool_item (f, w, &wbutton, label, i);
 +          gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, -1);
            gtk_widget_set_sensitive (wbutton, enabled_p);
 -          gtk_tool_item_set_homogeneous (ti, FALSE);
 -
 -          /* Callback to save modifyer mask (Shift/Control, etc).  GTK makes
 -             no distinction based on modifiers in the activate callback,
 -             so we have to do it ourselves.  */
 -          g_signal_connect (wbutton, "button-release-event",
 -                            G_CALLBACK (xg_tool_bar_button_cb),
 -                            NULL);
 -
 -          g_object_set_data (G_OBJECT (wbutton), XG_FRAME_DATA, (gpointer)f);
 -          
 -          /* Use enter/leave notify to show help.  We use the events
 -             rather than the GtkButton specific signals "enter" and
 -             "leave", so we can have only one callback.  The event
 -             will tell us what kind of event it is.  */
 -          /* The EMACS_INT cast avoids a warning. */
 -          g_signal_connect (G_OBJECT (weventbox),
 -                            "enter-notify-event",
 -                            G_CALLBACK (xg_tool_bar_help_callback),
 -                            (gpointer) (EMACS_INT) i);
 -          g_signal_connect (G_OBJECT (weventbox),
 -                            "leave-notify-event",
 -                            G_CALLBACK (xg_tool_bar_help_callback),
 -                            (gpointer) (EMACS_INT) i);
          }
        else
          {
 -          GtkWidget *wimage = gtk_bin_get_child (GTK_BIN (wbutton));
 +          GtkWidget *vb = gtk_bin_get_child (GTK_BIN (wbutton));
 +          GtkWidget *wimage;
 +          GtkWidget *wlbl = xg_get_tool_bar_widgets (vb, &wimage);
 +
            Pixmap old_img = (Pixmap)g_object_get_data (G_OBJECT (wimage),
                                                        XG_TOOL_BAR_IMAGE_DATA);
            gpointer old_stock_name = g_object_get_data (G_OBJECT (wimage),
                                                         XG_TOOL_BAR_STOCK_NAME);
            gpointer old_icon_name = g_object_get_data (G_OBJECT (wimage),
                                                        XG_TOOL_BAR_ICON_NAME);
 +          gtk_label_set_text (GTK_LABEL (wlbl), label);
            if (stock_name &&
                (! old_stock_name || strcmp (old_stock_name, stock_name) != 0))
              {
                                        (GDestroyNotify) xfree);
                g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA,
                                   NULL);
 -              g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_ICON_NAME, NULL);
 +              g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_ICON_NAME,
 +                                 NULL);
              }
            else if (icon_name &&
                     (! old_icon_name || strcmp (old_icon_name, icon_name) != 0))
              }
            else if (img && old_img != img->pixmap)
              {
 -              (void) xg_get_image_for_pixmap (f, img, x->widget, wimage);
 +              (void) xg_get_image_for_pixmap (f, img, x->widget,
 +                                              GTK_IMAGE (wimage));
                g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_IMAGE_DATA,
                                   (gpointer)img->pixmap);
  
                g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_STOCK_NAME,
                                   NULL);
 -              g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_ICON_NAME, NULL);
 +              g_object_set_data (G_OBJECT (wimage), XG_TOOL_BAR_ICON_NAME,
 +                                 NULL);
              }
  
            gtk_misc_set_padding (GTK_MISC (wimage), hmargin, vmargin);
  
            gtk_widget_set_sensitive (wbutton, enabled_p);
 -          gtk_widget_show_all (GTK_WIDGET (ti));
 -       }
 +        }
 +      xg_show_toolbar_item (ti);
  
  #undef PROP
      }
       can be reused later on.  */
    do
      {
 -      ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i++);
 +      ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), i++);
        if (ti) gtk_widget_hide_all (GTK_WIDGET (ti));
      } while (ti != NULL);
  
    new_req.height = 0;
    if (pack_tool_bar && f->n_tool_bar_items != 0)
 -      xg_pack_tool_bar (f);
 +    xg_pack_tool_bar (f);
    
  
 -  gtk_widget_size_request (GTK_WIDGET (x->toolbar_widget), &new_req);
 +  gtk_widget_size_request (GTK_WIDGET (wtoolbar), &new_req);
    if (old_req.height != new_req.height
        && ! FRAME_X_OUTPUT (f)->toolbar_detached)
      {
     Remove the tool bar.  */
  
  void
 -free_frame_tool_bar (f)
 -     FRAME_PTR f;
 +free_frame_tool_bar (FRAME_PTR f)
  {
    struct x_output *x = f->output_data.x;
  
  \f
  /***********************************************************************
                        Initializing
 - ***********************************************************************/
 +***********************************************************************/
  void
 -xg_initialize ()
 +xg_initialize (void)
  {
    GtkBindingSet *binding_set;
  
diff --combined src/gtkutil.h
@@@ -38,6 -38,7 +38,6 @@@ along with GNU Emacs.  If not, see <htt
  /* Key for data that menu items hold.  */
  #define XG_ITEM_DATA "emacs_menuitem"
  
 -
  /* Button types in menus.  */
  enum button_type
  {
@@@ -118,93 -119,96 +118,95 @@@ typedef struct _widget_valu
    struct _widget_value *free_list;
  } widget_value;
  
 -#ifdef HAVE_GTK_FILE_BOTH
 +#ifdef HAVE_GTK_FILE_SELECTION_NEW
  extern int use_old_gtk_file_dialog;
  #endif
  
 -extern widget_value *malloc_widget_value P_ ((void));
 -extern void free_widget_value P_ ((widget_value *));
 -
 -extern int xg_uses_old_file_dialog P_ ((void));
 -
 -extern char *xg_get_file_name P_ ((FRAME_PTR f,
 -                                   char *prompt,
 -                                   char *default_filename,
 -                                   int mustmatch_p,
 -                                   int only_dir_p));
 -
 -extern char *xg_get_font_name P_ ((FRAME_PTR f, char *));
 -
 -extern GtkWidget *xg_create_widget P_ ((char *type,
 -                                        char *name,
 -                                        FRAME_PTR f,
 -                                        widget_value *val,
 -                                        GCallback select_cb,
 -                                        GCallback deactivate_cb,
 -                                        GCallback hightlight_cb));
 -
 -extern void xg_modify_menubar_widgets P_ ((GtkWidget *menubar,
 -                                           FRAME_PTR f,
 -                                           widget_value *val,
 -                                           int deep_p,
 -                                           GCallback select_cb,
 -                                           GCallback deactivate_cb,
 -                                           GCallback hightlight_cb));
 -
 -extern int xg_update_frame_menubar P_ ((FRAME_PTR f));
 -
 -extern int xg_event_is_for_menubar P_ ((FRAME_PTR f, XEvent *event));
 -
 -extern int xg_have_tear_offs P_ ((void));
 -
 -extern int xg_get_scroll_id_for_window P_ ((Display *dpy, Window wid));
 -
 -extern void xg_create_scroll_bar P_ ((FRAME_PTR f,
 -                                      struct scroll_bar *bar,
 -                                      GCallback scroll_callback,
 -                                      GCallback end_callback,
 -                                      char *scroll_bar_name));
 -extern void xg_show_scroll_bar P_ ((int scrollbar_id));
 -extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id));
 -
 -extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f,
 -                                         int scrollbar_id,
 -                                         int top,
 -                                         int left,
 -                                         int width,
 -                                         int height));
 -
 -extern void xg_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *bar,
 -                                                 int portion,
 -                                                 int position,
 -                                                 int whole));
 -extern int xg_event_is_for_scrollbar P_ ((FRAME_PTR f, XEvent *event));
 -
 -extern void update_frame_tool_bar P_ ((FRAME_PTR f));
 -extern void free_frame_tool_bar P_ ((FRAME_PTR f));
 -
 -extern void xg_frame_resized P_ ((FRAME_PTR f,
 -                                  int pixelwidth,
 -                                  int pixelheight));
 -extern void xg_frame_set_char_size P_ ((FRAME_PTR f, int cols, int rows));
 -extern GtkWidget * xg_win_to_widget P_ ((Display *dpy, Window wdesc));
 -
 -extern int xg_display_open P_ ((char *display_name, Display **dpy));
 -extern void xg_display_close P_ ((Display *dpy));
 -extern GdkCursor * xg_create_default_cursor P_ ((Display *dpy));
 -
 -extern int xg_create_frame_widgets P_ ((FRAME_PTR f));
 -extern void x_wm_set_size_hint P_ ((FRAME_PTR f,
 -                                    long flags,
 -                                    int user_position));
 -extern void xg_set_background_color P_ ((FRAME_PTR f, unsigned long bg));
 -
 -extern void xg_set_frame_icon P_ ((FRAME_PTR f,
 -                                   Pixmap icon_pixmap,
 -                                   Pixmap icon_mask));
 +extern widget_value *malloc_widget_value (void);
 +extern void free_widget_value (widget_value *);
 +
 +extern int xg_uses_old_file_dialog (void);
 +
 +extern char *xg_get_file_name (FRAME_PTR f,
 +                               char *prompt,
 +                               char *default_filename,
 +                               int mustmatch_p,
 +                               int only_dir_p);
 +
 +extern char *xg_get_font_name (FRAME_PTR f, char *);
 +
 +extern GtkWidget *xg_create_widget (char *type,
 +                                    char *name,
 +                                    FRAME_PTR f,
 +                                    widget_value *val,
 +                                    GCallback select_cb,
 +                                    GCallback deactivate_cb,
 +                                    GCallback hightlight_cb);
 +
 +extern void xg_modify_menubar_widgets (GtkWidget *menubar,
 +                                       FRAME_PTR f,
 +                                       widget_value *val,
 +                                       int deep_p,
 +                                       GCallback select_cb,
 +                                       GCallback deactivate_cb,
 +                                       GCallback hightlight_cb);
 +
 +extern int xg_update_frame_menubar (FRAME_PTR f);
 +
++extern int xg_event_is_for_menubar (FRAME_PTR f, XEvent *event);
++
 +extern int xg_have_tear_offs (void);
 +
 +extern int xg_get_scroll_id_for_window (Display *dpy, Window wid);
 +
 +extern void xg_create_scroll_bar (FRAME_PTR f,
 +                                  struct scroll_bar *bar,
 +                                  GCallback scroll_callback,
 +                                  GCallback end_callback,
 +                                  char *scroll_bar_name);
 +extern void xg_remove_scroll_bar (FRAME_PTR f, int scrollbar_id);
 +
 +extern void xg_update_scrollbar_pos (FRAME_PTR f,
 +                                     int scrollbar_id,
 +                                     int top,
 +                                     int left,
 +                                     int width,
 +                                     int height);
 +
 +extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
 +                                             int portion,
 +                                             int position,
 +                                             int whole);
 +extern int xg_event_is_for_scrollbar (FRAME_PTR f, XEvent *event);
 +
 +extern void update_frame_tool_bar (FRAME_PTR f);
 +extern void free_frame_tool_bar (FRAME_PTR f);
 +
 +extern void xg_frame_resized (FRAME_PTR f,
 +                              int pixelwidth,
 +                              int pixelheight);
 +extern void xg_frame_set_char_size (FRAME_PTR f, int cols, int rows);
 +extern GtkWidget * xg_win_to_widget (Display *dpy, Window wdesc);
 +
 +extern void xg_display_open (char *display_name, Display **dpy);
 +extern void xg_display_close (Display *dpy);
 +extern GdkCursor * xg_create_default_cursor (Display *dpy);
 +
 +extern int xg_create_frame_widgets (FRAME_PTR f);
 +extern void x_wm_set_size_hint (FRAME_PTR f,
 +                                long flags,
 +                                int user_position);
 +extern void xg_set_background_color (FRAME_PTR f, unsigned long bg);
 +
 +extern void xg_set_frame_icon (FRAME_PTR f,
 +                               Pixmap icon_pixmap,
 +                               Pixmap icon_mask);
  
  /* Mark all callback data that are Lisp_object:s during GC.  */
 -extern void xg_mark_data P_ ((void));
 +extern void xg_mark_data (void);
  
  /* Initialize GTK specific parts.  */
 -extern void xg_initialize P_ ((void));
 +extern void xg_initialize (void);
  
  /* Setting scrollbar values invokes the callback.  Use this variable
     to indicate that the callback should do nothing.  */
diff --combined src/w32fns.c
@@@ -69,15 -69,15 +69,15 @@@ along with GNU Emacs.  If not, see <htt
  #define FOF_NO_CONNECTED_ELEMENTS 0x2000
  #endif
  
 -void syms_of_w32fns ();
 -void globals_of_w32fns ();
 +void syms_of_w32fns (void);
 +void globals_of_w32fns (void);
  
 -extern void free_frame_menubar ();
 -extern double atof ();
 -extern int w32_console_toggle_lock_key P_ ((int, Lisp_Object));
 -extern void w32_menu_display_help P_ ((HWND, HMENU, UINT, UINT));
 -extern void w32_free_menu_strings P_ ((HWND));
 -extern const char *map_w32_filename P_ ((const char *, const char **));
 +extern void free_frame_menubar (struct frame *);
 +extern double atof (const char *);
 +extern int w32_console_toggle_lock_key (int, Lisp_Object);
 +extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
 +extern void w32_free_menu_strings (HWND);
 +extern const char *map_w32_filename (const char *, const char **);
  
  extern int quit_char;
  
@@@ -294,8 -294,6 +294,8 @@@ extern Lisp_Object Vwindow_system_versi
  
  /* The below are defined in frame.c.  */
  
 +extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode;
 +extern Lisp_Object Vwindow_system_version;
  extern Lisp_Object Qtooltip;
  
  #ifdef GLYPH_DEBUG
@@@ -321,18 -319,18 +321,18 @@@ extern HMENU current_popup_menu
  static int menubar_in_use = 0;
  
  /* From w32uniscribe.c  */
 -extern void syms_of_w32uniscribe ();
 +extern void syms_of_w32uniscribe (void);
  extern int uniscribe_available;
  
  /* Function prototypes for hourglass support.  */
 -static void w32_show_hourglass P_ ((struct frame *));
 -static void w32_hide_hourglass P_ ((void));
 +static void w32_show_hourglass (struct frame *);
 +static void w32_hide_hourglass (void);
  
  
  \f
  /* Error if we are not connected to MS-Windows.  */
  void
 -check_w32 ()
 +check_w32 (void)
  {
    if (! w32_in_use)
      error ("MS-Windows not in use or not initialized");
     You should not call this unless HAVE_MENUS is defined.  */
  
  int
 -have_menus_p ()
 +have_menus_p (void)
  {
    return w32_in_use;
  }
     and checking validity for W32.  */
  
  FRAME_PTR
 -check_x_frame (frame)
 -     Lisp_Object frame;
 +check_x_frame (Lisp_Object frame)
  {
    FRAME_PTR f;
  
     the first display on the list.  */
  
  struct w32_display_info *
 -check_x_display_info (frame)
 -     Lisp_Object frame;
 +check_x_display_info (Lisp_Object frame)
  {
    if (NILP (frame))
      {
  /* This function can be called during GC, so use GC_xxx type test macros.  */
  
  struct frame *
 -x_window_to_frame (dpyinfo, wdesc)
 -     struct w32_display_info *dpyinfo;
 -     HWND wdesc;
 +x_window_to_frame (struct w32_display_info *dpyinfo, HWND wdesc)
  {
    Lisp_Object tail, frame;
    struct frame *f;
  }
  
  \f
 -static Lisp_Object unwind_create_frame P_ ((Lisp_Object));
 -static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object));
 -static void my_create_window P_ ((struct frame *));
 -static void my_create_tip_window P_ ((struct frame *));
 +static Lisp_Object unwind_create_frame (Lisp_Object);
 +static Lisp_Object unwind_create_tip_frame (Lisp_Object);
 +static void my_create_window (struct frame *);
 +static void my_create_tip_window (struct frame *);
  
  /* TODO: Native Input Method support; see x_create_im.  */
 -void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object,
 -                                Lisp_Object));
 +void x_set_foreground_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_background_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_mouse_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_cursor_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_border_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
 +void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 +static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
 +                              Lisp_Object);
  
  
  \f
     not Emacs's own window.  */
  
  void
 -x_real_positions (f, xptr, yptr)
 -     FRAME_PTR f;
 -     int *xptr, *yptr;
 +x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
  {
    POINT pt;
    RECT rect;
@@@ -480,7 -484,8 +480,7 @@@ DEFUN ("w32-define-rgb-color", Fw32_def
  This adds or updates a named color to `w32-color-map', making it
  available for use.  The original entry's RGB ref is returned, or nil
  if the entry is new.  */)
 -    (red, green, blue, name)
 -    Lisp_Object red, green, blue, name;
 +  (Lisp_Object red, Lisp_Object green, Lisp_Object blue, Lisp_Object name)
  {
    Lisp_Object rgb;
    Lisp_Object oldrgb = Qnil;
@@@ -766,7 -771,7 +766,7 @@@ colormap_t w32_color_map[] 
  
  DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
         0, 0, 0, doc: /* Return the default color map.  */)
 -     ()
 +  (void)
  {
    int i;
    colormap_t *pc = w32_color_map;
  }
  
  static Lisp_Object
 -w32_to_x_color (rgb)
 -     Lisp_Object rgb;
 +w32_to_x_color (Lisp_Object rgb)
  {
    Lisp_Object color;
  
  }
  
  static Lisp_Object
 -w32_color_map_lookup (colorname)
 -     char *colorname;
 +w32_color_map_lookup (char *colorname)
  {
    Lisp_Object tail, ret = Qnil;
  
  
  
  static void
 -add_system_logical_colors_to_map (system_colors)
 -     Lisp_Object *system_colors;
 +add_system_logical_colors_to_map (Lisp_Object *system_colors)
  {
    HKEY colors_key;
  
  
  
  static Lisp_Object
 -x_to_w32_color (colorname)
 -     char * colorname;
 +x_to_w32_color (char * colorname)
  {
    register Lisp_Object ret = Qnil;
  
@@@ -1198,7 -1207,9 +1198,7 @@@ w32_unmap_color (FRAME_PTR f, COLORREF 
  /* Gamma-correct COLOR on frame F.  */
  
  void
 -gamma_correct (f, color)
 -     struct frame *f;
 -     COLORREF *color;
 +gamma_correct (struct frame *f, COLORREF *color)
  {
    if (f->gamma)
      {
     If ALLOC is nonzero, allocate a new colormap cell.  */
  
  int
 -w32_defined_color (f, color, color_def, alloc)
 -     FRAME_PTR f;
 -     char *color;
 -     XColor *color_def;
 -     int alloc;
 +w32_defined_color (FRAME_PTR f, char *color, XColor *color_def, int alloc)
  {
    register Lisp_Object tem;
    COLORREF w32_color_ref;
     ARG says.  */
  
  int
 -x_decode_color (f, arg, def)
 -     FRAME_PTR f;
 -     Lisp_Object arg;
 -     int def;
 +x_decode_color (FRAME_PTR f, Lisp_Object arg, int def)
  {
    XColor cdef;
  
     in the standard place; do not attempt to change the window.  */
  
  void
 -x_set_foreground_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    struct w32_output *x = f->output_data.w32;
    PIX_TYPE fg, old_fg;
    if (FRAME_W32_WINDOW (f) != 0)
      {
        if (x->cursor_pixel == old_fg)
-       x->cursor_pixel = fg;
+       {
+         x->cursor_pixel = fg;
+         x->cursor_gc->background = fg;
+       }
  
        update_face_from_frame_parameter (f, Qforeground_color, arg);
        if (FRAME_VISIBLE_P (f))
  }
  
  void
 -x_set_background_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    FRAME_BACKGROUND_PIXEL (f)
      = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
  }
  
  void
 -x_set_mouse_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
    int count;
  }
  
  void
 -x_set_cursor_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    unsigned long fore_pixel, pixel;
  
     F has a window.  */
  
  void
 -x_set_border_pixel (f, pix)
 -     struct frame *f;
 -     int pix;
 +x_set_border_pixel (struct frame *f, int pix)
  {
  
    f->output_data.w32->border_pixel = pix;
     F has a window; it must be redone when the window is created.  */
  
  void
 -x_set_border_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    int pix;
  
  
  
  void
 -x_set_cursor_type (f, arg, oldval)
 -     FRAME_PTR f;
 -     Lisp_Object arg, oldval;
 +x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
  {
    set_frame_cursor_types (f, arg);
  
  }
  \f
  void
 -x_set_icon_type (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    int result;
  
  }
  
  void
 -x_set_icon_name (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    if (STRINGP (arg))
      {
  
  \f
  void
 -x_set_menu_bar_lines (f, value, oldval)
 -     struct frame *f;
 -     Lisp_Object value, oldval;
 +x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
  {
    int nlines;
    int olines = FRAME_MENU_BAR_LINES (f);
     The frame's height doesn't change.  */
  
  void
 -x_set_tool_bar_lines (f, value, oldval)
 -     struct frame *f;
 -     Lisp_Object value, oldval;
 +x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
  {
    int delta, nlines, root_height;
    Lisp_Object root_window;
         F->explicit_name is set, ignore the new name; otherwise, set it.  */
  
  void
 -x_set_name (f, name, explicit)
 -     struct frame *f;
 -     Lisp_Object name;
 -     int explicit;
 +x_set_name (struct frame *f, Lisp_Object name, int explicit)
  {
    /* Make sure that requests from lisp code override requests from
       Emacs redisplay code.  */
     specified a name for the frame; the name will override any set by the
     redisplay code.  */
  void
 -x_explicitly_set_name (f, arg, oldval)
 -     FRAME_PTR f;
 -     Lisp_Object arg, oldval;
 +x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
  {
    x_set_name (f, arg, 1);
  }
     name; names set this way will never override names set by the user's
     lisp code.  */
  void
 -x_implicitly_set_name (f, arg, oldval)
 -     FRAME_PTR f;
 -     Lisp_Object arg, oldval;
 +x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
  {
    x_set_name (f, arg, 0);
  }
     If NAME is nil, use the frame name as the title.  */
  
  void
 -x_set_title (f, name, old_name)
 -     struct frame *f;
 -     Lisp_Object name, old_name;
 +x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
  {
    /* Don't change the title if it's already NAME.  */
    if (EQ (name, f->title))
  }
  
  
 -void x_set_scroll_bar_default_width (f)
 -     struct frame *f;
 +void
 +x_set_scroll_bar_default_width (struct frame *f)
  {
    int wid = FRAME_COLUMN_WIDTH (f);
  
@@@ -1919,10 -1971,11 +1922,10 @@@ w32_load_cursor (LPCTSTR name
    return cursor;
  }
  
 -extern LRESULT CALLBACK w32_wnd_proc ();
 +extern LRESULT CALLBACK w32_wnd_proc (HWND, UINT, WPARAM, LPARAM);
  
  static BOOL
 -w32_init_class (hinst)
 -     HINSTANCE hinst;
 +w32_init_class (HINSTANCE hinst)
  {
    WNDCLASS wc;
  
  }
  
  static HWND
 -w32_createscrollbar (f, bar)
 -     struct frame *f;
 -     struct scroll_bar * bar;
 +w32_createscrollbar (struct frame *f, struct scroll_bar * bar)
  {
    return (CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE,
                        /* Position and size of scroll bar.  */
  }
  
  static void
 -w32_createwindow (f)
 -     struct frame *f;
 +w32_createwindow (struct frame *f)
  {
    HWND hwnd;
    RECT rect;
  }
  
  static void
 -my_post_msg (wmsg, hwnd, msg, wParam, lParam)
 -     W32Msg * wmsg;
 -     HWND hwnd;
 -     UINT msg;
 -     WPARAM wParam;
 -     LPARAM lParam;
 +my_post_msg (W32Msg * wmsg, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
  {
    wmsg->msg.hwnd = hwnd;
    wmsg->msg.message = msg;
@@@ -2120,7 -2181,7 +2123,7 @@@ record_keyup (unsigned int wparam, unsi
     it regains focus, be conservative and clear all modifiers since
     we cannot reconstruct the left and right modifier state.  */
  static void
 -reset_modifiers ()
 +reset_modifiers (void)
  {
    SHORT ctrl, alt;
  
     modifier keys, we know that, if no modifiers are set, then neither
     the left or right modifier should be set.  */
  static void
 -sync_modifiers ()
 +sync_modifiers (void)
  {
    if (!modifiers_recorded)
      return;
@@@ -2253,7 -2314,7 +2256,7 @@@ w32_key_to_modifier (int key
  }
  
  static unsigned int
 -w32_get_modifiers ()
 +w32_get_modifiers (void)
  {
    return ((modifier_set (VK_SHIFT)   ? shift_modifier : 0) |
          (modifier_set (VK_CONTROL) ? ctrl_modifier  : 0) |
     and window input.  */
  
  static int
 -construct_console_modifiers ()
 +construct_console_modifiers (void)
  {
    int mods;
  
@@@ -2342,7 -2403,8 +2345,7 @@@ static Lisp_Object w32_grabbed_keys
     combinations like Alt-Tab which are used by the system.  */
  
  static void
 -register_hot_keys (hwnd)
 -     HWND hwnd;
 +register_hot_keys (HWND hwnd)
  {
    Lisp_Object keylist;
  
  }
  
  static void
 -unregister_hot_keys (hwnd)
 -     HWND hwnd;
 +unregister_hot_keys (HWND hwnd)
  {
    Lisp_Object keylist;
  
@@@ -2567,7 -2630,7 +2570,7 @@@ complete_deferred_msg (HWND hwnd, UINT 
  }
  
  static void
 -cancel_all_deferred_msgs ()
 +cancel_all_deferred_msgs (void)
  {
    deferred_msg * item;
  
@@@ -2612,7 -2675,7 +2615,7 @@@ w32_msg_worker (void *arg
  }
  
  static void
 -signal_user_input ()
 +signal_user_input (void)
  {
    /* Interrupt any lisp that wants to be interrupted by input.  */
    if (!NILP (Vthrow_on_input))
  
  
  static void
 -post_character_message (hwnd, msg, wParam, lParam, modifiers)
 -     HWND hwnd;
 -     UINT msg;
 -     WPARAM wParam;
 -     LPARAM lParam;
 -     DWORD  modifiers;
 -
 +post_character_message (HWND hwnd, UINT msg,
 +                      WPARAM wParam, LPARAM lParam,
 +                      DWORD modifiers)
  {
    W32Msg wmsg;
  
  /* Main window procedure */
  
  LRESULT CALLBACK
 -w32_wnd_proc (hwnd, msg, wParam, lParam)
 -     HWND hwnd;
 -     UINT msg;
 -     WPARAM wParam;
 -     LPARAM lParam;
 +w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
  {
    struct frame *f;
    struct w32_display_info *dpyinfo = &one_w32_display_info;
        {
        PAINTSTRUCT paintStruct;
          RECT update_rect;
 -      bzero (&update_rect, sizeof (update_rect));
 +      memset (&update_rect, 0, sizeof (update_rect));
  
        f = x_window_to_frame (dpyinfo, hwnd);
        if (f == 0)
            wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
            /* Get buffer size.  */
            size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0);
 -          buffer = alloca(size);
 +          buffer = alloca (size);
            size = get_composition_string_fn (context, GCS_RESULTSTR,
                                              buffer, size);
          release_ime_context_fn (hwnd, context);
  }
  
  static void
 -my_create_window (f)
 -     struct frame * f;
 +my_create_window (struct frame * f)
  {
    MSG msg;
  
     messages for the tooltip.  Creating tooltips indirectly also creates
     deadlocks when tooltips are created for menu items.  */
  static void
 -my_create_tip_window (f)
 -     struct frame *f;
 +my_create_tip_window (struct frame *f)
  {
    RECT rect;
  
  /* Create and set up the w32 window for frame F.  */
  
  static void
 -w32_window (f, window_prompting, minibuffer_only)
 -     struct frame *f;
 -     long window_prompting;
 -     int minibuffer_only;
 +w32_window (struct frame *f, long window_prompting, int minibuffer_only)
  {
    BLOCK_INPUT;
  
     well.  */
  
  static void
 -x_icon (f, parms)
 -     struct frame *f;
 -     Lisp_Object parms;
 +x_icon (struct frame *f, Lisp_Object parms)
  {
    Lisp_Object icon_x, icon_y;
    struct w32_display_info *dpyinfo = &one_w32_display_info;
  
  
  static void
 -x_make_gc (f)
 -     struct frame *f;
 +x_make_gc (struct frame *f)
  {
    XGCValues gc_values;
  
     constructed.  */
  
  static Lisp_Object
 -unwind_create_frame (frame)
 -     Lisp_Object frame;
 +unwind_create_frame (Lisp_Object frame)
  {
    struct frame *f = XFRAME (frame);
  
  }
  
  static void
 -x_default_font_parameter (f, parms)
 -     struct frame *f;
 -     Lisp_Object parms;
 +x_default_font_parameter (struct frame *f, Lisp_Object parms)
  {
    struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
    Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@@@ -4195,7 -4277,8 +4198,7 @@@ then `default-minibuffer-frame' must b
  be shared by the new frame.
  
  This function is an internal primitive--use `make-frame' instead.  */)
 -  (parameters)
 -     Lisp_Object parameters;
 +  (Lisp_Object parameters)
  {
    struct frame *f;
    Lisp_Object frame, tem;
    f->output_method = output_w32;
    f->output_data.w32 =
      (struct w32_output *) xmalloc (sizeof (struct w32_output));
 -  bzero (f->output_data.w32, sizeof (struct w32_output));
 +  memset (f->output_data.w32, 0, sizeof (struct w32_output));
    FRAME_FONTSET (f) = -1;
  
    f->icon_name
       happen.  */
    init_frame_faces (f);
  
 -  x_default_parameter (f, parameters, Qmenu_bar_lines, make_number (1),
 -                     "menuBar", "MenuBar", RES_TYPE_NUMBER);
 -  x_default_parameter (f, parameters, Qtool_bar_lines, make_number (1),
 -                       "toolBar", "ToolBar", RES_TYPE_NUMBER);
 +  /* The X resources controlling the menu-bar and tool-bar are
 +     processed specially at startup, and reflected in the mode
 +     variables; ignore them here.  */
 +  x_default_parameter (f, parameters, Qmenu_bar_lines,
 +                     NILP (Vmenu_bar_mode)
 +                     ? make_number (0) : make_number (1),
 +                     NULL, NULL, RES_TYPE_NUMBER);
 +  x_default_parameter (f, parameters, Qtool_bar_lines,
 +                     NILP (Vtool_bar_mode)
 +                     ? make_number (0) : make_number (1),
 +                     NULL, NULL, RES_TYPE_NUMBER);
  
    x_default_parameter (f, parameters, Qbuffer_predicate, Qnil,
                       "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL);
     display info directly because we're called from frame.c, which doesn't
     know about that structure.  */
  Lisp_Object
 -x_get_focus_frame (frame)
 -     struct frame *frame;
 +x_get_focus_frame (struct frame *frame)
  {
    struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
    Lisp_Object xfocus;
  
  DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
         doc: /* Give FRAME input focus, raising to foreground if necessary.  */)
 -  (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    x_focus_on_frame (check_x_frame (frame));
    return Qnil;
  \f
  DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
         doc: /* Internal function called by `color-defined-p', which see.  */)
 -  (color, frame)
 -     Lisp_Object color, frame;
 +  (Lisp_Object color, Lisp_Object frame)
  {
    XColor foo;
    FRAME_PTR f = check_x_frame (frame);
  
  DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
         doc: /* Internal function called by `color-values', which see.  */)
 -  (color, frame)
 -     Lisp_Object color, frame;
 +  (Lisp_Object color, Lisp_Object frame)
  {
    XColor foo;
    FRAME_PTR f = check_x_frame (frame);
  
  DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
         doc: /* Internal function called by `display-color-p', which see.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4584,7 -4665,8 +4587,7 @@@ Note that color displays do support sha
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4600,7 -4682,8 +4603,7 @@@ DEFUN ("x-display-pixel-width", Fx_disp
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4613,7 -4696,8 +4616,7 @@@ DEFUN ("x-display-pixel-height", Fx_dis
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4626,7 -4710,8 +4629,7 @@@ DEFUN ("x-display-planes", Fx_display_p
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4639,7 -4724,8 +4642,7 @@@ DEFUN ("x-display-color-cells", Fx_disp
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    HDC hdc;
@@@ -4668,7 -4754,8 +4671,7 @@@ DEFUN ("x-server-max-request-size", Fx_
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4680,7 -4767,8 +4683,7 @@@ DEFUN ("x-server-vendor", Fx_server_ven
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    return build_string ("Microsoft Corp.");
  }
@@@ -4694,7 -4782,8 +4697,7 @@@ release number.  See also the function 
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    return Fcons (make_number (w32_major_version),
                Fcons (make_number (w32_minor_version),
@@@ -4706,7 -4795,8 +4709,7 @@@ DEFUN ("x-display-screens", Fx_display_
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    return make_number (1);
  }
@@@ -4717,7 -4807,8 +4720,7 @@@ DEFUN ("x-display-mm-height", Fx_displa
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    HDC hdc;
@@@ -4737,7 -4828,8 +4740,7 @@@ DEFUN ("x-display-mm-width", Fx_display
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
  
@@@ -4760,7 -4852,8 +4763,7 @@@ The value may be `always', `when-mapped
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    return intern ("not-useful");
  }
@@@ -4774,7 -4867,8 +4777,7 @@@ The value is one of the symbols `static
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -      (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    Lisp_Object result = Qnil;
@@@ -4797,37 -4891,43 +4800,37 @@@ DEFUN ("x-display-save-under", Fx_displ
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -  (display)
 -     Lisp_Object display;
 +  (Lisp_Object display)
  {
    return Qnil;
  }
  \f
  int
 -x_pixel_width (f)
 -     register struct frame *f;
 +x_pixel_width (register struct frame *f)
  {
    return FRAME_PIXEL_WIDTH (f);
  }
  
  int
 -x_pixel_height (f)
 -     register struct frame *f;
 +x_pixel_height (register struct frame *f)
  {
    return FRAME_PIXEL_HEIGHT (f);
  }
  
  int
 -x_char_width (f)
 -     register struct frame *f;
 +x_char_width (register struct frame *f)
  {
    return FRAME_COLUMN_WIDTH (f);
  }
  
  int
 -x_char_height (f)
 -     register struct frame *f;
 +x_char_height (register struct frame *f)
  {
    return FRAME_LINE_HEIGHT (f);
  }
  
  int
 -x_screen_planes (f)
 -     register struct frame *f;
 +x_screen_planes (register struct frame *f)
  {
    return FRAME_W32_DISPLAY_INFO (f)->n_planes;
  }
     Open a new connection if necessary.  */
  
  struct w32_display_info *
 -x_display_info_for_name (name)
 -     Lisp_Object name;
 +x_display_info_for_name (Lisp_Object name)
  {
    Lisp_Object names;
    struct w32_display_info *dpyinfo;
@@@ -4876,7 -4977,8 +4879,7 @@@ DISPLAY is the name of the display to c
  Optional second arg XRM-STRING is a string of resources in xrdb format.
  If the optional third arg MUST-SUCCEED is non-nil,
  terminate Emacs if we can't open the connection.  */)
 -  (display, xrm_string, must_succeed)
 -     Lisp_Object display, xrm_string, must_succeed;
 +  (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed)
  {
    unsigned char *xrm_option;
    struct w32_display_info *dpyinfo;
@@@ -4964,7 -5066,8 +4967,7 @@@ DEFUN ("x-close-connection", Fx_close_c
         doc: /* Close the connection to DISPLAY's server.
  For DISPLAY, specify either a frame or a display name (a string).
  If DISPLAY is nil, that stands for the selected frame's display.  */)
 -  (display)
 -  Lisp_Object display;
 +  (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    int i;
  
  DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
         doc: /* Return the list of display names that Emacs has connections to.  */)
 -  ()
 +  (void)
  {
    Lisp_Object tail, result;
  
  
  DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0,
         doc: /* This is a noop on W32 systems.  */)
 -     (on, display)
 -     Lisp_Object display, on;
 +  (Lisp_Object on, Lisp_Object display)
  {
    return Qnil;
  }
@@@ -5025,7 -5129,8 +5028,7 @@@ If OUTER_P is non-nil, the property is 
  FRAME.  Default is to change on the edit X window.
  
  Value is VALUE.  */)
 -     (prop, value, frame, type, format, outer_p)
 -     Lisp_Object prop, value, frame, type, format, outer_p;
 +  (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p)
  {
  #if 0 /* TODO : port window properties to W32 */
    struct frame *f = check_x_frame (frame);
@@@ -5054,7 -5159,8 +5057,7 @@@ DEFUN ("x-delete-window-property", Fx_d
         Sx_delete_window_property, 1, 2, 0,
         doc: /* Remove window property PROP from X window of FRAME.
  FRAME nil or omitted means use the selected frame.  Value is PROP.  */)
 -  (prop, frame)
 -     Lisp_Object prop, frame;
 +  (Lisp_Object prop, Lisp_Object frame)
  {
  #if 0 /* TODO : port window properties to W32 */
  
@@@ -5081,7 -5187,8 +5084,7 @@@ DEFUN ("x-window-property", Fx_window_p
  If FRAME is nil or omitted, use the selected frame.  Value is nil
  if FRAME hasn't a property with name PROP or if PROP has no string
  value.  */)
 -  (prop, frame)
 -     Lisp_Object prop, frame;
 +  (Lisp_Object prop, Lisp_Object frame)
  {
  #if 0 /* TODO : port window properties to W32 */
  
@@@ -5145,7 -5252,7 +5148,7 @@@ extern Lisp_Object Vhourglass_delay
            xdisp.c could be used. */
  
  int
 -hourglass_started ()
 +hourglass_started (void)
  {
    return hourglass_shown_p || hourglass_timer;
  }
  /* Cancel a currently active hourglass timer, and start a new one.  */
  
  void
 -start_hourglass ()
 +start_hourglass (void)
  {
    DWORD delay;
    int secs, msecs = 0;
     cursor if shown.  */
  
  void
 -cancel_hourglass ()
 +cancel_hourglass (void)
  {
    if (hourglass_timer)
      {
     to indicate that an hourglass cursor is shown.  */
  
  static void
 -w32_show_hourglass (f)
 -     struct frame *f;
 +w32_show_hourglass (struct frame *f)
  {
    if (!hourglass_shown_p)
      {
  /* Hide the hourglass cursor on all frames, if it is currently shown.  */
  
  static void
 -w32_hide_hourglass ()
 +w32_hide_hourglass (void)
  {
    if (hourglass_shown_p)
      {
                                Tool tips
   ***********************************************************************/
  
 -static Lisp_Object x_create_tip_frame P_ ((struct w32_display_info *,
 -                                         Lisp_Object, Lisp_Object));
 -static void compute_tip_xy P_ ((struct frame *, Lisp_Object, Lisp_Object,
 -                              Lisp_Object, int, int, int *, int *));
 +static Lisp_Object x_create_tip_frame (struct w32_display_info *,
 +                                       Lisp_Object, Lisp_Object);
 +static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
 +                            Lisp_Object, int, int, int *, int *);
  
  /* The frame of a currently visible tooltip.  */
  
@@@ -5277,7 -5385,8 +5280,7 @@@ Lisp_Object Vx_max_tooltip_size
  
  
  static Lisp_Object
 -unwind_create_tip_frame (frame)
 -     Lisp_Object frame;
 +unwind_create_tip_frame (Lisp_Object frame)
  {
    Lisp_Object deleted;
  
     when this happens.  */
  
  static Lisp_Object
 -x_create_tip_frame (dpyinfo, parms, text)
 -     struct w32_display_info *dpyinfo;
 -     Lisp_Object parms, text;
 +x_create_tip_frame (struct w32_display_info *dpyinfo,
 +                  Lisp_Object parms, Lisp_Object text)
  {
    struct frame *f;
    Lisp_Object frame, tem;
    f->output_method = output_w32;
    f->output_data.w32 =
      (struct w32_output *) xmalloc (sizeof (struct w32_output));
 -  bzero (f->output_data.w32, sizeof (struct w32_output));
 +  memset (f->output_data.w32, 0, sizeof (struct w32_output));
  
    FRAME_FONTSET (f)  = -1;
    f->icon_name = Qnil;
     the display in *ROOT_X, and *ROOT_Y.  */
  
  static void
 -compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
 -     struct frame *f;
 -     Lisp_Object parms, dx, dy;
 -     int width, height;
 -     int *root_x, *root_y;
 +compute_tip_xy (struct frame *f,
 +              Lisp_Object parms, Lisp_Object dx, Lisp_Object dy,
 +              int width, int height, int *root_x, int *root_y)
  {
    Lisp_Object left, top;
    int min_x, min_y, max_x, max_y;
@@@ -5648,7 -5760,8 +5651,7 @@@ DY added (default is -10)
  
  A tooltip's maximum size is specified by `x-max-tooltip-size'.
  Text larger than the specified size is clipped.  */)
 -  (string, frame, parms, timeout, dx, dy)
 -     Lisp_Object string, frame, parms, timeout, dx, dy;
 +  (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
  {
    struct frame *f;
    struct window *w;
  DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0,
         doc: /* Hide the current tooltip window, if there is any.
  Value is t if tooltip was open, nil otherwise.  */)
 -  ()
 +  (void)
  {
    int count;
    Lisp_Object deleted, frame, timer;
@@@ -5922,7 -6035,11 +5925,7 @@@ extern Lisp_Object Qfile_name_history
     allows us to work around the fact that the standard Open File
     dialog does not support directories.  */
  UINT CALLBACK
 -file_dialog_callback (hwnd, msg, wParam, lParam)
 -     HWND hwnd;
 -     UINT msg;
 -     WPARAM wParam;
 -     LPARAM lParam;
 +file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
  {
    if (msg == WM_NOTIFY)
      {
@@@ -5973,7 -6090,8 +5976,7 @@@ Use a file selection dialog
  Select DEFAULT-FILENAME in the dialog's file selection box, if
  specified.  Ensure that file exists if MUSTMATCH is non-nil.
  If ONLY-DIR-P is non-nil, the user can only select directories.  */)
 -  (prompt, dir, default_filename, mustmatch, only_dir_p)
 -     Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p;
 +  (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
  {
    struct frame *f = SELECTED_FRAME ();
    Lisp_Object file = Qnil;
      specbind (Qinhibit_redisplay, Qt);
      BLOCK_INPUT;
  
 -    bzero (&new_file_details, sizeof (new_file_details));
 +    memset (&new_file_details, 0, sizeof (new_file_details));
      /* Apparently NT4 crashes if you give it an unexpected size.
         I'm not sure about Windows 9x, so play it safe.  */
      if (w32_major_version > 4 && w32_major_version < 95)
  DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash,
         Ssystem_move_file_to_trash, 1, 1, 0,
         doc: /* Move file or directory named FILENAME to the recycle bin.  */)
 -     (filename)
 -     Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object handler;
    Lisp_Object encoded_file;
      /* On Windows, write permission is required to delete/move files.  */
      _chmod (path, 0666);
  
 -    bzero (tmp_path, sizeof (tmp_path));
 +    memset (tmp_path, 0, sizeof (tmp_path));
      strcpy (tmp_path, path);
  
 -    bzero (&file_op, sizeof (file_op));
 +    memset (&file_op, 0, sizeof (file_op));
      file_op.hwnd = HWND_DESKTOP;
      file_op.wFunc = FO_DELETE;
      file_op.pFrom = tmp_path;
@@@ -6163,7 -6282,8 +6166,7 @@@ to activate the menubar for keyboard ac
  screen saver if defined.
  
  If optional parameter FRAME is not specified, use selected frame.  */)
 -  (command, frame)
 -     Lisp_Object command, frame;
 +  (Lisp_Object command, Lisp_Object frame)
  {
    FRAME_PTR f = check_x_frame (frame);
  
@@@ -6216,7 -6336,8 +6219,7 @@@ an integer representing a ShowWindow fl
    1 - start normally
    3 - start maximized
    6 - start minimized  */)
 -  (operation, document, parameters, show_flag)
 -     Lisp_Object operation, document, parameters, show_flag;
 +  (Lisp_Object operation, Lisp_Object document, Lisp_Object parameters, Lisp_Object show_flag)
  {
    Lisp_Object current_dir;
    char *errstr;
@@@ -6272,7 -6393,8 +6275,7 @@@ lookup_vk_code (char *key
  /* Convert a one-element vector style key sequence to a hot key
     definition.  */
  static Lisp_Object
 -w32_parse_hot_key (key)
 -     Lisp_Object key;
 +w32_parse_hot_key (Lisp_Object key)
  {
    /* Copied from Fdefine_key and store_in_keymap.  */
    register Lisp_Object c;
@@@ -6353,7 -6475,8 +6356,7 @@@ modifier is interpreted as Alt if `w32-
  is always interpreted as the Windows modifier keys.
  
  The return value is the hotkey-id if registered, otherwise nil.  */)
 -  (key)
 -     Lisp_Object key;
 +  (Lisp_Object key)
  {
    key = w32_parse_hot_key (key);
  
  DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key,
         Sw32_unregister_hot_key, 1, 1, 0,
         doc: /* Unregister KEY as a hot-key combination.  */)
 -  (key)
 -     Lisp_Object key;
 +  (Lisp_Object key)
  {
    Lisp_Object item;
  
  DEFUN ("w32-registered-hot-keys", Fw32_registered_hot_keys,
         Sw32_registered_hot_keys, 0, 0, 0,
         doc: /* Return list of registered hot-key IDs.  */)
 -  ()
 +  (void)
  {
    return Fdelq (Qnil, Fcopy_sequence (w32_grabbed_keys));
  }
@@@ -6426,7 -6550,8 +6429,7 @@@ DEFUN ("w32-reconstruct-hot-key", Fw32_
         Sw32_reconstruct_hot_key, 1, 1, 0,
         doc: /* Convert hot-key ID to a lisp key combination.
  usage: (w32-reconstruct-hot-key ID)  */)
 -  (hotkeyid)
 -     Lisp_Object hotkeyid;
 +  (Lisp_Object hotkeyid)
  {
    int vk_code, w32_modifiers;
    Lisp_Object key;
@@@ -6460,7 -6585,8 +6463,7 @@@ DEFUN ("w32-toggle-lock-key", Fw32_togg
  KEY can be `capslock', `kp-numlock', or `scroll'.
  If the optional parameter NEW-STATE is a number, then the state of KEY
  is set to off if the low bit of NEW-STATE is zero, otherwise on.  */)
 -  (key, new_state)
 -     Lisp_Object key, new_state;
 +  (Lisp_Object key, Lisp_Object new_state)
  {
    int vk_code;
  
@@@ -6496,7 -6622,8 +6499,7 @@@ DEFUN ("w32-window-exists-p", Fw32_wind
         doc: /* Return non-nil if a window exists with the specified CLASS and NAME.
  
  This is a direct interface to the Windows API FindWindow function.  */)
 -  (class, name)
 -Lisp_Object class, name;
 +  (Lisp_Object class, Lisp_Object name)
  {
    HWND hnd;
  
@@@ -6525,7 -6652,7 +6528,7 @@@ The following %-sequences are provided
  %m Remaining time (to charge or discharge) in minutes
  %h Remaining time (to charge or discharge) in hours
  %t Remaining time (to charge or discharge) in the form `h:min'  */)
 -  ()
 +  (void)
  {
    Lisp_Object status = Qnil;
  
@@@ -6629,7 -6756,8 +6632,7 @@@ Value is a list of floats (TOTAL FREE A
  storage of the file system, FREE is the free storage, and AVAIL is the
  storage available to a non-superuser.  All 3 numbers are in bytes.
  If the underlying system call fails, value is nil.  */)
 -  (filename)
 -  Lisp_Object filename;
 +  (Lisp_Object filename)
  {
    Lisp_Object encoded, value;
  
  \f
  DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name,
         0, 0, 0, doc: /* Return the name of Windows default printer device.  */)
 -     ()
 +  (void)
  {
    static char pname_buf[256];
    int err;
@@@ -6833,7 -6961,7 +6836,7 @@@ frame_parm_handler w32_frame_parm_handl
  };
  
  void
 -syms_of_w32fns ()
 +syms_of_w32fns (void)
  {
    globals_of_w32fns ();
    /* This is zero if not using MS-Windows.  */
@@@ -7190,7 -7318,7 +7193,7 @@@ only be necessary if the default settin
        is non zero.
   */
  void
 -globals_of_w32fns ()
 +globals_of_w32fns (void)
  {
    HMODULE user32_lib = GetModuleHandle ("user32.dll");
    /*
  #undef abort
  
  void
 -w32_abort ()
 +w32_abort (void)
  {
    int button;
    button = MessageBox (NULL,
  
  /* For convenience when debugging.  */
  int
 -w32_last_error ()
 +w32_last_error (void)
  {
    return GetLastError ();
  }
diff --combined src/xfns.c
@@@ -110,6 -110,11 +110,6 @@@ extern void _XEditResCheckMessages ()
  
  extern LWLIB_ID widget_id_tick;
  
 -#ifdef USE_LUCID
 -/* This is part of a kludge--see lwlib/xlwmenu.c.  */
 -extern XFontStruct *xlwmenu_default_font;
 -#endif
 -
  extern void free_frame_menubar ();
  extern double atof ();
  
@@@ -198,13 -203,8 +198,13 @@@ Lisp_Object Qfont_param
  
  extern Lisp_Object Vwindow_system_version;
  
 +/* In editfns.c */
 +
 +extern Lisp_Object Vsystem_name;
 +
  /* The below are defined in frame.c.  */
  
 +extern Lisp_Object Vmenu_bar_mode, Vtool_bar_mode;
  extern Lisp_Object Qtooltip;
  
  #if GLYPH_DEBUG
@@@ -219,7 -219,7 +219,7 @@@ char *x_last_font_name
  /* Error if we are not connected to X.  */
  
  void
 -check_x ()
 +check_x (void)
  {
    if (! x_in_use)
      error ("X windows are not in use or not initialized");
     You should not call this unless HAVE_MENUS is defined.  */
  
  int
 -have_menus_p ()
 +have_menus_p (void)
  {
    return x_in_use;
  }
     and checking validity for X.  */
  
  FRAME_PTR
 -check_x_frame (frame)
 -     Lisp_Object frame;
 +check_x_frame (Lisp_Object frame)
  {
    FRAME_PTR f;
  
     the first X display on the list.  */
  
  struct x_display_info *
 -check_x_display_info (object)
 -     Lisp_Object object;
 +check_x_display_info (Lisp_Object object)
  {
    struct x_display_info *dpyinfo = NULL;
  
  /* This function can be called during GC, so use GC_xxx type test macros.  */
  
  struct frame *
 -x_window_to_frame (dpyinfo, wdesc)
 -     struct x_display_info *dpyinfo;
 -     int wdesc;
 +x_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
  {
    Lisp_Object tail, frame;
    struct frame *f;
     windows.  */
  
  struct frame *
 -x_any_window_to_frame (dpyinfo, wdesc)
 -     struct x_display_info *dpyinfo;
 -     int wdesc;
 +x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
  {
    Lisp_Object tail, frame;
    struct frame *f, *found;
  /* Likewise, but consider only the menu bar widget.  */
  
  struct frame *
- x_menubar_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
 -x_menubar_window_to_frame (dpyinfo, event)
 -     struct x_display_info *dpyinfo;
 -     XEvent *event;
++x_menubar_window_to_frame (struct x_display_info *dpyinfo, XEvent *event)
  {
+   Window wdesc = event->xany.window;
    Lisp_Object tail, frame;
    struct frame *f;
    struct x_output *x;
        if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
        continue;
        x = f->output_data.x;
-       /* Match if the window is this frame's menubar.  */
  #ifdef USE_GTK
-       if (x->menubar_widget)
-         {
-           GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
-         /* This gives false positives, but the rectangle check in xterm.c
-            where this is called takes care of that.  */
-           if (gwdesc != 0
-               && (gwdesc == x->menubar_widget
-                   || gtk_widget_is_ancestor (x->menubar_widget, gwdesc)
-                 || gtk_widget_is_ancestor (gwdesc, x->menubar_widget)))
-             return f;
-         }
+       if (x->menubar_widget && xg_event_is_for_menubar (f, event))
+         return f;
  #else
+       /* Match if the window is this frame's menubar.  */
        if (x->menubar_widget
          && lw_window_is_in_menubar (wdesc, x->menubar_widget))
        return f;
     If WDESC is some other (smaller) window, we return 0.  */
  
  struct frame *
 -x_top_window_to_frame (dpyinfo, wdesc)
 -     struct x_display_info *dpyinfo;
 -     int wdesc;
 +x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
  {
    Lisp_Object tail, frame;
    struct frame *f;
  
  \f
  
 -static void x_default_font_parameter P_ ((struct frame *, Lisp_Object));
 -
 -static Lisp_Object unwind_create_frame P_ ((Lisp_Object));
 -static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object));
 -
 -void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -static void x_set_wait_for_wm P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -void x_set_scroll_bar_foreground P_ ((struct frame *, Lisp_Object,
 -                                    Lisp_Object));
 -void x_set_scroll_bar_background P_ ((struct frame *, Lisp_Object,
 -                                    Lisp_Object));
 -static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *,
 -                                                           Lisp_Object,
 -                                                           Lisp_Object,
 -                                                           char *, char *,
 -                                                           int));
 +static void x_default_font_parameter (struct frame *, Lisp_Object);
 +
 +static Lisp_Object unwind_create_frame (Lisp_Object);
 +static Lisp_Object unwind_create_tip_frame (Lisp_Object);
 +
 +void x_set_foreground_color (struct frame *, Lisp_Object, Lisp_Object);
 +static void x_set_wait_for_wm (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_background_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_mouse_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_cursor_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_border_color (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
 +void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 +void x_set_scroll_bar_foreground (struct frame *, Lisp_Object,
 +                                  Lisp_Object);
 +void x_set_scroll_bar_background (struct frame *, Lisp_Object,
 +                                  Lisp_Object);
 +static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *,
 +                                                         Lisp_Object,
 +                                                         Lisp_Object,
 +                                                         char *, char *,
 +                                                         int);
  \f
  
  /* Store the screen positions of frame F into XPTR and YPTR.
     not Emacs's own window.  */
  
  void
 -x_real_positions (f, xptr, yptr)
 -     FRAME_PTR f;
 -     int *xptr, *yptr;
 +x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
  {
    int win_x, win_y, outer_x, outer_y;
    int real_x = 0, real_y = 0;
  /* Gamma-correct COLOR on frame F.  */
  
  void
 -gamma_correct (f, color)
 -     struct frame *f;
 -     XColor *color;
 +gamma_correct (struct frame *f, XColor *color)
  {
    if (f->gamma)
      {
     no color could be allocated.  */
  
  int
 -x_defined_color (f, color_name, color, alloc_p)
 -     struct frame *f;
 -     char *color_name;
 -     XColor *color;
 -     int alloc_p;
 +x_defined_color (struct frame *f, char *color_name, XColor *color, int alloc_p)
  {
    int success_p;
    Display *dpy = FRAME_X_DISPLAY (f);
     Signal an error if color can't be allocated.  */
  
  int
 -x_decode_color (f, color_name, mono_color)
 -     FRAME_PTR f;
 -     Lisp_Object color_name;
 -     int mono_color;
 +x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color)
  {
    XColor cdef;
  
     See also the comment of wait_for_wm in struct x_output.  */
  
  static void
 -x_set_wait_for_wm (f, new_value, old_value)
 -     struct frame *f;
 -     Lisp_Object new_value, old_value;
 +x_set_wait_for_wm (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
  {
    f->output_data.x->wait_for_wm = !NILP (new_value);
  }
     may be any format that GdkPixbuf knows about, i.e. not just bitmaps.  */
  
  int
 -xg_set_icon (f, file)
 -    FRAME_PTR f;
 -    Lisp_Object file;
 +xg_set_icon (FRAME_PTR f, Lisp_Object file)
  {
    int result = 0;
    Lisp_Object found;
  }
  
  int
 -xg_set_icon_from_xpm_data (f, data)
 -    FRAME_PTR f;
 -    char **data;
 +xg_set_icon_from_xpm_data (FRAME_PTR f, char **data)
  {
    int result = 0;
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data);
     in the standard place; do not attempt to change the window.  */
  
  void
 -x_set_foreground_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    struct x_output *x = f->output_data.x;
    unsigned long fg, old_fg;
  }
  
  void
 -x_set_background_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    struct x_output *x = f->output_data.x;
    unsigned long bg;
  }
  
  static Cursor
 -make_invisible_cursor (f)
 -     struct frame *f;
 +make_invisible_cursor (struct frame *f)
  {
    Display *dpy = FRAME_X_DISPLAY (f);
    static char const no_data[] = { 0 };
  }
  
  void
 -x_set_mouse_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    struct x_output *x = f->output_data.x;
    Display *dpy = FRAME_X_DISPLAY (f);
  }
  
  void
 -x_set_cursor_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    unsigned long fore_pixel, pixel;
    int fore_pixel_allocated_p = 0, pixel_allocated_p = 0;
     F has an x-window.  */
  
  void
 -x_set_border_pixel (f, pix)
 -     struct frame *f;
 -     int pix;
 +x_set_border_pixel (struct frame *f, int pix)
  {
    unload_color (f, f->output_data.x->border_pixel);
    f->output_data.x->border_pixel = pix;
     and so emacs' border colors may be overridden.  */
  
  void
 -x_set_border_color (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    int pix;
  
  
  
  void
 -x_set_cursor_type (f, arg, oldval)
 -     FRAME_PTR f;
 -     Lisp_Object arg, oldval;
 +x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
  {
    set_frame_cursor_types (f, arg);
  
  }
  \f
  void
 -x_set_icon_type (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    int result;
  
  }
  
  void
 -x_set_icon_name (f, arg, oldval)
 -     struct frame *f;
 -     Lisp_Object arg, oldval;
 +x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
  {
    int result;
  
  
  \f
  void
 -x_set_menu_bar_lines (f, value, oldval)
 -     struct frame *f;
 -     Lisp_Object value, oldval;
 +x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
  {
    int nlines;
  #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
     The frame's height doesn't change.  */
  
  void
 -x_set_tool_bar_lines (f, value, oldval)
 -     struct frame *f;
 -     Lisp_Object value, oldval;
 +x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
  {
    int delta, nlines, root_height;
    Lisp_Object root_window;
     the frame parameter.  */
  
  void
 -x_set_scroll_bar_foreground (f, value, oldval)
 -     struct frame *f;
 -     Lisp_Object value, oldval;
 +x_set_scroll_bar_foreground (struct frame *f, Lisp_Object value, Lisp_Object oldval)
  {
    unsigned long pixel;
  
     parameter.  */
  
  void
 -x_set_scroll_bar_background (f, value, oldval)
 -     struct frame *f;
 -     Lisp_Object value, oldval;
 +x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object oldval)
  {
    unsigned long pixel;
  
     the result should be `COMPOUND_TEXT'.  */
  
  static unsigned char *
 -x_encode_text (string, coding_system, selectionp, text_bytes, stringp, freep)
 -     Lisp_Object string, coding_system;
 -     int *text_bytes, *stringp;
 -     int selectionp;
 -     int *freep;
 +x_encode_text (Lisp_Object string, Lisp_Object coding_system, int selectionp, int *text_bytes, int *stringp, int *freep)
  {
    int result = string_xstring_p (string);
    struct coding_system coding;
     icon name to NAME.  */
  
  static void
 -x_set_name_internal (f, name)
 -     FRAME_PTR f;
 -     Lisp_Object name;
 +x_set_name_internal (FRAME_PTR f, Lisp_Object name)
  {
    if (FRAME_X_WINDOW (f))
      {
        int bytes, stringp;
          int do_free_icon_value = 0, do_free_text_value = 0;
        Lisp_Object coding_system;
 -#ifdef USE_GTK
        Lisp_Object encoded_name;
 +      Lisp_Object encoded_icon_name;
        struct gcpro gcpro1;
  
        /* As ENCODE_UTF_8 may cause GC and relocation of string data,
        GCPRO1 (name);
        encoded_name = ENCODE_UTF_8 (name);
        UNGCPRO;
 -#endif
  
        coding_system = Qcompound_text;
        /* Note: Encoding strategy
           We may also be able to use "UTF8_STRING" in text.encoding
           in the future which can encode all Unicode characters.
           But, for the moment, there's no way to know that the
 -         current window manager supports it or not.  */
 +         current window manager supports it or not.
 +
 +         Either way, we also set the _NET_WM_NAME and _NET_WM_ICON_NAME
 +         properties.  Per the EWMH specification, those two properties
 +         are always UTF8_STRING.  This matches what gtk_window_set_title()
 +         does in the USE_GTK case. */
        text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp,
                                    &do_free_text_value);
        text.encoding = (stringp ? XA_STRING
        if (!STRINGP (f->icon_name))
          {
            icon = text;
 +          encoded_icon_name = encoded_name;
          }
        else
          {
                             : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
            icon.format = 8;
            icon.nitems = bytes;
 +
 +          encoded_icon_name = ENCODE_UTF_8 (f->icon_name);
          }
  
  #ifdef USE_GTK
                                (char *) SDATA (encoded_name));
  #else /* not USE_GTK */
        XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
 +      XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
 +                       FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
 +                       FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
 +                       8, PropModeReplace,
 +                       (char *) SDATA (encoded_name),
 +                       SBYTES (encoded_name));
  #endif /* not USE_GTK */
  
        XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon);
 +      XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
 +                       FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
 +                       FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
 +                       8, PropModeReplace,
 +                       (char *) SDATA (encoded_icon_name),
 +                       SBYTES (encoded_icon_name));
  
        if (do_free_icon_value)
          xfree (icon.value);
         F->explicit_name is set, ignore the new name; otherwise, set it.  */
  
  void
 -x_set_name (f, name, explicit)
 -     struct frame *f;
 -     Lisp_Object name;
 -     int explicit;
 +x_set_name (struct frame *f, Lisp_Object name, int explicit)
  {
    /* Make sure that requests from lisp code override requests from
       Emacs redisplay code.  */
     specified a name for the frame; the name will override any set by the
     redisplay code.  */
  void
 -x_explicitly_set_name (f, arg, oldval)
 -     FRAME_PTR f;
 -     Lisp_Object arg, oldval;
 +x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
  {
    x_set_name (f, arg, 1);
  }
     name; names set this way will never override names set by the user's
     lisp code.  */
  void
 -x_implicitly_set_name (f, arg, oldval)
 -     FRAME_PTR f;
 -     Lisp_Object arg, oldval;
 +x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
  {
    x_set_name (f, arg, 0);
  }
     If NAME is nil, use the frame name as the title.  */
  
  void
 -x_set_title (f, name, old_name)
 -     struct frame *f;
 -     Lisp_Object name, old_name;
 +x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
  {
    /* Don't change the title if it's already NAME.  */
    if (EQ (name, f->title))
  }
  
  void
 -x_set_scroll_bar_default_width (f)
 -     struct frame *f;
 +x_set_scroll_bar_default_width (struct frame *f)
  {
    int wid = FRAME_COLUMN_WIDTH (f);
  
     named NAME.  If that is not found either, use the value DEFLT.  */
  
  static Lisp_Object
 -x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass,
 -                                    foreground_p)
 -     struct frame *f;
 -     Lisp_Object alist;
 -     Lisp_Object prop;
 -     char *xprop;
 -     char *xclass;
 -     int foreground_p;
 +x_default_scroll_bar_color_parameter (struct frame *f,
 +                                    Lisp_Object alist, Lisp_Object prop,
 +                                    char *xprop, char *xclass,
 +                                    int foreground_p)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Lisp_Object tem;
     for example, but Xt doesn't).  */
  
  static void
 -hack_wm_protocols (f, widget)
 -     FRAME_PTR f;
 -     Widget widget;
 +hack_wm_protocols (FRAME_PTR f, Widget widget)
  {
    Display *dpy = XtDisplay (widget);
    Window w = XtWindow (widget);
  
  #ifdef HAVE_X_I18N
  
 -static XFontSet xic_create_xfontset P_ ((struct frame *));
 -static XIMStyle best_xim_style P_ ((XIMStyles *, XIMStyles *));
 +static XFontSet xic_create_xfontset (struct frame *);
 +static XIMStyle best_xim_style (XIMStyles *, XIMStyles *);
  
  
  /* Supported XIM styles, ordered by preference.  */
@@@ -1910,7 -1958,9 +1901,7 @@@ char xic_defaut_fontset[] = "-*-*-*-r-n
  /* Create an Xt fontset spec from the name of a base font.
     If `motif' is True use the Motif syntax.  */
  char *
 -xic_create_fontsetname (base_fontname, motif)
 -     char *base_fontname;
 -     Bool motif;
 +xic_create_fontsetname (char *base_fontname, int motif)
  {
    const char *sep = motif ? ";" : ",";
    char *fontsetname;
      { /* There is no base font name, use the default.  */
        int len = strlen (base_fontname) + 2;
        fontsetname = xmalloc (len);
 -      bzero (fontsetname, len);
 +      memset (fontsetname, 0, len);
        strcpy (fontsetname, base_fontname);
      }
    else
             Use the specified font plus the default.  */
          int len = strlen (base_fontname) + strlen (xic_defaut_fontset) + 3;
          fontsetname = xmalloc (len);
 -        bzero (fontsetname, len);
 +        memset (fontsetname, 0, len);
          strcpy (fontsetname, base_fontname);
          strcat (fontsetname, sep);
          strcat (fontsetname, xic_defaut_fontset);
              int diff = (p2 - p3) - 2;
  
              base = alloca (strlen (base_fontname) + 1);
 -            bcopy (base_fontname, base, p3 - base_fontname);
 +            memcpy (base, base_fontname, p3 - base_fontname);
              base[p3 - base_fontname] = '*';
              base[(p3 - base_fontname) + 1] = '-';
              strcpy (base + (p3 - base_fontname) + 2, p2);
          /* Build the font spec that matches all charsets.  */
          len = p - base_fontname + strlen (allcs) + 1;
          font_allcs = (char *) alloca (len);
 -        bzero (font_allcs, len);
 -        bcopy (base_fontname, font_allcs, p - base_fontname);
 +        memset (font_allcs, 0, len);
 +        memcpy (font_allcs, base_fontname, p - base_fontname);
          strcat (font_allcs, allcs);
  
          /* Build the font spec that matches all families and
             add-styles.  */
          len = p - p1 + strlen (allcs) + strlen (allfamilies) + 1;
          font_allfamilies = (char *) alloca (len);
 -        bzero (font_allfamilies, len);
 +        memset (font_allfamilies, 0, len);
          strcpy (font_allfamilies, allfamilies);
 -        bcopy (p1, font_allfamilies + strlen (allfamilies), p - p1);
 +        memcpy (font_allfamilies + strlen (allfamilies), p1, p - p1);
          strcat (font_allfamilies, allcs);
  
          /* Build the font spec that matches all.  */
          len = p - p2 + strlen (allcs) + strlen (all) + strlen (allfamilies) + 1;
          font_all = (char *) alloca (len);
 -        bzero (font_all, len);
 +        memset (font_all, 0, len);
          strcpy (font_all, allfamilies);
          strcat (font_all, all);
 -        bcopy (p2, font_all + strlen (all) + strlen (allfamilies), p - p2);
 +        memcpy (font_all + strlen (all) + strlen (allfamilies), p2, p - p2);
          strcat (font_all, allcs);
  
          /* Build the actual font set name.  */
          len = strlen (base_fontname) + strlen (font_allcs)
            + strlen (font_allfamilies) + strlen (font_all) + 5;
          fontsetname = xmalloc (len);
 -        bzero (fontsetname, len);
 +        memset (fontsetname, 0, len);
          strcpy (fontsetname, base_fontname);
          strcat (fontsetname, sep);
          strcat (fontsetname, font_allcs);
@@@ -2056,7 -2106,8 +2047,7 @@@ print_fontset_result (xfs, name, missin
  #endif
  
  static XFontSet
 -xic_create_xfontset (f)
 -     struct frame *f;
 +xic_create_xfontset (struct frame *f)
  {
    XFontSet xfs = NULL;
    struct font *font = FRAME_FONT (f);
  /* Free the X fontset of frame F if it is the last frame using it.  */
  
  void
 -xic_free_xfontset (f)
 -     struct frame *f;
 +xic_free_xfontset (struct frame *f)
  {
    Lisp_Object rest, frame;
    int shared_p = 0;
     input method XIM.  */
  
  static XIMStyle
 -best_xim_style (user, xim)
 -     XIMStyles *user;
 -     XIMStyles *xim;
 +best_xim_style (XIMStyles *user, XIMStyles *xim)
  {
    int i, j;
  
  static XIMStyle xic_style;
  
  void
 -create_frame_xic (f)
 -     struct frame *f;
 +create_frame_xic (struct frame *f)
  {
    XIM xim;
    XIC xic = NULL;
  /* Destroy XIC and free XIC fontset of frame F, if any. */
  
  void
 -free_frame_xic (f)
 -     struct frame *f;
 +free_frame_xic (struct frame *f)
  {
    if (FRAME_XIC (f) == NULL)
      return;
     pixel position X/Y.  X and Y are relative to window W.  */
  
  void
 -xic_set_preeditarea (w, x, y)
 -     struct window *w;
 -     int x, y;
 +xic_set_preeditarea (struct window *w, int x, int y)
  {
    struct frame *f = XFRAME (w->frame);
    XVaNestedList attr;
  /* Place status area for XIC in bottom right corner of frame F.. */
  
  void
 -xic_set_statusarea (f)
 -     struct frame *f;
 +xic_set_statusarea (struct frame *f)
  {
    XIC xic = FRAME_XIC (f);
    XVaNestedList attr;
     BASE_FONTNAME.  Called when a new Emacs fontset is chosen.  */
  
  void
 -xic_set_xfontset (f, base_fontname)
 -     struct frame *f;
 -     char *base_fontname;
 +xic_set_xfontset (struct frame *f, char *base_fontname)
  {
    XVaNestedList attr;
    XFontSet xfs;
  /* Create and set up the X widget for frame F.  */
  
  static void
 -x_window (f, window_prompting, minibuffer_only)
 -     struct frame *f;
 -     long window_prompting;
 -     int minibuffer_only;
 +x_window (struct frame *f, long window_prompting, int minibuffer_only)
  {
    XClassHint class_hints;
    XSetWindowAttributes attributes;
    XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
    XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
    XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
 +  XtSetArg (al[ac], XtNborderWidth, 0); ac++;
    XtSetValues (pane_widget, al, ac);
    f->output_data.x->column_widget = pane_widget;
  
    XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
    XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
    XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
 +  XtSetArg (al[ac], XtNborderWidth, 0); ac++;
    frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget,
                                 al, ac);
  
  #else /* not USE_X_TOOLKIT */
  #ifdef USE_GTK
  void
 -x_window (f)
 -     FRAME_PTR f;
 +x_window (FRAME_PTR f)
  {
    if (! xg_create_frame_widgets (f))
      error ("Unable to create window");
  /* Create and set up the X window for frame F.  */
  
  void
 -x_window (f)
 -     struct frame *f;
 -
 +x_window (struct frame *f)
  {
    XClassHint class_hints;
    XSetWindowAttributes attributes;
  /* Verify that the icon position args for this window are valid.  */
  
  static void
 -x_icon_verify (f, parms)
 -     struct frame *f;
 -     Lisp_Object parms;
 +x_icon_verify (struct frame *f, Lisp_Object parms)
  {
    Lisp_Object icon_x, icon_y;
  
     well.  */
  
  static void
 -x_icon (f, parms)
 -     struct frame *f;
 -     Lisp_Object parms;
 +x_icon (struct frame *f, Lisp_Object parms)
  {
    Lisp_Object icon_x, icon_y;
  #if 0
     mouse cursor and the gray border tile.  */
  
  static void
 -x_make_gc (f)
 -     struct frame *f;
 +x_make_gc (struct frame *f)
  {
    XGCValues gc_values;
  
  /* Free what was allocated in x_make_gc.  */
  
  void
 -x_free_gcs (f)
 -     struct frame *f;
 +x_free_gcs (struct frame *f)
  {
    Display *dpy = FRAME_X_DISPLAY (f);
  
     constructed.  */
  
  static Lisp_Object
 -unwind_create_frame (frame)
 -     Lisp_Object frame;
 +unwind_create_frame (Lisp_Object frame)
  {
    struct frame *f = XFRAME (frame);
  
  
  
  static void
 -x_default_font_parameter (f, parms)
 -     struct frame *f;
 -     Lisp_Object parms;
 +x_default_font_parameter (struct frame *f, Lisp_Object parms)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
                                        RES_TYPE_STRING);
 -  Lisp_Object font;
 -  int got_from_gconf = 0;
 +  Lisp_Object font = Qnil;
    if (EQ (font_param, Qunbound))
      font_param = Qnil;
  
    if (NILP (font_param))
      {
 -      /* System font takes precedendce over X resources.  We must suggest this
 +      /* System font should take precedendce over X resources.  We suggest this
           regardless of font-use-system-font because .emacs may not have been
           read yet.  */
        const char *system_font = xsettings_get_system_font ();
 -      if (system_font) font_param = make_string (system_font,
 -                                                 strlen (system_font));
 +      if (system_font)
 +        {
 +          char *name = xstrdup (system_font);
 +          font = font_open_by_name (f, name);
 +          free (name);
 +        }
      }
 -  
 -  font = !NILP (font_param) ? font_param
 -    : x_get_arg (dpyinfo, parms, Qfont, "font", "Font", RES_TYPE_STRING);
  
 -  if (! STRINGP (font))
 +  if (NILP (font))
 +      font = !NILP (font_param) ? font_param
 +      : x_get_arg (dpyinfo, parms, Qfont, "font", "Font", RES_TYPE_STRING);
 +
 +  if (! FONTP (font) && ! STRINGP (font))
      {
        char *names[]
        = {
        x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil));
      }
  
 -  x_default_parameter (f, parms, Qfont, font,
 -                       got_from_gconf ? NULL : "font",
 -                       got_from_gconf ? NULL : "Font",
 -                       RES_TYPE_STRING);
 +  /* This call will make X resources override any system font setting.  */
 +  x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING);
  }
  
  
@@@ -3052,7 -3124,8 +3043,7 @@@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_
         0, 1, 0,
         doc: /* Send the size hints for frame FRAME to the window manager.
  If FRAME is nil, use the selected frame.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    struct frame *f;
    if (NILP (frame))
    return Qnil;
  }
  
 +static void
 +set_machine_and_pid_properties (struct frame *f)
 +{
 +  /* See the above comment "Note: Encoding strategy".  */
 +  XTextProperty text;
 +  int bytes, stringp;
 +  int do_free_text_value = 0;
 +  long pid = (long) getpid ();
 +
 +  text.value = x_encode_text (Vsystem_name,
 +                              Qcompound_text, 0, &bytes, &stringp,
 +                              &do_free_text_value);
 +  text.encoding = (stringp ? XA_STRING
 +                   : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
 +  text.format = 8;
 +  text.nitems = bytes;
 +  XSetWMClientMachine (FRAME_X_DISPLAY (f),
 +                       FRAME_OUTER_WINDOW (f),
 +                       &text);
 +  if (do_free_text_value)
 +    xfree (text.value);
 +
 +  XChangeProperty (FRAME_X_DISPLAY (f),
 +                   FRAME_OUTER_WINDOW (f),
 +                   XInternAtom (FRAME_X_DISPLAY (f),
 +                                "_NET_WM_PID",
 +                                False),
 +                   XA_CARDINAL, 32, PropModeReplace,
 +                   (unsigned char *) &pid, 1);
 +}
 +
  DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
         1, 1, 0,
         doc: /* Make a new X window, which is called a "frame" in Emacs terms.
@@@ -3107,7 -3149,8 +3098,7 @@@ then `default-minibuffer-frame' must b
  be shared by the new frame.
  
  This function is an internal primitive--use `make-frame' instead.  */)
 -     (parms)
 -     Lisp_Object parms;
 +  (Lisp_Object parms)
  {
    struct frame *f;
    Lisp_Object frame, tem;
  
    f->output_method = output_x_window;
    f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
 -  bzero (f->output_data.x, sizeof (struct x_output));
 +  memset (f->output_data.x, 0, sizeof (struct x_output));
    f->output_data.x->icon_bitmap = -1;
    FRAME_FONTSET (f) = -1;
    f->output_data.x->scroll_bar_foreground_pixel = -1;
        error ("Invalid frame font");
      }
  
 -#ifdef USE_LUCID
 -  /* Prevent lwlib/xlwmenu.c from crashing because of a bug
 -     whereby it fails to get any font.  */
 -  BLOCK_INPUT;
 -  xlwmenu_default_font = XLoadQueryFont (FRAME_X_DISPLAY (f), "fixed");
 -  UNBLOCK_INPUT;
 -#endif
 -
    /* Frame contents get displaced if an embedded X window has a border.  */
    if (! FRAME_X_EMBEDDED_P (f))
 -    x_default_parameter (f, parms, Qborder_width, make_number (2),
 +    x_default_parameter (f, parms, Qborder_width, make_number (0),
                         "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
  
    /* This defaults to 1 in order to match xterm.  We recognize either
  #endif
                       "internalBorderWidth", "internalBorderWidth",
                       RES_TYPE_NUMBER);
 -  x_default_parameter (f, parms, Qvertical_scroll_bars, Qleft,
 +  x_default_parameter (f, parms, Qvertical_scroll_bars,
 +#if defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS)
 +                     Qright,
 +#else
 +                     Qleft,
 +#endif
                       "verticalScrollBars", "ScrollBars",
                       RES_TYPE_SYMBOL);
  
       happen.  */
    init_frame_faces (f);
  
 -  x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1),
 -                     "menuBar", "MenuBar", RES_TYPE_BOOLEAN_NUMBER);
 -  x_default_parameter (f, parms, Qtool_bar_lines, make_number (1),
 -                     "toolBar", "ToolBar", RES_TYPE_NUMBER);
 +  /* The X resources controlling the menu-bar and tool-bar are
 +     processed specially at startup, and reflected in the mode
 +     variables; ignore them here.  */
 +  x_default_parameter (f, parms, Qmenu_bar_lines,
 +                     NILP (Vmenu_bar_mode)
 +                     ? make_number (0) : make_number (1),
 +                     NULL, NULL, RES_TYPE_NUMBER);
 +  x_default_parameter (f, parms, Qtool_bar_lines,
 +                     NILP (Vtool_bar_mode)
 +                     ? make_number (0) : make_number (1),
 +                     NULL, NULL, RES_TYPE_NUMBER);
 +
    x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
                       "bufferPredicate", "BufferPredicate",
                       RES_TYPE_SYMBOL);
        ;
      }
  
 +  BLOCK_INPUT;
 +                       
 +  /* Set machine name and pid for the purpose of window managers.  */
 +  set_machine_and_pid_properties(f);
 +
    /* Set the WM leader property.  GTK does this itself, so this is not
       needed when using GTK.  */
    if (dpyinfo->client_leader_window != 0)
      {
 -      BLOCK_INPUT;
        XChangeProperty (FRAME_X_DISPLAY (f),
                         FRAME_OUTER_WINDOW (f),
                         dpyinfo->Xatom_wm_client_leader,
                         XA_WINDOW, 32, PropModeReplace,
                         (unsigned char *) &dpyinfo->client_leader_window, 1);
 -      UNBLOCK_INPUT;
      }
  
 +  UNBLOCK_INPUT;
 +
    /* Initialize `default-minibuffer-frame' in case this is the first
       frame on this terminal.  */
    if (FRAME_HAS_MINIBUF_P (f)
     know about that structure.  */
  
  Lisp_Object
 -x_get_focus_frame (frame)
 -     struct frame *frame;
 +x_get_focus_frame (struct frame *frame)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame);
    Lisp_Object xfocus;
  DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
         doc: /* Set the input focus to FRAME.
  FRAME nil means use the selected frame.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    struct frame *f = check_x_frame (frame);
    Display *dpy = FRAME_X_DISPLAY (f);
  \f
  DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
         doc: /* Internal function called by `color-defined-p', which see.  */)
 -     (color, frame)
 -     Lisp_Object color, frame;
 +  (Lisp_Object color, Lisp_Object frame)
  {
    XColor foo;
    FRAME_PTR f = check_x_frame (frame);
  
  DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
         doc: /* Internal function called by `color-values', which see.  */)
 -     (color, frame)
 -     Lisp_Object color, frame;
 +  (Lisp_Object color, Lisp_Object frame)
  {
    XColor foo;
    FRAME_PTR f = check_x_frame (frame);
  
  DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
         doc: /* Internal function called by `display-color-p', which see.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3629,7 -3667,8 +3620,7 @@@ Note that color displays do support sha
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3657,7 -3696,8 +3648,7 @@@ DEFUN ("x-display-pixel-width", Fx_disp
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3670,7 -3710,8 +3661,7 @@@ DEFUN ("x-display-pixel-height", Fx_dis
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3683,7 -3724,8 +3674,7 @@@ DEFUN ("x-display-planes", Fx_display_p
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3696,7 -3738,8 +3687,7 @@@ DEFUN ("x-display-color-cells", Fx_disp
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3720,7 -3763,8 +3711,7 @@@ DEFUN ("x-server-max-request-size", Fx_
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3734,7 -3778,8 +3725,7 @@@ that operating systems cannot be develo
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
    char *vendor = ServerVendor (dpyinfo->display);
@@@ -3752,7 -3797,8 +3743,7 @@@ number.  See also the function `x-serve
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
    Display *dpy = dpyinfo->display;
@@@ -3767,7 -3813,8 +3758,7 @@@ DEFUN ("x-display-screens", Fx_display_
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3779,7 -3826,8 +3770,7 @@@ DEFUN ("x-display-mm-height", Fx_displa
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3791,7 -3839,8 +3782,7 @@@ DEFUN ("x-display-mm-width", Fx_display
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
@@@ -3805,7 -3854,8 +3796,7 @@@ The value may be `always', `when-mapped
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
    Lisp_Object result;
@@@ -3841,7 -3891,8 +3832,7 @@@ The value is one of the symbols `static
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
    Lisp_Object result;
@@@ -3880,7 -3931,8 +3871,7 @@@ DEFUN ("x-display-save-under", Fx_displ
  The optional argument TERMINAL specifies which display to ask about.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If omitted or nil, that stands for the selected frame's display.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
  }
  \f
  int
 -x_pixel_width (f)
 -     register struct frame *f;
 +x_pixel_width (register struct frame *f)
  {
    return FRAME_PIXEL_WIDTH (f);
  }
  
  int
 -x_pixel_height (f)
 -     register struct frame *f;
 +x_pixel_height (register struct frame *f)
  {
    return FRAME_PIXEL_HEIGHT (f);
  }
  
  int
 -x_char_width (f)
 -     register struct frame *f;
 +x_char_width (register struct frame *f)
  {
    return FRAME_COLUMN_WIDTH (f);
  }
  
  int
 -x_char_height (f)
 -     register struct frame *f;
 +x_char_height (register struct frame *f)
  {
    return FRAME_LINE_HEIGHT (f);
  }
  
  int
 -x_screen_planes (f)
 -     register struct frame *f;
 +x_screen_planes (register struct frame *f)
  {
    return FRAME_X_DISPLAY_INFO (f)->n_planes;
  }
@@@ -3972,7 -4029,8 +3963,7 @@@ XScreenNumberOfScreen (scr
     members of DPYINFO appropriately.  Called from x_term_init.  */
  
  void
 -select_visual (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +select_visual (struct x_display_info *dpyinfo)
  {
    Display *dpy = dpyinfo->display;
    Screen *screen = dpyinfo->screen;
        XVisualInfo vinfo;
  
        strcpy (s, SDATA (value));
 -      dash = index (s, '-');
 +      dash = strchr (s, '-');
        if (dash)
        {
          dpyinfo->n_planes = atoi (dash + 1);
        vinfo_template.screen = XScreenNumberOfScreen (screen);
        vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask,
                              &vinfo_template, &n_visuals);
 -      if (n_visuals != 1)
 +      if (n_visuals <= 0)
        fatal ("Can't get proper X visual info");
  
        dpyinfo->n_planes = vinfo->depth;
     Open a new connection if necessary.  */
  
  struct x_display_info *
 -x_display_info_for_name (name)
 -     Lisp_Object name;
 +x_display_info_for_name (Lisp_Object name)
  {
    Lisp_Object names;
    struct x_display_info *dpyinfo;
@@@ -4092,7 -4151,8 +4083,7 @@@ DISPLAY is the name of the display to c
  Optional second arg XRM-STRING is a string of resources in xrdb format.
  If the optional third arg MUST-SUCCEED is non-nil,
  terminate Emacs if we can't open the connection.  */)
 -     (display, xrm_string, must_succeed)
 -     Lisp_Object display, xrm_string, must_succeed;
 +  (Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed)
  {
    unsigned char *xrm_option;
    struct x_display_info *dpyinfo;
@@@ -4143,7 -4203,8 +4134,7 @@@ DEFUN ("x-close-connection", Fx_close_c
  For TERMINAL, specify a terminal object, a frame or a display name (a
  string).  If TERMINAL is nil, that stands for the selected frame's
  terminal.  */)
 -     (terminal)
 -     Lisp_Object terminal;
 +  (Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
  
  DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
         doc: /* Return the list of display names that Emacs has connections to.  */)
 -     ()
 +  (void)
  {
    Lisp_Object tail, result;
  
@@@ -4177,7 -4238,8 +4168,7 @@@ easier
  The optional second argument TERMINAL specifies which display to act on.
  TERMINAL should be a terminal object, a frame or a display name (a string).
  If TERMINAL is omitted or nil, that stands for the selected frame's display.  */)
 -     (on, terminal)
 -    Lisp_Object terminal, on;
 +  (Lisp_Object on, Lisp_Object terminal)
  {
    struct x_display_info *dpyinfo = check_x_display_info (terminal);
  
  /* Wait for responses to all X commands issued so far for frame F.  */
  
  void
 -x_sync (f)
 -     FRAME_PTR f;
 +x_sync (FRAME_PTR f)
  {
    BLOCK_INPUT;
    XSync (FRAME_X_DISPLAY (f), False);
@@@ -4220,7 -4283,8 +4211,7 @@@ If OUTER_P is non-nil, the property is 
  FRAME.  Default is to change on the edit X window.
  
  Value is VALUE.  */)
 -     (prop, value, frame, type, format, outer_p)
 -     Lisp_Object prop, value, frame, type, format, outer_p;
 +  (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p)
  {
    struct frame *f = check_x_frame (frame);
    Atom prop_atom;
@@@ -4298,7 -4362,8 +4289,7 @@@ DEFUN ("x-delete-window-property", Fx_d
         Sx_delete_window_property, 1, 2, 0,
         doc: /* Remove window property PROP from X window of FRAME.
  FRAME nil or omitted means use the selected frame.  Value is PROP.  */)
 -     (prop, frame)
 -     Lisp_Object prop, frame;
 +  (Lisp_Object prop, Lisp_Object frame)
  {
    struct frame *f = check_x_frame (frame);
    Atom prop_atom;
@@@ -4329,7 -4394,8 +4320,7 @@@ If VECTOR_RET_P is non-nil, don't retur
  
  Value is nil if FRAME hasn't a property with name PROP or if PROP has
  no value of TYPE.  */)
 -     (prop, frame, type, source, delete_p, vector_ret_p)
 -     Lisp_Object prop, frame, type, source, delete_p, vector_ret_p;
 +  (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p)
  {
    struct frame *f = check_x_frame (frame);
    Atom prop_atom;
               elements."
               This applies even if long is more than 32 bits, the X library
               converts from 32 bit elements received from the X server to long
 -             and passes the long array to us.  Thus, for that case bcopy can not
 +             and passes the long array to us.  Thus, for that case memcpy can not
               be used.  We convert to a 32 bit type here, because so much code
               assume on that.
  
     shown on the frames.  */
  
  void
 -show_hourglass (timer)
 -     struct atimer *timer;
 +show_hourglass (struct atimer *timer)
  {
    /* The timer implementation will cancel this timer automatically
       after this function has run.  Set hourglass_atimer to null
     shown.  */
  
  void
 -hide_hourglass ()
 +hide_hourglass (void)
  {
    if (hourglass_shown_p)
      {
                                Tool tips
   ***********************************************************************/
  
 -static Lisp_Object x_create_tip_frame P_ ((struct x_display_info *,
 -                                         Lisp_Object, Lisp_Object));
 -static void compute_tip_xy P_ ((struct frame *, Lisp_Object, Lisp_Object,
 -                              Lisp_Object, int, int, int *, int *));
 +static Lisp_Object x_create_tip_frame (struct x_display_info *,
 +                                       Lisp_Object, Lisp_Object);
 +static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
 +                            Lisp_Object, int, int, int *, int *);
  
  /* The frame of a currently visible tooltip.  */
  
@@@ -4573,7 -4640,8 +4564,7 @@@ Lisp_Object Vx_max_tooltip_size
  
  
  static Lisp_Object
 -unwind_create_tip_frame (frame)
 -     Lisp_Object frame;
 +unwind_create_tip_frame (Lisp_Object frame)
  {
    Lisp_Object deleted;
  
     when this happens.  */
  
  static Lisp_Object
 -x_create_tip_frame (dpyinfo, parms, text)
 -     struct x_display_info *dpyinfo;
 -     Lisp_Object parms, text;
 +x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms, Lisp_Object text)
  {
    struct frame *f;
    Lisp_Object frame, tem;
       counts etc.  */
    f->output_method = output_x_window;
    f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
 -  bzero (f->output_data.x, sizeof (struct x_output));
 +  memset (f->output_data.x, 0, sizeof (struct x_output));
    f->output_data.x->icon_bitmap = -1;
    FRAME_FONTSET (f) = -1;
    f->output_data.x->scroll_bar_foreground_pixel = -1;
       needed to determine window geometry.  */
    x_default_font_parameter (f, parms);
  
 -  x_default_parameter (f, parms, Qborder_width, make_number (2),
 +  x_default_parameter (f, parms, Qborder_width, make_number (0),
                       "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
  
    /* This defaults to 2 in order to match xterm.  We recognize either
     the display in *ROOT_X, and *ROOT_Y.  */
  
  static void
 -compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
 -     struct frame *f;
 -     Lisp_Object parms, dx, dy;
 -     int width, height;
 -     int *root_x, *root_y;
 +compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object dy, int width, int height, int *root_x, int *root_y)
  {
    Lisp_Object left, top;
    int win_x, win_y;
@@@ -4989,7 -5063,8 +4980,7 @@@ DY added (default is -10)
  
  A tooltip's maximum size is specified by `x-max-tooltip-size'.
  Text larger than the specified size is clipped.  */)
 -     (string, frame, parms, timeout, dx, dy)
 -     Lisp_Object string, frame, parms, timeout, dx, dy;
 +  (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
  {
    struct frame *f;
    struct window *w;
    clear_glyph_matrix (w->desired_matrix);
    clear_glyph_matrix (w->current_matrix);
    SET_TEXT_POS (pos, BEGV, BEGV_BYTE);
 -  try_window (FRAME_ROOT_WINDOW (f), pos, 0);
 +  try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
  
    /* Compute width and height of the tooltip.  */
    width = height = 0;
        /* Let the row go over the full width of the frame.  */
        row->full_width_p = 1;
  
 +      row_width = row->pixel_width;
        /* There's a glyph at the end of rows that is used to place
         the cursor there.  Don't include the width of this glyph.  */
        if (row->used[TEXT_AREA])
        {
          last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
 -        row_width = row->pixel_width - last->pixel_width;
 +        if (INTEGERP (last->object))
 +          row_width -= last->pixel_width;
        }
 -      else
 -      row_width = row->pixel_width;
  
        height += row->height;
        width = max (width, row_width);
  DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0,
         doc: /* Hide the current tooltip window, if there is any.
  Value is t if tooltip was open, nil otherwise.  */)
 -     ()
 +  (void)
  {
    int count;
    Lisp_Object deleted, frame, timer;
        {
        struct frame *f = SELECTED_FRAME ();
        Widget w = f->output_data.x->menubar_widget;
 -      extern void xlwmenu_redisplay P_ ((Widget));
 +        extern void xlwmenu_redisplay (Widget);
  
        if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
            && w != NULL)
@@@ -5241,7 -5316,7 +5232,7 @@@ DEFUN ("x-uses-old-gtk-dialog", Fx_uses
         Sx_uses_old_gtk_dialog,
         0, 0, 0,
         doc: /* Return t if the old Gtk+ file selection dialog is used.  */)
 -     ()
 +  (void)
  {
  #ifdef USE_GTK
    extern int use_dialog_box;
@@@ -5308,7 -5383,8 +5299,7 @@@ DEFUN ("x-file-dialog", Fx_file_dialog
  Use a file selection dialog.  Select DEFAULT-FILENAME in the dialog's file
  selection box, if specified.  If MUSTMATCH is non-nil, the returned file
  or directory must exist.  ONLY-DIR-P is ignored."  */)
 -  (prompt, dir, default_filename, mustmatch, only_dir_p)
 -     Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p;
 +  (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
  {
    int result;
    struct frame *f = SELECTED_FRAME ();
  #ifdef USE_GTK
  
  static Lisp_Object
 -clean_up_dialog (arg)
 -     Lisp_Object arg;
 +clean_up_dialog (Lisp_Object arg)
  {
    x_menu_set_in_use (0);
  
@@@ -5479,7 -5556,8 +5470,7 @@@ Use a file selection dialog.  Select DE
  selection box, if specified.  If MUSTMATCH is non-nil, the returned file
  or directory must exist.  If ONLY-DIR-P is non-nil, the user can only select
  directories.  */)
 -  (prompt, dir, default_filename, mustmatch, only_dir_p)
 -     Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p;
 +  (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
  {
    FRAME_PTR f = SELECTED_FRAME ();
    char *fn;
@@@ -5540,7 -5618,8 +5531,7 @@@ DEFUN ("x-select-font", Fx_select_font
  Return a GTK-style font string corresponding to the selection.
  
  If FRAME is omitted or nil, it defaults to the selected frame. */)
 -  (frame, ignored)
 -     Lisp_Object frame, ignored;
 +  (Lisp_Object frame, Lisp_Object ignored)
  {
    FRAME_PTR f = check_x_frame (frame);
    char *name;
@@@ -5628,7 -5707,8 +5619,7 @@@ FRAME nil means use the selected frame
  Value is t if we know that both keys are present, and are mapped to the
  usual X keysyms.  Value is `lambda' if we cannot determine if both keys are
  present and mapped to the usual X keysyms.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
  #ifdef HAVE_XKBGETKEYBOARD
    XkbDescPtr kb;
              /* The XKB symbolic key names can be seen most easily in
                 the PS file generated by `xkbprint -label name
                 $DISPLAY'.  */
 -            if (bcmp ("DELE", kb->names->keys[i].name, 4) == 0)
 +            if (memcmp ("DELE", kb->names->keys[i].name, 4) == 0)
                delete_keycode = i;
 -            else if (bcmp ("BKSP", kb->names->keys[i].name, 4) == 0)
 +            else if (memcmp ("BKSP", kb->names->keys[i].name, 4) == 0)
                backspace_keycode = i;
            }
  
@@@ -5759,7 -5839,7 +5750,7 @@@ frame_parm_handler x_frame_parm_handler
  };
  
  void
 -syms_of_xfns ()
 +syms_of_xfns (void)
  {
    /* This is zero if not using X windows.  */
    x_in_use = 0;
diff --combined src/xmenu.c
@@@ -81,8 -81,6 +81,8 @@@ along with GNU Emacs.  If not, see <htt
  #include <X11/StringDefs.h>
  #include <X11/Shell.h>
  #ifdef USE_LUCID
 +#include "xsettings.h"
 +#include "../lwlib/xlwmenu.h"
  #ifdef HAVE_XAW3D
  #include <X11/Xaw3d/Paned.h>
  #else /* !HAVE_XAW3D */
@@@ -122,22 -120,22 +122,22 @@@ extern Lisp_Object Qoverriding_local_ma
  extern Lisp_Object Qmenu_bar_update_hook;
  
  #ifdef USE_X_TOOLKIT
 -extern void set_frame_menubar P_ ((FRAME_PTR, int, int));
 +extern void set_frame_menubar (FRAME_PTR, int, int);
  extern XtAppContext Xt_app_con;
  
 -static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object,
 -                                   char **));
 -static void popup_get_selection P_ ((XEvent *, struct x_display_info *,
 -                                     LWLIB_ID, int));
 +static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object,
 +                                 char **);
 +static void popup_get_selection (XEvent *, struct x_display_info *,
 +                                 LWLIB_ID, int);
  #endif /* USE_X_TOOLKIT */
  
  #ifdef USE_GTK
 -extern void set_frame_menubar P_ ((FRAME_PTR, int, int));
 -static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object,
 -                                   char **));
 +extern void set_frame_menubar (FRAME_PTR, int, int);
 +static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object,
 +                                 char **);
  #endif
  
 -static int update_frame_menubar P_ ((struct frame *));
 +static int update_frame_menubar (struct frame *);
  \f
  /* Flag which when set indicates a dialog or menu has been posted by
     Xt on behalf of one of the widget sets.  */
@@@ -147,17 -145,26 +147,17 @@@ static int next_menubar_widget_id
  
  /* For NS and NTGUI, these prototypes are defined in keyboard.h.  */
  #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
 -extern widget_value *xmalloc_widget_value P_ ((void));
 -extern widget_value *digest_single_submenu P_ ((int, int, int));
 +extern widget_value *xmalloc_widget_value (void);
 +extern widget_value *digest_single_submenu (int, int, int);
  #endif
  
 -/* This is set nonzero after the user activates the menu bar, and set
 -   to zero again after the menu bars are redisplayed by prepare_menu_bar.
 -   While it is nonzero, all calls to set_frame_menubar go deep.
 -
 -   I don't understand why this is needed, but it does seem to be
 -   needed on Motif, according to Marcus Daniels <marcus@sysc.pdx.edu>.  */
 -
 -int pending_menu_activation;
  \f
  #ifdef USE_X_TOOLKIT
  
  /* Return the frame whose ->output_data.x->id equals ID, or 0 if none.  */
  
  static struct frame *
 -menubar_id_to_frame (id)
 -     LWLIB_ID id;
 +menubar_id_to_frame (LWLIB_ID id)
  {
    Lisp_Object tail, frame;
    FRAME_PTR f;
     the scroll bar or the edit window.  Fx_popup_menu needs to be
     sure it is the edit window.  */
  void
 -mouse_position_for_popup (f, x, y)
 -     FRAME_PTR f;
 -     int *x;
 -     int *y;
 +mouse_position_for_popup (FRAME_PTR f, int *x, int *y)
  {
    Window root, dummy_window;
    int dummy;
@@@ -251,7 -261,8 +251,7 @@@ otherwise it is "Question"
  If the user gets rid of the dialog box without making a valid choice,
  for instance using the window manager, then this produces a quit and
  `x-popup-dialog' does not return.  */)
 -     (position, contents, header)
 -     Lisp_Object position, contents, header;
 +  (Lisp_Object position, Lisp_Object contents, Lisp_Object header)
  {
    FRAME_PTR f = NULL;
    Lisp_Object window;
  /* Set menu_items_inuse so no other popup menu or dialog is created.  */
  
  void
 -x_menu_set_in_use (in_use)
 -     int in_use;
 +x_menu_set_in_use (int in_use)
  {
    menu_items_inuse = in_use ? Qt : Qnil;
    popup_activated_flag = in_use;
@@@ -447,7 -459,11 +447,7 @@@ x_menu_wait_for_event (void *data
     with BLOCK_INPUT, UNBLOCK_INPUT wrappers.  */
  
  static void
 -popup_get_selection (initial_event, dpyinfo, id, do_timers)
 -     XEvent *initial_event;
 -     struct x_display_info *dpyinfo;
 -     LWLIB_ID id;
 -     int do_timers;
 +popup_get_selection (XEvent *initial_event, struct x_display_info *dpyinfo, LWLIB_ID id, int do_timers)
  {
    XEvent event;
  
@@@ -504,7 -520,8 +504,7 @@@ arrow keys, select a menu entry with th
  escape key.  If FRAME has no menu bar this function does nothing.
  
  If FRAME is nil or not given, use the selected frame.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    XEvent ev;
    FRAME_PTR f = check_x_frame (frame);
@@@ -582,7 -599,8 +582,7 @@@ arrow keys, select a menu entry with th
  escape key.  If FRAME has no menu bar this function does nothing.
  
  If FRAME is nil or not given, use the selected frame.  */)
 -     (frame)
 -     Lisp_Object frame;
 +  (Lisp_Object frame)
  {
    GtkWidget *menubar;
    FRAME_PTR f;
     Used for popup menus and dialogs. */
  
  static void
 -popup_widget_loop (do_timers, widget)
 -     int do_timers;
 -     GtkWidget *widget;
 +popup_widget_loop (int do_timers, GtkWidget *widget)
  {
    ++popup_activated_flag;
  
     execute Lisp code.  */
  
  void
 -x_activate_menubar (f)
 -     FRAME_PTR f;
 +x_activate_menubar (FRAME_PTR f)
  {
    if (! FRAME_X_P (f))
      abort ();
  
    set_frame_menubar (f, 0, 1);
    BLOCK_INPUT;
 +  popup_activated_flag = 1;
  #ifdef USE_GTK
-   /* If we click outside any menu item, the menu bar still grabs.
-      So we send Press and the Release.  If outside, grab is released.
-      If on a menu item, it is popped up normally.
-      PutBack is like a stack, so we put back in reverse order.  */
-   f->output_data.x->saved_menu_event->type = ButtonRelease;
-   XPutBackEvent (f->output_data.x->display_info->display,
-                  f->output_data.x->saved_menu_event);
-   f->output_data.x->saved_menu_event->type = ButtonPress;
    XPutBackEvent (f->output_data.x->display_info->display,
                   f->output_data.x->saved_menu_event);
 -  popup_activated_flag = 1;
  #else
    XtDispatchEvent (f->output_data.x->saved_menu_event);
  #endif
    UNBLOCK_INPUT;
 -#ifdef USE_MOTIF
 -  if (f->output_data.x->saved_menu_event->type == ButtonRelease)
 -    pending_menu_activation = 1;
 -#endif
  
    /* Ignore this if we get it a second time.  */
    f->output_data.x->saved_menu_event->type = 0;
  
  #ifndef USE_GTK
  static void
 -popup_activate_callback (widget, id, client_data)
 -     Widget widget;
 -     LWLIB_ID id;
 -     XtPointer client_data;
 +popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
  {
    popup_activated_flag = 1;
  #ifdef USE_X_TOOLKIT
  
  #ifdef USE_GTK
  static void
 -popup_deactivate_callback (widget, client_data)
 -     GtkWidget *widget;
 -     gpointer client_data;
 +popup_deactivate_callback (GtkWidget *widget, gpointer client_data)
  {
    popup_activated_flag = 0;
  }
  #else
  static void
 -popup_deactivate_callback (widget, id, client_data)
 -     Widget widget;
 -     LWLIB_ID id;
 -     XtPointer client_data;
 +popup_deactivate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
  {
    popup_activated_flag = 0;
  }
     for that widget.
     F is the frame if known, or NULL if not known.  */
  static void
 -show_help_event (f, widget, help)
 -     FRAME_PTR f;
 -     xt_or_gtk_widget widget;
 -     Lisp_Object help;
 +show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help)
  {
    Lisp_Object frame;
  
  
  #ifdef USE_GTK
  void
 -menu_highlight_callback (widget, call_data)
 -     GtkWidget *widget;
 -     gpointer call_data;
 +menu_highlight_callback (GtkWidget *widget, gpointer call_data)
  {
    xg_menu_item_cb_data *cb_data;
    Lisp_Object help;
  }
  #else
  void
 -menu_highlight_callback (widget, id, call_data)
 -     Widget widget;
 -     LWLIB_ID id;
 -     void *call_data;
 +menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data)
  {
    struct frame *f;
    Lisp_Object help;
@@@ -804,7 -837,9 +796,7 @@@ static int xg_crazy_callback_abort
     Figure out what the user chose
     and put the appropriate events into the keyboard buffer.  */
  static void
 -menubar_selection_callback (widget, client_data)
 -     GtkWidget *widget;
 -     gpointer client_data;
 +menubar_selection_callback (GtkWidget *widget, gpointer client_data)
  {
    xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data;
  
     Figure out what the user chose
     and put the appropriate events into the keyboard buffer.  */
  static void
 -menubar_selection_callback (widget, id, client_data)
 -     Widget widget;
 -     LWLIB_ID id;
 -     XtPointer client_data;
 +menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
  {
    FRAME_PTR f;
  
     changed.  Value is non-zero if widgets were updated.  */
  
  static int
 -update_frame_menubar (f)
 -     FRAME_PTR f;
 +update_frame_menubar (FRAME_PTR f)
  {
  #ifdef USE_GTK
    return xg_update_frame_menubar (f);
    return 1;
  }
  
 +#ifdef USE_LUCID
 +static void
 +apply_systemfont_to_dialog (Widget w)
 +{
 +  const char *fn = xsettings_get_system_normal_font ();
 +  if (fn) 
 +    {
 +      XrmDatabase db = XtDatabase (XtDisplay (w));
 +      if (db)
 +        XrmPutStringResource (&db, "*dialog.faceName", fn);
 +    }
 +}
 +
 +static void
 +apply_systemfont_to_menu (Widget w)
 +{
 +  const char *fn = xsettings_get_system_normal_font ();
 +  int defflt;
 +
 +  if (!fn) return;
 +
 +  if (XtIsShell (w)) /* popup menu */
 +    {
 +      Widget *childs = NULL;
 +
 +      XtVaGetValues (w, XtNchildren, &childs, NULL);
 +      if (*childs) w = *childs;
 +    }
 +
 +  /* Only use system font if the default is used for the menu.  */
 +  XtVaGetValues (w, XtNdefaultFace, &defflt, NULL);
 +  if (defflt)
 +    XtVaSetValues (w, XtNfaceName, fn, NULL);
 +}
 +#endif
 +
  /* Set the contents of the menubar widgets of frame F.
     The argument FIRST_TIME is currently ignored;
     it is set the first time this is called, from initialize_frame_menubar.  */
  
  void
 -set_frame_menubar (f, first_time, deep_p)
 -     FRAME_PTR f;
 -     int first_time;
 -     int deep_p;
 +set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
  {
    xt_or_gtk_widget menubar_widget;
  #ifdef USE_X_TOOLKIT
  
    if (! menubar_widget)
      deep_p = 1;
 -  else if (pending_menu_activation && !deep_p)
 -    deep_p = 1;
    /* Make the first call for any given frame always go deep.  */
    else if (!f->output_data.x->saved_menu_event && !deep_p)
      {
  
        /* Save the frame's previous menu bar contents data.  */
        if (previous_menu_items_used)
 -      bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items,
 -             previous_menu_items_used * sizeof (Lisp_Object));
 +      memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
 +              previous_menu_items_used * sizeof (Lisp_Object));
  
        /* Fill in menu_items with the current menu bar contents.
         This can evaluate Lisp code.  */
  
        /* Make menu pop down on C-g.  */
        XtOverrideTranslations (menubar_widget, override);
 +#ifdef USE_LUCID
 +      apply_systemfont_to_menu (menubar_widget);
 +#endif
      }
  
    {
 -    int menubar_size
 +    int menubar_size;
 +    if (f->output_data.x->menubar_widget)
 +      XtRealizeWidget (f->output_data.x->menubar_widget);
 +
 +    menubar_size
        = (f->output_data.x->menubar_widget
         ? (f->output_data.x->menubar_widget->core.height
            + f->output_data.x->menubar_widget->core.border_width)
  #if 1 /* Experimentally, we now get the right results
         for -geometry -0-0 without this.  24 Aug 96, rms.
           Maybe so, but the menu bar size is missing the pixels so the
 -         WM size hints are off by theses pixel.  Jan D, oct 2009.  */
 +         WM size hints are off by these pixels.  Jan D, oct 2009.  */
  #ifdef USE_LUCID
      if (FRAME_EXTERNAL_MENU_BAR (f))
        {
     is visible.  */
  
  void
 -initialize_frame_menubar (f)
 -     FRAME_PTR f;
 +initialize_frame_menubar (FRAME_PTR f)
  {
    /* This function is called before the first chance to redisplay
       the frame.  It has to be, so the frame will have the right size.  */
  
  #ifndef USE_GTK
  void
 -free_frame_menubar (f)
 -     FRAME_PTR f;
 +free_frame_menubar (FRAME_PTR f)
  {
    Widget menubar_widget;
  
        lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id);
        f->output_data.x->menubar_widget = NULL;
  
 -#ifdef USE_MOTIF
        if (f->output_data.x->widget)
        {
 +#ifdef USE_MOTIF
          XtVaGetValues (f->output_data.x->widget, XtNx, &x1, XtNy, &y1, NULL);
          if (x1 == 0 && y1 == 0)
            XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL);
 -      }
  #endif
 -
 +          x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
 +      }
        UNBLOCK_INPUT;
      }
  }
@@@ -1414,7 -1417,12 +1406,7 @@@ struct next_popup_x_
  
     Here only X and Y are used.  */
  static void
 -menu_position_func (menu, x, y, push_in, user_data)
 -     GtkMenu *menu;
 -     gint *x;
 -     gint *y;
 -     gboolean *push_in;
 -     gpointer user_data;
 +menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
  {
    struct next_popup_x_y* data = (struct next_popup_x_y*)user_data;
    GtkRequisition req;
  }
  
  static void
 -popup_selection_callback (widget, client_data)
 -     GtkWidget *widget;
 -     gpointer client_data;
 +popup_selection_callback (GtkWidget *widget, gpointer client_data)
  {
    xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data;
  
  }
  
  static Lisp_Object
 -pop_down_menu (arg)
 -     Lisp_Object arg;
 +pop_down_menu (Lisp_Object arg)
  {
    struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
  
     menu pops down.
     menu_item_selection will be set to the selection.  */
  static void
 -create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp)
 -     FRAME_PTR f;
 -     widget_value *first_wv;
 -     int x;
 -     int y;
 -     int for_click;
 -     EMACS_UINT timestamp;
 +create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, EMACS_UINT timestamp)
  {
    int i;
    GtkWidget *menu;
  
    record_unwind_protect (pop_down_menu, make_save_value (menu, 0));
  
 -  if (GTK_WIDGET_MAPPED (menu))
 +  if (gtk_widget_get_mapped (menu))
      {
        /* Set this to one.  popup_widget_loop increases it by one, so it becomes
           two.  show_help_echo uses this to detect popup menus.  */
  LWLIB_ID widget_id_tick;
  
  static void
 -popup_selection_callback (widget, id, client_data)
 -     Widget widget;
 -     LWLIB_ID id;
 -     XtPointer client_data;
 +popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
  {
    menu_item_selection = (Lisp_Object *) client_data;
  }
     as a Lisp object as (HIGHPART . LOWPART).  */
  
  static Lisp_Object
 -pop_down_menu (arg)
 -     Lisp_Object arg;
 +pop_down_menu (Lisp_Object arg)
  {
    LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID)
                   | XINT (XCDR (arg)));
     menu pops down.
     menu_item_selection will be set to the selection.  */
  static void
 -create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp)
 -     FRAME_PTR f;
 -     widget_value *first_wv;
 -     int x;
 -     int y;
 -     int for_click;
 -     EMACS_UINT timestamp;
 +create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv,
 +                          int x, int y, int for_click, EMACS_UINT timestamp)
  {
    int i;
    Arg av[2];
                             popup_deactivate_callback,
                             menu_highlight_callback);
  
 +#ifdef USE_LUCID
 +  apply_systemfont_to_menu (menu);
 +#endif
 +
    dummy.type = ButtonPress;
    dummy.serial = 0;
    dummy.send_event = 0;
@@@ -1912,7 -1934,9 +1904,7 @@@ xmenu_show (FRAME_PTR f, int x, int y, 
  \f
  #ifdef USE_GTK
  static void
 -dialog_selection_callback (widget, client_data)
 -     GtkWidget *widget;
 -     gpointer client_data;
 +dialog_selection_callback (GtkWidget *widget, gpointer client_data)
  {
    /* The EMACS_INT cast avoids a warning.  There's no problem
       as long as pointers have enough bits to hold small integers.  */
     dialog pops down.
     menu_item_selection will be set to the selection.  */
  static void
 -create_and_show_dialog (f, first_wv)
 -     FRAME_PTR f;
 -     widget_value *first_wv;
 +create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
  {
    GtkWidget *menu;
  
  
  #else /* not USE_GTK */
  static void
 -dialog_selection_callback (widget, id, client_data)
 -     Widget widget;
 -     LWLIB_ID id;
 -     XtPointer client_data;
 +dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
  {
    /* The EMACS_INT cast avoids a warning.  There's no problem
       as long as pointers have enough bits to hold small integers.  */
     dialog pops down.
     menu_item_selection will be set to the selection.  */
  static void
 -create_and_show_dialog (f, first_wv)
 -     FRAME_PTR f;
 -     widget_value *first_wv;
 +create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
  {
    LWLIB_ID dialog_id;
  
      abort();
  
    dialog_id = widget_id_tick++;
 +#ifdef USE_LUCID
 +  apply_systemfont_to_dialog (f->output_data.x->widget);
 +#endif
    lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv,
                      f->output_data.x->widget, 1, 0,
                      dialog_selection_callback, 0, 0);
    lw_modify_all_widgets (dialog_id, first_wv->contents, True);
 -
    /* Display the dialog box.  */
    lw_pop_up_all_widgets (dialog_id);
    popup_activated_flag = 1;
@@@ -2018,7 -2047,11 +2010,7 @@@ static char * button_names [] = 
    "button6", "button7", "button8", "button9", "button10" };
  
  static Lisp_Object
 -xdialog_show (f, keymaps, title, header, error_name)
 -     FRAME_PTR f;
 -     int keymaps;
 -     Lisp_Object title, header;
 -     char **error_name;
 +xdialog_show (FRAME_PTR f, int keymaps, Lisp_Object title, Lisp_Object header, char **error_name)
  {
    int i, nb_buttons=0;
    char dialog_name[6];
@@@ -2216,7 -2249,9 +2208,7 @@@ static struct frame *menu_help_frame
     keyboard events.  */
  
  static void
 -menu_help_callback (help_string, pane, item)
 -     char *help_string;
 -     int pane, item;
 +menu_help_callback (char *help_string, int pane, int item)
  {
    extern Lisp_Object Qmenu_item;
    Lisp_Object *first_item;
  }
  
  static Lisp_Object
 -pop_down_menu (arg)
 -     Lisp_Object arg;
 +pop_down_menu (Lisp_Object arg)
  {
    struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
    struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
  
  
  Lisp_Object
 -xmenu_show (f, x, y, for_click, keymaps, title, error, timestamp)
 -     FRAME_PTR f;
 -     int x, y;
 -     int for_click;
 -     int keymaps;
 -     Lisp_Object title;
 -     char **error;
 -     EMACS_UINT timestamp;
 +xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
 +          Lisp_Object title, char **error, EMACS_UINT timestamp)
  {
    Window root;
    XMenu *menu;
              item_data
                = (unsigned char *) alloca (maxwidth
                                            + SBYTES (descrip) + 1);
 -            bcopy (SDATA (item_name), item_data,
 -                   SBYTES (item_name));
 +            memcpy (item_data, SDATA (item_name), SBYTES (item_name));
              for (j = SCHARS (item_name); j < maxwidth; j++)
                item_data[j] = ' ';
 -            bcopy (SDATA (descrip), item_data + j,
 -                   SBYTES (descrip));
 +            memcpy (item_data + j, SDATA (descrip), SBYTES (descrip));
              item_data[j + SBYTES (descrip)] = 0;
            }
          else
  /* Detect if a dialog or menu has been posted.  */
  
  int
 -popup_activated ()
 +popup_activated (void)
  {
    return popup_activated_flag;
  }
  
  DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
         doc: /* Return t if a menu or popup dialog is active.  */)
 -     ()
 +  (void)
  {
  #ifdef HAVE_MENUS
    return (popup_activated ()) ? Qt : Qnil;
  }
  \f
  void
 -syms_of_xmenu ()
 +syms_of_xmenu (void)
  {
    Qdebug_on_next_call = intern_c_string ("debug-on-next-call");
    staticpro (&Qdebug_on_next_call);
diff --combined src/xterm.c
@@@ -50,13 -50,15 +50,13 @@@ along with GNU Emacs.  If not, see <htt
  #include <sys/types.h>
  #endif /* makedev */
  
 -#ifdef BSD_SYSTEM
 +#ifdef HAVE_SYS_IOCTL_H
  #include <sys/ioctl.h>
 -#endif /* ! defined (BSD_SYSTEM) */
 +#endif /* ! defined (HAVE_SYS_IOCTL_H) */
  
  #include "systime.h"
  
 -#ifndef INCLUDED_FCNTL
  #include <fcntl.h>
 -#endif
  #include <ctype.h>
  #include <errno.h>
  #include <setjmp.h>
  #endif
  
  #ifdef USE_LUCID
 -extern int xlwmenu_window_p P_ ((Widget w, Window window));
 -extern void xlwmenu_redisplay P_ ((Widget));
 +extern int xlwmenu_window_p (Widget w, Window window);
 +extern void xlwmenu_redisplay (Widget);
  #endif
  
  #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
  
 -extern void free_frame_menubar P_ ((struct frame *));
 +extern void free_frame_menubar (struct frame *);
  #endif
  
  #ifdef USE_X_TOOLKIT
@@@ -307,6 -309,8 +307,6 @@@ extern Lisp_Object Vx_no_window_manager
  
  extern Lisp_Object Qeql;
  
 -extern int errno;
 -
  /* A mask of extra modifier bits to put into every keyboard char.  */
  
  extern EMACS_INT extra_keyboard_modifiers;
@@@ -332,60 -336,61 +332,60 @@@ Lisp_Object Qx_gtk_map_stock
  
  extern Lisp_Object Vinhibit_redisplay;
  
 -extern XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
 -extern int x_bitmap_mask P_ ((FRAME_PTR, int));
 -
 -static int x_alloc_nearest_color_1 P_ ((Display *, Colormap, XColor *));
 -static void x_set_window_size_1 P_ ((struct frame *, int, int, int));
 -static const XColor *x_color_cells P_ ((Display *, int *));
 -static void x_update_window_end P_ ((struct window *, int, int));
 -
 -static int x_io_error_quitter P_ ((Display *));
 -static struct terminal *x_create_terminal P_ ((struct x_display_info *));
 -void x_delete_terminal P_ ((struct terminal *));
 -static void x_update_end P_ ((struct frame *));
 -static void XTframe_up_to_date P_ ((struct frame *));
 -static void XTset_terminal_modes P_ ((struct terminal *));
 -static void XTreset_terminal_modes P_ ((struct terminal *));
 -static void x_clear_frame P_ ((struct frame *));
 -static void frame_highlight P_ ((struct frame *));
 -static void frame_unhighlight P_ ((struct frame *));
 -static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
 -static void  x_focus_changed P_ ((int, int, struct x_display_info *,
 -                                struct frame *, struct input_event *));
 -static void x_detect_focus_change P_ ((struct x_display_info *,
 -                                       XEvent *, struct input_event *));
 -static void XTframe_rehighlight P_ ((struct frame *));
 -static void x_frame_rehighlight P_ ((struct x_display_info *));
 -static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
 -static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int,
 -                                 enum text_cursor_kinds));
 -
 -static void x_clip_to_row P_ ((struct window *, struct glyph_row *, int, GC));
 -static void x_flush P_ ((struct frame *f));
 -static void x_update_begin P_ ((struct frame *));
 -static void x_update_window_begin P_ ((struct window *));
 -static void x_after_update_window_line P_ ((struct glyph_row *));
 -static struct scroll_bar *x_window_to_scroll_bar P_ ((Display *, Window));
 -static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *,
 -                                          enum scroll_bar_part *,
 -                                          Lisp_Object *, Lisp_Object *,
 -                                          unsigned long *));
 -static void x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
 -static void x_check_fullscreen P_ ((struct frame *));
 -static void x_check_expected_move P_ ((struct frame *, int, int));
 -static void x_sync_with_move P_ ((struct frame *, int, int, int));
 -static int handle_one_xevent P_ ((struct x_display_info *, XEvent *,
 -                                int *, struct input_event *));
 +extern XrmDatabase x_load_resources (Display *, char *, char *, char *);
 +extern int x_bitmap_mask (FRAME_PTR, int);
 +
 +static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *);
 +static void x_set_window_size_1 (struct frame *, int, int, int);
 +static const XColor *x_color_cells (Display *, int *);
 +static void x_update_window_end (struct window *, int, int);
 +
 +static int x_io_error_quitter (Display *);
 +static struct terminal *x_create_terminal (struct x_display_info *);
 +void x_delete_terminal (struct terminal *);
 +static void x_update_end (struct frame *);
 +static void XTframe_up_to_date (struct frame *);
 +static void XTset_terminal_modes (struct terminal *);
 +static void XTreset_terminal_modes (struct terminal *);
 +static void x_clear_frame (struct frame *);
 +static void frame_highlight (struct frame *);
 +static void frame_unhighlight (struct frame *);
 +static void x_new_focus_frame (struct x_display_info *, struct frame *);
 +static void  x_focus_changed (int, int, struct x_display_info *,
 +                              struct frame *, struct input_event *);
 +static void x_detect_focus_change (struct x_display_info *,
 +                                   XEvent *, struct input_event *);
 +static void XTframe_rehighlight (struct frame *);
 +static void x_frame_rehighlight (struct x_display_info *);
 +static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
 +static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
 +                               enum text_cursor_kinds);
 +
 +static void x_clip_to_row (struct window *, struct glyph_row *, int, GC);
 +static void x_flush (struct frame *f);
 +static void x_update_begin (struct frame *);
 +static void x_update_window_begin (struct window *);
 +static void x_after_update_window_line (struct glyph_row *);
 +static struct scroll_bar *x_window_to_scroll_bar (Display *, Window);
 +static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
 +                                        enum scroll_bar_part *,
 +                                        Lisp_Object *, Lisp_Object *,
 +                                        unsigned long *);
 +static void x_handle_net_wm_state (struct frame *, XPropertyEvent *);
 +static void x_check_fullscreen (struct frame *);
 +static void x_check_expected_move (struct frame *, int, int);
 +static void x_sync_with_move (struct frame *, int, int, int);
 +static int handle_one_xevent (struct x_display_info *, XEvent *,
 +                              int *, struct input_event *);
  /* Don't declare this NO_RETURN because we want no
     interference with debugging failing X calls.  */
 -static SIGTYPE x_connection_closed P_ ((Display *, char *));
 +static SIGTYPE x_connection_closed (Display *, char *);
  
  
  /* Flush display of frame F, or of all frames if F is null.  */
  
  static void
 -x_flush (f)
 -     struct frame *f;
 +x_flush (struct frame *f)
  {
    /* Don't call XFlush when it is not safe to redisplay; the X
       connection may be broken.  */
@@@ -454,7 -459,8 +454,7 @@@ record_event (locus, type
  /* Return the struct x_display_info corresponding to DPY.  */
  
  struct x_display_info *
 -x_display_info_for_display (dpy)
 -     Display *dpy;
 +x_display_info_for_display (Display *dpy)
  {
    struct x_display_info *dpyinfo;
  
  #define OPACITY "_NET_WM_WINDOW_OPACITY"
  
  void
 -x_set_frame_alpha (f)
 -     struct frame *f;
 +x_set_frame_alpha (struct frame *f)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Display *dpy = FRAME_X_DISPLAY (f);
    if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
      /* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
         we must treat the former instead of the latter. */
 -    win = FRAME_X_OUTPUT(f)->parent_desc;
 +    win = FRAME_X_OUTPUT (f)->parent_desc;
  
    if (dpyinfo->x_highlight_frame == f)
      alpha = f->alpha[0];
      unsigned long n, left;
  
      x_catch_errors (dpy);
 -    rc = XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False),
 -                          0L, 1L, False, XA_CARDINAL,
 -                          &actual, &format, &n, &left,
 -                          &data);
 +    rc = XGetWindowProperty (dpy, win, XInternAtom(dpy, OPACITY, False),
 +                           0L, 1L, False, XA_CARDINAL,
 +                           &actual, &format, &n, &left,
 +                           &data);
  
      if (rc == Success && actual != None)
        if (*(unsigned long *)data == opac)
  }
  
  int
 -x_display_pixel_height (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_display_pixel_height (struct x_display_info *dpyinfo)
  {
    return HeightOfScreen (dpyinfo->screen);
  }
  
  int
 -x_display_pixel_width (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_display_pixel_width (struct x_display_info *dpyinfo)
  {
    return WidthOfScreen (dpyinfo->screen);
  }
     because all interesting stuff is done on a window basis.  */
  
  static void
 -x_update_begin (f)
 -     struct frame *f;
 +x_update_begin (struct frame *f)
  {
    /* Nothing to do.  */
  }
     position of W.  */
  
  static void
 -x_update_window_begin (w)
 -     struct window *w;
 +x_update_window_begin (struct window *w)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct x_display_info *display_info = FRAME_X_DISPLAY_INFO (f);
  /* Draw a vertical window border from (x,y0) to (x,y1)  */
  
  static void
 -x_draw_vertical_window_border (w, x, y0, y1)
 -     struct window *w;
 -     int x, y0, y1;
 +x_draw_vertical_window_border (struct window *w, int x, int y0, int y1)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct face *face;
     here.  */
  
  static void
 -x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
 -     struct window *w;
 -     int cursor_on_p, mouse_face_overwritten_p;
 +x_update_window_end (struct window *w, int cursor_on_p, int mouse_face_overwritten_p)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
  
     update_end.  */
  
  static void
 -x_update_end (f)
 -     struct frame *f;
 +x_update_end (struct frame *f)
  {
    /* Mouse highlight may be displayed again.  */
    FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0;
     updated_window is not available here.  */
  
  static void
 -XTframe_up_to_date (f)
 -     struct frame *f;
 +XTframe_up_to_date (struct frame *f)
  {
    if (FRAME_X_P (f))
      {
     between bitmaps to be drawn between current row and DESIRED_ROW.  */
  
  static void
 -x_after_update_window_line (desired_row)
 -     struct glyph_row *desired_row;
 +x_after_update_window_line (struct glyph_row *desired_row)
  {
    struct window *w = updated_window;
    struct frame *f;
  }
  
  static void
 -x_draw_fringe_bitmap (w, row, p)
 -     struct window *w;
 -     struct glyph_row *row;
 -     struct draw_fringe_bitmap_params *p;
 +x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fringe_bitmap_params *p)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    Display *display = FRAME_X_DISPLAY (f);
@@@ -899,37 -920,37 +899,37 @@@ XTreset_terminal_modes (struct termina
  
  
  
 -static void x_set_glyph_string_clipping P_ ((struct glyph_string *));
 -static void x_set_glyph_string_gc P_ ((struct glyph_string *));
 -static void x_draw_glyph_string_background P_ ((struct glyph_string *,
 -                                              int));
 -static void x_draw_glyph_string_foreground P_ ((struct glyph_string *));
 -static void x_draw_composite_glyph_string_foreground P_ ((struct glyph_string *));
 -static void x_draw_glyph_string_box P_ ((struct glyph_string *));
 -static void x_draw_glyph_string  P_ ((struct glyph_string *));
 -static void x_compute_glyph_string_overhangs P_ ((struct glyph_string *));
 -static void x_set_cursor_gc P_ ((struct glyph_string *));
 -static void x_set_mode_line_face_gc P_ ((struct glyph_string *));
 -static void x_set_mouse_face_gc P_ ((struct glyph_string *));
 -static int x_alloc_lighter_color P_ ((struct frame *, Display *, Colormap,
 -                                    unsigned long *, double, int));
 -static void x_setup_relief_color P_ ((struct frame *, struct relief *,
 -                                    double, int, unsigned long));
 -static void x_setup_relief_colors P_ ((struct glyph_string *));
 -static void x_draw_image_glyph_string P_ ((struct glyph_string *));
 -static void x_draw_image_relief P_ ((struct glyph_string *));
 -static void x_draw_image_foreground P_ ((struct glyph_string *));
 -static void x_draw_image_foreground_1 P_ ((struct glyph_string *, Pixmap));
 -static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int,
 -                                         int, int, int));
 -static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int,
 -                                  int, int, int, int, int, int,
 -                                  XRectangle *));
 -static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int,
 -                               int, int, int, XRectangle *));
 +static void x_set_glyph_string_clipping (struct glyph_string *);
 +static void x_set_glyph_string_gc (struct glyph_string *);
 +static void x_draw_glyph_string_background (struct glyph_string *,
 +                                            int);
 +static void x_draw_glyph_string_foreground (struct glyph_string *);
 +static void x_draw_composite_glyph_string_foreground (struct glyph_string *);
 +static void x_draw_glyph_string_box (struct glyph_string *);
 +static void x_draw_glyph_string  (struct glyph_string *);
 +static void x_compute_glyph_string_overhangs (struct glyph_string *);
 +static void x_set_cursor_gc (struct glyph_string *);
 +static void x_set_mode_line_face_gc (struct glyph_string *);
 +static void x_set_mouse_face_gc (struct glyph_string *);
 +static int x_alloc_lighter_color (struct frame *, Display *, Colormap,
 +                                  unsigned long *, double, int);
 +static void x_setup_relief_color (struct frame *, struct relief *,
 +                                  double, int, unsigned long);
 +static void x_setup_relief_colors (struct glyph_string *);
 +static void x_draw_image_glyph_string (struct glyph_string *);
 +static void x_draw_image_relief (struct glyph_string *);
 +static void x_draw_image_foreground (struct glyph_string *);
 +static void x_draw_image_foreground_1 (struct glyph_string *, Pixmap);
 +static void x_clear_glyph_string_rect (struct glyph_string *, int,
 +                                       int, int, int);
 +static void x_draw_relief_rect (struct frame *, int, int, int, int,
 +                                int, int, int, int, int, int,
 +                                XRectangle *);
 +static void x_draw_box_rect (struct glyph_string *, int, int, int, int,
 +                             int, int, int, XRectangle *);
  
  #if GLYPH_DEBUG
 -static void x_check_font P_ ((struct frame *, struct font *));
 +static void x_check_font (struct frame *, struct font *);
  #endif
  
  
     face.  */
  
  static void
 -x_set_cursor_gc (s)
 -     struct glyph_string *s;
 +x_set_cursor_gc (struct glyph_string *s)
  {
    if (s->font == FRAME_FONT (s->f)
        && s->face->background == FRAME_BACKGROUND_PIXEL (s->f)
  /* Set up S->gc of glyph string S for drawing text in mouse face.  */
  
  static void
 -x_set_mouse_face_gc (s)
 -     struct glyph_string *s;
 +x_set_mouse_face_gc (struct glyph_string *s)
  {
    int face_id;
    struct face *face;
     matrix was built, so there isn't much to do, here.  */
  
  static INLINE void
 -x_set_mode_line_face_gc (s)
 -     struct glyph_string *s;
 +x_set_mode_line_face_gc (struct glyph_string *s)
  {
    s->gc = s->face->gc;
  }
     pattern.  */
  
  static INLINE void
 -x_set_glyph_string_gc (s)
 -     struct glyph_string *s;
 +x_set_glyph_string_gc (struct glyph_string *s)
  {
    PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
  
     line or menu if we don't have X toolkit support.  */
  
  static INLINE void
 -x_set_glyph_string_clipping (s)
 -     struct glyph_string *s;
 +x_set_glyph_string_clipping (struct glyph_string *s)
  {
    XRectangle *r = s->clip;
    int n = get_glyph_string_clip_rects (s, r, 2);
     the area of SRC.  */
  
  static void
 -x_set_glyph_string_clipping_exactly (src, dst)
 -     struct glyph_string *src, *dst;
 +x_set_glyph_string_clipping_exactly (struct glyph_string *src, struct glyph_string *dst)
  {
    XRectangle r;
  
     Compute left and right overhang of glyph string S.  */
  
  static void
 -x_compute_glyph_string_overhangs (s)
 -     struct glyph_string *s;
 +x_compute_glyph_string_overhangs (struct glyph_string *s)
  {
    if (s->cmp == NULL
        && (s->first_glyph->type == CHAR_GLYPH
  /* Fill rectangle X, Y, W, H with background color of glyph string S.  */
  
  static INLINE void
 -x_clear_glyph_string_rect (s, x, y, w, h)
 -     struct glyph_string *s;
 -     int x, y, w, h;
 +x_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h)
  {
    XGCValues xgcv;
    XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv);
     contains the first component of a composition.  */
  
  static void
 -x_draw_glyph_string_background (s, force_p)
 -     struct glyph_string *s;
 -     int force_p;
 +x_draw_glyph_string_background (struct glyph_string *s, int force_p)
  {
    /* Nothing to do if background has already been drawn or if it
       shouldn't be drawn in the first place.  */
  /* Draw the foreground of glyph string S.  */
  
  static void
 -x_draw_glyph_string_foreground (s)
 -     struct glyph_string *s;
 +x_draw_glyph_string_foreground (struct glyph_string *s)
  {
    int i, x;
  
  /* Draw the foreground of composite glyph string S.  */
  
  static void
 -x_draw_composite_glyph_string_foreground (s)
 -     struct glyph_string *s;
 +x_draw_composite_glyph_string_foreground (struct glyph_string *s)
  {
    int i, j, x;
    struct font *font = s->font;
  
  #ifdef USE_X_TOOLKIT
  
 -static struct frame *x_frame_of_widget P_ ((Widget));
 -static Boolean cvt_string_to_pixel P_ ((Display *, XrmValue *, Cardinal *,
 -                                      XrmValue *, XrmValue *, XtPointer *));
 -static void cvt_pixel_dtor P_ ((XtAppContext, XrmValue *, XtPointer,
 -                              XrmValue *, Cardinal *));
 +static struct frame *x_frame_of_widget (Widget);
 +static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
 +                                    XrmValue *, XrmValue *, XtPointer *);
 +static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
 +                            XrmValue *, Cardinal *);
  
  
  /* Return the frame on which widget WIDGET is used.. Abort if frame
     cannot be determined.  */
  
  static struct frame *
 -x_frame_of_widget (widget)
 -     Widget widget;
 +x_frame_of_widget (Widget widget)
  {
    struct x_display_info *dpyinfo;
    Lisp_Object tail;
     if successful.  This is called from lwlib.  */
  
  int
 -x_alloc_nearest_color_for_widget (widget, cmap, color)
 -     Widget widget;
 -     Colormap cmap;
 -     XColor *color;
 +x_alloc_nearest_color_for_widget (Widget widget, Colormap cmap, XColor *color)
  {
    struct frame *f = x_frame_of_widget (widget);
    return x_alloc_nearest_color (f, cmap, color);
     Value is non-zero if successful.  */
  
  int
 -x_alloc_lighter_color_for_widget (widget, display, cmap, pixel, factor, delta)
 -     Widget widget;
 -     Display *display;
 -     Colormap cmap;
 -     unsigned long *pixel;
 -     double factor;
 -     int delta;
 +x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap,
 +                                unsigned long *pixel, double factor, int delta)
  {
    struct frame *f = x_frame_of_widget (widget);
    return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
@@@ -1462,9 -1505,12 +1462,9 @@@ static Pixel cvt_string_to_pixel_value
     Value is True if successful, False otherwise.  */
  
  static Boolean
 -cvt_string_to_pixel (dpy, args, nargs, from, to, closure_ret)
 -     Display *dpy;
 -     XrmValue *args;
 -     Cardinal *nargs;
 -     XrmValue *from, *to;
 -     XtPointer *closure_ret;
 +cvt_string_to_pixel (Display *dpy, XrmValue *args, Cardinal *nargs,
 +                   XrmValue *from, XrmValue *to,
 +                   XtPointer *closure_ret)
  {
    Screen *screen;
    Colormap cmap;
     ARGS and NARGS are like for cvt_string_to_pixel.  */
  
  static void
 -cvt_pixel_dtor (app, to, closure, args, nargs)
 -    XtAppContext app;
 -    XrmValuePtr to;
 -    XtPointer closure;
 -    XrmValuePtr args;
 -    Cardinal *nargs;
 +cvt_pixel_dtor (XtAppContext app, XrmValuePtr to, XtPointer closure, XrmValuePtr args,
 +              Cardinal *nargs)
  {
    if (*nargs != 2)
      {
     say a 24-bit TrueColor map.  */
  
  static const XColor *
 -x_color_cells (dpy, ncells)
 -     Display *dpy;
 -     int *ncells;
 +x_color_cells (Display *dpy, int *ncells)
  {
    struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
  
     colors in COLORS.  Use cached information, if available.  */
  
  void
 -x_query_colors (f, colors, ncolors)
 -     struct frame *f;
 -     XColor *colors;
 -     int ncolors;
 +x_query_colors (struct frame *f, XColor *colors, int ncolors)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
     COLOR.  Use cached information, if available.  */
  
  void
 -x_query_color (f, color)
 -     struct frame *f;
 -     XColor *color;
 +x_query_color (struct frame *f, XColor *color)
  {
    x_query_colors (f, color, 1);
  }
     allocated.  */
  
  static int
 -x_alloc_nearest_color_1 (dpy, cmap, color)
 -     Display *dpy;
 -     Colormap cmap;
 -     XColor *color;
 +x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color)
  {
    int rc;
  
     allocated.  */
  
  int
 -x_alloc_nearest_color (f, cmap, color)
 -     struct frame *f;
 -     Colormap cmap;
 -     XColor *color;
 +x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color)
  {
    gamma_correct (f, color);
    return x_alloc_nearest_color_1 (FRAME_X_DISPLAY (f), cmap, color);
     get color reference counts right.  */
  
  unsigned long
 -x_copy_color (f, pixel)
 -     struct frame *f;
 -     unsigned long pixel;
 +x_copy_color (struct frame *f, long unsigned int pixel)
  {
    XColor color;
  
     get color reference counts right.  */
  
  unsigned long
 -x_copy_dpy_color (dpy, cmap, pixel)
 -     Display *dpy;
 -     Colormap cmap;
 -     unsigned long pixel;
 +x_copy_dpy_color (Display *dpy, Colormap cmap, long unsigned int pixel)
  {
    XColor color;
  
     Value is non-zero if successful.  */
  
  static int
 -x_alloc_lighter_color (f, display, cmap, pixel, factor, delta)
 -     struct frame *f;
 -     Display *display;
 -     Colormap cmap;
 -     unsigned long *pixel;
 -     double factor;
 -     int delta;
 +x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta)
  {
    XColor color, new;
    long bright;
     be allocated, use DEFAULT_PIXEL, instead.  */
  
  static void
 -x_setup_relief_color (f, relief, factor, delta, default_pixel)
 -     struct frame *f;
 -     struct relief *relief;
 -     double factor;
 -     int delta;
 -     unsigned long default_pixel;
 +x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel)
  {
    XGCValues xgcv;
    struct x_output *di = f->output_data.x;
  /* Set up colors for the relief lines around glyph string S.  */
  
  static void
 -x_setup_relief_colors (s)
 -     struct glyph_string *s;
 +x_setup_relief_colors (struct glyph_string *s)
  {
    struct x_output *di = s->f->output_data.x;
    unsigned long color;
     when drawing.  */
  
  static void
 -x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width,
 -                  raised_p, top_p, bot_p, left_p, right_p, clip_rect)
 -     struct frame *f;
 -     int left_x, top_y, right_x, bottom_y, width;
 -     int top_p, bot_p, left_p, right_p, raised_p;
 -     XRectangle *clip_rect;
 +x_draw_relief_rect (struct frame *f,
 +                  int left_x, int top_y, int right_x, int bottom_y, int width,
 +                  int raised_p, int top_p, int bot_p, int left_p, int right_p,
 +                  XRectangle *clip_rect)
  {
    Display *dpy = FRAME_X_DISPLAY (f);
    Window window = FRAME_X_WINDOW (f);
     rectangle to use when drawing.  */
  
  static void
 -x_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width,
 -               left_p, right_p, clip_rect)
 -     struct glyph_string *s;
 -     int left_x, top_y, right_x, bottom_y, width, left_p, right_p;
 -     XRectangle *clip_rect;
 +x_draw_box_rect (struct glyph_string *s,
 +               int left_x, int top_y, int right_x, int bottom_y, int width,
 +               int left_p, int right_p, XRectangle *clip_rect)
  {
    XGCValues xgcv;
  
  /* Draw a box around glyph string S.  */
  
  static void
 -x_draw_glyph_string_box (s)
 -     struct glyph_string *s;
 +x_draw_glyph_string_box (struct glyph_string *s)
  {
    int width, left_x, right_x, top_y, bottom_y, last_x, raised_p;
    int left_p, right_p;
  /* Draw foreground of image glyph string S.  */
  
  static void
 -x_draw_image_foreground (s)
 -     struct glyph_string *s;
 +x_draw_image_foreground (struct glyph_string *s)
  {
    int x = s->x;
    int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
  /* Draw a relief around the image glyph string S.  */
  
  static void
 -x_draw_image_relief (s)
 -     struct glyph_string *s;
 +x_draw_image_relief (struct glyph_string *s)
  {
 -  int x0, y0, x1, y1, thick, raised_p;
 +  int x0, y0, x1, y1, thick, raised_p, extra;
    XRectangle r;
    int x = s->x;
    int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
        raised_p = s->img->relief > 0;
      }
  
 -  x0 = x - thick;
 -  y0 = y - thick;
 -  x1 = x + s->slice.width + thick - 1;
 -  y1 = y + s->slice.height + thick - 1;
 +  extra = s->face->id == TOOL_BAR_FACE_ID
 +    ? XINT (Vtool_bar_button_margin) : 0;
 +
 +  x0 = x - thick - extra;
 +  y0 = y - thick - extra;
 +  x1 = x + s->slice.width + thick - 1 + extra;
 +  y1 = y + s->slice.height + thick - 1 + extra;
  
    x_setup_relief_colors (s);
    get_glyph_string_clip_rect (s, &r);
  /* Draw the foreground of image glyph string S to PIXMAP.  */
  
  static void
 -x_draw_image_foreground_1 (s, pixmap)
 -     struct glyph_string *s;
 -     Pixmap pixmap;
 +x_draw_image_foreground_1 (struct glyph_string *s, Pixmap pixmap)
  {
    int x = 0;
    int y = s->ybase - s->y - image_ascent (s->img, s->face, &s->slice);
     give the rectangle to draw.  */
  
  static void
 -x_draw_glyph_string_bg_rect (s, x, y, w, h)
 -     struct glyph_string *s;
 -     int x, y, w, h;
 +x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h)
  {
    if (s->stippled_p)
      {
   */
  
  static void
 -x_draw_image_glyph_string (s)
 -     struct glyph_string *s;
 +x_draw_image_glyph_string (struct glyph_string *s)
  {
    int box_line_hwidth = eabs (s->face->box_line_width);
    int box_line_vwidth = max (s->face->box_line_width, 0);
  /* Draw stretch glyph string S.  */
  
  static void
 -x_draw_stretch_glyph_string (s)
 -     struct glyph_string *s;
 +x_draw_stretch_glyph_string (struct glyph_string *s)
  {
    xassert (s->first_glyph->type == STRETCH_GLYPH);
  
  /* Draw glyph string S.  */
  
  static void
 -x_draw_glyph_string (s)
 -     struct glyph_string *s;
 +x_draw_glyph_string (struct glyph_string *s)
  {
    int relief_drawn_p = 0;
  
  /* Shift display to make room for inserted glyphs.   */
  
  void
 -x_shift_glyphs_for_insert (f, x, y, width, height, shift_by)
 -     struct frame *f;
 -     int x, y, width, height, shift_by;
 +x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by)
  {
    XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f),
             f->output_data.x->normal_gc,
     for X frames.  */
  
  static void
 -x_delete_glyphs (f, n)
 -     struct frame *f;
 -     register int n;
 +x_delete_glyphs (struct frame *f, register int n)
  {
    abort ();
  }
     If they are <= 0, this is probably an error.  */
  
  void
 -x_clear_area (dpy, window, x, y, width, height, exposures)
 -     Display *dpy;
 -     Window window;
 -     int x, y;
 -     int width, height;
 -     int exposures;
 +x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures)
  {
    xassert (width > 0 && height > 0);
    XClearArea (dpy, window, x, y, width, height, exposures);
@@@ -2844,7 -2944,7 +2844,7 @@@ x_clear_frame (struct frame *f
       redisplay, do it here.  */
    gtk_widget_queue_draw (FRAME_GTK_WIDGET (f));
  #endif
 -  
 +
    XFlush (FRAME_X_DISPLAY (f));
  
    UNBLOCK_INPUT;
     *RESULT.  Return 1 if the difference is negative, otherwise 0.  */
  
  static int
 -timeval_subtract (result, x, y)
 -     struct timeval *result, x, y;
 +timeval_subtract (struct timeval *result, struct timeval x, struct timeval y)
  {
    /* Perform the carry for the later subtraction by updating y.  This
       is safer because on some systems the tv_sec member is unsigned.  */
  }
  
  void
 -XTflash (f)
 -     struct frame *f;
 +XTflash (struct frame *f)
  {
    BLOCK_INPUT;
  
  #ifdef USE_GTK
      /* Use Gdk routines to draw.  This way, we won't draw over scroll bars
         when the scroll bars and the edit widget share the same X window.  */
 +    GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
      GdkGCValues vals;
      GdkGC *gc;
      vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f)
                               ^ FRAME_BACKGROUND_PIXEL (f));
      vals.function = GDK_XOR;
 -    gc = gdk_gc_new_with_values (FRAME_GTK_WIDGET (f)->window,
 -                                 &vals,
 -                                 GDK_GC_FUNCTION
 -                                 | GDK_GC_FOREGROUND);
 +    gc = gdk_gc_new_with_values (window,
 +                                 &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND);
  #define XFillRectangle(d, win, gc, x, y, w, h) \
 -    gdk_draw_rectangle (FRAME_GTK_WIDGET (f)->window, \
 -                        gc, TRUE, x, y, w, h)
 +    gdk_draw_rectangle (window, gc, TRUE, x, y, w, h)
  #else
      GC gc;
  
  
  
  static void
 -XTtoggle_invisible_pointer (f, invisible)
 -     FRAME_PTR f;
 -     int invisible;
 +XTtoggle_invisible_pointer (FRAME_PTR f, int invisible)
  {
    BLOCK_INPUT;
 -  if (invisible) 
 +  if (invisible)
      {
        if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0)
          XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
  /* Make audible bell.  */
  
  void
 -XTring_bell ()
 +XTring_bell (struct frame *f)
  {
 -  struct frame *f = SELECTED_FRAME ();
 -
    if (FRAME_X_DISPLAY (f))
      {
  #if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT)
     that is bounded by calls to x_update_begin and x_update_end.  */
  
  static void
 -XTset_terminal_window (n)
 -     register int n;
 +XTset_terminal_window (struct frame *f, int n)
  {
    /* This function intentionally left blank.  */
  }
     lines or deleting -N lines at vertical position VPOS.  */
  
  static void
 -x_ins_del_lines (f, vpos, n)
 -     struct frame *f;
 -     int vpos, n;
 +x_ins_del_lines (struct frame *f, int vpos, int n)
  {
    abort ();
  }
  /* Scroll part of the display as described by RUN.  */
  
  static void
 -x_scroll_run (w, run)
 -     struct window *w;
 -     struct run *run;
 +x_scroll_run (struct window *w, struct run *run)
  {
    struct frame *f = XFRAME (w->frame);
    int x, y, width, height, from_y, to_y, bottom_y;
  
  \f
  static void
 -frame_highlight (f)
 -     struct frame *f;
 +frame_highlight (struct frame *f)
  {
    /* We used to only do this if Vx_no_window_manager was non-nil, but
       the ICCCM (section 4.1.6) says that the window's border pixmap
  }
  
  static void
 -frame_unhighlight (f)
 -     struct frame *f;
 +frame_unhighlight (struct frame *f)
  {
    /* We used to only do this if Vx_no_window_manager was non-nil, but
       the ICCCM (section 4.1.6) says that the window's border pixmap
     Lisp code can tell when the switch took place by examining the events.  */
  
  static void
 -x_new_focus_frame (dpyinfo, frame)
 -     struct x_display_info *dpyinfo;
 -     struct frame *frame;
 +x_new_focus_frame (struct x_display_info *dpyinfo, struct frame *frame)
  {
    struct frame *old_focus = dpyinfo->x_focus_frame;
  
     a FOCUS_IN_EVENT into *BUFP.  */
  
  static void
 -x_focus_changed (type, state, dpyinfo, frame, bufp)
 -     int type;
 -     int state;
 -     struct x_display_info *dpyinfo;
 -     struct frame *frame;
 -     struct input_event *bufp;
 +x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame, struct input_event *bufp)
  {
    if (type == FocusIn)
      {
     Returns FOCUS_IN_EVENT event in *BUFP. */
  
  static void
 -x_detect_focus_change (dpyinfo, event, bufp)
 -     struct x_display_info *dpyinfo;
 -     XEvent *event;
 -     struct input_event *bufp;
 +x_detect_focus_change (struct x_display_info *dpyinfo, XEvent *event, struct input_event *bufp)
  {
    struct frame *frame;
  
  /* Handle an event saying the mouse has moved out of an Emacs frame.  */
  
  void
 -x_mouse_leave (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_mouse_leave (struct x_display_info *dpyinfo)
  {
    x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame);
  }
     the appropriate X display info.  */
  
  static void
 -XTframe_rehighlight (frame)
 -     struct frame *frame;
 +XTframe_rehighlight (struct frame *frame)
  {
    x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame));
  }
  
  static void
 -x_frame_rehighlight (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_frame_rehighlight (struct x_display_info *dpyinfo)
  {
    struct frame *old_highlight = dpyinfo->x_highlight_frame;
  
  
  /* Initialize mode_switch_bit and modifier_meaning.  */
  static void
 -x_find_modifier_meanings (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_find_modifier_meanings (struct x_display_info *dpyinfo)
  {
    int min_code, max_code;
    KeySym *syms;
     Emacs uses.  */
  
  unsigned int
 -x_x_to_emacs_modifiers (dpyinfo, state)
 -     struct x_display_info *dpyinfo;
 -     unsigned int state;
 +x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, unsigned int state)
  {
    EMACS_UINT mod_meta = meta_modifier;
    EMACS_UINT mod_alt  = alt_modifier;
  }
  
  static unsigned int
 -x_emacs_to_x_modifiers (dpyinfo, state)
 -     struct x_display_info *dpyinfo;
 -     unsigned int state;
 +x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, unsigned int state)
  {
    EMACS_UINT mod_meta = meta_modifier;
    EMACS_UINT mod_alt  = alt_modifier;
  /* Convert a keysym to its name.  */
  
  char *
 -x_get_keysym_name (keysym)
 -     KeySym keysym;
 +x_get_keysym_name (int keysym)
  {
    char *value;
  
     the mouse.  */
  
  static Lisp_Object
 -construct_mouse_click (result, event, f)
 -     struct input_event *result;
 -     XButtonEvent *event;
 -     struct frame *f;
 +construct_mouse_click (struct input_event *result, XButtonEvent *event, struct frame *f)
  {
    /* Make the event type NO_EVENT; we'll change that when we decide
       otherwise.  */
@@@ -3614,7 -3751,9 +3614,7 @@@ static XMotionEvent last_mouse_motion_e
  static Lisp_Object last_mouse_motion_frame;
  
  static int
 -note_mouse_movement (frame, event)
 -     FRAME_PTR frame;
 -     XMotionEvent *event;
 +note_mouse_movement (FRAME_PTR frame, XMotionEvent *event)
  {
    last_mouse_movement_time = event->time;
    last_mouse_motion_event = *event;
   ************************************************************************/
  
  static void
 -redo_mouse_highlight ()
 +redo_mouse_highlight (void)
  {
    if (!NILP (last_mouse_motion_frame)
        && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame)))
     movement.  */
  
  static void
 -XTmouse_position (fp, insist, bar_window, part, x, y, time)
 -     FRAME_PTR *fp;
 -     int insist;
 -     Lisp_Object *bar_window;
 -     enum scroll_bar_part *part;
 -     Lisp_Object *x, *y;
 -     unsigned long *time;
 +XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time)
  {
    FRAME_PTR f1;
  
     bits.  */
  
  static struct scroll_bar *
 -x_window_to_scroll_bar (display, window_id)
 -     Display *display;
 -     Window window_id;
 +x_window_to_scroll_bar (Display *display, Window window_id)
  {
    Lisp_Object tail;
  
     if WINDOW is not part of a menu bar.  */
  
  static Widget
 -x_window_to_menu_bar (window)
 -     Window window;
 +x_window_to_menu_bar (Window window)
  {
    Lisp_Object tail;
  
  
  #ifdef USE_TOOLKIT_SCROLL_BARS
  
 -static void x_scroll_bar_to_input_event P_ ((XEvent *, struct input_event *));
 -static void x_send_scroll_bar_event P_ ((Lisp_Object, int, int, int));
 -static void x_create_toolkit_scroll_bar P_ ((struct frame *,
 -                                           struct scroll_bar *));
 -static void x_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *,
 -                                              int, int, int));
 +static void x_scroll_bar_to_input_event (XEvent *, struct input_event *);
 +static void x_send_scroll_bar_event (Lisp_Object, int, int, int);
 +static void x_create_toolkit_scroll_bar (struct frame *,
 +                                         struct scroll_bar *);
 +static void x_set_toolkit_scroll_bar_thumb (struct scroll_bar *,
 +                                            int, int, int);
  
  
  /* Lisp window being scrolled.  Set when starting to interact with
@@@ -4004,8 -4152,14 +4004,8 @@@ static Boolean xaw3d_pick_top
     a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so.  */
  
  static void
 -xt_action_hook (widget, client_data, action_name, event, params,
 -              num_params)
 -     Widget widget;
 -     XtPointer client_data;
 -     String action_name;
 -     XEvent *event;
 -     String *params;
 -     Cardinal *num_params;
 +xt_action_hook (Widget widget, XtPointer client_data, String action_name,
 +              XEvent *event, String *params, Cardinal *num_params)
  {
    int scroll_bar_p;
    char *end_action;
@@@ -4056,7 -4210,9 +4056,7 @@@ static int scroll_bar_windows_size
     amount to scroll of a whole of WHOLE.  */
  
  static void
 -x_send_scroll_bar_event (window, part, portion, whole)
 -     Lisp_Object window;
 -     int part, portion, whole;
 +x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
  {
    XEvent event;
    XClientMessageEvent *ev = (XClientMessageEvent *) &event;
  
        scroll_bar_windows = (struct window **) xrealloc (scroll_bar_windows,
                                                        nbytes);
 -      bzero (&scroll_bar_windows[i], nbytes - old_nbytes);
 +      memset (&scroll_bar_windows[i], 0, nbytes - old_nbytes);
        scroll_bar_windows_size = new_size;
      }
  
     in *IEVENT.  */
  
  static void
 -x_scroll_bar_to_input_event (event, ievent)
 -     XEvent *event;
 -     struct input_event *ievent;
 +x_scroll_bar_to_input_event (XEvent *event, struct input_event *ievent)
  {
    XClientMessageEvent *ev = (XClientMessageEvent *) event;
    Lisp_Object window;
     CALL_DATA is a pointer to a XmScrollBarCallbackStruct.  */
  
  static void
 -xm_scroll_callback (widget, client_data, call_data)
 -     Widget widget;
 -     XtPointer client_data, call_data;
 +xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
  {
    struct scroll_bar *bar = (struct scroll_bar *) client_data;
    XmScrollBarCallbackStruct *cs = (XmScrollBarCallbackStruct *) call_data;
@@@ -4254,8 -4414,7 +4254,8 @@@ xg_scroll_callback (GtkRange     *range
            && FRAME_X_DISPLAY_INFO (f)->grabbed < (1 << 4))
          {
            part = scroll_bar_handle;
 -          whole = adj->upper - adj->page_size;
 +          whole = gtk_adjustment_get_upper (adj) -
 +            gtk_adjustment_get_page_size (adj);
            portion = min ((int)position, whole);
            bar->dragging = make_number ((int)portion);
          }
@@@ -4316,7 -4475,9 +4316,7 @@@ xg_end_scroll_callback (GtkWidget *widg
     the thumb is.  */
  
  static void
 -xaw_jump_callback (widget, client_data, call_data)
 -     Widget widget;
 -     XtPointer client_data, call_data;
 +xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data)
  {
    struct scroll_bar *bar = (struct scroll_bar *) client_data;
    float top = *(float *) call_data;
     Values < height of scroll bar mean line-wise movement.  */
  
  static void
 -xaw_scroll_callback (widget, client_data, call_data)
 -     Widget widget;
 -     XtPointer client_data, call_data;
 +xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
  {
    struct scroll_bar *bar = (struct scroll_bar *) client_data;
    /* The position really is stored cast to a pointer.  */
  
  #ifdef USE_GTK
  static void
 -x_create_toolkit_scroll_bar (f, bar)
 -     struct frame *f;
 -     struct scroll_bar *bar;
 +x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
  {
    char *scroll_bar_name = SCROLL_BAR_NAME;
  
  #else /* not USE_GTK */
  
  static void
 -x_create_toolkit_scroll_bar (f, bar)
 -     struct frame *f;
 -     struct scroll_bar *bar;
 +x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
  {
    Window xwindow;
    Widget widget;
    if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
      {
        pixel = f->output_data.x->scroll_bar_background_pixel;
 -      if (pixel != -1) 
 +      if (pixel != -1)
          {
            if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
                                        FRAME_X_COLORMAP (f),
    if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
      {
        pixel = f->output_data.x->scroll_bar_background_pixel;
 -      if (pixel != -1) 
 +      if (pixel != -1)
          {
            if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
                                        FRAME_X_COLORMAP (f),
  
  #ifdef USE_GTK
  static void
 -x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
 -     struct scroll_bar *bar;
 -     int portion, position, whole;
 +x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole)
  {
    xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
  }
  
  #else /* not USE_GTK */
  static void
 -x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
 -     struct scroll_bar *bar;
 -     int portion, position, whole;
 +x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position,
 +                              int whole)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
    Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
     scroll bar. */
  
  static struct scroll_bar *
 -x_scroll_bar_create (w, top, left, width, height)
 -     struct window *w;
 -     int top, left, width, height;
 +x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
  {
    struct frame *f = XFRAME (w->frame);
    struct scroll_bar *bar
                               left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
                               width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
                               max (height, 1));
 -    xg_show_scroll_bar (bar->x_window);
  #else /* not USE_GTK */
      Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
      XtConfigureWidget (scroll_bar,
     to move to the very end of the buffer.  */
  
  static void
 -x_scroll_bar_set_handle (bar, start, end, rebuild)
 -     struct scroll_bar *bar;
 -     int start, end;
 -     int rebuild;
 +x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild)
  {
    int dragging = ! NILP (bar->dragging);
    Window w = bar->x_window;
     nil.  */
  
  static void
 -x_scroll_bar_remove (bar)
 -     struct scroll_bar *bar;
 +x_scroll_bar_remove (struct scroll_bar *bar)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
    BLOCK_INPUT;
     create one.  */
  
  static void
 -XTset_vertical_scroll_bar (w, portion, whole, position)
 -     struct window *w;
 -     int portion, whole, position;
 +XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int position)
  {
    struct frame *f = XFRAME (w->frame);
    struct scroll_bar *bar;
     `*redeem_scroll_bar_hook' is applied to its window before the judgment.  */
  
  static void
 -XTcondemn_scroll_bars (frame)
 -     FRAME_PTR frame;
 +XTcondemn_scroll_bars (FRAME_PTR frame)
  {
    /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS.  */
    while (! NILP (FRAME_SCROLL_BARS (frame)))
     Note that WINDOW isn't necessarily condemned at all.  */
  
  static void
 -XTredeem_scroll_bar (window)
 -     struct window *window;
 +XTredeem_scroll_bar (struct window *window)
  {
    struct scroll_bar *bar;
    struct frame *f;
     last call to `*condemn_scroll_bars_hook'.  */
  
  static void
 -XTjudge_scroll_bars (f)
 -     FRAME_PTR f;
 +XTjudge_scroll_bars (FRAME_PTR f)
  {
    Lisp_Object bar, next;
  
     mark bits.  */
  
  static void
 -x_scroll_bar_expose (bar, event)
 -     struct scroll_bar *bar;
 -     XEvent *event;
 +x_scroll_bar_expose (struct scroll_bar *bar, XEvent *event)
  {
    Window w = bar->x_window;
    FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
  
  
  static void
 -x_scroll_bar_handle_click (bar, event, emacs_event)
 -     struct scroll_bar *bar;
 -     XEvent *event;
 -     struct input_event *emacs_event;
 +x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event)
  {
    if (! WINDOWP (bar->window))
      abort ();
     mark bits.  */
  
  static void
 -x_scroll_bar_note_movement (bar, event)
 -     struct scroll_bar *bar;
 -     XEvent *event;
 +x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
  {
    FRAME_PTR f = XFRAME (XWINDOW (bar->window)->frame);
  
     on the scroll bar.  */
  
  static void
 -x_scroll_bar_report_motion (fp, bar_window, part, x, y, time)
 -     FRAME_PTR *fp;
 -     Lisp_Object *bar_window;
 -     enum scroll_bar_part *part;
 -     Lisp_Object *x, *y;
 -     unsigned long *time;
 +x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time)
  {
    struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
    Window w = bar->x_window;
     redraw them.  */
  
  void
 -x_scroll_bar_clear (f)
 -     FRAME_PTR f;
 +x_scroll_bar_clear (FRAME_PTR f)
  {
  #ifndef USE_TOOLKIT_SCROLL_BARS
    Lisp_Object bar;
@@@ -5544,18 -5739,22 +5544,18 @@@ struct x_display_info *XTread_socket_fa
  
  static struct x_display_info *next_noop_dpyinfo;
  
 -#define SET_SAVED_MENU_EVENT(size)                                    \
 +#define SET_SAVED_BUTTON_EVENT                                          \
       do                                                                       \
         {                                                              \
         if (f->output_data.x->saved_menu_event == 0)                   \
             f->output_data.x->saved_menu_event                         \
             = (XEvent *) xmalloc (sizeof (XEvent));                    \
 -         bcopy (&event, f->output_data.x->saved_menu_event, size);    \
 +         *f->output_data.x->saved_menu_event = event;                   \
         inev.ie.kind = MENU_BAR_ACTIVATE_EVENT;                        \
         XSETFRAME (inev.ie.frame_or_window, f);                        \
         }                                                              \
       while (0)
  
 -#define SET_SAVED_BUTTON_EVENT SET_SAVED_MENU_EVENT (sizeof (XButtonEvent))
 -#define SET_SAVED_KEY_EVENT    SET_SAVED_MENU_EVENT (sizeof (XKeyEvent))
 -
 -
  enum
  {
    X_EVENT_NORMAL,
  
  #ifdef HAVE_X_I18N
  static int
 -x_filter_event (dpyinfo, event)
 -     struct x_display_info *dpyinfo;
 -     XEvent *event;
 +x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
  {
    /* XFilterEvent returns non-zero if the input method has
     consumed the event.  We pass the frame's X window to
@@@ -5596,7 -5797,10 +5596,7 @@@ static struct input_event *current_hold
     It is invoked before the XEvent is translated to a GdkEvent,
     so we have a chance to act on the event before GTK. */
  static GdkFilterReturn
 -event_handler_gdk (gxev, ev, data)
 -     GdkXEvent *gxev;
 -     GdkEvent *ev;
 -     gpointer data;
 +event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
  {
    XEvent *xev = (XEvent *) gxev;
  
     We return the number of characters stored into the buffer. */
  
  static int
 -handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
 -     struct x_display_info *dpyinfo;
 -     XEvent *eventp;
 -     int *finish;
 -     struct input_event *hold_quit;
 +handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, struct input_event *hold_quit)
  {
    union {
      struct input_event ie;
    EVENT_INIT (inev.ie);
    inev.ie.kind = NO_EVENT;
    inev.ie.arg = Qnil;
 -  
 +
    if (pending_event_wait.eventtype == event.type)
      pending_event_wait.eventtype = 0; /* Indicates we got it.  */
 -  
 +
    switch (event.type)
      {
      case ClientMessage:
               this enables ComposeCharacter to work whether or
               not it is combined with Meta.  */
            if (modifiers & dpyinfo->meta_mod_mask)
 -            bzero (&compose_status, sizeof (compose_status));
 +            memset (&compose_status, 0, sizeof (compose_status));
  
  #ifdef HAVE_X_I18N
            if (FRAME_XIC (f))
            if (compose_status.chars_matched > 0 && nbytes == 0)
              break;
  
 -          bzero (&compose_status, sizeof (compose_status));
 +          memset (&compose_status, 0, sizeof (compose_status));
            orig_keysym = keysym;
  
          /* Common for all keysym input events.  */
                              event.xconfigure.height);
            f = 0;
          }
 -#endif  
 +#endif
        if (f)
          {
  #ifndef USE_X_TOOLKIT
            /* GTK creates windows but doesn't map them.
               Only get real positions when mapped. */
            if (FRAME_GTK_OUTER_WIDGET (f)
 -              && GTK_WIDGET_MAPPED (FRAME_GTK_OUTER_WIDGET (f)))
 +              && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f)))
  #endif
              {
              x_real_positions (f, &f->left_pos, &f->top_pos);
             by the rest of Emacs, we put it here.  */
          int tool_bar_p = 0;
  
 -        bzero (&compose_status, sizeof (compose_status));
 +        memset (&compose_status, 0, sizeof (compose_status));
        last_mouse_glyph_frame = 0;
          last_user_time = event.xbutton.time;
  
          f->mouse_moved = 0;
  
  #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
-         f = x_menubar_window_to_frame (dpyinfo, event.xbutton.window);
+         f = x_menubar_window_to_frame (dpyinfo, &event);
          /* For a down-event in the menu bar,
             don't pass it to Xt right now.
             Instead, save it away
             and we will pass it to Xt from kbd_buffer_get_event.
             That way, we can run some Lisp code first.  */
 -        if (
 +        if (! popup_activated ()
  #ifdef USE_GTK
 -            ! popup_activated ()
              /* Gtk+ menus only react to the first three buttons. */
              && event.xbutton.button < 3
 -            &&
  #endif
 -            f && event.type == ButtonPress
 +            && f && event.type == ButtonPress
              /* Verify the event is really within the menu bar
                 and not just sent to it due to grabbing.  */
              && event.xbutton.x >= 0
            {
              SET_SAVED_BUTTON_EVENT;
              XSETFRAME (last_mouse_press_frame, f);
 -#ifdef USE_GTK
              *finish = X_EVENT_DROP;
 -#endif
            }
          else if (event.type == ButtonPress)
            {
              last_mouse_press_frame = Qnil;
              goto OTHER;
            }
 -
 -#ifdef USE_MOTIF /* This should do not harm for Lucid,
 -                  but I am trying to be cautious.  */
 -        else if (event.type == ButtonRelease)
 -          {
 -            if (!NILP (last_mouse_press_frame))
 -              {
 -                f = XFRAME (last_mouse_press_frame);
 -                if (f->output_data.x)
 -                  SET_SAVED_BUTTON_EVENT;
 -              }
 -            else
 -              goto OTHER;
 -          }
 -#endif /* USE_MOTIF */
          else
            goto OTHER;
  #endif /* USE_X_TOOLKIT || USE_GTK */
  
     Returns the value handle_one_xevent sets in the finish argument.  */
  int
 -x_dispatch_event (event, display)
 -     XEvent *event;
 -     Display *display;
 +x_dispatch_event (XEvent *event, Display *display)
  {
    struct x_display_info *dpyinfo;
    int finish = X_EVENT_NORMAL;
     EXPECTED is nonzero if the caller knows input is available.  */
  
  static int
 -XTread_socket (terminal, expected, hold_quit)
 -     struct terminal *terminal;
 -     int expected;
 -     struct input_event *hold_quit;
 +XTread_socket (struct terminal *terminal, int expected, struct input_event *hold_quit)
  {
    int count = 0;
    XEvent event;
     mode lines must be clipped to the whole window.  */
  
  static void
 -x_clip_to_row (w, row, area, gc)
 -     struct window *w;
 -     struct glyph_row *row;
 -     int area;
 -     GC gc;
 +x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    XRectangle clip_rect;
  /* Draw a hollow box cursor on window W in glyph row ROW.  */
  
  static void
 -x_draw_hollow_cursor (w, row)
 -     struct window *w;
 -     struct glyph_row *row;
 +x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
     --gerd.  */
  
  static void
 -x_draw_bar_cursor (w, row, width, kind)
 -     struct window *w;
 -     struct glyph_row *row;
 -     int width;
 -     enum text_cursor_kinds kind;
 +x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text_cursor_kinds kind)
  {
    struct frame *f = XFRAME (w->frame);
    struct glyph *cursor_glyph;
  /* RIF: Define cursor CURSOR on frame F.  */
  
  static void
 -x_define_frame_cursor (f, cursor)
 -     struct frame *f;
 -     Cursor cursor;
 +x_define_frame_cursor (struct frame *f, Cursor cursor)
  {
    if (!f->pointer_invisible
        && f->output_data.x->current_cursor != cursor)
  /* RIF: Clear area on frame F.  */
  
  static void
 -x_clear_frame_area (f, x, y, width, height)
 -     struct frame *f;
 -     int x, y, width, height;
 +x_clear_frame_area (struct frame *f, int x, int y, int width, int height)
  {
    x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                x, y, width, height, False);
  /* RIF: Draw cursor on window W.  */
  
  static void
 -x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p)
 -     struct window *w;
 -     struct glyph_row *glyph_row;
 -     int x, y;
 -     int cursor_type, cursor_width;
 -     int on_p, active_p;
 +x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int y, int cursor_type, int cursor_width, int on_p, int active_p)
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
  
        w->phys_cursor_on_p = 1;
  
        if (glyph_row->exact_window_width_line_p
 -        && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])
 +        && (glyph_row->reversed_p
 +            ? (w->phys_cursor.hpos < 0)
 +            : (w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA])))
        {
          glyph_row->cursor_in_fringe_p = 1;
 -        draw_fringe_bitmap (w, glyph_row, 0);
 +        draw_fringe_bitmap (w, glyph_row, glyph_row->reversed_p);
        }
        else
 -      switch (cursor_type)
        {
 -      case HOLLOW_BOX_CURSOR:
 -        x_draw_hollow_cursor (w, glyph_row);
 -        break;
 +        switch (cursor_type)
 +          {
 +          case HOLLOW_BOX_CURSOR:
 +            x_draw_hollow_cursor (w, glyph_row);
 +            break;
  
 -      case FILLED_BOX_CURSOR:
 -        draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
 -        break;
 +          case FILLED_BOX_CURSOR:
 +            draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR);
 +            break;
  
 -      case BAR_CURSOR:
 -        x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR);
 -        break;
 +          case BAR_CURSOR:
 +            x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR);
 +            break;
  
 -      case HBAR_CURSOR:
 -        x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR);
 -        break;
 +          case HBAR_CURSOR:
 +            x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR);
 +            break;
  
 -      case NO_CURSOR:
 -        w->phys_cursor_width = 0;
 -        break;
 +          case NO_CURSOR:
 +            w->phys_cursor_width = 0;
 +            break;
  
 -      default:
 -        abort ();
 +          default:
 +            abort ();
 +          }
        }
  
  #ifdef HAVE_X_I18N
  /* Make the x-window of frame F use the gnu icon bitmap.  */
  
  int
 -x_bitmap_icon (f, file)
 -     struct frame *f;
 -     Lisp_Object file;
 +x_bitmap_icon (struct frame *f, Lisp_Object file)
  {
    int bitmap_id;
  
     Use ICON_NAME as the text.  */
  
  int
 -x_text_icon (f, icon_name)
 -     struct frame *f;
 -     char *icon_name;
 +x_text_icon (struct frame *f, char *icon_name)
  {
    if (FRAME_X_WINDOW (f) == 0)
      return 1;
@@@ -7402,7 -7653,9 +7402,7 @@@ static struct x_error_message_stack *x_
     x_catch_errors is in effect.  */
  
  static void
 -x_error_catcher (display, error)
 -     Display *display;
 -     XErrorEvent *error;
 +x_error_catcher (Display *display, XErrorEvent *error)
  {
    XGetErrorText (display, error->error_code,
                 x_error_message->string,
  
     Calling x_uncatch_errors resumes the normal error handling.  */
  
 -void x_check_errors ();
 +void x_check_errors (Display *dpy, char *format);
  
  void
 -x_catch_errors (dpy)
 -     Display *dpy;
 +x_catch_errors (Display *dpy)
  {
    struct x_error_message_stack *data = xmalloc (sizeof (*data));
  
     DPY should be the display that was passed to x_catch_errors.  */
  
  void
 -x_uncatch_errors ()
 +x_uncatch_errors (void)
  {
    struct x_error_message_stack *tmp;
  
     sprintf (a buffer, FORMAT, the x error message text) as the text.  */
  
  void
 -x_check_errors (dpy, format)
 -     Display *dpy;
 -     char *format;
 +x_check_errors (Display *dpy, char *format)
  {
    /* Make sure to catch any errors incurred so far.  */
    XSync (dpy, False);
    if (x_error_message->string[0])
      {
        char string[X_ERROR_MESSAGE_SIZE];
 -      bcopy (x_error_message->string, string, X_ERROR_MESSAGE_SIZE);
 +      memcpy (string, x_error_message->string, X_ERROR_MESSAGE_SIZE);
        x_uncatch_errors ();
        error (format, string);
      }
     since we did x_catch_errors on DPY.  */
  
  int
 -x_had_errors_p (dpy)
 -     Display *dpy;
 +x_had_errors_p (Display *dpy)
  {
    /* Make sure to catch any errors incurred so far.  */
    XSync (dpy, False);
  /* Forget about any errors we have had, since we did x_catch_errors on DPY.  */
  
  void
 -x_clear_errors (dpy)
 -     Display *dpy;
 +x_clear_errors (Display *dpy)
  {
    x_error_message->string[0] = 0;
  }
  /* Close off all unclosed x_catch_errors calls.  */
  
  void
 -x_fully_uncatch_errors ()
 +x_fully_uncatch_errors (void)
  {
    while (x_error_message)
      x_uncatch_errors ();
  /* Nonzero if x_catch_errors has been done and not yet canceled.  */
  
  int
 -x_catching_errors ()
 +x_catching_errors (void)
  {
    return x_error_message != 0;
  }
  
  #if 0
  static unsigned int x_wire_count;
 -x_trace_wire ()
 +x_trace_wire (void)
  {
    fprintf (stderr, "Lib call: %d\n", ++x_wire_count);
  }
     which will do the appropriate cleanup for us.  */
  
  static SIGTYPE
 -x_connection_signal (signalnum)       /* If we don't have an argument, */
 -     int signalnum;           /* some compilers complain in signal calls.  */
 +x_connection_signal (int signalnum)   /* If we don't have an argument, */
 +                              /* some compilers complain in signal calls.  */
  {
  #ifdef USG
    /* USG systems forget handlers when they are used;
@@@ -7558,7 -7816,7 +7558,7 @@@ static char *error_msg
     instead of dumping core when XtCloseDisplay fails.  */
  
  static void
 -x_fatal_error_signal ()
 +x_fatal_error_signal (void)
  {
    fprintf (stderr, "%s\n", error_msg);
    exit (70);
     the text of an error message that lead to the connection loss.  */
  
  static SIGTYPE
 -x_connection_closed (dpy, error_message)
 -     Display *dpy;
 -     char *error_message;
 +x_connection_closed (Display *dpy, char *error_message)
  {
    struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
    Lisp_Object frame, tail;
        /* If DPYINFO is null, this means we didn't open the display
         in the first place, so don't try to close it.  */
        {
 -      extern void (*fatal_error_signal_hook) P_ ((void));
 +        extern void (*fatal_error_signal_hook) (void);
        fatal_error_signal_hook = x_fatal_error_signal;
        XtCloseDisplay (dpy);
        fatal_error_signal_hook = NULL;
        if (terminal_list->next_terminal == NULL)
          {
            fprintf (stderr, "%s\n", error_msg);
 -          shut_down_emacs (0, 0, Qnil);
 -          exit (70);
 +          Fkill_emacs (make_number (70));
 +          /* NOTREACHED */
          }
        xg_display_close (dpyinfo->display);
  #endif
    if (terminal_list == 0)
      {
        fprintf (stderr, "%s\n", error_msg);
 -      shut_down_emacs (0, 0, Qnil);
 -      exit (70);
 +      Fkill_emacs (make_number (70));
 +      /* NOTREACHED */
      }
  
    /* Ordinary stack unwind doesn't deal with these.  */
  
  /* We specifically use it before defining it, so that gcc doesn't inline it,
     otherwise gdb doesn't know how to properly put a breakpoint on it.  */
 -static void x_error_quitter P_ ((Display *, XErrorEvent *));
 +static void x_error_quitter (Display *, XErrorEvent *);
  
  /* This is the first-level handler for X protocol errors.
     It calls x_error_quitter or x_error_catcher.  */
  
  static int
 -x_error_handler (display, error)
 -     Display *display;
 -     XErrorEvent *error;
 +x_error_handler (Display *display, XErrorEvent *error)
  {
    if (x_error_message)
      x_error_catcher (display, error);
     after x_error_handler prevents inlining into the former.  */
  
  static void NO_INLINE
 -x_error_quitter (display, error)
 -     Display *display;
 -     XErrorEvent *error;
 +x_error_quitter (Display *display, XErrorEvent *error)
  {
    char buf[256], buf1[356];
  
     If that was the only one, it prints an error message and kills Emacs.  */
  
  static int
 -x_io_error_quitter (display)
 -     Display *display;
 +x_io_error_quitter (Display *display)
  {
    char buf[256];
  
     FONT-OBJECT.  */
  
  Lisp_Object
 -x_new_font (f, font_object, fontset)
 -     struct frame *f;
 -     Lisp_Object font_object;
 -     int fontset;
 +x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
  {
    struct font *font = XFONT_OBJECT (font_object);
  
     pointer to the x_display_info structure corresponding to XIM.  */
  
  static void
 -xim_destroy_callback (xim, client_data, call_data)
 -     XIM xim;
 -     XPointer client_data;
 -     XPointer call_data;
 +xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
  {
    struct x_display_info *dpyinfo = (struct x_display_info *) client_data;
    Lisp_Object frame, tail;
  
  #ifdef HAVE_X11R6
  /* This isn't prototyped in OSF 5.0 or 5.1a.  */
 -extern char *XSetIMValues P_ ((XIM, ...));
 +extern char *XSetIMValues (XIM, ...);
  #endif
  
  /* Open the connection to the XIM server on display DPYINFO.
     RESOURCE_NAME is the resource name Emacs uses.  */
  
  static void
 -xim_open_dpy (dpyinfo, resource_name)
 -     struct x_display_info *dpyinfo;
 -     char *resource_name;
 +xim_open_dpy (struct x_display_info *dpyinfo, char *resource_name)
  {
    XIM xim;
  
     when the callback was registered.  */
  
  static void
 -xim_instantiate_callback (display, client_data, call_data)
 -     Display *display;
 -     XPointer client_data;
 -     XPointer call_data;
 +xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_data)
  {
    struct xim_inst_t *xim_inst = (struct xim_inst_t *) client_data;
    struct x_display_info *dpyinfo = xim_inst->dpyinfo;
     in the XIM instantiate callback function.  */
  
  static void
 -xim_initialize (dpyinfo, resource_name)
 -     struct x_display_info *dpyinfo;
 -     char *resource_name;
 +xim_initialize (struct x_display_info *dpyinfo, char *resource_name)
  {
    dpyinfo->xim = NULL;
  #ifdef HAVE_XIM
        xim_inst->dpyinfo = dpyinfo;
        len = strlen (resource_name);
        xim_inst->resource_name = (char *) xmalloc (len + 1);
 -      bcopy (resource_name, xim_inst->resource_name, len + 1);
 +      memcpy (xim_inst->resource_name, resource_name, len + 1);
        XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
                                      resource_name, EMACS_CLASS,
                                      xim_instantiate_callback,
  /* Close the connection to the XIM server on display DPYINFO. */
  
  static void
 -xim_close_dpy (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +xim_close_dpy (struct x_display_info *dpyinfo)
  {
  #ifdef HAVE_XIM
    if (use_xim)
     from its current recorded position values and gravity.  */
  
  void
 -x_calc_absolute_position (f)
 -     struct frame *f;
 +x_calc_absolute_position (struct frame *f)
  {
    int flags = f->size_hint_flags;
  
     which means, do adjust for borders but don't change the gravity.  */
  
  void
 -x_set_offset (f, xoff, yoff, change_gravity)
 -     struct frame *f;
 -     register int xoff, yoff;
 -     int change_gravity;
 +x_set_offset (struct frame *f, register int xoff, register int yoff, int change_gravity)
  {
    int modified_top, modified_left;
  
     http://freedesktop.org/wiki/Specifications/wm-spec.  */
  
  static int
 -wm_supports (f, atomname)
 -     struct frame *f;
 -     const char *atomname;
 +wm_supports (struct frame *f, const char *atomname)
  {
    Atom actual_type;
    unsigned long actual_size, bytes_remaining;
  }
  
  static void
 -set_wm_state (frame, add, what, what2)
 -     Lisp_Object frame;
 -     int add;
 -     const char *what;
 -     const char *what2;
 +set_wm_state (Lisp_Object frame, int add, const char *what, const char *what2)
  {
    const char *atom = "_NET_WM_STATE";
    Fx_send_client_event (frame, make_number (0), frame,
  }
  
  void
 -x_set_sticky (f, new_value, old_value)
 -     struct frame *f;
 -     Lisp_Object new_value, old_value;
 +x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
  {
    Lisp_Object frame;
  
  /* Do fullscreen as specified in extended window manager hints */
  
  static int
 -do_ewmh_fullscreen (f)
 -     struct frame *f;
 +do_ewmh_fullscreen (struct frame *f)
  {
    int have_net_atom = wm_supports (f, "_NET_WM_STATE");
  
        set_wm_state (frame, 0, fs, NULL);
        set_wm_state (frame, 0, fh, NULL);
        set_wm_state (frame, 0, fw, NULL);
 -      
 +
        /* If there are _NET_ atoms we assume we have extended window manager
           hints.  */
        switch (f->want_fullscreen)
  }
  
  static void
 -XTfullscreen_hook (f)
 -     FRAME_PTR f;
 +XTfullscreen_hook (FRAME_PTR f)
  {
    if (f->async_visible)
      {
  
  
  static void
 -x_handle_net_wm_state (f, event)
 -     struct frame *f;
 -     XPropertyEvent *event;
 +x_handle_net_wm_state (struct frame *f, XPropertyEvent *event)
  {
    Atom actual_type;
    unsigned long actual_size, bytes_remaining;
    for (i = 0; i < actual_size; ++i)
      {
        Atom a = ((Atom*)tmp_data)[i];
 -      if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) 
 +      if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
          {
            if (value == FULLSCREEN_HEIGHT)
              value = FULLSCREEN_MAXIMIZED;
      }
  
    lval = Qnil;
 -  switch (value) 
 +  switch (value)
      {
      case FULLSCREEN_WIDTH:
        lval = Qfullwidth;
        lval = Qmaximized;
        break;
      }
 -      
 +
    store_frame_param (f, Qfullscreen, lval);
    store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
  
  /* Check if we need to resize the frame due to a fullscreen request.
     If so needed, resize the frame. */
  static void
 -x_check_fullscreen (f)
 -     struct frame *f;
 +x_check_fullscreen (struct frame *f)
  {
    if (do_ewmh_fullscreen (f))
      return;
          case FULLSCREEN_HEIGHT:
            height = x_display_pixel_height (dpyinfo);
          }
 -      
 +
        if (FRAME_COLS (f) != width || FRAME_LINES (f) != height)
          {
            change_frame_size (f, height, width, 0, 1, 0);
     compensate by moving the window right and down by the proper amount.  */
  
  static void
 -x_check_expected_move (f, expected_left, expected_top)
 -     struct frame *f;
 -     int expected_left;
 -     int expected_top;
 +x_check_expected_move (struct frame *f, int expected_left, int expected_top)
  {
    int current_left = 0, current_top = 0;
  
     of an exact comparison.  */
  
  static void
 -x_sync_with_move (f, left, top, fuzzy)
 -    struct frame *f;
 -    int left, top, fuzzy;
 +x_sync_with_move (struct frame *f, int left, int top, int fuzzy)
  {
    int count = 0;
  
  
  /* Wait for an event on frame F matching EVENTTYPE.  */
  void
 -x_wait_for_event (f, eventtype)
 -     struct frame *f;
 -     int eventtype;
 +x_wait_for_event (struct frame *f, int eventtype)
  {
    int level = interrupt_input_blocked;
  
  
        FD_ZERO (&fds);
        FD_SET (fd, &fds);
 -      
 +
        EMACS_GET_TIME (time_now);
        EMACS_SUB_TIME (tmo, tmo_at, time_now);
  
     size changes.  Otherwise we leave the window gravity unchanged.  */
  
  static void
 -x_set_window_size_1 (f, change_gravity, cols, rows)
 -     struct frame *f;
 -     int change_gravity;
 -     int cols, rows;
 +x_set_window_size_1 (struct frame *f, int change_gravity, int cols, int rows)
  {
    int pixelwidth, pixelheight;
  
    f->scroll_bar_actual_width
      = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
         ? 0
 -       : FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0
 -       ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)
 -       : (FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)));
 +       : FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f));
  
    compute_fringe_widths (f, 0);
  
     Otherwise we leave the window gravity unchanged.  */
  
  void
 -x_set_window_size (f, change_gravity, cols, rows)
 -     struct frame *f;
 -     int change_gravity;
 -     int cols, rows;
 +x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
  {
    BLOCK_INPUT;
  
    if (NILP (tip_frame) || XFRAME (tip_frame) != f)
      {
        int r, c;
 -        
 +
        /* When the frame is maximized/fullscreen or running under for
           example Xmonad, x_set_window_size_1 will be a no-op.
           In that case, the right thing to do is extend rows/cols to
  /* Mouse warping.  */
  
  void
 -x_set_mouse_position (f, x, y)
 -     struct frame *f;
 -     int x, y;
 +x_set_mouse_position (struct frame *f, int x, int y)
  {
    int pix_x, pix_y;
  
  /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F.  */
  
  void
 -x_set_mouse_pixel_position (f, pix_x, pix_y)
 -     struct frame *f;
 -     int pix_x, pix_y;
 +x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
  {
    BLOCK_INPUT;
  
  /* focus shifting, raising and lowering.  */
  
  void
 -x_focus_on_frame (f)
 -     struct frame *f;
 +x_focus_on_frame (struct frame *f)
  {
  #if 0
    /* I don't think that the ICCCM allows programs to do things like this
  }
  
  void
 -x_unfocus_frame (f)
 -     struct frame *f;
 +x_unfocus_frame (struct frame *f)
  {
  #if 0
    /* Look at the remarks in x_focus_on_frame.  */
  /* Raise frame F.  */
  
  void
 -x_raise_frame (f)
 -     struct frame *f;
 +x_raise_frame (struct frame *f)
  {
    BLOCK_INPUT;
    if (f->async_visible)
  /* Lower frame F.  */
  
  void
 -x_lower_frame (f)
 -     struct frame *f;
 +x_lower_frame (struct frame *f)
  {
    if (f->async_visible)
      {
  /* Activate frame with Extended Window Manager Hints */
  
  void
 -x_ewmh_activate_frame (f)
 -     FRAME_PTR f;
 +x_ewmh_activate_frame (FRAME_PTR f)
  {
    /* See Window Manager Specification/Extended Window Manager Hints at
       http://freedesktop.org/wiki/Specifications/wm-spec  */
  }
  
  static void
 -XTframe_raise_lower (f, raise_flag)
 -     FRAME_PTR f;
 -     int raise_flag;
 +XTframe_raise_lower (FRAME_PTR f, int raise_flag)
  {
    if (raise_flag)
      x_raise_frame (f);
  /* XEmbed implementation.  */
  
  void
 -xembed_set_info (f, flags)
 -     struct frame *f;
 -     enum xembed_info flags;
 +xembed_set_info (struct frame *f, enum xembed_info flags)
  {
    Atom atom;
    unsigned long data[2];
  }
  
  void
 -xembed_send_message (f, time, message, detail, data1, data2)
 -     struct frame *f;
 -     Time time;
 -     enum xembed_message message;
 -     long detail;
 -     long data1;
 -     long data2;
 +xembed_send_message (struct frame *f, Time time, enum xembed_message message, long int detail, long int data1, long int data2)
  {
    XEvent event;
  
     finishes with it.  */
  
  void
 -x_make_frame_visible (f)
 -     struct frame *f;
 +x_make_frame_visible (struct frame *f)
  {
    Lisp_Object type;
    int original_top, original_left;
            /* It could be confusing if a real alarm arrives while
               processing the fake one.  Turn it off and let the
               handler reset it.  */
 -          extern void poll_for_input_1 P_ ((void));
 +            extern void poll_for_input_1 (void);
            int old_poll_suppress_count = poll_suppress_count;
            poll_suppress_count = 1;
            poll_for_input_1 ();
  /* Make the frame visible (mapped and not iconified).  */
  
  void
 -x_make_frame_invisible (f)
 -     struct frame *f;
 +x_make_frame_invisible (struct frame *f)
  {
    Window window;
  
  /* Change window state from mapped to iconified.  */
  
  void
 -x_iconify_frame (f)
 -     struct frame *f;
 +x_iconify_frame (struct frame *f)
  {
    int result;
    Lisp_Object type;
  /* Free X resources of frame F.  */
  
  void
 -x_free_frame_resources (f)
 -     struct frame *f;
 +x_free_frame_resources (struct frame *f)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
    Lisp_Object bar;
  /* Destroy the X window of frame F.  */
  
  void
 -x_destroy_window (f)
 -     struct frame *f;
 +x_destroy_window (struct frame *f)
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
  
  
  #ifndef USE_GTK
  void
 -x_wm_set_size_hint (f, flags, user_position)
 -     struct frame *f;
 -     long flags;
 -     int user_position;
 +x_wm_set_size_hint (struct frame *f, long flags, int user_position)
  {
    XSizeHints size_hints;
    Window window = FRAME_OUTER_WINDOW (f);
  /* Used for IconicState or NormalState */
  
  void
 -x_wm_set_window_state (f, state)
 -     struct frame *f;
 -     int state;
 +x_wm_set_window_state (struct frame *f, int state)
  {
  #ifdef USE_X_TOOLKIT
    Arg al[1];
  }
  
  void
 -x_wm_set_icon_pixmap (f, pixmap_id)
 -     struct frame *f;
 -     int pixmap_id;
 +x_wm_set_icon_pixmap (struct frame *f, int pixmap_id)
  {
    Pixmap icon_pixmap, icon_mask;
  
  }
  
  void
 -x_wm_set_icon_position (f, icon_x, icon_y)
 -     struct frame *f;
 -     int icon_x, icon_y;
 +x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
  {
    Window window = FRAME_OUTER_WINDOW (f);
  
     font table.  */
  
  static void
 -x_check_font (f, font)
 -     struct frame *f;
 -     struct font *font;
 +x_check_font (struct frame *f, struct font *font)
  {
    Lisp_Object frame;
  
@@@ -9609,7 -9955,8 +9609,7 @@@ static int x_session_initialized
  /* Test whether two display-name strings agree up to the dot that separates
     the screen number from the server number.  */
  static int
 -same_x_server (name1, name2)
 -     const char *name1, *name2;
 +same_x_server (const char *name1, const char *name2)
  {
    int seen_colon = 0;
    const unsigned char *system_name = SDATA (Vsystem_name);
     get to the first bit.  With MASK 0x7e0, *BITS is set to 6, and *OFFSET
     to 5.  */
  static void
 -get_bits_and_offset (mask, bits, offset)
 -     unsigned long mask;
 -     int *bits;
 -     int *offset;
 +get_bits_and_offset (long unsigned int mask, int *bits, int *offset)
  {
    int nr = 0;
    int off = 0;
     But don't permanently open it, just test its availability.  */
  
  int
 -x_display_ok (display)
 -    const char *display;
 +x_display_ok (const char *display)
  {
      int dpy_ok = 1;
      Display *dpy;
  
  #ifdef USE_GTK
  static void
 -my_log_handler (log_domain, log_level, message, user_data)
 -     const gchar *log_domain;
 -     GLogLevelFlags log_level;
 -     const gchar *message;
 -     gpointer user_data;
 +my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
  {
    if (!strstr (message, "g_set_prgname"))
        fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message);
  }
  #endif
 -  
 +
  /* Open a connection to X display DISPLAY_NAME, and return
     the structure that describes the open display.
     If we cannot contact the display, return null.  */
  
  struct x_display_info *
 -x_term_init (display_name, xrm_option, resource_name)
 -     Lisp_Object display_name;
 -     char *xrm_option;
 -     char *resource_name;
 +x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
  {
    int connection;
    Display *dpy;
      char *argv[NUM_ARGV];
      char **argv2 = argv;
      guint id;
 -#ifndef HAVE_GTK_MULTIDISPLAY
 -    if (!EQ (Vinitial_window_system, Qx))
 -      error ("Sorry, you cannot connect to X servers with the GTK toolkit");
 -#endif
  
      if (x_initialized++ > 1)
        {
 -#ifdef HAVE_GTK_MULTIDISPLAY
 -        /* Opening another display.  If xg_display_open returns less
 -           than zero, we are probably on GTK 2.0, which can only handle
 -           one display.  GTK 2.2 or later can handle more than one.  */
 -        if (xg_display_open (SDATA (display_name), &dpy) < 0)
 -#endif
 -          error ("Sorry, this version of GTK can only handle one display");
 +        xg_display_open (SDATA (display_name), &dpy);
        }
      else
        {
    /* We have definitely succeeded.  Record the new connection.  */
  
    dpyinfo = (struct x_display_info *) xmalloc (sizeof (struct x_display_info));
 -  bzero (dpyinfo, sizeof *dpyinfo);
 +  memset (dpyinfo, 0, sizeof *dpyinfo);
  
    terminal = x_create_terminal (dpyinfo);
  
      = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE", False);
    dpyinfo->Xatom_net_window_type_tooltip
      = XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE_TOOLTIP", False);
 -  
 +  dpyinfo->Xatom_net_wm_icon_name
 +    = XInternAtom (dpyinfo->display, "_NET_WM_ICON_NAME", False);
 +  dpyinfo->Xatom_net_wm_name
 +    = XInternAtom (dpyinfo->display, "_NET_WM_NAME", False);
 +
    dpyinfo->cut_buffers_initialized = 0;
  
    dpyinfo->x_dnd_atoms_size = 8;
  
    xsettings_initialize (dpyinfo);
  
 -#ifdef subprocesses
    /* This is only needed for distinguishing keyboard and process input.  */
    if (connection != 0)
      add_keyboard_wait_descriptor (connection);
 -#endif
  
  #ifdef F_SETOWN
    fcntl (connection, F_SETOWN, getpid ());
     and without sending any more commands to the X server.  */
  
  void
 -x_delete_display (dpyinfo)
 -     struct x_display_info *dpyinfo;
 +x_delete_display (struct x_display_info *dpyinfo)
  {
    struct terminal *t;
  
  #ifdef HAVE_X_SM
          /* Close X session management when we close its display.  */
          if (t->id == 1 && x_session_have_connection ())
 -          x_session_close();
 +          x_session_close ();
  #endif
          delete_terminal (t);
          break;
     that slows us down.  */
  
  static void
 -x_process_timeouts (timer)
 -     struct atimer *timer;
 +x_process_timeouts (struct atimer *timer)
  {
    BLOCK_INPUT;
    x_timeout_atimer_activated_flag = 0;
     processed, these widgets don't behave normally.  */
  
  void
 -x_activate_timeout_atimer ()
 +x_activate_timeout_atimer (void)
  {
    BLOCK_INPUT;
    if (!x_timeout_atimer_activated_flag)
@@@ -10506,7 -10874,7 +10506,7 @@@ x_create_terminal (struct x_display_inf
  }
  
  void
 -x_initialize ()
 +x_initialize (void)
  {
    baud_rate = 19200;
  
  
  
  void
 -syms_of_xterm ()
 +syms_of_xterm (void)
  {
    x_error_message = NULL;
  
diff --combined src/xterm.h
@@@ -370,9 -370,6 +370,9 @@@ struct x_display_inf
    /* XSettings atoms and windows.  */
    Atom Xatom_xsettings_sel, Xatom_xsettings_prop, Xatom_xsettings_mgr;
    Window xsettings_window;
 +
 +  /* Frame name and icon name */
 +  Atom Xatom_net_wm_name, Xatom_net_wm_icon_name;
  };
  
  #ifdef HAVE_X_I18N
@@@ -381,13 -378,14 +381,16 @@@ extern int use_xim
  #endif
  
  /* This checks to make sure we have a display.  */
 -extern void check_x P_ ((void));
 -extern struct frame *x_window_to_frame P_ ((struct x_display_info *, int));
 +extern void check_x (void);
 +
 +extern struct frame *x_window_to_frame (struct x_display_info *, int);
  
 -extern struct frame *x_any_window_to_frame P_ ((struct x_display_info *, int));
 -extern struct frame *x_menubar_window_to_frame P_ ((struct x_display_info *,
 -                                                    XEvent *));
 -extern struct frame *x_top_window_to_frame P_ ((struct x_display_info *, int));
 +extern struct frame *x_any_window_to_frame (struct x_display_info *, int);
- extern struct frame *x_menubar_window_to_frame (struct x_display_info *, int);
++extern struct frame *x_menubar_window_to_frame (struct x_display_info *,
++                                              XEvent *);
++
 +extern struct frame *x_top_window_to_frame (struct x_display_info *, int);
  
  #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
  #define x_any_window_to_frame x_window_to_frame
@@@ -406,14 -404,14 +409,14 @@@ extern Lisp_Object x_display_name_list
  /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'.  */
  extern Lisp_Object Vx_pixel_size_width_font_regexp;
  
 -extern struct x_display_info *x_display_info_for_display P_ ((Display *));
 -extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
 -extern void x_set_frame_alpha P_ ((struct frame *));
 +extern struct x_display_info *x_display_info_for_display (Display *);
 +extern struct x_display_info *x_display_info_for_name (Lisp_Object);
 +extern void x_set_frame_alpha (struct frame *);
  
 -extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *));
 -extern int x_display_ok  P_ ((const char *));
 +extern struct x_display_info *x_term_init (Lisp_Object, char *, char *);
 +extern int x_display_ok  (const char *);
  
 -extern void select_visual P_ ((struct x_display_info *));
 +extern void select_visual (struct x_display_info *);
  
  \f
  struct font;
@@@ -664,22 -662,8 +667,22 @@@ enu
                                 FRAME_X_WINDOW (f))
  #else
  #ifdef USE_GTK
 +/* Functions not present in older Gtk+ */
 +
 +#ifndef HAVE_GTK_WIDGET_GET_WINDOW
 +#define gtk_widget_get_window(w) ((w)->window)
 +#endif
 +#ifndef HAVE_GTK_WIDGET_GET_MAPPED
 +#define gtk_widget_get_mapped(w) (GTK_WIDGET_MAPPED (w))
 +#endif
 +#ifndef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE
 +#define gtk_adjustment_get_page_size(w) ((w)->page_size)
 +#define gtk_adjustment_get_upper(w) ((w)->upper)
 +#endif
 +
  #define GTK_WIDGET_TO_X_WIN(w) \
 -  ((w) && (w)->window ? GDK_WINDOW_XWINDOW ((w)->window) : 0)
 +  ((w) && gtk_widget_get_window (w) \
 +   ? GDK_WINDOW_XWINDOW (gtk_widget_get_window (w)) : 0)
  
  #define FRAME_GTK_OUTER_WIDGET(f) ((f)->output_data.x->widget)
  #define FRAME_GTK_WIDGET(f) ((f)->output_data.x->edit_widget)
@@@ -918,168 -902,168 +921,168 @@@ struct image
  
  /* From xselect.c.  */
  
 -void x_handle_selection_notify P_ ((XSelectionEvent *));
 -void x_handle_property_notify P_ ((XPropertyEvent *));
 +void x_handle_selection_notify (XSelectionEvent *);
 +void x_handle_property_notify (XPropertyEvent *);
  
  /* From xfns.c.  */
  
 -Lisp_Object display_x_get_resource P_ ((struct x_display_info *,
 -                                      Lisp_Object, Lisp_Object,
 -                                      Lisp_Object, Lisp_Object));
 -struct frame *check_x_frame P_ ((Lisp_Object));
 +Lisp_Object display_x_get_resource (struct x_display_info *,
 +                                    Lisp_Object, Lisp_Object,
 +                                    Lisp_Object, Lisp_Object);
 +struct frame *check_x_frame (Lisp_Object);
  EXFUN (Fx_display_color_p, 1);
  EXFUN (Fx_display_grayscale_p, 1);
 -extern void x_free_gcs P_ ((struct frame *));
 +extern void x_free_gcs (struct frame *);
  
  /* From xrdb.c.  */
  
 -char *x_get_customization_string P_ ((XrmDatabase, char *, char *));
 -XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
 -int x_get_resource P_ ((XrmDatabase, char *, char *,
 -                      XrmRepresentation, XrmValue *));
 -void x_delete_display P_ ((struct x_display_info *));
 -void x_make_frame_visible P_ ((struct frame *));
 -void x_iconify_frame P_ ((struct frame *));
 -void x_wm_set_size_hint P_ ((struct frame *, long, int));
 -int x_text_icon P_ ((struct frame *, char *));
 -int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
 -void x_set_window_size P_ ((struct frame *, int, int, int));
 -void x_wm_set_window_state P_ ((struct frame *, int));
 -int x_alloc_nearest_color P_ ((struct frame *, Colormap, XColor *));
 +char *x_get_customization_string (XrmDatabase, char *, char *);
 +XrmDatabase x_load_resources (Display *, char *, char *, char *);
 +int x_get_resource (XrmDatabase, char *, char *,
 +                    XrmRepresentation, XrmValue *);
 +void x_delete_display (struct x_display_info *);
 +void x_make_frame_visible (struct frame *);
 +void x_iconify_frame (struct frame *);
 +void x_wm_set_size_hint (struct frame *, long, int);
 +int x_text_icon (struct frame *, char *);
 +int x_bitmap_icon (struct frame *, Lisp_Object);
 +void x_set_window_size (struct frame *, int, int, int);
 +void x_wm_set_window_state (struct frame *, int);
 +int x_alloc_nearest_color (struct frame *, Colormap, XColor *);
  
  /* Defined in xterm.c */
  
 -extern void cancel_mouse_face P_ ((struct frame *));
 -extern void x_scroll_bar_clear P_ ((struct frame *));
 -extern int x_text_icon P_ ((struct frame *, char *));
 -extern int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
 -extern void x_catch_errors P_ ((Display *));
 -extern void x_check_errors P_ ((Display *, char *));
 -extern int x_had_errors_p P_ ((Display *));
 -extern int x_catching_errors P_ ((void));
 -extern void x_uncatch_errors P_ ((void));
 -extern void x_clear_errors P_ ((Display *));
 -extern void x_set_window_size P_ ((struct frame *, int, int, int));
 -extern void x_set_mouse_position P_ ((struct frame *, int, int));
 -extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int));
 -extern void x_ewmh_activate_frame P_ ((struct frame *));
 -extern void x_raise_frame P_ ((struct frame *));
 -extern void x_lower_frame P_ ((struct frame *));
 -extern void x_make_frame_visible P_ ((struct frame *));
 -extern void x_make_frame_invisible P_ ((struct frame *));
 -extern void x_iconify_frame P_ ((struct frame *));
 -extern void x_free_frame_resources P_ ((struct frame *));
 -extern void x_destroy_window P_ ((struct frame *));
 -extern void x_wm_set_size_hint P_ ((struct frame *, long, int));
 -extern void x_wm_set_window_state P_ ((struct frame *, int));
 -extern void x_wm_set_icon_pixmap P_ ((struct frame *, int));
 -extern void x_delete_display P_ ((struct x_display_info *));
 -extern void x_delete_terminal P_ ((struct terminal *terminal));
 -extern void x_initialize P_ ((void));
 -extern unsigned long x_copy_color P_ ((struct frame *, unsigned long));
 +extern void cancel_mouse_face (struct frame *);
 +extern void x_scroll_bar_clear (struct frame *);
 +extern int x_text_icon (struct frame *, char *);
 +extern int x_bitmap_icon (struct frame *, Lisp_Object);
 +extern void x_catch_errors (Display *);
 +extern void x_check_errors (Display *, char *);
 +extern int x_had_errors_p (Display *);
 +extern int x_catching_errors (void);
 +extern void x_uncatch_errors (void);
 +extern void x_clear_errors (Display *);
 +extern void x_set_window_size (struct frame *, int, int, int);
 +extern void x_set_mouse_position (struct frame *, int, int);
 +extern void x_set_mouse_pixel_position (struct frame *, int, int);
 +extern void x_ewmh_activate_frame (struct frame *);
 +extern void x_raise_frame (struct frame *);
 +extern void x_lower_frame (struct frame *);
 +extern void x_make_frame_visible (struct frame *);
 +extern void x_make_frame_invisible (struct frame *);
 +extern void x_iconify_frame (struct frame *);
 +extern void x_free_frame_resources (struct frame *);
 +extern void x_destroy_window (struct frame *);
 +extern void x_wm_set_size_hint (struct frame *, long, int);
 +extern void x_wm_set_window_state (struct frame *, int);
 +extern void x_wm_set_icon_pixmap (struct frame *, int);
 +extern void x_delete_display (struct x_display_info *);
 +extern void x_delete_terminal (struct terminal *terminal);
 +extern void x_initialize (void);
 +extern unsigned long x_copy_color (struct frame *, unsigned long);
  #ifdef USE_X_TOOLKIT
  extern XtAppContext Xt_app_con;
 -extern int x_alloc_lighter_color_for_widget __P ((Widget, Display*, Colormap,
 -                                                unsigned long *,
 -                                                double, int));
 -extern void x_activate_timeout_atimer P_ ((void));
 +extern int x_alloc_lighter_color_for_widget (Widget, Display*, Colormap,
 +                                             unsigned long *,
 +                                             double, int);
 +extern void x_activate_timeout_atimer (void);
  #endif
 -extern void x_query_colors P_ ((struct frame *f, XColor *, int));
 -extern void x_query_color P_ ((struct frame *f, XColor *));
 -extern void x_clear_area P_ ((Display *, Window, int, int, int, int, int));
 -extern void set_vertical_scroll_bar P_ ((struct window *));
 +extern void x_query_colors (struct frame *f, XColor *, int);
 +extern void x_query_color (struct frame *f, XColor *);
 +extern void x_clear_area (Display *, Window, int, int, int, int, int);
 +extern void set_vertical_scroll_bar (struct window *);
  
 -extern int x_dispatch_event P_ ((XEvent *, Display *));
 -extern unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *,
 -                                              unsigned));
 -extern int x_display_pixel_height P_ ((struct x_display_info *));
 -extern int x_display_pixel_width P_ ((struct x_display_info *));
 +extern int x_dispatch_event (XEvent *, Display *);
 +extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *,
 +                                            unsigned);
 +extern int x_display_pixel_height (struct x_display_info *);
 +extern int x_display_pixel_width (struct x_display_info *);
  
 -extern void x_set_sticky P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -extern void x_wait_for_event P_ ((struct frame *, int));
 +extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object);
 +extern void x_wait_for_event (struct frame *, int);
  
  /* Defined in xselect.c */
  
 -extern void x_handle_property_notify P_ ((XPropertyEvent *));
 -extern void x_handle_selection_notify P_ ((XSelectionEvent *));
 -extern void x_handle_selection_event P_ ((struct input_event *));
 -extern void x_clear_frame_selections P_ ((struct frame *));
 -
 -extern int x_handle_dnd_message P_ ((struct frame *,
 -                                     XClientMessageEvent *,
 -                                     struct x_display_info *,
 -                                     struct input_event *bufp));
 -extern int x_check_property_data P_ ((Lisp_Object));
 -extern void x_fill_property_data P_ ((Display *,
 -                                      Lisp_Object,
 -                                      void *,
 -                                      int));
 -extern Lisp_Object x_property_data_to_lisp P_ ((struct frame *,
 -                                                unsigned char *,
 -                                                Atom,
 -                                                int,
 -                                                unsigned long));
 +extern void x_handle_property_notify (XPropertyEvent *);
 +extern void x_handle_selection_notify (XSelectionEvent *);
 +extern void x_handle_selection_event (struct input_event *);
 +extern void x_clear_frame_selections (struct frame *);
 +
 +extern int x_handle_dnd_message (struct frame *,
 +                                 XClientMessageEvent *,
 +                                 struct x_display_info *,
 +                                 struct input_event *bufp);
 +extern int x_check_property_data (Lisp_Object);
 +extern void x_fill_property_data (Display *,
 +                                  Lisp_Object,
 +                                  void *,
 +                                  int);
 +extern Lisp_Object x_property_data_to_lisp (struct frame *,
 +                                            unsigned char *,
 +                                            Atom,
 +                                            int,
 +                                            unsigned long);
  
  /* Defined in xfns.c */
  
 -extern struct x_display_info * check_x_display_info P_ ((Lisp_Object frame));
 +extern struct x_display_info * check_x_display_info (Lisp_Object frame);
  
  #ifdef USE_GTK
 -extern int xg_set_icon P_ ((struct frame *, Lisp_Object));
 -extern int xg_set_icon_from_xpm_data P_ ((struct frame *, char**));
 +extern int xg_set_icon (struct frame *, Lisp_Object);
 +extern int xg_set_icon_from_xpm_data (struct frame *, char**);
  #endif /* USE_GTK */
  
 -extern void x_real_positions P_ ((struct frame *, int *, int *));
 -extern int defined_color P_ ((struct frame *, char *, XColor *, int));
 -extern void x_set_border_pixel P_ ((struct frame *, int));
 -extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -extern void x_implicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
 -extern void xic_free_xfontset P_ ((struct frame *));
 -extern void create_frame_xic P_ ((struct frame *));
 -extern void destroy_frame_xic P_ ((struct frame *));
 -extern void xic_set_preeditarea P_ ((struct window *, int, int));
 -extern void xic_set_statusarea P_ ((struct frame *));
 -extern void xic_set_xfontset P_ ((struct frame *, char *));
 -extern int x_pixel_width P_ ((struct frame *));
 -extern int x_pixel_height P_ ((struct frame *));
 -extern int x_char_width P_ ((struct frame *));
 -extern int x_char_height P_ ((struct frame *));
 -extern int x_screen_planes P_ ((struct frame *));
 -extern void x_sync P_ ((struct frame *));
 -extern int x_defined_color P_ ((struct frame *, char *, XColor *, int));
 +extern void x_real_positions (struct frame *, int *, int *);
 +extern int defined_color (struct frame *, char *, XColor *, int);
 +extern void x_set_border_pixel (struct frame *, int);
 +extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 +extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 +extern void xic_free_xfontset (struct frame *);
 +extern void create_frame_xic (struct frame *);
 +extern void destroy_frame_xic (struct frame *);
 +extern void xic_set_preeditarea (struct window *, int, int);
 +extern void xic_set_statusarea (struct frame *);
 +extern void xic_set_xfontset (struct frame *, char *);
 +extern int x_pixel_width (struct frame *);
 +extern int x_pixel_height (struct frame *);
 +extern int x_char_width (struct frame *);
 +extern int x_char_height (struct frame *);
 +extern int x_screen_planes (struct frame *);
 +extern void x_sync (struct frame *);
 +extern int x_defined_color (struct frame *, char *, XColor *, int);
  #ifdef HAVE_X_I18N
 -extern void free_frame_xic P_ ((struct frame *));
 +extern void free_frame_xic (struct frame *);
  #endif
 -extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 +extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
  
  /* Defined in xfaces.c */
  
 -extern int compute_glyph_face P_ ((struct frame *, int, int));
 -extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int));
 -extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap,
 -                                 unsigned long *, int));
 +extern int compute_glyph_face (struct frame *, int, int);
 +extern int compute_glyph_face_1 (struct frame *, Lisp_Object, int);
 +extern void x_free_dpy_colors (Display *, Screen *, Colormap,
 +                               unsigned long *, int);
  
  /* Defined in xmenu.c */
  
 -extern void x_menu_set_in_use P_ ((int));
 -extern void x_menu_wait_for_event P_ ((void *data));
 -extern void x_activate_menubar P_ ((struct frame *));
 -extern int popup_activated P_ ((void));
 -extern void initialize_frame_menubar P_ ((struct frame *));
 -extern void free_frame_menubar P_ ((struct frame *));
 +extern void x_menu_set_in_use (int);
 +extern void x_menu_wait_for_event (void *data);
 +extern void x_activate_menubar (struct frame *);
 +extern int popup_activated (void);
 +extern void initialize_frame_menubar (struct frame *);
 +extern void free_frame_menubar (struct frame *);
  
  /* Defined in widget.c */
  
  #ifdef USE_X_TOOLKIT
 -extern void widget_store_internal_border P_ ((Widget));
 +extern void widget_store_internal_border (Widget);
  #endif
  
  /* Defined in xsmfns.c */
  #ifdef HAVE_X_SM
 -extern void x_session_initialize P_ ((struct x_display_info *dpyinfo));
 -extern int x_session_check_input P_ ((struct input_event *bufp));
 -extern int x_session_have_connection P_ ((void));
 -extern void x_session_close P_ ((void));
 +extern void x_session_initialize (struct x_display_info *dpyinfo);
 +extern int x_session_check_input (struct input_event *bufp);
 +extern int x_session_have_connection (void);
 +extern void x_session_close (void);
  #endif
  
  /* XEmbed implementation.  */
@@@ -1132,10 -1116,10 +1135,10 @@@ enum xembed_accelerato
  
  /* Defined in xterm.c */
  
 -extern void xembed_set_info P_ ((struct frame *f, enum xembed_info flags));
 -extern void xembed_send_message P_ ((struct frame *f, Time time,
 -                                   enum xembed_message message,
 -                                   long detail, long data1, long data2));
 +extern void xembed_set_info (struct frame *f, enum xembed_info flags);
 +extern void xembed_send_message (struct frame *f, Time time,
 +                                 enum xembed_message message,
 +                                 long detail, long data1, long data2);
  
  /* Is the frame embedded into another application? */