changeset 85973:d3e87ee5aa0e

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-923
author Miles Bader <miles@gnu.org>
date Fri, 09 Nov 2007 09:45:30 +0000
parents 51aa47312c4b (current diff) 30ba92a68228 (diff)
children 403aa95593fa
files admin/FOR-RELEASE doc/emacs/ChangeLog doc/emacs/building.texi doc/misc/widget.texi etc/NEWS.22 leim/Makefile.in lisp/ChangeLog lisp/dired-aux.el lisp/ediff-hook.el lisp/emacs-lisp/elp.el lisp/follow.el lisp/gnus/ChangeLog lisp/gnus/gnus-sum.el lisp/gnus/qp.el lisp/loadhist.el lisp/msb.el lisp/net/tls.el lisp/progmodes/gdb-ui.el lisp/progmodes/gud.el lisp/savehist.el lisp/server.el lisp/ses.el lisp/shadowfile.el lisp/strokes.el lisp/uniquify.el lisp/whitespace.el src/ChangeLog src/dispextern.h src/emacs.c src/macfns.c src/textprop.c src/xdisp.c src/xfaces.c
diffstat 35 files changed, 582 insertions(+), 178 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Fri Nov 09 05:20:57 2007 +0000
+++ b/admin/FOR-RELEASE	Fri Nov 09 09:45:30 2007 +0000
@@ -41,6 +41,18 @@
 ** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process)
 http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg00690.html
 
+** undefined reference getopt_long
+Report by Daniel C. Bastos <dbast0s@yahoo.com.br> on bug-gnu-emacs
+from 2007-08-27.  Impossible to procede without more input from OP (as
+of 20070912, emails are bouncing) or someone else who can reproduce this.
+http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01497.html
+
+** emacs-22.1 with GTK problems (with patches)
+Only outstanding issue seems to be whether Solaris 2.6 GTK can be
+supported in the absence of recursive mutexes, via a change to
+alloc.c, or whether configure should abort.
+http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00055.html
+
 * BUGS
 
 ** Document the changes introduced by multi-tty
--- a/doc/emacs/ChangeLog	Fri Nov 09 05:20:57 2007 +0000
+++ b/doc/emacs/ChangeLog	Fri Nov 09 09:45:30 2007 +0000
@@ -1,3 +1,11 @@
+2007-11-09  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi, gnus-faq.texi, message.texi: Bump version to 5.10.9.
+
+2007-11-09  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Watch Expressions): Remove obscure sentence.
+
 2007-11-06  Kenichi Handa  <handa@ni.aist.go.jp>
 
 	* mule.texi (Select Input Method): Describe how to activate an input
@@ -15,11 +23,20 @@
 
 	* gnus.texi (Troubleshooting): Adjust Gnus version number.
 
+2007-10-30  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Watch Expressions): Describe gdb-delete-out-of-scope.
+
 2007-10-30  Glenn Morris  <rgm@gnu.org>
 
 	* misc.texi (Directory Tracking): Explain a bit more about
 	dirtrack-mode.
 
+2007-10-29  Richard Stallman  <rms@gnu.org>
+
+	* widget.texi (Introduction): Delete discussion of implementation
+	internals.
+
 2007-10-25  Glenn Morris  <rgm@gnu.org>
 
 	* fortran-xtra.texi (Fortran): F90 mode handles F2003.
--- a/doc/emacs/building.texi	Fri Nov 09 05:20:57 2007 +0000
+++ b/doc/emacs/building.texi	Fri Nov 09 09:45:30 2007 +0000
@@ -1121,6 +1121,13 @@
 scope less noticeable.  When a variable goes out of scope you can't
 edit its value.
 
+@vindex gdb-delete-out-of-scope
+  If the variable @code{gdb-delete-out-of-scope} is non-@code{nil}
+(the default value), Emacs automatically deletes watch expressions
+which go out of scope.  Sometimes, when re-entering the same function,
+it may be useful to set this value to nil so that you don't need to
+recreate the watch expression.
+
 @vindex gdb-use-colon-colon-notation
   If the variable @code{gdb-use-colon-colon-notation} is
 non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}}
--- a/doc/misc/widget.texi	Fri Nov 09 05:20:57 2007 +0000
+++ b/doc/misc/widget.texi	Fri Nov 09 09:45:30 2007 +0000
@@ -142,19 +142,6 @@
 widget library will also use the new graphic features automatically.
 @end enumerate
 
-In order to minimize the code that is loaded by users who do not
-create any widgets, the code has been split in two files:
-
-@cindex widget library, files
-@table @file
-@item widget.el
-This will declare the user variables, define the function
-@code{define-widget}, and autoload the function @code{widget-create}.
-@item wid-edit.el
-Everything else is here, there is no reason to load it explicitly, as
-it will be autoloaded when needed.
-@end table
-
 @node User Interface, Programming Example, Introduction, Top
 @comment  node-name,  next,  previous,  up
 @section User Interface
--- a/etc/NEWS.22	Fri Nov 09 05:20:57 2007 +0000
+++ b/etc/NEWS.22	Fri Nov 09 09:45:30 2007 +0000
@@ -42,15 +42,6 @@
 
 * Changes in Emacs 22.2
 
-** `browse-url-emacs' loads a URL into an Emacs buffer.  Handy for *.el URLs.
-
-** `bad-packages-alist' will warn about external packages that are known
-to cause problems in this version of Emacs.
-
-** The values of `dired-recursive-deletes' and `dired-recursive-copies'
-have been changed to `top'.  This means that the user is asked once,
-before deleting/copying the indicated directory recursively.
-
 ** In Image mode, whenever the displayed image is wider and/or higher
 than the window, the usual keys for moving the cursor cause the image
 to be scrolled horizontally or vertically instead.
@@ -67,6 +58,15 @@
 Windows to cause focus to follow the mouse will now need to explicitly set
 this variable.
 
+** `bad-packages-alist' will warn about external packages that are known
+to cause problems in this version of Emacs.
+
+** The values of `dired-recursive-deletes' and `dired-recursive-copies'
+have been changed to `top'.  This means that the user is asked once,
+before deleting/copying the indicated directory recursively.
+
+** `browse-url-emacs' loads a URL into an Emacs buffer.  Handy for *.el URLs.
+
 ** The command gdba has been removed as gdb works now for those cases where it
 was needed.  In text command mode, if you have problems before execution has
 started, use M-x gud-gdb.
@@ -106,7 +106,8 @@
 * Lisp Changes in Emacs 22.2.
 
 ** Frame-local variables are deprecated and are slated for removal.
-   Use frame parameters instead.
+Use frame parameters instead.
+
 ** The function invisible-p returns non-nil if the character
 after a specified position is invisible.
 
@@ -121,9 +122,16 @@
 ** The new function `image-refresh' refreshes all images associated
 with a given image specification.
 
-** The new function `split-string-and-unquote' does (what?)
-
-** The new function `combine-and-quote-strings' does (what?)
+** The new function `combine-and-quote-strings' concatenates a list of strings
+using a specified separator.  If a string contains double quotes, they
+are escaped in the output.
+
+** The new function `split-string-and-unquote' performs the inverse operation to
+`combine-and-quote-strings', i.e. splits a single string into a list
+of strings, undoing any quoting added by `combine-and-quote-strings'.
+(For some separator/string combinations, the original strings cannot
+be recovered.)
+
 
 * Installation Changes in Emacs 22.1
 
--- a/leim/Makefile.in	Fri Nov 09 05:20:57 2007 +0000
+++ b/leim/Makefile.in	Fri Nov 09 09:45:30 2007 +0000
@@ -255,7 +255,7 @@
 	  `id -un 2> /dev/null`; do \
 	  [ -n "$${installuser}" ] && break ; \
 	done ; \
-	find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
+	-find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
 
 clean mostlyclean:
 	rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \
--- a/lisp/ChangeLog	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/ChangeLog	Fri Nov 09 09:45:30 2007 +0000
@@ -1,3 +1,78 @@
+2007-11-09  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el (gud-gdb): Remove vestigial gdba doc and code.
+
+2007-11-09  Sven Joachim  <svenjoac@gmx.de>
+
+	* dired-aux.el (dired-copy-file-recursive):
+	Preserve directory permissions.
+
+2007-11-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* whitespace.el (whitespace-write-file-hook): Remove interactive spec.
+	(whitespace-unload-function): New-style unload function.  When run,
+	unintern `whitespace-unload-hook' and call `unload-feature' recursively
+	to stop the old hook from messing with the unloading.
+
+2007-11-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* emacs-lisp/elp.el (elp-report-limit, elp-restore-all)
+	(elp-unset-master, elp-results): Fix typos.
+	(elp-sort-by-function, elp-use-standard-output, elp-recycle-buffers-p):
+	Doc fixes.
+
+	* msb.el (msb--many-menus): Remove variable.
+	(msb-max-menu-items, msb--add-to-menu): Doc fixes.
+	(msb-menu-cond, msb-item-handling-function, msb--create-function-info)
+	(msb--toggle-menu-type): Fix typos in docstrings.
+
+	* shadowfile.el (shadow-inhibit-overload, shadow-remove-from-todo)
+	(shadow-insert-var): Doc fixes.
+	(shadow-file-match, shadow-define-cluster, shadow-define-regexp-group):
+	Reflow docstrings.
+	(shadow-parse-fullname, shadow-read-files): Fix typos in docstrings.
+
+2007-11-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* ediff-hook.el (ediff, ediff-files, ediff-buffers, ebuffers, ediff3)
+	(ediff-files3, ediff-buffers3, ebuffers3, erevision, ediff-revision):
+	Fix typos in autoload docstrings.
+
+2007-11-09  Richard Stallman  <rms@gnu.org>
+
+	* savehist.el (savehist-save): Obey savehist-ignored-variables.
+
+2007-11-09  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-delete-out-of-scope): New option.
+	(gdb-var-update-handler-1): Use it.
+
+2007-11-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* loadhist.el (unload-feature): Remove erroneous check for the
+	FEATURE-unload-function variable; check the existence of the
+	function (that's what the docstring says, and it makes more sense).
+
+	* follow.el (follow-unload-function): Add docstring.
+	(follow-unload-function): Remove variable.
+
+	* server.el (server-unload-function): Remove variable.
+	(server-unload-function): Unbind `server-edit' from `C-x #'.
+
+	* uniquify.el (uniquify-unload-function): Add docstring.
+	(uniquify-unload-function): Remove variable.
+
+	* ses.el (ses-unload-function): New function.
+
+2007-11-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* emacs-lisp/unsafep.el (unsafep, unsafep-function)
+	(unsafep-progn, unsafep-let): Fix typos in docstrings.
+
+	* uniquify.el (uniquify-maybe-rerationalize-w/o-cb): Define it
+	before use to avoid a warning in packages that require uniquify.
+	(uniquify-unload-function): New function and var.
+
 2007-11-09  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
--- a/lisp/dired-aux.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/dired-aux.el	Fri Nov 09 09:45:30 2007 +0000
@@ -1160,7 +1160,8 @@
 	     (or (eq recursive 'always)
 		 (yes-or-no-p (format "Recursive copies of %s? " from))))
 	;; This is a directory.
-	(let ((files
+	(let ((mode (file-modes from))
+	      (files
 	       (condition-case err
 		   (directory-files from nil dired-re-no-dot)
 		 (file-error
@@ -1174,7 +1175,9 @@
 	    (if (file-exists-p to)
 		(or top (dired-handle-overwrite to))
 	      (condition-case err
-		  (make-directory to)
+		  (progn
+		    (make-directory to)
+		    (set-file-modes to #o700))
 		(file-error
 		 (push (dired-make-relative from)
 		       dired-create-files-failures)
@@ -1193,7 +1196,9 @@
 		(file-error
 		 (push (dired-make-relative thisfrom)
 		       dired-create-files-failures)
-		 (dired-log "Copying error for %s:\n%s\n" thisfrom err))))))
+		 (dired-log "Copying error for %s:\n%s\n" thisfrom err)))))
+	  (when (file-directory-p to)
+	    (set-file-modes to mode)))
       ;; Not a directory.
       (or top (dired-handle-overwrite to))
       (condition-case err
--- a/lisp/ediff-hook.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/ediff-hook.el	Fri Nov 09 09:45:30 2007 +0000
@@ -261,17 +261,17 @@
     () ; if dumping, autoloads are set up in loaddefs.el
   ;; if the user decides to load this file, set up autoloads
   ;; compare files and buffers
-  (autoload 'ediff "ediff" "Compare two files" t)
-  (autoload 'ediff-files "ediff" "Compare two files" t)
-  (autoload 'ediff-buffers "ediff" "Compare two bufers" t)
-  (autoload 'ebuffers "ediff" "Compare two bufers" t)
-  (autoload 'ediff3  "ediff"  "Compare three files" t)
-  (autoload 'ediff-files3 "ediff" "Compare three files" t)
-  (autoload 'ediff-buffers3 "ediff" "Compare three bufers" t)
-  (autoload 'ebuffers3 "ediff" "Compare three bufers" t)
+  (autoload 'ediff "ediff" "Compare two files." t)
+  (autoload 'ediff-files "ediff" "Compare two files." t)
+  (autoload 'ediff-buffers "ediff" "Compare two buffers." t)
+  (autoload 'ebuffers "ediff" "Compare two buffers." t)
+  (autoload 'ediff3  "ediff"  "Compare three files." t)
+  (autoload 'ediff-files3 "ediff" "Compare three files." t)
+  (autoload 'ediff-buffers3 "ediff" "Compare three buffers." t)
+  (autoload 'ebuffers3 "ediff" "Compare three buffers." t)
 
-  (autoload 'erevision "ediff" "Compare versions of a file" t)
-  (autoload 'ediff-revision "ediff" "Compare versions of a file" t)
+  (autoload 'erevision "ediff" "Compare versions of a file." t)
+  (autoload 'ediff-revision "ediff" "Compare versions of a file." t)
 
   ;; compare regions and windows
   (autoload 'ediff-windows-wordwise
--- a/lisp/emacs-lisp/elp.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/emacs-lisp/elp.el	Fri Nov 09 09:45:30 2007 +0000
@@ -147,16 +147,16 @@
   :group 'elp)
 
 (defcustom elp-sort-by-function 'elp-sort-by-total-time
-  "*Non-nil specifies elp results sorting function.
+  "*Non-nil specifies ELP results sorting function.
 These functions are currently available:
 
   elp-sort-by-call-count   -- sort by the highest call count
   elp-sort-by-total-time   -- sort by the highest total time
   elp-sort-by-average-time -- sort by the highest average times
 
-You can write you're own sort function. It should adhere to the
-interface specified by the PRED argument for the `sort' defun.  Each
-\"element of LIST\" is really a 4 element vector where element 0 is
+You can write your own sort function.  It should adhere to the
+interface specified by the PREDICATE argument for `sort'.
+Each \"element of LIST\" is really a 4 element vector where element 0 is
 the call count, element 1 is the total time spent in the function,
 element 2 is the average time spent in the function, and element 3 is
 the symbol's name string."
@@ -164,7 +164,7 @@
   :group 'elp)
 
 (defcustom elp-report-limit 1
-  "*Prevents some functions from being displayed in the results buffer.
+  "*Prevent some functions from being displayed in the results buffer.
 If a number, no function that has been called fewer than that number
 of times will be displayed in the output buffer.  If nil, all
 functions will be displayed."
@@ -173,12 +173,12 @@
   :group 'elp)
 
 (defcustom elp-use-standard-output nil
-  "*Non-nil says to output to `standard-output' instead of a buffer."
+  "*If non-nil, output to `standard-output' instead of a buffer."
   :type 'boolean
   :group 'elp)
 
 (defcustom elp-recycle-buffers-p t
-  "*nil says to not recycle the `elp-results-buffer'.
+  "*If nil, don't recycle the `elp-results-buffer'.
 In other words, a new unique buffer is create every time you run
 \\[elp-results]."
   :type 'boolean
@@ -372,7 +372,7 @@
     (mapcar 'elp-restore-function list)))
 
 (defun elp-restore-all ()
-  "Restores the original definitions of all functions being profiled."
+  "Restore the original definitions of all functions being profiled."
   (interactive)
   (elp-restore-list elp-all-instrumented-list))
 
@@ -412,7 +412,7 @@
       (elp-instrument-function funsym)))
 
 (defun elp-unset-master ()
-  "Unsets the master function."
+  "Unset the master function."
   (interactive)
   ;; when there's no master function, recording is turned on by default.
   (setq elp-master nil
@@ -558,7 +558,7 @@
 (defun elp-results ()
   "Display current profiling results.
 If `elp-reset-after-results' is non-nil, then current profiling
-information for all instrumented functions are reset after results are
+information for all instrumented functions is reset after results are
 displayed."
   (interactive)
   (let ((curbuf (current-buffer))
--- a/lisp/emacs-lisp/unsafep.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/emacs-lisp/unsafep.el	Fri Nov 09 09:45:30 2007 +0000
@@ -116,9 +116,9 @@
 
 ;;;###autoload
 (defun unsafep (form &optional unsafep-vars)
-  "Return nil if evaluating FORM couldn't possibly do any harm;
-otherwise result is a reason why FORM is unsafe.  UNSAFEP-VARS is a list
-of symbols with local bindings."
+  "Return nil if evaluating FORM couldn't possibly do any harm.
+Otherwise result is a reason why FORM is unsafe.
+UNSAFEP-VARS is a list of symbols with local bindings."
   (catch 'unsafep
     (if (or (eq safe-functions t)	    ;User turned off safety-checking
 	    (atom form))		    ;Atoms are never unsafe
@@ -213,8 +213,8 @@
 
 (defun unsafep-function (fun)
   "Return nil if FUN is a safe function.
-\(either a safe lambda or a symbol that names a safe function).  Otherwise
-result is a reason code."
+\(Either a safe lambda or a symbol that names a safe function).
+Otherwise result is a reason code."
   (cond
    ((eq (car-safe fun) 'lambda)
     (unsafep fun unsafep-vars))
@@ -226,8 +226,8 @@
     `(function ,fun))))
 
 (defun unsafep-progn (list)
-  "Return nil if all forms in LIST are safe, or the reason
-for the first unsafe form."
+  "Return nil if all forms in LIST are safe.
+Else, return the reason for the first unsafe form."
   (catch 'unsafep-progn
     (let (reason)
       (dolist (x list)
@@ -236,8 +236,9 @@
 
 (defun unsafep-let (clause)
   "Check the safety of a let binding.
-CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL).  Checks VAL
-and throws a reason to `unsafep' if unsafe.  Returns SYM."
+CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL).
+Check VAL and throw a reason to `unsafep' if unsafe.
+Return SYM."
   (let (reason sym)
     (if (atom clause)
 	(setq sym clause)
--- a/lisp/follow.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/follow.el	Fri Nov 09 09:45:30 2007 +0000
@@ -2163,6 +2163,7 @@
 ;;{{{ The end
 
 (defun follow-unload-function ()
+  "Unload Follow mode library."
   (easy-menu-remove-item nil '("Tools") "Follow")
   (follow-stop-intercept-process-output)
   (dolist (group '((before
@@ -2189,10 +2190,9 @@
 				  (intern (concat "follow-" (symbol-name fun))))
 		(ad-update fun))
 	    (error nil))))))
+  ;; continue standard processing
   nil)
 
-(defvar follow-unload-function 'follow-unload-function)
-
 ;;
 ;; We're done!
 ;;
--- a/lisp/gnus/ChangeLog	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/gnus/ChangeLog	Fri Nov 09 09:45:30 2007 +0000
@@ -1,3 +1,7 @@
+2007-11-03  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-sum.el (gnus-summary-highlight): Mark as risky local variable.
+
 2007-11-01  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* mm-util.el (mm-charset-eval-alist): Mark as risky local variable.
@@ -21,6 +25,10 @@
 	(gnus-article-prev-page): Honor gnus-article-over-scroll when moving
 	back to the previous page.
 
+2007-10-30  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* qp.el (quoted-printable-decode-string): Fix typo in doc string.
+
 2007-10-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-ems.el (gnus-x-splash): Work even if there's no scroll bar.
--- a/lisp/gnus/gnus-sum.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/gnus/gnus-sum.el	Fri Nov 09 09:45:30 2007 +0000
@@ -1080,6 +1080,7 @@
   :group 'gnus-summary-visual
   :type '(repeat (cons (sexp :tag "Form" nil)
 		       face)))
+(put 'gnus-summary-highlight 'risky-local-variable t)
 
 (defcustom gnus-alter-header-function nil
   "Function called to allow alteration of article header structures.
--- a/lisp/gnus/qp.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/gnus/qp.el	Fri Nov 09 09:45:30 2007 +0000
@@ -82,7 +82,7 @@
 
 (defun quoted-printable-decode-string (string &optional coding-system)
   "Decode the quoted-printable encoded STRING and return the result.
-If CODING-SYSTEM is non-nil, decode the region with coding-system.
+If CODING-SYSTEM is non-nil, decode the string with coding-system.
 Use of CODING-SYSTEM is deprecated; this function should deal with
 raw bytes, and coding conversion should be done separately."
   (mm-with-unibyte-buffer
--- a/lisp/loadhist.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/loadhist.el	Fri Nov 09 09:45:30 2007 +0000
@@ -191,7 +191,7 @@
 	 (unload-func (intern-soft (concat name "-unload-function"))))
     ;; If FEATURE-unload-function is defined and returns non-nil,
     ;; don't try to do anything more; otherwise proceed normally.
-    (unless (and (bound-and-true-p unload-func)
+    (unless (and (fboundp unload-func)
 		 (funcall unload-func))
       ;; Try to avoid losing badly when hooks installed in critical
       ;; places go away.  (Some packages install things on
--- a/lisp/msb.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/msb.el	Fri Nov 09 09:45:30 2007 +0000
@@ -190,9 +190,6 @@
      3099
      "Other files (%d)")))
 
-;; msb--many-menus is obsolete
-(defvar msb--many-menus msb--very-many-menus)
-
 ;;;
 ;;; Customizable variables
 ;;;
@@ -235,12 +232,12 @@
 MENU-TITLE is really a format.  If you add %d in it, the %d is
 replaced with the number of items in that menu.
 
-ITEM-HANDLING-FN, is optional.  If it is supplied and is a function,
-than it is used for displaying the items in that particular buffer
+ITEM-HANDLING-FN is optional.  If it is supplied and is a function,
+then it is used for displaying the items in that particular buffer
 menu, otherwise the function pointed out by
 `msb-item-handling-function' is used.
 
-ITEM-SORT-FN, is also optional.
+ITEM-SORT-FN is also optional.
 If it is not supplied, the function pointed out by
 `msb-item-sort-function' is used.
 If it is nil, then no sort takes place and the buffers are presented
@@ -282,7 +279,7 @@
 (defcustom msb-max-menu-items 15
   "*The maximum number of items in a menu.
 If this variable is set to 15 for instance, then the submenu will be
-split up in minor parts, 15 items each.  nil means no limit."
+split up in minor parts, 15 items each.  A value of nil means no limit."
   :type '(choice integer (const nil))
   :set 'msb-custom-set
   :group 'msb)
@@ -336,7 +333,7 @@
   "*The appearance of a buffer menu.
 
 The default function to call for handling the appearance of a menu
-item.  It should take to arguments, BUFFER and MAX-BUFFER-NAME-LENGTH,
+item.  It should take two arguments, BUFFER and MAX-BUFFER-NAME-LENGTH,
 where the latter is the max length of all buffer names.
 
 The function should return the string to use in the menu.
@@ -664,7 +661,7 @@
 (defun msb--create-function-info (menu-cond-elt)
   "Create a vector from an element MENU-COND-ELT of `msb-menu-cond'.
 This takes the form:
-\]BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER)
+\[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER]
 See `msb-menu-cond' for a description of its elements."
   (let* ((list-symbol (make-symbol "-msb-buffer-list"))
 	 (tmp-ih (and (> (length menu-cond-elt) 3)
@@ -727,7 +724,7 @@
 (defun msb--add-to-menu (buffer function-info max-buffer-name-length)
   "Add BUFFER to the menu depicted by FUNCTION-INFO.
 All side-effects.  Adds an element of form (BUFFER-TITLE . BUFFER)
-to the buffer-list variable in function-info."
+to the buffer-list variable in FUNCTION-INFO."
   (let ((list-symbol (aref function-info 0))) ;BUFFER-LIST-VARIABLE
     ;; Here comes the hairy side-effect!
     (set list-symbol
@@ -961,7 +958,7 @@
       (msb--create-buffer-menu-2))))
 
 (defun msb--toggle-menu-type ()
-  "Multi purpose function for selecting a buffer with the mouse."
+  "Multi-purpose function for selecting a buffer with the mouse."
   (interactive)
   (setq msb-files-by-directory (not msb-files-by-directory))
   ;; This gets a warning, but it is correct,
--- a/lisp/net/tls.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/net/tls.el	Fri Nov 09 09:45:30 2007 +0000
@@ -51,6 +51,9 @@
   (autoload 'format-spec "format-spec")
   (autoload 'format-spec-make "format-spec"))
 
+(eval-when-compile
+  (require 'rx))
+
 (defgroup tls nil
   "Transport Layer Security (TLS) parameters."
   :group 'comm)
--- a/lisp/progmodes/gdb-ui.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/progmodes/gdb-ui.el	Fri Nov 09 09:45:30 2007 +0000
@@ -947,6 +947,12 @@
   :group 'gud
   :version "22.1")
 
+(defcustom gdb-delete-out-of-scope t
+  "If non-nil delete watch expressions automatically when they go out of scope."
+  :type 'boolean
+  :group 'gud
+  :version "22.2")
+
 (defun gdb-speedbar-expand-node (text token indent)
   "Expand the node the user clicked on.
 TEXT is the text of the button we clicked on, a + or - item.
@@ -3515,7 +3521,9 @@
       (when var
 	(let ((match (match-string 3)))
 	  (cond ((string-equal match "false")
-		 (setcar (nthcdr 5 var) 'out-of-scope))
+		 (if gdb-delete-out-of-scope
+		     (gdb-var-delete-1 varnum)
+		   (setcar (nthcdr 5 var) 'out-of-scope)))
 		((string-equal match "true")
 		 (setcar (nthcdr 5 var) 'changed)
 		 (setcar (nthcdr 4 var)
--- a/lisp/progmodes/gud.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/progmodes/gud.el	Fri Nov 09 09:45:30 2007 +0000
@@ -709,25 +709,14 @@
 (defvar gud-filter-pending-text nil
   "Non-nil means this is text that has been saved for later in `gud-filter'.")
 
-;; The old gdb command.  The new one is in gdb-ui.el.
+;; The old gdb command (text command mode).  The new one is in gdb-ui.el.
 ;;;###autoload
 (defun gud-gdb (command-line)
   "Run gdb on program FILE in buffer *gud-FILE*.
 The directory containing FILE becomes the initial working
-directory and source-file directory for your debugger.  By
-default this command starts GDB using a graphical interface.  See
-`gdba' for more information.
-
-To run GDB in text command mode, replace the GDB \"--annotate=3\"
-option with \"--fullname\" either in the minibuffer for the
-current Emacs session, or the custom variable
-`gud-gdb-command-name' for all future sessions.  You need to use
-text command mode to debug multiple programs within one Emacs
-session."
+directory and source-file directory for your debugger."
   (interactive (list (gud-query-cmdline 'gud-gdb)))
 
-  (require 'gdb-ui)
-
   (when (and gud-comint-buffer
 	   (buffer-name gud-comint-buffer)
 	   (get-buffer-process gud-comint-buffer)
@@ -736,8 +725,8 @@
 	(error
 	 "Multiple debugging requires restarting in text command mode"))
 
-  (gud-common-init command-line nil 'gud-gdba-marker-filter)
-  (set (make-local-variable 'gud-minor-mode) 'gdba)
+  (gud-common-init command-line nil 'gud-gdb-marker-filter)
+  (set (make-local-variable 'gud-minor-mode) 'gdb)
 
   (gud-def gud-break  "break %f:%l"  "\C-b" "Set breakpoint at current line.")
   (gud-def gud-tbreak "tbreak %f:%l" "\C-t"
--- a/lisp/savehist.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/savehist.el	Fri Nov 09 09:45:30 2007 +0000
@@ -308,7 +308,8 @@
 	       (current-buffer))
 	(insert ?\n)
 	(dolist (symbol savehist-minibuffer-history-variables)
-	  (when (boundp symbol)
+	  (when (and (boundp symbol)
+		     (not (memq symbol savehist-ignored-variables)))
 	    (let ((value (savehist-trim-history (symbol-value symbol)))
 		  excess-space)
 	      (when value		; Don't save empty histories.
--- a/lisp/server.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/server.el	Fri Nov 09 09:45:30 2007 +0000
@@ -1287,6 +1287,7 @@
 (defun server-unload-function ()
   "Unload the server library."
   (server-mode -1)
+  (substitute-key-definition 'server-edit nil ctl-x-map)
   (save-current-buffer
     (dolist (buffer (buffer-list))
       (set-buffer buffer)
@@ -1294,7 +1295,10 @@
   ;; continue standard unloading
   nil)
 
+(add-hook 'kill-emacs-hook (lambda () (server-mode -1))) ;Cleanup upon exit.
+
 (defvar server-unload-function 'server-unload-function)
+
 
 (provide 'server)
 
--- a/lisp/ses.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/ses.el	Fri Nov 09 09:45:30 2007 +0000
@@ -2921,7 +2921,7 @@
 ;;----------------------------------------------------------------------------
 
 ;;These functions use the variables 'row' and 'col' that are
-;;dynamically bound by ses-print-cell.  We define these varables at
+;;dynamically bound by ses-print-cell.  We define these variables at
 ;;compile-time to make the compiler happy.
 (eval-when-compile
   (dolist (x '(row col))
@@ -2980,6 +2980,19 @@
 (dolist (x (cons 'ses-unsafe ses-standard-printer-functions))
   (put x 'side-effect-free t))
 
+(defun ses-unload-function ()
+  "Unload the Simple Emacs Spreadsheet."
+  (dolist (fun '(copy-region-as-kill yank))
+    (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun))))
+    (ad-update fun))
+  (save-current-buffer
+    (dolist (buf (buffer-list))
+      (set-buffer buf)
+      (when (eq major-mode 'ses-mode)
+	(funcall (or default-major-mode 'fundamental-mode)))))
+  ;; continue standard unloading
+  nil)
+
 (provide 'ses)
 
 ;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3
--- a/lisp/shadowfile.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/shadowfile.el	Fri Nov 09 09:45:30 2007 +0000
@@ -103,8 +103,8 @@
 
 (defcustom shadow-inhibit-overload nil
   "If non-nil, shadowfile won't redefine \\[save-buffers-kill-emacs].
-Normally it overloads the function `save-buffers-kill-emacs' to check
-for files have been changed and need to be copied to other systems."
+Normally it overloads the function `save-buffers-kill-emacs' to check for
+files that have been changed and need to be copied to other systems."
   :type 'boolean
   :group 'shadow)
 
@@ -299,7 +299,7 @@
 
 (defun shadow-parse-fullname (fullname)
   "Parse FULLNAME into \(site user path) list.
-Leave it alone if it already is one.  Returns nil if the argument is
+Leave it alone if it already is one.  Return nil if the argument is
 not a full ange-ftp pathname."
   (if (listp fullname)
       fullname
@@ -392,9 +392,9 @@
  "Return t if PATTERN matches FILE.
 If REGEXP is supplied and non-nil, the file part of the pattern is a regular
 expression, otherwise it must match exactly.  The sites and usernames must
-match---see `shadow-same-site'.  The pattern must be in full ange-ftp format, but
-the file can be any valid filename.  This function does not do any filename
-expansion or contraction, you must do that yourself first."
+match---see `shadow-same-site'.  The pattern must be in full ange-ftp format,
+but the file can be any valid filename.  This function does not do any
+filename expansion or contraction, you must do that yourself first."
  (let* ((pattern-sup (shadow-parse-fullname pattern))
 	(file-sup (shadow-parse-name file)))
    (and (shadow-same-site pattern-sup file-sup)
@@ -412,8 +412,8 @@
 This is a group of hosts that share directories, so that copying to or from
 one of them is sufficient to update the file on all of them.  Clusters are
 defined by a name, the network address of a primary host \(the one we copy
-files to), and a regular expression that matches the hostnames of all the sites
-in the cluster."
+files to), and a regular expression that matches the hostnames of all the
+sites in the cluster."
   (interactive (list (completing-read "Cluster name: " shadow-clusters () ())))
   (let* ((old (shadow-get-cluster name))
 	 (primary (read-string "Primary host: "
@@ -469,8 +469,8 @@
   "Make each of a group of files be shared between hosts.
 Prompts for regular expression; files matching this are shared between a list
 of sites, which are also prompted for.  The filenames must be identical on all
-hosts \(if they aren't, use `shadow-define-literal-group' instead of this function).
-Each site can be either a hostname or the name of a cluster \(see
+hosts \(if they aren't, use `shadow-define-literal-group' instead of this
+function).  Each site can be either a hostname or the name of a cluster \(see
 `shadow-define-cluster')."
   (interactive)
   (let ((regexp (read-string
@@ -639,7 +639,7 @@
 
 (defun shadow-remove-from-todo (pair)
   "Remove PAIR from `shadow-files-to-copy'.
-PAIR must be (eq to) one of the elements of that list."
+PAIR must be `eq' to one of the elements of that list."
   (setq shadow-files-to-copy
 	(shadow-remove-if (function (lambda (s) (eq s pair)))
 			  shadow-files-to-copy)))
@@ -647,7 +647,7 @@
 (defun shadow-read-files ()
   "Visit and load `shadow-info-file' and `shadow-todo-file'.
 Thus restores shadowfile's state from your last Emacs session.
-Returns t unless files were locked; then returns nil."
+Return t unless files were locked; then return nil."
   (interactive)
   (if (and (fboundp 'file-locked-p)
 	   (or (stringp (file-locked-p shadow-info-file))
@@ -723,8 +723,9 @@
   (setq shadow-hashtable (make-vector 37 0)))
 
 (defun shadow-insert-var (variable)
-  "Prettily insert a `setq' command for VARIABLE,
-which, when later evaluated, will restore it to its current setting.
+  "Build a `setq' to restore VARIABLE.
+Prettily insert a `setq' command which, when later evaluated,
+will restore VARIABLE to its current setting.
 VARIABLE must be the name of a variable whose value is a list."
   (let ((standard-output (current-buffer)))
     (insert (format "(setq %s" variable))
--- a/lisp/strokes.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/strokes.el	Fri Nov 09 09:45:30 2007 +0000
@@ -1371,7 +1371,9 @@
 
 (defun strokes-alphabetic-lessp (stroke1 stroke2)
   "Return t if STROKE1's command name precedes STROKE2's in lexicographic order."
-  (string-lessp (cdr stroke1) (cdr stroke2)))
+  (let ((command-name-1 (symbol-name (cdr stroke1)))
+	(command-name-2 (symbol-name (cdr stroke2))))
+    (string-lessp command-name-1 command-name-2)))
 
 (defvar strokes-mode-map
   (let ((map (make-sparse-keymap)))
--- a/lisp/uniquify.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/uniquify.el	Fri Nov 09 09:45:30 2007 +0000
@@ -421,6 +421,23 @@
 
 ;;; Hooks from the rest of Emacs
 
+;; Buffer deletion
+;; Rerationalize after a buffer is killed, to reduce coinciding buffer names.
+;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so
+;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list
+;; ignoring the current buffer (which is going to be deleted anyway).
+(defun uniquify-maybe-rerationalize-w/o-cb ()
+  "Re-rationalize buffer names, ignoring current buffer.
+For use on `kill-buffer-hook'."
+  (if (and (cdr uniquify-managed)
+	   uniquify-buffer-name-style
+	   uniquify-after-kill-buffer-p)
+      (uniquify-rerationalize-w/o-cb uniquify-managed)))
+
+;; Ideally we'd like to add it buffer-locally, but that doesn't work
+;; because kill-buffer-hook is not permanent-local :-(
+(add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb)
+
 ;; The logical place to put all this code is in generate-new-buffer-name.
 ;; It's written in C, so we would add a generate-new-buffer-name-function
 ;; which, if non-nil, would be called instead of the C.  One problem with
@@ -458,22 +475,24 @@
 	 (file-name-nondirectory filename)
 	 (file-name-directory filename) ad-return-value))))
 
-;; Buffer deletion
-;; Rerationalize after a buffer is killed, to reduce coinciding buffer names.
-;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so
-;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list
-;; ignoring the current buffer (which is going to be deleted anyway).
-(defun uniquify-maybe-rerationalize-w/o-cb ()
-  "Re-rationalize buffer names, ignoring current buffer.
-For use on `kill-buffer-hook'."
-  (if (and (cdr uniquify-managed)
-	   uniquify-buffer-name-style
-	   uniquify-after-kill-buffer-p)
-      (uniquify-rerationalize-w/o-cb uniquify-managed)))
+;;; The End
 
-;; Ideally we'd like to add it buffer-locally, but that doesn't work
-;; because kill-buffer-hook is not permanent-local :-(
-(add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb)
+(defun uniquify-unload-function ()
+  "Unload the uniquify library."
+  (save-current-buffer
+    (let ((buffers nil))
+      (dolist (buf (buffer-list))
+	(set-buffer buf)
+	(when uniquify-managed
+	  (push (cons buf (uniquify-item-base (car uniquify-managed))) buffers)))
+      (dolist (fun '(rename-buffer create-file-buffer))
+	(ad-remove-advice fun 'after (intern (concat (symbol-name fun) "-uniquify")))
+	(ad-update fun))
+      (dolist (buf buffers)
+	(set-buffer (car buf))
+	(rename-buffer (cdr buf) t))))
+  ;; continue standard uploading
+  nil)
 
 (provide 'uniquify)
 
--- a/lisp/whitespace.el	Fri Nov 09 05:20:57 2007 +0000
+++ b/lisp/whitespace.el	Fri Nov 09 09:45:30 2007 +0000
@@ -784,7 +784,6 @@
 (defun whitespace-write-file-hook ()
   "Hook function to be called on the buffer when whitespace check is enabled.
 This is meant to be added buffer-locally to `write-file-functions'."
-  (interactive)
   (let ((werr nil))
     (if whitespace-auto-cleanup
 	(whitespace-cleanup-internal)
@@ -794,6 +793,21 @@
 		       buffer-file-name))))
   nil)
 
+(defun whitespace-unload-function ()
+  "Unload the whitespace library."
+  (if (unintern "whitespace-unload-hook")
+      ;; if whitespace-unload-hook is defined, let's get rid of it
+      ;; and recursively call `unload-feature'
+      (progn (unload-feature 'whitespace) t)
+    ;; this only happens in the recursive call
+    (whitespace-global-mode -1)
+    (save-current-buffer
+      (dolist (buf (buffer-list))
+	(set-buffer buf)
+	(remove-hook 'write-file-functions 'whitespace-write-file-hook t)))
+    ;; continue standard unloading
+    nil))
+
 (defun whitespace-unload-hook ()
   (remove-hook 'find-file-hook 'whitespace-buffer)
   (remove-hook 'write-file-functions 'whitespace-write-file-hook t)
--- a/src/ChangeLog	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/ChangeLog	Fri Nov 09 09:45:30 2007 +0000
@@ -1,3 +1,60 @@
+2007-11-09  Chong Yidong  <cyd@stupidchicken.com>
+
+	* dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE
+	twice.
+
+	* xdisp.c (handle_face_prop): Fix last change.
+
+2007-11-09  Richard Stallman  <rms@gnu.org>
+
+	* xdisp.c (handle_face_prop): Test for strings that came from overlays,
+	not just for after-strings and before-strings.
+	Call face_for_overlay_string and pass the overlay to it.
+	(handle_display_prop): Determine whether property came from an overlay.
+	Pass OVERLAY arg to handle_single_display_spec.
+	(handle_single_display_spec): New arg OVERLAY sets it->from_overlay.
+	(load_overlay_strings): Fill in it->string_overlays.
+	(get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays.
+
+	* xfaces.c (face_for_overlay_string): Function renamed from
+	face_at_buffer_position_no_overlays, and add arg OVERLAY.
+
+	* dispextern.h (struct it): New elt string_overlays.
+	New elt from_overlay, also in stack.
+	Rearrange a few elements.
+	(face_for_overlay_string): Decl renamed from
+	face_at_buffer_position_no_overlays, and add argument.
+
+2007-11-09  Richard Stallman  <rms@gnu.org>
+
+	* xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays
+	to get the base face for an overlay string.
+
+	* dispextern.h (face_at_buffer_position_no_overlays): Add decl.
+
+	* xfaces.c (face_at_buffer_position_no_overlays): New function.
+
+	* xdisp.c (handle_stop): Move some code out of loop.
+
+2007-11-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes):
+	Fix conversion from Lisp object to ATSUFontID.
+
+2007-11-09  Jason Rumney  <jasonr@gnu.org>
+
+	* xdisp.c (Fformat_mode_line): Do nothing when noninteractive.
+
+2007-11-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* unexmacosx.c (unexec_regions_recorder, unexec_regions_merge):
+	Don't assume regions are aligned to page boundary.
+	(print_load_command_name): Add LC_UUID if defined.
+
+2007-11-09  Richard Stallman  <rms@gnu.org>
+
+	* emacs.c (syms_of_emacs) <installation-directory>: Reflow docstring.
+
 2007-11-07  Jason Rumney  <jasonr@gnu.org>
 
 	* s/windows95.h: Remove.
--- a/src/dispextern.h	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/dispextern.h	Fri Nov 09 09:45:30 2007 +0000
@@ -1803,6 +1803,9 @@
   Lisp_Object height;
 };
 
+/* Input sources for fetching characters or data to display.
+   The input source is found in the `method' field.  */
+
 enum it_method {
   GET_FROM_BUFFER = 0,
   GET_FROM_DISPLAY_VECTOR,
@@ -1904,20 +1907,27 @@
      position in overlay strings etc.  */
   struct display_pos current;
 
+  /* Total number of overlay strings to process.  This can be >
+     OVERLAY_STRING_CHUNK_SIZE.  */
+  int n_overlay_strings;
+
   /* Vector of overlays to process.  Overlay strings are processed
      OVERLAY_STRING_CHUNK_SIZE at a time.  */
 #define OVERLAY_STRING_CHUNK_SIZE 16
   Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE];
 
-  /* Total number of overlay strings to process.  This can be >
-     OVERLAY_STRING_CHUNK_SIZE.  */
-  int n_overlay_strings;
+  /* For each overlay string, the overlay it came from.  */
+  Lisp_Object string_overlays[OVERLAY_STRING_CHUNK_SIZE];
 
   /* If non-nil, a Lisp string being processed.  If
      current.overlay_string_index >= 0, this is an overlay string from
      pos.  */
   Lisp_Object string;
 
+  /* If non-nil, we are processing a string that came
+     from a `display' property given by an overlay.  */
+  Lisp_Object from_overlay;
+
   /* Stack of saved values.  New entries are pushed when we begin to
      process an overlay string or a string from a `glyph' property.
      Entries are popped when we return to deliver display elements
@@ -1953,6 +1963,7 @@
     /* current text and display positions.  */
     struct text_pos position;
     struct display_pos current;
+    Lisp_Object from_overlay;
     enum glyph_row_area area;
     enum it_method method;
     unsigned multibyte_p : 1;
@@ -1969,13 +1980,6 @@
   /* Stack pointer.  */
   int sp;
 
-  /* Setting of buffer-local variable selective-display-ellipsis.  */
-  unsigned selective_display_ellipsis_p : 1;
-
-  /* 1 means control characters are translated into the form `^C'
-     where the `^' can be replaced by a display table entry.  */
-  unsigned ctl_arrow_p : 1;
-
   /* -1 means selective display hides everything between a \r and the
      next newline; > 0 means hide lines indented more than that value.  */
   int selective;
@@ -1987,6 +1991,16 @@
   /* Face to use.  */
   int face_id;
 
+  /* Setting of buffer-local variable selective-display-ellipsis.  */
+  unsigned selective_display_ellipsis_p : 1;
+
+  /* 1 means control characters are translated into the form `^C'
+     where the `^' can be replaced by a display table entry.  */
+  unsigned ctl_arrow_p : 1;
+
+  /* 1 means lines are truncated.  */
+  unsigned truncate_lines_p : 1;
+
   /* Non-zero means that the current face has a box.  */
   unsigned face_box_p : 1;
 
@@ -2066,9 +2080,6 @@
   Lisp_Object object;
   struct text_pos position;
 
-  /* 1 means lines are truncated.  */
-  unsigned truncate_lines_p : 1;
-
   /* Number of columns per \t.  */
   short tab_width;
 
@@ -2845,6 +2856,9 @@
 void recompute_basic_faces P_ ((struct frame *));
 int face_at_buffer_position P_ ((struct window *, int, int, int, int *,
 				 int, int));
+int face_for_overlay_string P_ ((struct window *, int, int,
+				 int, int *,
+				 int, int, Lisp_Object));
 int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int,
 				 int, int *, enum face_id, int));
 int merge_faces P_ ((struct frame *, Lisp_Object, int, int));
--- a/src/emacs.c	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/emacs.c	Fri Nov 09 09:45:30 2007 +0000
@@ -2510,8 +2510,9 @@
 
   DEFVAR_LISP ("installation-directory", &Vinstallation_directory,
 	       doc: /* A directory within which to look for the `lib-src' and `etc' directories.
-This is non-nil when we can't find those directories in their standard installed
-locations, but we can find them near where the Emacs executable was found.  */);
+This is non-nil when we can't find those directories in their standard
+installed locations, but we can find them near where the Emacs executable
+was found.  */);
   Vinstallation_directory = Qnil;
 
   DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale,
--- a/src/macfns.c	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/macfns.c	Fri Nov 09 09:45:30 2007 +0000
@@ -4644,8 +4644,8 @@
   Lisp_Object result;
 
   check_mac ();
-  CHECK_NUMBER_OR_FLOAT(id);
-  font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id);
+  CHECK_NUMBER_OR_FLOAT (id);
+  font_id = INTEGERP (id) ? XINT (id) : XFLOAT_DATA (id);
   BLOCK_INPUT;
   result = mac_atsu_font_face_attributes (font_id);
   UNBLOCK_INPUT;
--- a/src/textprop.c	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/textprop.c	Fri Nov 09 09:45:30 2007 +0000
@@ -713,7 +713,7 @@
   Lisp_Object overlay;
   Lisp_Object val
     = get_char_property_and_overlay (position, prop, object, &overlay);
-  return Fcons(val, overlay);
+  return Fcons (val, overlay);
 }
 
 
--- a/src/unexmacosx.c	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/unexmacosx.c	Fri Nov 09 09:45:30 2007 +0000
@@ -443,15 +443,13 @@
 
   while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
     {
-      /* Subtract the size of trailing null pages from filesize.  It
+      /* Subtract the size of trailing null bytes from filesize.  It
 	 can be smaller than vmsize in segment commands.  In such a
-	 case, trailing pages are initialized with zeros.  */
-      for (p = ranges->address + ranges->size; p > ranges->address;
-	   p -= sizeof (int))
-	if (*(((int *) p)-1))
-	  break;
-      filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address);
-      assert (filesize <= ranges->size);
+	 case, trailing bytes are initialized with zeros.  */
+      for (p = ranges->address + ranges->size; p > ranges->address; p--)
+      	if (*(((char *) p)-1))
+      	  break;
+      filesize = p - ranges->address;
 
       unexec_regions[num_unexec_regions].filesize = filesize;
       unexec_regions[num_unexec_regions++].range = *ranges;
@@ -503,11 +501,19 @@
 {
   int i, n;
   unexec_region_info r;
+  vm_size_t padsize;
 
   qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]),
 	 &unexec_regions_sort_compare);
   n = 0;
   r = unexec_regions[0];
+  padsize = r.range.address & (pagesize - 1);
+  if (padsize)
+    {
+      r.range.address -= padsize;
+      r.range.size += padsize;
+      r.filesize += padsize;
+    }
   for (i = 1; i < num_unexec_regions; i++)
     {
       if (r.range.address + r.range.size == unexec_regions[i].range.address
@@ -520,6 +526,17 @@
 	{
 	  unexec_regions[n++] = r;
 	  r = unexec_regions[i];
+	  padsize = r.range.address & (pagesize - 1);
+	  if (padsize)
+	    {
+	      if ((unexec_regions[n-1].range.address
+		   + unexec_regions[n-1].range.size) == r.range.address)
+		unexec_regions[n-1].range.size -= padsize;
+
+	      r.range.address -= padsize;
+	      r.range.size += padsize;
+	      r.filesize += padsize;
+	    }
 	}
     }
   unexec_regions[n++] = r;
@@ -562,6 +579,11 @@
     case LC_TWOLEVEL_HINTS:
       printf ("LC_TWOLEVEL_HINTS");
       break;
+#ifdef LC_UUID
+    case LC_UUID:
+      printf ("LC_UUID          ");
+      break;
+#endif
     default:
       printf ("unknown          ");
     }
--- a/src/xdisp.c	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/xdisp.c	Fri Nov 09 09:45:30 2007 +0000
@@ -954,8 +954,8 @@
 static int face_before_or_after_it_pos P_ ((struct it *, int));
 static int next_overlay_change P_ ((int));
 static int handle_single_display_spec P_ ((struct it *, Lisp_Object,
-					   Lisp_Object, struct text_pos *,
-					   int));
+					   Lisp_Object, Lisp_Object,
+					   struct text_pos *, int));
 static int underlying_face_id P_ ((struct it *));
 static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *,
 						 struct window *));
@@ -3060,16 +3060,18 @@
 	  if (it->method == GET_FROM_DISPLAY_VECTOR)
 	    handle_overlay_change_p = 0;
 
-	  /* Handle overlay changes.  */
+	  /* Handle overlay changes.
+	     This sets HANDLED to HANDLED_RECOMPUTE_PROPS
+	     if it finds overlays.  */
 	  if (handle_overlay_change_p)
 	    handled = handle_overlay_change (it);
-
-	  /* Determine where to stop next.  */
-	  if (handled == HANDLED_NORMALLY)
-	    compute_stop_pos (it);
 	}
     }
   while (handled == HANDLED_RECOMPUTE_PROPS);
+
+  /* Determine where to stop next.  */
+  if (handled == HANDLED_NORMALLY)
+    compute_stop_pos (it);
 }
 
 
@@ -3350,18 +3352,58 @@
   else
     {
       int base_face_id, bufpos;
-
-      if (it->current.overlay_string_index >= 0)
-	bufpos = IT_CHARPOS (*it);
-      else
-	bufpos = 0;
-
-      /* For strings from a buffer, i.e. overlay strings or strings
-	 from a `display' property, use the face at IT's current
-	 buffer position as the base face to merge with, so that
-	 overlay strings appear in the same face as surrounding
-	 text, unless they specify their own faces.  */
-      base_face_id = underlying_face_id (it);
+      int i;
+      Lisp_Object from_overlay
+	= (it->current.overlay_string_index >= 0
+	   ? it->string_overlays[it->current.overlay_string_index]
+	   : Qnil);
+
+      /* See if we got to this string directly or indirectly from
+	 an overlay property.  That includes the before-string or
+	 after-string of an overlay, strings in display properties
+	 provided by an overlay, their text properties, etc.
+
+	 FROM_OVERLAY is the overlay that brought us here, or nil if none.  */
+      if (! NILP (from_overlay))
+	for (i = it->sp - 1; i >= 0; i--)
+	  {
+	    if (it->stack[i].current.overlay_string_index >= 0)
+	      from_overlay
+		= it->string_overlays[it->stack[i].current.overlay_string_index];
+	    else if (! NILP (it->stack[i].from_overlay))
+	      from_overlay = it->stack[i].from_overlay;
+
+	    if (!NILP (from_overlay))
+	      break;
+	  }
+
+      if (! NILP (from_overlay))
+	{
+	  bufpos = IT_CHARPOS (*it);
+	  /* For a string from an overlay, the base face depends
+	     only on text properties and ignores overlays.  */
+	  base_face_id
+	    = face_for_overlay_string (it->w,
+				       IT_CHARPOS (*it),
+				       it->region_beg_charpos,
+				       it->region_end_charpos,
+				       &next_stop,
+				       (IT_CHARPOS (*it)
+					+ TEXT_PROP_DISTANCE_LIMIT),
+				       0,
+				       from_overlay);
+	}
+      else
+	{
+	  bufpos = 0;
+
+	  /* For strings from a `display' property, use the face at
+	     IT's current buffer position as the base face to merge
+	     with, so that overlay strings appear in the same face as
+	     surrounding text, unless they specify their own
+	     faces.  */
+	  base_face_id = underlying_face_id (it);
+	}
 
       new_face_id = face_at_string_position (it->w,
 					     it->string,
@@ -3772,7 +3814,7 @@
 handle_display_prop (it)
      struct it *it;
 {
-  Lisp_Object prop, object;
+  Lisp_Object prop, object, overlay;
   struct text_pos *position;
   /* Nonzero if some property replaces the display of the text itself.  */
   int display_replaced_p = 0;
@@ -3800,10 +3842,12 @@
   if (!it->string_from_display_prop_p)
     it->area = TEXT_AREA;
 
-  prop = Fget_char_property (make_number (position->charpos),
-			     Qdisplay, object);
+  prop = get_char_property_and_overlay (make_number (position->charpos),
+					Qdisplay, object, &overlay);
   if (NILP (prop))
     return HANDLED_NORMALLY;
+  /* Now OVERLAY is the overlay that gave us this property, or nil
+     if it was a text property.  */
 
   if (!STRINGP (it->string))
     object = it->w->buffer;
@@ -3825,7 +3869,7 @@
     {
       for (; CONSP (prop); prop = XCDR (prop))
 	{
-	  if (handle_single_display_spec (it, XCAR (prop), object,
+	  if (handle_single_display_spec (it, XCAR (prop), object, overlay,
 					  position, display_replaced_p))
 	    {
 	      display_replaced_p = 1;
@@ -3840,7 +3884,7 @@
     {
       int i;
       for (i = 0; i < ASIZE (prop); ++i)
-	if (handle_single_display_spec (it, AREF (prop, i), object,
+	if (handle_single_display_spec (it, AREF (prop, i), object, overlay,
 					position, display_replaced_p))
 	  {
 	    display_replaced_p = 1;
@@ -3852,7 +3896,8 @@
     }
   else
     {
-      int ret = handle_single_display_spec (it, prop, object, position, 0);
+      int ret = handle_single_display_spec (it, prop, object, overlay,
+					    position, 0);
       if (ret < 0)  /* Replaced by "", i.e. nothing. */
 	return HANDLED_RECOMPUTE_PROPS;
       if (ret)
@@ -3894,6 +3939,9 @@
    replaced text display with something else, for example an image;
    we ignore such properties after the first one has been processed.
 
+   OVERLAY is the overlay this `display' property came from,
+   or nil if it was a text property.
+
    If PROP is a `space' or `image' specification, and in some other
    cases too, set *POSITION to the position where the `display'
    property ends.
@@ -3903,11 +3951,12 @@
    "something" is "nothing". */
 
 static int
-handle_single_display_spec (it, spec, object, position,
+handle_single_display_spec (it, spec, object, overlay, position,
 			    display_replaced_before_p)
      struct it *it;
      Lisp_Object spec;
      Lisp_Object object;
+     Lisp_Object overlay;
      struct text_pos *position;
      int display_replaced_before_p;
 {
@@ -4017,7 +4066,7 @@
       return 0;
     }
 
-  /* Handle `(space_width WIDTH)'.  */
+  /* Handle `(space-width WIDTH)'.  */
   if (CONSP (spec)
       && EQ (XCAR (spec), Qspace_width)
       && CONSP (XCDR (spec)))
@@ -4141,6 +4190,7 @@
       it->position = start_pos;
       it->object = NILP (object) ? it->w->buffer : object;
       it->method = GET_FROM_IMAGE;
+      it->from_overlay = Qnil;
       it->face_id = face_id;
 
       /* Say that we haven't consumed the characters with
@@ -4211,6 +4261,7 @@
       it->position = *position;
       push_it (it);
       it->position = save_pos;
+      it->from_overlay = overlay;
 
       if (NILP (location))
 	it->area = TEXT_AREA;
@@ -4854,7 +4905,10 @@
   i = 0;
   j = it->current.overlay_string_index;
   while (i < OVERLAY_STRING_CHUNK_SIZE && j < n)
-    it->overlay_strings[i++] = entries[j++].string;
+    {
+      it->overlay_strings[i++] = entries[j++].string;
+      it->string_overlays[i++] = entries[j++].overlay;
+    }
 
   CHECK_IT (it);
 }
@@ -4900,6 +4954,7 @@
 	 string.  */
       IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0;
       it->string = it->overlay_strings[0];
+      it->from_overlay = Qnil;
       it->stop_charpos = 0;
       xassert (STRINGP (it->string));
       it->end_charpos = SCHARS (it->string);
@@ -4953,6 +5008,7 @@
   p->face_id = it->face_id;
   p->string = it->string;
   p->method = it->method;
+  p->from_overlay = it->from_overlay;
   switch (p->method)
     {
     case GET_FROM_IMAGE:
@@ -5006,6 +5062,7 @@
   it->current = p->current;
   it->position = p->position;
   it->string = p->string;
+  it->from_overlay = p->from_overlay;
   if (NILP (it->string))
     SET_TEXT_POS (it->current.string_pos, -1, -1);
   it->method = p->method;
@@ -17388,7 +17445,9 @@
     buffer = w->buffer;
   CHECK_BUFFER (buffer);
 
-  if (NILP (format))
+  /* Make formatting the modeline a non-op when noninteractive, otherwise
+     there will be problems later caused by a partially initialized frame.  */
+  if (NILP (format) || noninteractive)
     return empty_unibyte_string;
 
   if (no_props)
--- a/src/xfaces.c	Fri Nov 09 05:20:57 2007 +0000
+++ b/src/xfaces.c	Fri Nov 09 09:45:30 2007 +0000
@@ -7732,6 +7732,85 @@
   return lookup_face (f, attrs, 0, NULL);
 }
 
+/* Return the face ID at buffer position POS for displaying ASCII
+   characters associated with overlay strings for overlay OVERLAY.
+
+   Like face_at_buffer_position except for OVERLAY.  Currently it
+   simply disregards the `face' properties of all overlays.  */
+
+int
+face_for_overlay_string (w, pos, region_beg, region_end,
+			 endptr, limit, mouse, overlay)
+     struct window *w;
+     int pos;
+     int region_beg, region_end;
+     int *endptr;
+     int limit;
+     int mouse;
+     Lisp_Object overlay;
+{
+  struct frame *f = XFRAME (w->frame);
+  Lisp_Object attrs[LFACE_VECTOR_SIZE];
+  Lisp_Object prop, position;
+  int i, noverlays;
+  Lisp_Object *overlay_vec;
+  Lisp_Object frame;
+  int endpos;
+  Lisp_Object propname = mouse ? Qmouse_face : Qface;
+  Lisp_Object limit1, end;
+  struct face *default_face;
+
+  /* W must display the current buffer.  We could write this function
+     to use the frame and buffer of W, but right now it doesn't.  */
+  /* xassert (XBUFFER (w->buffer) == current_buffer); */
+
+  XSETFRAME (frame, f);
+  XSETFASTINT (position, pos);
+
+  endpos = ZV;
+  if (pos < region_beg && region_beg < endpos)
+    endpos = region_beg;
+
+  /* Get the `face' or `mouse_face' text property at POS, and
+     determine the next position at which the property changes.  */
+  prop = Fget_text_property (position, propname, w->buffer);
+  XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
+  end = Fnext_single_property_change (position, propname, w->buffer, limit1);
+  if (INTEGERP (end))
+    endpos = XINT (end);
+
+  *endptr = endpos;
+
+  default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
+
+  /* Optimize common cases where we can use the default face.  */
+  if (NILP (prop)
+      && !(pos >= region_beg && pos < region_end))
+    return DEFAULT_FACE_ID;
+
+  /* Begin with attributes from the default face.  */
+  bcopy (default_face->lface, attrs, sizeof attrs);
+
+  /* Merge in attributes specified via text properties.  */
+  if (!NILP (prop))
+    merge_face_ref (f, prop, attrs, 1, 0);
+
+  /* If in the region, merge in the region face.  */
+  if (pos >= region_beg && pos < region_end)
+    {
+      merge_named_face (f, Qregion, attrs, 0);
+
+      if (region_end < endpos)
+	endpos = region_end;
+    }
+
+  *endptr = endpos;
+
+  /* Look up a realized face with the given face attributes,
+     or realize a new one for ASCII characters.  */
+  return lookup_face (f, attrs, 0, NULL);
+}
+
 
 /* Compute the face at character position POS in Lisp string STRING on
    window W, for ASCII characters.