changeset 83401:03335deca80b

Merged from miles@gnu.org--gnu-2005 (patch 655) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-655 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-441
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 18 Nov 2005 14:53:14 +0000
parents 03934708f1e9 (current diff) 9d0a2cc054be (diff)
children 606eab743857
files admin/FOR-RELEASE lisp/ChangeLog lisp/faces.el lisp/font-lock.el lisp/progmodes/ada-mode.el lisp/progmodes/gdb-ui.el lisp/progmodes/idlwave.el lisp/progmodes/tcl.el lisp/simple.el lispref/ChangeLog man/ChangeLog man/emacs.texi src/xfaces.c
diffstat 55 files changed, 497 insertions(+), 206 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Fri Nov 18 13:13:34 2005 +0000
+++ b/admin/FOR-RELEASE	Fri Nov 18 14:53:14 2005 +0000
@@ -25,6 +25,9 @@
 
 ** Check what should be deleted or updated in MORE.STUFF.
 
+** Send an email to the various distributions, including the GNOME
+and KDE projects, to use the new Emacs icons in etc/images/icons.
+
 * NEW FEATURES
 
 ** Rework how fringe bitmaps are defined and used.
@@ -52,9 +55,6 @@
 
 ** Fix completion highlighting bug in partial completion mode.
 
-** Clean up the confusion about what `unspecified' means
-in the face defaults for new frames.
-
 ** TCP server processes do not work on Windows.
 
 TCP/IP server processes created with `make-network-process' consume
--- a/etc/NEWS	Fri Nov 18 13:13:34 2005 +0000
+++ b/etc/NEWS	Fri Nov 18 14:53:14 2005 +0000
@@ -4935,6 +4935,11 @@
 *** `set-fontset-font', `fontset-info', `fontset-font' now operate on
 the default fontset if the argument NAME is nil..
 
++++
+*** In `set-face-attribute', you can assign any attribute the value
+`:ignore-defface'.  This forces the attribute value to be acquired
+from some other face during face merging.
+
 ** Font-Lock changes:
 
 +++
@@ -13334,10 +13339,10 @@
 *** Custom support
 
 The variables font-lock-face-attributes, font-lock-display-type and
-font-lock-background-mode are now obsolete; the recommended way to specify the
-faces to use for Font Lock mode is with M-x customize-group on the new custom
-group font-lock-highlighting-faces.  If you set font-lock-face-attributes in
-your ~/.emacs file, Font Lock mode will respect its value.  However, you should
+font-lock-background-mode are now obsolete; the recommended way to specify
+the faces to use for Font Lock mode is with M-x customize-group on the new
+custom group font-lock-faces.  If you set font-lock-face-attributes in your
+~/.emacs file, Font Lock mode will respect its value.  However, you should
 consider converting from setting that variable to using M-x customize.
 
 You can still use X resources to specify Font Lock face appearances.
Binary file etc/images/icons/emacs_16.png has changed
Binary file etc/images/icons/emacs_24.png has changed
Binary file etc/images/icons/emacs_32.png has changed
Binary file etc/images/icons/emacs_48.png has changed
--- a/lisp/ChangeLog	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/ChangeLog	Fri Nov 18 14:53:14 2005 +0000
@@ -1,8 +1,108 @@
+2005-11-18  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el (gud-install-speedbar-variables): Bind gud-pp
+	to "p".
+	(gdb): Move definition of gud-pp to...
+
+	* progmodes/gdb-ui.el (gdb-ann3): ...here.  Make it work in the
+	speedbar.
+	(gdb-find-watch-expression): New function.
+	
+2005-11-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* faces.el (face-attribute, set-face-attribute): Mention existence
+	of `:ignore-defface' setting in docstring.
+
+2005-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* simple.el (completion-setup-function): Fix last change.
+
+2005-11-17  John Paul Wallington  <jpw@pobox.com>
+
+	* ibuf-ext.el (ibuffer-interactive-filter-by-mode):
+	Use `posn-set-point' instead of `mouse-set-point' because the
+	latter is not fbound when configured without X.
+
+	* comint.el (comint-insert-input): Likewise.
+
+2005-11-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* simple.el (hard-newline): New variable.
+	(sendmail-user-agent-compose, next-line): Use it.
+
+	* mail/sendmail.el (mail-setup, mail-send, mail-insert-from-field)
+	(sendmail-send-it, mail-do-fcc, mail-cc, mail-bcc, mail-fcc)
+	(mail-mail-reply-to, mail-mail-followup-to)
+	(mail-position-on-field, mail-signature, mail-yank-original)
+	(mail-attach-file): Likewise.
+
+	* mail/mailheader.el (mail-header-format)
+	(mail-header-format-function): Likewise.
+
+	* add-log.el (add-change-log-entry, change-log-merge): Likewise.
+
+2005-11-17  Juri Linkov  <juri@jurta.org>
+
+	* font-lock.el (font-lock-faces): Rename this defgroup from
+	`font-lock-highlighting-faces'.
+	(font-lock-comment-face, font-lock-comment-delimiter-face)
+	(font-lock-string-face, font-lock-doc-face)
+	(font-lock-keyword-face, font-lock-builtin-face)
+	(font-lock-function-name-face, font-lock-variable-name-face)
+	(font-lock-type-face, font-lock-constant-face)
+	(font-lock-warning-face, font-lock-negation-char-face)
+	(font-lock-preprocessor-face)
+	(font-lock-regexp-grouping-backslash)
+	(font-lock-regexp-grouping-construct): Rename :group from
+	`font-lock-highlighting-faces' to `font-lock-faces'.
+
+	* cus-edit.el (lisp, c, tex):
+	* progmodes/ada-mode.el (ada):
+	* progmodes/asm-mode.el (asm):
+	* progmodes/cperl-mode.el (cperl-faces):
+	* progmodes/cpp.el (cpp):
+	* progmodes/dcl-mode.el (dcl):
+	* progmodes/f90.el (f90):
+	* progmodes/fortran.el (fortran):
+	* progmodes/icon.el (icon):
+	* progmodes/idlwave.el (idlwave-misc):
+	* progmodes/m4-mode.el (m4):
+	* progmodes/make-mode.el (makefile):
+	* progmodes/meta-mode.el (meta-font):
+	* progmodes/modula2.el (modula2):
+	* progmodes/octave-mod.el (octave):
+	* progmodes/pascal.el (pascal):
+	* progmodes/perl-mode.el (perl):
+	* progmodes/prolog.el (prolog):
+	* progmodes/ps-mode.el (PostScript-edit):
+	* progmodes/scheme.el (scheme):
+	* progmodes/sh-script.el (sh-script):
+	* progmodes/simula.el (simula):
+	* progmodes/tcl.el (tcl):
+	* textmodes/nroff-mode.el (nroff):
+	* textmodes/reftex-vars.el (reftex-fontification-configurations):
+	* textmodes/sgml-mode.el (sgml):
+	* textmodes/texinfo.el (texinfo):
+	Add :link (custom-group-link font-lock-faces) to defgroup.
+
+	* hi-lock.el (hi-lock): Rename this defgroup from
+	`hi-lock-interactive-text-highlighting'.  Change parent group from
+	`faces' to `font-lock'.  Add link to the manual.
+	(hi-lock-mode, hi-lock-file-patterns-range)
+	(hi-lock-exclude-modes, hi-lock-faces): Rename :group from
+	`hi-lock-interactive-text-highlighting' to `hi-lock'.
+	(hi-lock-faces): Add :group `faces'.
+
+	* cus-edit.el (custom-variable-prompt): Clarify the code.
+
+	* faces.el (face-read-string): Set the default value arg of
+	completing-read.
+
 2005-11-16  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* rfn-eshadow.el (file-name-shadow-properties)
-	(file-name-shadow-tty-properties, file-name-shadow-mode): Remove
-	autoloads, because the file is now preloaded.
+	(file-name-shadow-tty-properties, file-name-shadow-mode):
+	Remove autoloads, because the file is now preloaded.
 
 2005-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -82,8 +182,8 @@
 2005-11-17  Nick Roberts  <nickrob@snap.net.nz>
 
 	* progmodes/gud.el (gud-speedbar-item-info): New function.
-	(gud-install-speedbar-variables): Use it to display data types
-	of watch expression as tooltips in speedbar.
+	(gud-install-speedbar-variables): Use it to display data type
+	of watch expression as a tooltip in speedbar.
 
 2005-11-15  Luc Teirlinck  <teirllm@auburn.edu>
 
@@ -254,7 +354,7 @@
 
 	* help.el (help-for-help-internal): Improve doc of C-h a.
 	(describe-key): Improve prompt; doc fix.
-	
+
 2005-11-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* vc-svn.el (vc-svn-registered): Catch all errors.
@@ -271,7 +371,7 @@
 
 2005-11-13  Nick Roberts  <nickrob@snap.net.nz>
 
-	* progmodes/gud.el (gud-menu-map):  Move parentheses (again).
+	* progmodes/gud.el (gud-menu-map): Move parentheses (again).
 	(gud-speedbar-buttons): Match on "const char *" too.
 
 	* progmodes/gdb-ui.el (gdb-var-create-handler)
@@ -490,6 +590,11 @@
 
 	* textmodes/org.el (org-export-as-html): Remove bogus (debug) form.
 
+2005-11-07  John Paul Wallington  <jpw@gnu.org>
+
+	* ibuffer.el (ibuffer): Search iconified frames too when
+	getting Ibuffer buffer's window.
+
 2005-11-06  Richard M. Stallman  <rms@gnu.org>
 
 	* progmodes/compile.el (compilation-internal-error-properties):
--- a/lisp/add-log.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/add-log.el	Fri Nov 18 14:53:14 2005 +0000
@@ -551,7 +551,7 @@
 	  (forward-line 1)
 	(insert (nth (random (length new-entries))
 		     new-entries)
-		"\n\n")
+		hard-newline hard-newline)
 	(forward-line -1)))
 
     ;; Determine where we should stop searching for a usable
@@ -584,7 +584,7 @@
 	   ;; Delete excess empty lines; make just 2.
 	   (while (and (not (eobp)) (looking-at "^\\s *$"))
 	     (delete-region (point) (line-beginning-position 2)))
-	   (insert-char ?\n 2)
+	   (insert hard-newline hard-newline)
 	   (forward-line -2)
 	   (indent-relative-maybe))
 	  (t
@@ -593,7 +593,7 @@
 	     (forward-line 1))
 	   (while (and (not (eobp)) (looking-at "^\\s *$"))
 	     (delete-region (point) (line-beginning-position 2)))
-	   (insert-char ?\n 3)
+	   (insert hard-newline hard-newline hard-newline)
 	   (forward-line -2)
 	   (indent-to left-margin)
 	   (insert "* ")
@@ -1066,7 +1066,7 @@
 			(and (= ?\n (char-before))
 			     (or (<= (1- (point)) (point-min))
 				 (= ?\n (char-before (1- (point)))))))
-	      (insert "\n"))
+	      (insert hard-newline))
 	    ;; Move to the end of it to terminate outer loop.
 	    (with-current-buffer other-buf
 	      (goto-char (point-max)))
--- a/lisp/comint.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/comint.el	Fri Nov 18 14:53:14 2005 +0000
@@ -799,7 +799,7 @@
   ;; for events without parameters.
   (interactive (list last-input-event))
   (let ((pos (point)))
-    (if event (mouse-set-point event))
+    (if event (posn-set-point (event-end event)))
     (if (not (eq (get-char-property (point) 'field) 'input))
 	;; No input at POS, fall back to the global definition.
 	(let* ((keys (this-command-keys))
--- a/lisp/cus-edit.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/cus-edit.el	Fri Nov 18 14:53:14 2005 +0000
@@ -212,11 +212,13 @@
 
 (defgroup lisp nil
   "Lisp support, including Emacs Lisp."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages
   :group 'development)
 
 (defgroup c nil
   "Support for the C language and related languages."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :link '(custom-manual "(ccmode)")
   :group 'languages)
 
@@ -323,6 +325,7 @@
 
 (defgroup tex nil
   "Code related to the TeX formatter."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'wp)
 
 (defgroup faces nil
@@ -490,15 +493,14 @@
 (defun custom-variable-prompt ()
   "Prompt for a custom variable, defaulting to the variable at point.
 Return a list suitable for use in `interactive'."
-   (let ((v (variable-at-point))
-	 (enable-recursive-minibuffers t)
-	 val)
-     (setq val (if (and (symbolp v) (custom-variable-p v))
-		   (completing-read
-		    (format "Customize option (default %s): " v) obarray
-		    'custom-variable-p t nil nil (symbol-name v))
-		 (completing-read "Customize option: " obarray
-				  'custom-variable-p t)))
+   (let* ((v (variable-at-point))
+	  (default (and (symbolp v) (custom-variable-p v) (symbol-name v)))
+	  (enable-recursive-minibuffers t)
+	  val)
+     (setq val (completing-read
+		(if default (format "Customize option (default %s): " default)
+		  "Customize option: ")
+		obarray 'custom-variable-p t nil nil default))
      (list (if (equal val "")
 	       (if (symbolp v) v nil)
 	     (intern val)))))
--- a/lisp/faces.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/faces.el	Fri Nov 18 14:53:14 2005 +0000
@@ -357,11 +357,12 @@
 If FRAME is t, report on the defaults for face FACE (for new frames).
 If FRAME is omitted or nil, use the selected frame.
 
-If INHERIT is nil, only attributes directly defined by FACE are considered,
-  so the return value may be `unspecified', or a relative value.
+If INHERIT is nil, only attributes directly defined by FACE are
+  considered, so the return value may be `unspecified',
+  `:ignore-defface', or a relative value.
 If INHERIT is non-nil, FACE's definition of ATTRIBUTE is merged with the
   faces specified by its `:inherit' attribute; however the return value
-  may still be `unspecified' or relative.
+  may still be relative.
 If INHERIT is a face or a list of faces, then the result is further merged
   with that face (or faces), until it becomes specified and absolute.
 
@@ -560,8 +561,13 @@
 attribute is changed on all frames).
 
 ARGS must come in pairs ATTRIBUTE VALUE.  ATTRIBUTE must be a valid
-face attribute name.  All attributes can be set to `unspecified';
-this fact is not further mentioned below.
+face attribute name.
+
+Unless you're certain you know what you're doing, don't set an
+attribute to `unspecified' .  To make a face ignore the attribute
+given in the defface spec, assign it the value `:ignore-defface'.
+You can do this for any attribute; this fact is not further
+mentioned below.
 
 The following attributes are recognized:
 
@@ -1019,7 +1025,7 @@
 		     (format "%s for face `%s' (default %s): "
 			     name face default)
 		   (format "%s for face `%s': " name face))
-		 completion-alist)))
+		 completion-alist nil nil nil nil default)))
     (if (equal value "") default value)))
 
 
--- a/lisp/font-lock.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/font-lock.el	Fri Nov 18 14:53:14 2005 +0000
@@ -216,7 +216,7 @@
   :link '(custom-manual "(elisp)Font Lock Mode")
   :group 'faces)
 
-(defgroup font-lock-highlighting-faces nil
+(defgroup font-lock-faces nil
   "Faces for highlighting text."
   :prefix "font-lock-"
   :group 'font-lock)
@@ -1667,7 +1667,7 @@
      )
     (t (:weight bold :slant italic)))
   "Font Lock mode face used to highlight comments."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-comment-delimiter-face
   '((default :inherit font-lock-comment-face)
@@ -1678,7 +1678,7 @@
     (((class color) (min-colors 8) (background dark))
      :foreground "red1"))
   "Font Lock mode face used to highlight comment delimiters."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-string-face
   '((((class grayscale) (background light)) (:foreground "DimGray" :slant italic))
@@ -1690,12 +1690,12 @@
     (((class color) (min-colors 8)) (:foreground "green"))
     (t (:slant italic)))
   "Font Lock mode face used to highlight strings."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-doc-face
   '((t :inherit font-lock-string-face))
   "Font Lock mode face used to highlight documentation."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-keyword-face
   '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold))
@@ -1707,7 +1707,7 @@
     (((class color) (min-colors 8)) (:foreground "cyan" :weight bold))
     (t (:weight bold)))
   "Font Lock mode face used to highlight keywords."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-builtin-face
   '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold))
@@ -1719,7 +1719,7 @@
     (((class color) (min-colors 8)) (:foreground "blue" :weight bold))
     (t (:weight bold)))
   "Font Lock mode face used to highlight builtins."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-function-name-face
   '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
@@ -1729,7 +1729,7 @@
     (((class color) (min-colors 8)) (:foreground "blue" :weight bold))
     (t (:inverse-video t :weight bold)))
   "Font Lock mode face used to highlight function names."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-variable-name-face
   '((((class grayscale) (background light))
@@ -1743,7 +1743,7 @@
     (((class color) (min-colors 8)) (:foreground "yellow" :weight light))
     (t (:weight bold :slant italic)))
   "Font Lock mode face used to highlight variable names."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-type-face
   '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold))
@@ -1755,7 +1755,7 @@
     (((class color) (min-colors 8)) (:foreground "green"))
     (t (:weight bold :underline t)))
   "Font Lock mode face used to highlight type and classes."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-constant-face
   '((((class grayscale) (background light))
@@ -1769,7 +1769,7 @@
     (((class color) (min-colors 8)) (:foreground "magenta"))
     (t (:weight bold :underline t)))
   "Font Lock mode face used to highlight constants and labels."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-warning-face
   '((((class color) (min-colors 88) (background light)) (:foreground "Red1" :weight bold))
@@ -1779,27 +1779,27 @@
     (((class color) (min-colors 8)) (:foreground "red"))
     (t (:inverse-video t :weight bold)))
   "Font Lock mode face used to highlight warnings."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-negation-char-face
   '((t nil))
   "Font Lock mode face used to highlight easy to overlook negation."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-preprocessor-face
   '((t :inherit font-lock-builtin-face))
   "Font Lock mode face used to highlight preprocessor directives."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-regexp-grouping-backslash
   '((t :inherit bold))
   "Font Lock mode face for backslashes in Lisp regexp grouping constructs."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 (defface font-lock-regexp-grouping-construct
   '((t :inherit bold))
   "Font Lock mode face used to highlight grouping constructs in Lisp regexps."
-  :group 'font-lock-highlighting-faces)
+  :group 'font-lock-faces)
 
 ;;; End of Colour etc. support.
 
--- a/lisp/gnus/ChangeLog	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/gnus/ChangeLog	Fri Nov 18 14:53:14 2005 +0000
@@ -1,3 +1,33 @@
+2005-11-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* message.el (message-courtesy-message)
+	(message-mark-insert-begin, message-mark-insert-end)
+	(message-elide-ellipsis, message-cancel-message)
+	(message-add-header, message-change-subject)
+	(message-cross-post-followup-to-header)
+	(message-cross-post-insert-note, message-reduce-to-to-cc)
+	(message-widen-reply, message-delete-not-region)
+	(message-kill-to-signature, message-insert-signature)
+	(message-insert-importance-high, message-insert-importance-low)
+	(message-insert-or-toggle-importance)
+	(message-insert-disposition-notification-to)
+	(message-indent-citation, message-yank-original)
+	(message-cite-original-without-signature, message-cite-original)
+	(message-insert-citation-line, message-position-on-field)
+	(message-fix-before-sending, message-send-mail-partially)
+	(message-send-mail, message-send-mail-with-sendmail)
+	(message-send-mail-with-qmail, message-send-news)
+	(message-check-news-header-syntax, message-generate-headers)
+	(message-insert-courtesy-copy, message-fill-address)
+	(message-fill-header, message-shorten-references)
+	(message-setup-1, message-cancel-news)
+	(message-forward-make-body-plain) (message-forward-make-body-mime)
+	(message-forward-make-body-mml) (message-encode-message-body)
+	(message-forward-make-body-digest-plain)
+	(message-forward-make-body-digest-mime)
+	(message-use-alternative-email-as-from): Insert `hard-newline'
+	instead of ordinary newlines.
+
 2005-11-09  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* message.el (message-generate-headers): Downcase the argument
--- a/lisp/gnus/message.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/gnus/message.el	Fri Nov 18 14:53:14 2005 +0000
@@ -141,7 +141,11 @@
   :group 'message-sending)
 
 (defcustom message-courtesy-message
-  "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n"
+  (concat
+   "The following message is a courtesy copy of an article"
+   hard-newline
+   "that has been posted to %s as well."
+   hard-newline hard-newline)
   "*This is inserted at the start of a mailed copy of a posted message.
 If the string contains the format spec \"%s\", the Newsgroups
 the article has been posted to will be inserted there.
@@ -339,7 +343,9 @@
 ;;; marking inserted text
 
 (defcustom message-mark-insert-begin
-  "--8<---------------cut here---------------start------------->8---\n"
+  (concat
+   "--8<---------------cut here---------------start------------->8---"
+   hard-newline)
   "How to mark the beginning of some inserted text."
   :version "22.1"
   :type 'string
@@ -347,14 +353,16 @@
   :group 'message-various)
 
 (defcustom message-mark-insert-end
-  "--8<---------------cut here---------------end--------------->8---\n"
+  (concat
+   "--8<---------------cut here---------------end--------------->8---"
+   hard-newline)
   "How to mark the end of some inserted text."
   :version "22.1"
   :type 'string
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-various)
 
-(defcustom message-archive-header "X-No-Archive: Yes\n"
+(defcustom message-archive-header "X-No-Archive: Yes"
   "Header to insert when you don't want your article to be archived.
 Archives \(such as groups.google.com\) respect this header."
   :version "22.1"
@@ -418,7 +426,8 @@
   :link '(custom-manual "(message)Various Message Variables")
   :group 'message-various)
 
-(defcustom message-elide-ellipsis "\n[...]\n\n"
+(defcustom message-elide-ellipsis
+  (concat hard-newline "[...]" hard-newline hard-newline)
   "*The string which is inserted for elided text."
   :type 'string
   :link '(custom-manual "(message)Various Commands")
@@ -578,7 +587,8 @@
   :link '(custom-manual "(message)Insertion Variables")
   :type 'regexp)
 
-(defcustom message-cancel-message "I am canceling my own article.\n"
+(defcustom message-cancel-message 
+  (concat "I am canceling my own article." hard-newline)
   "Message to be inserted in the cancel message."
   :group 'message-interface
   :link '(custom-manual "(message)Canceling News")
@@ -1734,7 +1744,7 @@
 	  (goto-char (point-max))
 	  (if (string-match "\n$" (car headers))
 	      (insert (car headers))
-	    (insert (car headers) ?\n)))))
+	    (insert (car headers) hard-newline)))))
     (setq headers (cdr headers))))
 
 (defmacro message-with-reply-buffer (&rest forms)
@@ -1841,7 +1851,7 @@
 		    (insert (concat "Subject: "
 				    new-subject
 				    " (was: "
-				    old-subject ")\n")))))))))
+				    old-subject ")" hard-newline)))))))))
 
 (defun message-mark-inserted-region (beg end)
   "Mark some region in the current article with enclosing tags.
@@ -1925,7 +1935,7 @@
 				 target-group
 				 "[ \t]*$")
 			 (message-fetch-field "Newsgroups")))
-      (insert (concat "\nFollowup-To: " target-group)))
+      (insert (concat hard-newline "Followup-To: " target-group)))
   (setq message-cross-post-old-target target-group))
 
 (defun message-cross-post-insert-note (target-group cross-post in-old
@@ -1957,8 +1967,8 @@
     (if (or in-old
 	    (not cross-post)
 	    (string-match "^[ \t]*poster[ \t]*$" target-group))
-	(insert (concat message-followup-to-note target-group "\n"))
-      (insert (concat message-cross-post-note target-group "\n")))))
+	(insert message-followup-to-note target-group hard-newline)
+      (insert message-cross-post-note target-group hard-newline))))
 
 (defun message-cross-post-followup-to (target-group)
   "Crossposts message and set Followup-To to TARGET-GROUP.
@@ -2018,7 +2028,7 @@
 	  (save-excursion
 	    (message-goto-to)
 	    (message-delete-line)
-	    (insert (concat "To: " cc-content "\n"))
+	    (insert (concat "To: " cc-content hard-newline))
 	    (save-restriction
 	      (message-narrow-to-headers)
 	      (message-remove-header (if bcc
@@ -2783,7 +2793,7 @@
 	  (message-remove-header (symbol-name (car elem)))
 	  (goto-char (point-min))
 	  (insert (symbol-name (car elem)) ": "
-		  (cdr elem) "\n"))))))
+		  (cdr elem) hard-newline))))))
 
 (defun message-insert-newsgroups ()
   "Insert the Newsgroups header from the article being replied to."
@@ -2813,7 +2823,7 @@
 				 (point)
 			       (forward-line -2)
 			       (point)))
-      (insert "\n")
+      (insert hard-newline)
       (goto-char beg)
       (delete-region beg (progn (message-goto-body)
 				(forward-line 2)
@@ -2832,7 +2842,7 @@
       (end-of-line -1))
     (kill-region point (point))
     (unless (bolp)
-      (insert "\n"))))
+      (insert hard-newline))))
 
 (defun message-newline-and-reformat (&optional arg not-break)
   "Insert four newlines, and then reformat if inside quoted text.
@@ -2974,15 +2984,15 @@
       (goto-char (point-max))
       ;; Insert the signature.
       (unless (bolp)
-	(insert "\n"))
+	(insert hard-newline))
       (when message-signature-insert-empty-line
-	(insert "\n"))
-      (insert "-- \n")
+	(insert hard-newline))
+      (insert "-- " hard-newline)
       (if (eq signature t)
 	  (insert-file-contents message-signature-file)
 	(insert signature))
       (goto-char (point-max))
-      (or (bolp) (insert "\n")))))
+      (or (bolp) (insert hard-newline)))))
 
 (defun message-insert-importance-high ()
   "Insert header to mark message as important."
@@ -2992,7 +3002,7 @@
       (message-narrow-to-headers)
       (message-remove-header "Importance"))
     (message-goto-eoh)
-    (insert "Importance: high\n")))
+    (insert "Importance: high" hard-newline)))
 
 (defun message-insert-importance-low ()
   "Insert header to mark message as unimportant."
@@ -3002,7 +3012,7 @@
       (message-narrow-to-headers)
       (message-remove-header "Importance"))
     (message-goto-eoh)
-    (insert "Importance: low\n")))
+    (insert "Importance: low" hard-newline)))
 
 (defun message-insert-or-toggle-importance ()
   "Insert a \"Importance: high\" header, or cycle through the header values.
@@ -3024,7 +3034,7 @@
 			  (t
 			   "high")))))
       (message-goto-eoh)
-      (insert (format "Importance: %s\n" new)))))
+      (insert (format "Importance: %s" new) hard-newline))))
 
 (defun message-insert-disposition-notification-to ()
   "Request a disposition notification (return receipt) to this message.
@@ -3035,10 +3045,11 @@
       (message-narrow-to-headers)
       (message-remove-header "Disposition-Notification-To"))
     (message-goto-eoh)
-    (insert (format "Disposition-Notification-To: %s\n"
+    (insert (format "Disposition-Notification-To: %s"
 		    (or (message-field-value "Reply-to")
 			(message-field-value "From")
-			(message-make-from))))))
+			(message-make-from)))
+	    hard-newline)))
 
 (defun message-elide-region (b e)
   "Elide the text in the region.
@@ -3173,7 +3184,7 @@
     ;; Delete blank lines at the end of the buffer.
     (goto-char (point-max))
     (unless (eolp)
-      (insert "\n"))
+      (insert hard-newline))
     (while (and (zerop (forward-line -1))
 		(looking-at "$"))
       (message-delete-line))
@@ -3211,7 +3222,7 @@
 	(funcall message-cite-function))
       (message-exchange-point-and-mark)
       (unless (bolp)
-	(insert ?\n))
+	(insert hard-newline))
       (unless modified
 	(setq message-checksum (message-checksum))))))
 
@@ -3269,13 +3280,13 @@
       (delete-region (point) end)
       (unless (search-backward "\n\n" start t)
 	;; Insert a blank line if it is peeled off.
-	(insert "\n")))
+	(insert hard-newline)))
     (goto-char start)
     (while functions
       (funcall (pop functions)))
     (when message-citation-line-function
       (unless (bolp)
-	(insert "\n"))
+	(insert hard-newline))
       (funcall message-citation-line-function))))
 
 (eval-when-compile (defvar mail-citation-hook))	;Compiler directive
@@ -3311,13 +3322,14 @@
 	(funcall (pop functions)))
       (when message-citation-line-function
 	(unless (bolp)
-	  (insert "\n"))
+	  (insert hard-newline))
 	(funcall message-citation-line-function)))))
 
 (defun message-insert-citation-line ()
   "Insert a simple citation line."
   (when message-reply-headers
-    (insert (mail-header-from message-reply-headers) " writes:\n\n")))
+    (insert (mail-header-from message-reply-headers)
+	    " writes:" hard-newline hard-newline)))
 
 (defun message-position-on-field (header &rest afters)
   (let ((case-fold-search t))
@@ -3343,7 +3355,7 @@
 	(when afters
 	  (re-search-forward "^[^ \t]" nil 'move)
 	  (beginning-of-line))
-	(insert header ": \n")
+	(insert header ": " hard-newline)
 	(forward-char -1)
 	nil))))
 
@@ -3539,7 +3551,7 @@
   ;; Make sure there's a newline at the end of the message.
   (goto-char (point-max))
   (unless (bolp)
-    (insert "\n"))
+    (insert hard-newline))
   ;; Make the hidden headers visible.
   (let ((points (message-text-with-property 'message-hidden)))
     (when points
@@ -3644,7 +3656,7 @@
   (goto-char (point-min))
   (re-search-forward
    (concat "^" (regexp-quote mail-header-separator) "\n"))
-  (replace-match "\n")
+  (replace-match hard-newline)
   (run-hooks 'message-send-mail-hook)
   (let ((p (goto-char (point-min)))
 	(tembuf (message-generate-new-buffer-clone-locals " message temp"))
@@ -3686,17 +3698,18 @@
 	      (message-remove-header "Message-ID")
 	      (message-remove-header "Lines")
 	      (goto-char (point-max))
-	      (insert "Mime-Version: 1.0\n")
+	      (insert "Mime-Version: 1.0" hard-newline)
 	      (setq header (buffer-string)))
 	    (goto-char (point-max))
-	    (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d\n\n"
-			    id n total))
+	    (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d"
+			    id n total)
+		    hard-newline hard-newline)
 	    (forward-char -1)
 	    (let ((mail-header-separator ""))
 	      (when (memq 'Message-ID message-required-mail-headers)
-		(insert "Message-ID: " (message-make-message-id) "\n"))
+		(insert "Message-ID: " (message-make-message-id) hard-newline))
 	      (when (memq 'Lines message-required-mail-headers)
-		(insert "Lines: " (message-make-lines) "\n"))
+		(insert "Lines: " (message-make-lines) hard-newline))
 	      (message-goto-subject)
 	      (end-of-line)
 	      (insert (format " (%d/%d)" n total))
@@ -3761,7 +3774,7 @@
 	  (goto-char (point-max))
 	  ;; require one newline at the end.
 	  (or (= (preceding-char) ?\n)
-	      (insert ?\n))
+	      (insert hard-newline))
 	  (message-cleanup-headers)
 	  ;; FIXME: we're inserting the courtesy copy after encoding.
 	  ;; This is wrong if the courtesy copy string contains
@@ -3837,7 +3850,7 @@
 	    (goto-char (point-min))
 	    (re-search-forward
 	     (concat "^" (regexp-quote mail-header-separator) "\n"))
-	    (replace-match "\n")
+	    (replace-match hard-newline)
 	    (backward-char 1)
 	    (setq delimline (point-marker))
 	    (run-hooks 'message-send-mail-hook)
@@ -3899,7 +3912,7 @@
   (goto-char (point-min))
   (re-search-forward
    (concat "^" (regexp-quote mail-header-separator) "\n"))
-  (replace-match "\n")
+  (replace-match hard-newline)
   (run-hooks 'message-send-mail-hook)
   ;; send the message
   (case
@@ -4067,13 +4080,13 @@
 	      (goto-char (point-max))
 	      ;; require one newline at the end.
 	      (or (= (preceding-char) ?\n)
-		  (insert ?\n))
+		  (insert hard-newline))
 	      (let ((case-fold-search t))
 		;; Remove the delimiter.
 		(goto-char (point-min))
 		(re-search-forward
 		 (concat "^" (regexp-quote mail-header-separator) "\n"))
-		(replace-match "\n")
+		(replace-match hard-newline)
 		(backward-char 1))
 	      (run-hooks 'message-send-news-hook)
 	      (gnus-open-server method)
@@ -4200,7 +4213,7 @@
 					     (message-tokenize-header
 					      newsgroups)))))))))
 	 (goto-char (point-min))
-	 (insert "Followup-To: " to "\n"))
+	 (insert "Followup-To: " to hard-newline))
        t))
    ;; Check "Shoot me".
    (message-check 'shoot
@@ -5099,7 +5112,7 @@
 		      ;; We check whether the value was ended by a
 		      ;; newline.  If now, we insert one.
 		      (unless (bolp)
-			(insert "\n"))
+			(insert hard-newline))
 		      (forward-line -1)))
 		;; The value of this header was empty, so we clear
 		;; totally and insert the new value.
@@ -5139,7 +5152,7 @@
 	    (beginning-of-line))
 	  (when (or (message-news-p)
 		    (string-match "@.+\\.." secure-sender))
-	    (insert "Sender: " secure-sender "\n"))))
+	    (insert "Sender: " secure-sender hard-newline))))
       ;; Check for IDNA
       (message-idna-to-ascii-rhs))))
 
@@ -5151,7 +5164,7 @@
 	(message-narrow-to-headers)
 	(when (setq newsgroups (message-fetch-field "newsgroups"))
 	  (goto-char (point-max))
-	  (insert "Posted-To: " newsgroups "\n")))
+	  (insert "Posted-To: " newsgroups hard-newline)))
       (forward-line 1)
       (when message-courtesy-message
 	(cond
@@ -5170,7 +5183,7 @@
     (insert (capitalize (symbol-name header))
 	    ": "
 	    (if (consp value) (car value) value)
-	    "\n")
+	    hard-newline)
     (narrow-to-region (point-min) (1- (point-max)))
     (let (quoted last)
       (goto-char (point-min))
@@ -5184,7 +5197,7 @@
 		  (progn
 		    (save-excursion
 		      (goto-char last)
-		      (insert "\n\t"))
+		      (insert hard-newline "\t"))
 		    (setq last (1+ (point))))
 		(setq last (1+ (point)))))
 	  (setq quoted (not quoted)))
@@ -5210,7 +5223,7 @@
     (insert (capitalize (symbol-name header))
 	    ": "
 	    (if (consp value) (car value) value)
-	    "\n")
+	    hard-newline)
     (save-restriction
       (narrow-to-region begin (point))
       (fill-region-as-paragraph begin (point))
@@ -5279,7 +5292,7 @@
     (let ((refstring (mapconcat #'identity refs " ")))
       (if (and message-this-is-news message-cater-to-broken-inn)
 	  (insert (capitalize (symbol-name header)) ": "
-		  refstring "\n")
+		  refstring hard-newline)
 	(message-fill-header header refstring)))))
 
 (defun message-position-point ()
@@ -5508,18 +5521,18 @@
   (delete-region (point) (progn (forward-line -1) (point)))
   (when message-default-headers
     (insert message-default-headers)
-    (or (bolp) (insert ?\n)))
+    (or (bolp) (insert hard-newline)))
   (put-text-property
    (point)
    (progn
-     (insert mail-header-separator "\n")
+     (insert mail-header-separator hard-newline)
      (1- (point)))
    'read-only nil)
   (forward-line -1)
   (when (message-news-p)
     (when message-default-news-headers
       (insert message-default-news-headers)
-      (or (bolp) (insert ?\n)))
+      (or (bolp) (insert hard-newline)))
     (when message-generate-headers-first
       (message-generate-headers
        (message-headers-to-generate
@@ -5530,7 +5543,7 @@
   (when (message-mail-p)
     (when message-default-mail-headers
       (insert message-default-mail-headers)
-      (or (bolp) (insert ?\n)))
+      (or (bolp) (insert hard-newline)))
     (save-restriction
       (message-narrow-to-headers)
       (if message-alternative-emails
@@ -6012,14 +6025,14 @@
 	    (message-news)
 	  (setq buf (set-buffer (get-buffer-create " *message cancel*"))))
 	(erase-buffer)
-	(insert "Newsgroups: " newsgroups "\n"
-		"From: " from "\n"
-		"Subject: cmsg cancel " message-id "\n"
-		"Control: cancel " message-id "\n"
+	(insert "Newsgroups: " newsgroups hard-newline
+		"From: " from hard-newline
+		"Subject: cmsg cancel " message-id hard-newline
+		"Control: cancel " message-id hard-newline
 		(if distribution
-		    (concat "Distribution: " distribution "\n")
+		    (concat "Distribution: " distribution hard-newline)
 		  "")
-		mail-header-separator "\n"
+		mail-header-separator hard-newline
 		message-cancel-message)
 	(run-hooks 'message-cancel-hook)
 	(unless arg
@@ -6208,7 +6221,9 @@
 
 (defun message-forward-make-body-plain (forward-buffer)
   (insert
-   "\n-------------------- Start of forwarded message --------------------\n")
+   hard-newline
+   "-------------------- Start of forwarded message --------------------"
+   hard-newline)
   (let ((b (point)) e)
     (insert
      (with-temp-buffer
@@ -6224,7 +6239,9 @@
        (buffer-string)))
     (setq e (point))
     (insert
-     "\n-------------------- End of forwarded message --------------------\n")
+     hard-newline
+     "-------------------- End of forwarded message --------------------"
+     hard-newline)
     (when message-forward-ignored-headers
       (save-restriction
 	(narrow-to-region b e)
@@ -6234,7 +6251,10 @@
 	(message-remove-header message-forward-ignored-headers t)))))
 
 (defun message-forward-make-body-mime (forward-buffer)
-  (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
+  (insert 
+   hard-newline hard-newline
+   "<#part type=message/rfc822 disposition=inline raw=t>"
+   hard-newline)
   (let ((b (point)) e)
     (save-restriction
       (narrow-to-region (point) (point))
@@ -6244,10 +6264,13 @@
 	(replace-match "X-From-Line: "))
       (goto-char (point-max)))
     (setq e (point))
-    (insert "<#/part>\n")))
+    (insert "<#/part>" hard-newline)))
 
 (defun message-forward-make-body-mml (forward-buffer)
-  (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
+  (insert 
+   hard-newline hard-newline
+   "<#mml type=message/rfc822 disposition=inline>"
+   hard-newline)
   (let ((b (point)) e)
     (if (not message-forward-decoded-p)
 	(insert
@@ -6270,7 +6293,7 @@
 	  (replace-match "X-From-Line: "))
 	(goto-char (point-max))))
     (setq e (point))
-    (insert "<#/mml>\n")
+    (insert "<#/mml>" hard-newline)
     (when (and (not message-forward-decoded-p)
 	       message-forward-ignored-headers)
       (save-restriction
@@ -6282,19 +6305,23 @@
 
 (defun message-forward-make-body-digest-plain (forward-buffer)
   (insert
-   "\n-------------------- Start of forwarded message --------------------\n")
+   hard-newline
+   "-------------------- Start of forwarded message --------------------"
+   hard-newline)
   (let ((b (point)) e)
     (mml-insert-buffer forward-buffer)
     (setq e (point))
     (insert
-     "\n-------------------- End of forwarded message --------------------\n")))
+     hard-newline
+     "-------------------- End of forwarded message --------------------"
+     hard-newline)))
 
 (defun message-forward-make-body-digest-mime (forward-buffer)
-  (insert "\n<#multipart type=digest>\n")
+  (insert hard-newline "<#multipart type=digest>" hard-newline)
   (let ((b (point)) e)
     (insert-buffer-substring forward-buffer)
     (setq e (point))
-    (insert "<#/multipart>\n")
+    (insert "<#/multipart>" hard-newline)
     (save-restriction
       (narrow-to-region b e)
       (goto-char b)
@@ -6799,7 +6826,7 @@
 	(message-narrow-to-headers-or-head)
 	(message-remove-header "Mime-Version")
 	(goto-char (point-max))
-	(insert "MIME-Version: 1.0\n")
+	(insert "MIME-Version: 1.0" hard-newline)
 	(when lines
 	  (insert lines))
 	(setq content-type-p
@@ -6819,7 +6846,7 @@
 	;; For unknown reason, MIME-Version doesn't exist.
 	(when (re-search-forward "^MIME-Version:" nil t)
 	  (forward-line 1)
-	  (insert "Content-Type: text/plain; charset=us-ascii\n"))))))
+	  (insert "Content-Type: text/plain; charset=us-ascii" hard-newline))))))
 
 (defun message-read-from-minibuffer (prompt &optional initial-contents)
   "Read from the minibuffer while providing abbrev expansion."
@@ -6848,7 +6875,7 @@
       (pop emails))
     (unless (or (not email) (equal email user-mail-address))
       (goto-char (point-max))
-      (insert "From: " email "\n"))))
+      (insert "From: " email hard-newline))))
 
 (defun message-options-get (symbol)
   (cdr (assq symbol message-options)))
--- a/lisp/hi-lock.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/hi-lock.el	Fri Nov 18 14:53:14 2005 +0000
@@ -84,9 +84,10 @@
 (eval-and-compile
   (require 'font-lock))
 
-(defgroup hi-lock-interactive-text-highlighting nil
+(defgroup hi-lock nil
   "Interactively add and remove font-lock patterns for highlighting text."
-  :group 'faces)
+  :link '(custom-manual "(emacs)Highlight Interactively")
+  :group 'font-lock)
 
 ;;;###autoload
 (defcustom hi-lock-mode nil
@@ -95,7 +96,7 @@
          (hi-lock-mode (or value 0)))
   :initialize 'custom-initialize-default
   :type 'boolean
-  :group 'hi-lock-interactive-text-highlighting
+  :group 'hi-lock
   :require 'hi-lock)
 
 (defcustom hi-lock-file-patterns-range 10000
@@ -104,7 +105,7 @@
 up to this limit are added to font-lock's patterns.  See documentation
 of functions `hi-lock-mode' and `hi-lock-find-patterns'."
   :type 'integer
-  :group 'hi-lock-interactive-text-highlighting)
+  :group 'hi-lock)
 
 (defcustom hi-lock-exclude-modes
   '(rmail-mode mime/viewer-mode gnus-article-mode)
@@ -112,12 +113,13 @@
 For security reasons since font lock patterns can specify function
 calls."
   :type '(repeat symbol)
-  :group 'hi-lock-interactive-text-highlighting)
+  :group 'hi-lock)
 
 
 (defgroup hi-lock-faces nil
   "Faces for hi-lock."
-  :group 'hi-lock-interactive-text-highlighting)
+  :group 'hi-lock
+  :group 'faces)
 
 (defface hi-yellow
   '((((min-colors 88) (background dark))
--- a/lisp/ibuf-ext.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/ibuf-ext.el	Fri Nov 18 14:53:14 2005 +0000
@@ -257,7 +257,7 @@
   "Enable or disable filtering by the major mode at point."
   (interactive "d")
   (if (eventp event-or-point)
-      (mouse-set-point event-or-point)
+      (posn-set-point (event-end event-or-point))
     (goto-char event-or-point))
   (let ((buf (ibuffer-current-buffer)))
     (if (assq 'mode ibuffer-filtering-qualifiers)
--- a/lisp/mail/mailheader.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/mail/mailheader.el	Fri Nov 18 14:53:14 2005 +0000
@@ -146,7 +146,7 @@
     (insert (capitalize (symbol-name header))
 	    ": "
 	    (if (consp value) (car value) value)
-	    "\n")))
+	    hard-newline)))
 
 (defun mail-header-format (format-rules headers)
   "Use FORMAT-RULES to format HEADERS and insert into current buffer.
@@ -187,7 +187,7 @@
 	       (if (cdr rule)
 		   (funcall (cdr rule) header value)
 		 (funcall mail-header-format-function header value))))))
-    (insert "\n")))
+    (insert hard-newline)))
 
 (provide 'mailheader)
 
--- a/lisp/mail/sendmail.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/mail/sendmail.el	Fri Nov 18 14:53:14 2005 +0000
@@ -446,7 +446,7 @@
 	;; has been called and has done so.
 	(let ((fill-prefix "\t")
 	      (address-start (point)))
-	  (insert to "\n")
+	  (insert to hard-newline)
 	  (fill-region-as-paragraph address-start (point-max))
 	  (goto-char (point-max))
 	  (unless (bolp)
@@ -455,7 +455,7 @@
     (if cc
 	(let ((fill-prefix "\t")
 	      (address-start (progn (insert "CC: ") (point))))
-	  (insert cc "\n")
+	  (insert cc hard-newline)
 	  (fill-region-as-paragraph address-start (point-max))
 	  (goto-char (point-max))
 	  (unless (bolp)
@@ -464,23 +464,23 @@
 	(let ((fill-prefix "\t")
 	      (fill-column 78)
 	      (address-start (point)))
-	  (insert "In-reply-to: " in-reply-to "\n")
+	  (insert "In-reply-to: " in-reply-to hard-newline)
 	  (fill-region-as-paragraph address-start (point-max))
 	  (goto-char (point-max))
 	  (unless (bolp)
 	    (newline))))
-    (insert "Subject: " (or subject "") "\n")
+    (insert "Subject: " (or subject "") hard-newline)
     (if mail-default-headers
 	(insert mail-default-headers))
     (if mail-default-reply-to
-	(insert "Reply-to: " mail-default-reply-to "\n"))
+	(insert "Reply-to: " mail-default-reply-to hard-newline))
     (if mail-self-blind
-	(insert "BCC: " user-mail-address "\n"))
+	(insert "BCC: " user-mail-address hard-newline))
     (if mail-archive-file-name
-	(insert "FCC: " mail-archive-file-name "\n"))
+	(insert "FCC: " mail-archive-file-name hard-newline))
     (put-text-property (point)
 		       (progn
-			 (insert mail-header-separator "\n")
+			 (insert mail-header-separator hard-newline)
 			 (1- (point)))
 		       'category 'mail-header-separator)
     ;; Insert the signature.  But remember the beginning of the message.
@@ -488,7 +488,7 @@
     (cond ((eq mail-signature t)
 	   (if (file-exists-p mail-signature-file)
 	       (progn
-		 (insert "\n\n-- \n")
+		 (insert hard-newline hard-newline "-- " hard-newline)
 		 (insert-file-contents mail-signature-file))))
 	  ((stringp mail-signature)
 	   (insert mail-signature))
@@ -835,14 +835,14 @@
 			     (split-string new-header-values
 					   ",[[:space:]]+" t))
 			    (mapconcat 'identity l ", "))
-			  "\n"))
+			  hard-newline))
 		;; Add Mail-Reply-To if none yet
 		(unless (mail-fetch-field "mail-reply-to")
 		  (goto-char (mail-header-end))
 		  (insert "Mail-Reply-To: "
 			  (or (mail-fetch-field "reply-to")
 			      user-mail-address)
-			  "\n"))))))
+			  hard-newline))))))
 	(unless (memq mail-send-nonascii '(t mime))
 	  (goto-char (point-min))
 	  (skip-chars-forward "\0-\177")
@@ -931,7 +931,7 @@
 					     fullname-end 1)
 		     (replace-match "\\\\\\&" t))
 		   (insert "\""))))
-	   (insert " <" login ">\n"))
+	   (insert " <" login ">" hard-newline))
 	  ((eq mail-from-style 'parens)
 	   (insert "From: " login " (")
 	   (let ((fullname-start (point)))
@@ -955,9 +955,9 @@
 		       fullname-end 1)
 		 (replace-match "\\1(\\3)" t)
 		 (goto-char fullname-start))))
-	   (insert ")\n"))
+	   (insert ")" hard-newline))
 	  ((null mail-from-style)
-	   (insert "From: " login "\n"))
+	   (insert "From: " login hard-newline))
 	  ((eq mail-from-style 'system-default)
 	   nil)
 	  (t (error "Invalid value for `mail-from-style'")))))
@@ -996,7 +996,7 @@
 	  (goto-char (point-max))
 	  ;; require one newline at the end.
 	  (or (= (preceding-char) ?\n)
-	      (insert ?\n))
+	      (insert hard-newline))
 	  ;; Change header-delimiter to be what sendmail expects.
 	  (goto-char (mail-header-end))
 	  (delete-region (point) (progn (end-of-line) (point)))
@@ -1008,7 +1008,7 @@
 	  ;; Ignore any blank lines in the header
 	  (while (and (re-search-forward "\n\n\n*" delimline t)
 		      (< (point) delimline))
-	    (replace-match "\n"))
+	    (replace-match hard-newline))
 	  (goto-char (point-min))
 	  ;; Look for Resent- headers.  They require sending
 	  ;; the message specially.
@@ -1070,10 +1070,10 @@
 		   (setq charset
 			 (coding-system-get selected-coding 'mime-charset))
 		   (goto-char delimline)
-		   (insert "MIME-version: 1.0\n"
+		   (insert "MIME-version: 1.0" hard-newline
 			   "Content-type: text/plain; charset="
-			   (symbol-name charset) "\n"
-			   "Content-Transfer-Encoding: 8bit\n")))
+			   (symbol-name charset) hard-newline
+			   "Content-Transfer-Encoding: 8bit" hard-newline)))
 	    ;; Insert an extra newline if we need it to work around
 	    ;; Sun's bug that swallows newlines.
 	    (goto-char (1+ delimline))
@@ -1167,8 +1167,8 @@
       (set-buffer tembuf)
       (erase-buffer)
       ;; This initial newline is written out if the fcc file already exists.
-      (insert "\nFrom " (user-login-name) " "
-	      (current-time-string time) "\n")
+      (insert hard-newline "From " (user-login-name) " "
+	      (current-time-string time) hard-newline)
       ;; Insert the time zone before the year.
       (forward-char -1)
       (forward-word -1)
@@ -1178,7 +1178,7 @@
       (insert-buffer-substring rmailbuf)
       ;; Make sure messages are separated.
       (goto-char (point-max))
-      (insert ?\n)
+      (insert hard-newline)
       (goto-char 2)
       ;; ``Quote'' "^From " as ">From "
       ;;  (note that this isn't really quoting, as there is no requirement
@@ -1220,10 +1220,11 @@
 			      (rmail-maybe-set-message-counters)
 			      (widen)
 			      (narrow-to-region (point-max) (point-max))
-			      (insert "\C-l\n0, unseen,,\n*** EOOH ***\n"
-				      "Date: " (mail-rfc822-date) "\n")
+			      (insert "\C-l" hard-newline "0, unseen,,"
+				      hard-newline "*** EOOH ***" hard-newline
+				      "Date: " (mail-rfc822-date) hard-newline)
 			      (insert-buffer-substring curbuf beg2 end)
-			      (insert "\n\C-_")
+			      (insert hard-newline "\C-_")
 			      (goto-char (point-min))
 			      (widen)
 			      (search-backward "\n\^_")
@@ -1261,10 +1262,11 @@
 		    (set-buffer (get-buffer-create " mail-temp"))
 		    (setq buffer-read-only nil)
 		    (erase-buffer)
-		    (insert "\C-l\n0, unseen,,\n*** EOOH ***\n"
-			    "Date: " (mail-rfc822-date) "\n")
+		    (insert "\C-l" hard-newline "0, unseen,," hard-newline
+			    "*** EOOH ***" hard-newline "Date: "
+			    (mail-rfc822-date) hard-newline)
 		    (insert-buffer-substring curbuf beg2 end)
-		    (insert "\n\C-_")
+		    (insert hard-newline "\C-_")
 		    (write-region (point-min) (point-max) (car fcc-list) t)
 		    (erase-buffer)))
 	      (write-region
@@ -1316,7 +1318,7 @@
   (expand-abbrev)
   (or (mail-position-on-field "cc" t)
       (progn (mail-position-on-field "to")
-	     (insert "\nCC: "))))
+	     (insert hard-newline "CC: "))))
 
 (defun mail-bcc ()
   "Move point to end of BCC-field.  Create a BCC field if none."
@@ -1324,7 +1326,7 @@
   (expand-abbrev)
   (or (mail-position-on-field "bcc" t)
       (progn (mail-position-on-field "to")
-	     (insert "\nBCC: "))))
+	     (insert hard-newline "BCC: "))))
 
 (defun mail-fcc (folder)
   "Add a new FCC field, with file name completion."
@@ -1332,7 +1334,7 @@
   (expand-abbrev)
   (or (mail-position-on-field "fcc" t)	;Put new field after exiting FCC.
       (mail-position-on-field "to"))
-  (insert "\nFCC: " folder))
+  (insert hard-newline "FCC: " folder))
 
 (defun mail-reply-to ()
   "Move point to end of Reply-To-field.  Create a Reply-To field if none."
@@ -1347,7 +1349,7 @@
   (expand-abbrev)
   (or (mail-position-on-field "mail-reply-to" t)
       (progn (mail-position-on-field "to")
-           (insert "\nMail-Reply-To: "))))
+           (insert hard-newline "Mail-Reply-To: "))))
 
 (defun mail-mail-followup-to ()
   "Move point to end of Mail-Followup-To field.
@@ -1356,7 +1358,7 @@
   (expand-abbrev)
   (or (mail-position-on-field "mail-followup-to" t)
       (progn (mail-position-on-field "to")
-           (insert "\nMail-Followup-To: "))))
+           (insert hard-newline "Mail-Followup-To: "))))
 
 (defun mail-position-on-field (field &optional soft)
   (let (end
@@ -1371,7 +1373,7 @@
 	  t)
       (or soft
 	  (progn (goto-char end)
-		 (insert field ": \n")
+		 (insert field ": " hard-newline)
 		 (skip-chars-backward "\n")))
       nil)))
 
@@ -1394,7 +1396,7 @@
 	(delete-region (point) (point-max)))
     (if (stringp mail-signature)
 	(insert mail-signature)
-      (insert "\n\n-- \n")
+      (insert hard-newline hard-newline "-- " hard-newline)
       (insert-file-contents (expand-file-name mail-signature-file)))))
 
 (defun mail-fill-yanked-message (&optional justifyp)
@@ -1480,7 +1482,7 @@
 	;; loop would deactivate the mark because we inserted text.
 	(goto-char (prog1 (mark t)
 		     (set-marker (mark-marker) (point) (current-buffer))))
-	(if (not (eolp)) (insert ?\n)))))
+	(if (not (eolp)) (insert hard-newline)))))
 
 (defun mail-yank-clear-headers (start end)
   (if (< end start)
@@ -1564,7 +1566,8 @@
       (insert-char ?= (max 0 (- 60 (current-column))))
       (newline)
       (setq middle (point))
-      (insert "============================================================\n")
+      (insert "============================================================"
+	      hard-newline)
       (push-mark)
       (goto-char middle)
       (insert-file-contents file)
--- a/lisp/progmodes/ada-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/ada-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -163,6 +163,7 @@
 
 (defgroup ada nil
   "Major mode for editing Ada source in Emacs."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defcustom ada-auto-case t
--- a/lisp/progmodes/asm-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/asm-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -52,6 +52,7 @@
 
 (defgroup asm nil
   "Mode for editing assembler code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defcustom asm-comment-char ?\;
--- a/lisp/progmodes/cperl-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/cperl-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -170,6 +170,7 @@
 
 (defgroup cperl-faces nil
   "Fontification colors."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :prefix "cperl-"
   :group 'cperl)
 
--- a/lisp/progmodes/cpp.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/cpp.el	Fri Nov 18 14:53:14 2005 +0000
@@ -50,6 +50,7 @@
 ;;; Customization:
 (defgroup cpp nil
   "Highlight or hide text according to cpp conditionals."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'c
   :prefix "cpp-")
 
--- a/lisp/progmodes/dcl-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/dcl-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -95,6 +95,7 @@
 
 (defgroup dcl nil
   "Major mode for editing DCL command files."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defcustom dcl-basic-offset 4
--- a/lisp/progmodes/f90.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/f90.el	Fri Nov 18 14:53:14 2005 +0000
@@ -164,6 +164,7 @@
 
 (defgroup f90 nil
   "Major mode for editing free format Fortran 90,95 code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defgroup f90-indent nil
--- a/lisp/progmodes/fortran.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/fortran.el	Fri Nov 18 14:53:14 2005 +0000
@@ -63,7 +63,8 @@
 
 (defgroup fortran nil
   "Major mode for editing fixed format Fortran code."
-  :link  '(custom-manual "(emacs)Fortran")
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
+  :link '(custom-manual "(emacs)Fortran")
   :group 'languages)
 
 (defgroup fortran-indent nil
--- a/lisp/progmodes/gdb-ui.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Fri Nov 18 14:53:14 2005 +0000
@@ -337,6 +337,15 @@
 			 (file-name-nondirectory file) ":1\n")
 		 `(lambda () (gdb-set-gud-minor-mode ,buffer)))))))))
 
+(defun gdb-find-watch-expression ()
+  (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
+	 (varno (nth 1 var)) (expr))
+    (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varno)
+    (dolist (var1 gdb-var-list)
+      (if (string-equal (nth 1 var1) (match-string 1 varno))
+	  (setq expr (concat (car var1) "." (match-string 2 varno)))))
+    expr))
+
 (defun gdb-ann3 ()
   (setq gdb-debug-log nil)
   (set (make-local-variable 'gud-minor-mode) 'gdba)
@@ -369,6 +378,15 @@
   (gud-def gud-go (gud-call (if gdb-active-process "continue" "run") arg)
 	   nil "Start or continue execution.")
 
+  ;; For debugging Emacs only.
+  (gud-def gud-pp
+	   (gud-call
+	    (concat
+	     "pp1 " (if (eq (buffer-local-value
+			     'major-mode (window-buffer)) 'speedbar-mode)
+			(gdb-find-watch-expression) "%e")) arg)
+	   nil   "Print the emacs s-expression.")
+
   (define-key gud-minor-mode-map [left-margin mouse-1]
     'gdb-mouse-set-clear-breakpoint)
   (define-key gud-minor-mode-map [left-fringe mouse-1]
--- a/lisp/progmodes/gud.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/gud.el	Fri Nov 18 14:53:14 2005 +0000
@@ -389,7 +389,8 @@
     (define-key gud-speedbar-key-map " " 'speedbar-toggle-line-expansion)
     (define-key gud-speedbar-key-map "[" 'speedbar-expand-line-descendants)
     (define-key gud-speedbar-key-map "]" 'speedbar-contract-line-descendants)
-    (define-key gud-speedbar-key-map "D" 'gdb-var-delete))
+    (define-key gud-speedbar-key-map "D" 'gdb-var-delete)
+    (define-key gud-speedbar-key-map "p" 'gud-pp))
 
   (speedbar-add-expansion-list '("GUD" gud-speedbar-menu-items
 				 gud-speedbar-key-map
@@ -654,7 +655,6 @@
 	   "Evaluate C dereferenced pointer expression at point.")
 
   ;; For debugging Emacs only.
-  (gud-def gud-pp  "pp1 %e"     nil   "Print the emacs s-expression.")
   (gud-def gud-pv "pv1 %e"      "\C-v" "Print the value of the lisp variable.")
 
   (gud-def gud-until  "until %l" "\C-u" "Continue to current line.")
--- a/lisp/progmodes/icon.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/icon.el	Fri Nov 18 14:53:14 2005 +0000
@@ -84,6 +84,7 @@
 
 (defgroup icon nil
   "Mode for editing Icon code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defcustom icon-indent-level 4
--- a/lisp/progmodes/idlwave.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/idlwave.el	Fri Nov 18 14:53:14 2005 +0000
@@ -1049,6 +1049,7 @@
 
 (defgroup idlwave-misc nil
   "Miscellaneous options for IDLWAVE mode."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'idlwave)
 
 (defcustom idlwave-startup-message t
--- a/lisp/progmodes/m4-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/m4-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -44,6 +44,7 @@
 
 (defgroup m4 nil
   "m4 code editing commands for Emacs."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :prefix "m4-"
   :group 'languages)
 
--- a/lisp/progmodes/make-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/make-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -97,6 +97,7 @@
 
 (defgroup makefile nil
   "Makefile editing commands for Emacs."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'tools
   :prefix "makefile-")
 
--- a/lisp/progmodes/meta-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/meta-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -135,6 +135,7 @@
 
 (defgroup meta-font nil
   "Major mode for editing Metafont or MetaPost sources."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 ;;; Fontification.
--- a/lisp/progmodes/modula2.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/modula2.el	Fri Nov 18 14:53:14 2005 +0000
@@ -24,6 +24,7 @@
 
 (defgroup modula2 nil
   "Major mode for editing Modula-2 code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :prefix "m2-"
   :group 'languages)
 
--- a/lisp/progmodes/octave-mod.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/octave-mod.el	Fri Nov 18 14:53:14 2005 +0000
@@ -45,6 +45,7 @@
 
 (defgroup octave nil
   "Major mode for editing Octave source files."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defvar inferior-octave-output-list nil)
--- a/lisp/progmodes/pascal.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/pascal.el	Fri Nov 18 14:53:14 2005 +0000
@@ -63,6 +63,7 @@
 
 (defgroup pascal nil
   "Major mode for editing Pascal source in Emacs."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defvar pascal-mode-abbrev-table nil
--- a/lisp/progmodes/perl-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/perl-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -113,6 +113,7 @@
 
 (defgroup perl nil
   "Major mode for editing Perl code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :prefix "perl-"
   :group 'languages)
 
--- a/lisp/progmodes/prolog.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/prolog.el	Fri Nov 18 14:53:14 2005 +0000
@@ -36,6 +36,7 @@
 
 (defgroup prolog nil
   "Major mode for editing and running Prolog under Emacs."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 
--- a/lisp/progmodes/ps-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/ps-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -43,6 +43,7 @@
 
 (defgroup PostScript-edit nil
   "PostScript editing."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :prefix "ps-mode-"
   :group 'PostScript)
 
--- a/lisp/progmodes/scheme.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/scheme.el	Fri Nov 18 14:53:14 2005 +0000
@@ -238,6 +238,7 @@
 
 (defgroup scheme nil
   "Editing Scheme code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'lisp)
 
 (defcustom scheme-mit-dialect t
--- a/lisp/progmodes/sh-script.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/sh-script.el	Fri Nov 18 14:53:14 2005 +0000
@@ -211,6 +211,7 @@
 
 (defgroup sh-script nil
   "Shell script mode."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'sh
   :prefix "sh-")
 
--- a/lisp/progmodes/simula.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/simula.el	Fri Nov 18 14:53:14 2005 +0000
@@ -40,6 +40,7 @@
 
 (defgroup simula nil
   "Major mode for editing Simula code."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :prefix "simula-"
   :group 'languages)
 
--- a/lisp/progmodes/tcl.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/progmodes/tcl.el	Fri Nov 18 14:53:14 2005 +0000
@@ -119,6 +119,7 @@
 
 (defgroup tcl nil
   "Major mode for editing Tcl source in Emacs."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defcustom tcl-indent-level 4
--- a/lisp/simple.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/simple.el	Fri Nov 18 14:53:14 2005 +0000
@@ -348,6 +348,8 @@
 
 ;; Making and deleting lines.
 
+(defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)))
+
 (defun newline (&optional arg)
   "Insert a newline, and move to left margin of the new line if it's blank.
 If `use-hard-newlines' is non-nil, the newline is marked with the
@@ -3328,7 +3330,7 @@
 	  ;; When adding a newline, don't expand an abbrev.
 	  (let ((abbrev-mode nil))
 	    (end-of-line)
-	    (insert "\n"))
+	    (insert hard-newline))
 	(line-move arg nil nil try-vscroll))
     (if (interactive-p)
 	(condition-case nil
@@ -4508,7 +4510,7 @@
 	(unless (member-ignore-case (car (car other-headers))
 				    '("in-reply-to" "cc" "body"))
 	    (insert (car (car other-headers)) ": "
-		    (cdr (car other-headers)) "\n"))
+		    (cdr (car other-headers)) hard-newline))
 	(setq other-headers (cdr other-headers)))
       (when body
 	(forward-line 1)
@@ -4921,7 +4923,7 @@
                 ;; when completing file names.  It's not even clear what
                 ;; is TRT.
                 0
-              (- common-string-length (- (point) (point-max))))))
+              (- common-string-length (- (point-max) (point))))))
     (with-current-buffer standard-output
       (completion-list-mode)
       (set (make-local-variable 'completion-reference-buffer) mainbuf)
--- a/lisp/textmodes/nroff-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/textmodes/nroff-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -38,6 +38,7 @@
 
 (defgroup nroff nil
   "Nroff mode."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'wp
   :prefix "nroff-")
 
--- a/lisp/textmodes/reftex-vars.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/textmodes/reftex-vars.el	Fri Nov 18 14:53:14 2005 +0000
@@ -1704,6 +1704,7 @@
 
 (defgroup reftex-fontification-configurations nil
   "Options concerning the faces used in RefTeX."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'reftex)
 
 (defcustom reftex-use-fonts t
--- a/lisp/textmodes/sgml-mode.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/textmodes/sgml-mode.el	Fri Nov 18 14:53:14 2005 +0000
@@ -41,6 +41,7 @@
 
 (defgroup sgml nil
   "SGML editing mode."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages)
 
 (defcustom sgml-basic-offset 2
--- a/lisp/textmodes/texinfo.el	Fri Nov 18 13:13:34 2005 +0000
+++ b/lisp/textmodes/texinfo.el	Fri Nov 18 14:53:14 2005 +0000
@@ -46,6 +46,7 @@
 
 (defgroup texinfo nil
   "Texinfo Mode."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'docs)
 
 ;;;###autoload
--- a/lispref/ChangeLog	Fri Nov 18 13:13:34 2005 +0000
+++ b/lispref/ChangeLog	Fri Nov 18 14:53:14 2005 +0000
@@ -1,3 +1,7 @@
+2005-11-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* display.texi (Attribute Functions): Mention :ignore-defface.
+
 2005-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* modes.texi (Minor Mode Conventions): Use custom-set-minor-mode.
--- a/lispref/display.texi	Fri Nov 18 13:13:34 2005 +0000
+++ b/lispref/display.texi	Fri Nov 18 14:53:14 2005 +0000
@@ -1859,6 +1859,11 @@
 next face gets a chance.  However, the @code{default} face must
 specify all attributes.
 
+  Any attribute can have the value @code{:ignore-defface}.  The effect
+of this is identical to @code{unspecified}.  It exists because of an
+technical ambiguity in giving attributes the value @code{unspecified}.
+@xref{Attribute Functions}.
+
   Some of these font attributes are meaningful only on certain kinds of
 displays---if your display cannot handle a certain attribute, the
 attribute is ignored.  (The attributes @code{:family}, @code{:width},
@@ -2051,6 +2056,14 @@
 for frame @var{frame}.  If @var{frame} is @code{nil}, it sets
 the attribute for all frames, and the defaults for new frames.
 
+Unless you know what you're doing, don't set an attribute to
+@code{unspecified}.  This is ambiguous---it is unclear whether it
+means to unspecify the value stored in the frame-local copies of the
+face (which means reverting to the original face spec), or the value
+in the face spec itself.  What you probably want is to set the
+attribute to @code{:ignore-defface}.  This forces the attribute value
+to be acquired from some other face during face merging.
+
 The extra arguments @var{arguments} specify the attributes to set, and
 the values for them.  They should consist of alternating attribute names
 (such as @code{:family} or @code{:underline}) and corresponding values.
--- a/man/ChangeLog	Fri Nov 18 13:13:34 2005 +0000
+++ b/man/ChangeLog	Fri Nov 18 14:53:14 2005 +0000
@@ -1,3 +1,9 @@
+2005-11-17  Juri Linkov  <juri@jurta.org>
+
+	* emacs.texi (Top):
+	* display.texi (Highlight Interactively): Put this font-lock based
+	mode near Font Lock node.
+
 2005-11-16  Chong Yidong  <cyd@stupidchicken.com>
 
 	* ack.texi (Acknowledgments): Acknowledge Andrew Zhilin for Emacs
--- a/man/display.texi	Fri Nov 18 13:13:34 2005 +0000
+++ b/man/display.texi	Fri Nov 18 14:53:14 2005 +0000
@@ -14,8 +14,8 @@
 * Faces::	           How to change the display style using faces.
 * Standard Faces::         Emacs' predefined faces.
 * Font Lock::              Minor mode for syntactic highlighting using faces.
+* Highlight Interactively:: Tell Emacs what text to highlight.
 * Highlight Changes::      Using colors to show where you changed the buffer.
-* Highlight Interactively:: Tell Emacs what text to highlight.
 * Scrolling::	           Moving text up and down in a window.
 * Horizontal Scrolling::   Moving text left and right in a window.
 * Fringes::                Enabling or disabling window fringes.
@@ -385,14 +385,6 @@
 (or @dfn{JIT}) Lock, by customizing variables in the customization
 group @samp{jit-lock}.  @xref{Specific Customization}.
 
-@node Highlight Changes
-@section Highlight Changes Mode
-
-@findex highlight-changes-mode
-  Use @kbd{M-x highlight-changes-mode} to enable a minor mode
-that uses faces (colors, typically) to indicate which parts of
-the buffer were changed most recently.
-
 @node Highlight Interactively
 @section Interactive Highlighting by Matching
 @cindex highlighting by matching
@@ -460,6 +452,14 @@
 @code{hi-lock-exclude-modes}.
 @end table
 
+@node Highlight Changes
+@section Highlight Changes Mode
+
+@findex highlight-changes-mode
+  Use @kbd{M-x highlight-changes-mode} to enable a minor mode
+that uses faces (colors, typically) to indicate which parts of
+the buffer were changed most recently.
+
 @node Scrolling
 @section Scrolling
 
--- a/man/emacs.texi	Fri Nov 18 13:13:34 2005 +0000
+++ b/man/emacs.texi	Fri Nov 18 14:53:14 2005 +0000
@@ -309,8 +309,8 @@
 * Faces::	           How to change the display style using faces.
 * Standard Faces::         Emacs' predefined faces.
 * Font Lock::              Minor mode for syntactic highlighting using faces.
+* Highlight Interactively:: Tell Emacs what text to highlight.
 * Highlight Changes::      Using colors to show where you changed the buffer.
-* Highlight Interactively:: Tell Emacs what text to highlight.
 * Scrolling::	           Moving text up and down in a window.
 * Horizontal Scrolling::   Moving text left and right in a window.
 * Fringes::                Enabling or disabling window fringes.
--- a/src/ChangeLog	Fri Nov 18 13:13:34 2005 +0000
+++ b/src/ChangeLog	Fri Nov 18 14:53:14 2005 +0000
@@ -1,3 +1,18 @@
+2005-11-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* image.c (x_create_bitmap_from_xpm_data): Free attributes on
+	fail.
+
+	* xfaces.c (Qignore_defface): New variable.
+	(syms_of_xfaces): Provide `:ignore-defface'.
+	(IGNORE_DEFFACE_P): New macro.
+	(check_lface_attrs, lface_fully_specified_p)
+	(Finternal_set_lisp_face_attribute)
+	(Fface_attribute_relative_p, Fmerge_face_attribute): Handle
+	Qignore_defface as a possible value.
+	(merge_face_vectors): The merged face is `unspecified' if the
+	mergee specifies `:ignore-defface'.
+
 2005-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* lread.c (readevalloop): Add missing GCPROs.
--- a/src/image.c	Fri Nov 18 13:13:34 2005 +0000
+++ b/src/image.c	Fri Nov 18 14:53:14 2005 +0000
@@ -3737,10 +3737,12 @@
   rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
 				bits, &bitmap, &mask, &attrs);
   if (rc != XpmSuccess)
-    return -1;
+    {
+      XpmFreeAttributes (&attrs);
+      return -1;
+    }
 
   id = x_allocate_bitmap_record (f);
-
   dpyinfo->bitmaps[id - 1].pixmap = bitmap;
   dpyinfo->bitmaps[id - 1].have_mask = 1;
   dpyinfo->bitmaps[id - 1].mask = mask;
--- a/src/xfaces.c	Fri Nov 18 13:13:34 2005 +0000
+++ b/src/xfaces.c	Fri Nov 18 14:53:14 2005 +0000
@@ -277,6 +277,10 @@
 
 #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified)
 
+/* Non-zero if face attribute ATTR is `ignore-defface'.  */
+
+#define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), Qignore_defface)
+
 /* Value is the number of elements of VECTOR.  */
 
 #define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR))
@@ -315,6 +319,7 @@
 Lisp_Object Qreleased_button, Qpressed_button;
 Lisp_Object QCstyle, QCcolor, QCline_width;
 Lisp_Object Qunspecified;
+Lisp_Object Qignore_defface;
 
 char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
 
@@ -3107,48 +3112,64 @@
      Lisp_Object *attrs;
 {
   xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
 	   || STRINGP (attrs[LFACE_FAMILY_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_SWIDTH_INDEX])
 	   || SYMBOLP (attrs[LFACE_SWIDTH_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_AVGWIDTH_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_AVGWIDTH_INDEX])
 	   || INTEGERP (attrs[LFACE_AVGWIDTH_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX])
 	   || INTEGERP (attrs[LFACE_HEIGHT_INDEX])
 	   || FLOATP (attrs[LFACE_HEIGHT_INDEX])
 	   || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX])
 	   || SYMBOLP (attrs[LFACE_WEIGHT_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_SLANT_INDEX])
 	   || SYMBOLP (attrs[LFACE_SLANT_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_UNDERLINE_INDEX])
 	   || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX])
 	   || STRINGP (attrs[LFACE_UNDERLINE_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_OVERLINE_INDEX])
 	   || SYMBOLP (attrs[LFACE_OVERLINE_INDEX])
 	   || STRINGP (attrs[LFACE_OVERLINE_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_STRIKE_THROUGH_INDEX])
 	   || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX])
 	   || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX])
 	   || SYMBOLP (attrs[LFACE_BOX_INDEX])
 	   || STRINGP (attrs[LFACE_BOX_INDEX])
 	   || INTEGERP (attrs[LFACE_BOX_INDEX])
 	   || CONSP (attrs[LFACE_BOX_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX])
 	   || SYMBOLP (attrs[LFACE_INVERSE_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_FOREGROUND_INDEX])
 	   || STRINGP (attrs[LFACE_FOREGROUND_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_BACKGROUND_INDEX])
 	   || STRINGP (attrs[LFACE_BACKGROUND_INDEX]));
   xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_INHERIT_INDEX])
 	   || NILP (attrs[LFACE_INHERIT_INDEX])
 	   || SYMBOLP (attrs[LFACE_INHERIT_INDEX])
 	   || CONSP (attrs[LFACE_INHERIT_INDEX]));
 #ifdef HAVE_WINDOW_SYSTEM
   xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_STIPPLE_INDEX])
 	   || SYMBOLP (attrs[LFACE_STIPPLE_INDEX])
 	   || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX])));
   xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX])
+	   || IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX])
 	   || NILP (attrs[LFACE_FONT_INDEX])
 	   || STRINGP (attrs[LFACE_FONT_INDEX]));
 #endif
@@ -3357,7 +3378,7 @@
   for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
     if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX
 	&& i != LFACE_AVGWIDTH_INDEX)
-      if (UNSPECIFIEDP (attrs[i])
+      if ((UNSPECIFIEDP (attrs[i]) || IGNORE_DEFFACE_P (attrs[i]))
 #ifdef MAC_OS
         /* MAC_TODO: No stipple support on Mac OS yet, this index is
            always unspecified.  */
@@ -3572,6 +3593,8 @@
       {
 	if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i]))
 	  to[i] = merge_face_heights (from[i], to[i], to[i]);
+	else if (IGNORE_DEFFACE_P (from[i]))
+	  to[i] = Qunspecified;
 	else
 	  to[i] = from[i];
       }
@@ -4064,7 +4087,7 @@
 
   if (EQ (attr, QCfamily))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  CHECK_STRING (value);
 	  if (SCHARS (value) == 0)
@@ -4076,7 +4099,7 @@
     }
   else if (EQ (attr, QCheight))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  Lisp_Object test;
 
@@ -4097,7 +4120,7 @@
     }
   else if (EQ (attr, QCweight))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  CHECK_SYMBOL (value);
 	  if (face_numeric_weight (value) < 0)
@@ -4109,7 +4132,7 @@
     }
   else if (EQ (attr, QCslant))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  CHECK_SYMBOL (value);
 	  if (face_numeric_slant (value) < 0)
@@ -4121,7 +4144,7 @@
     }
   else if (EQ (attr, QCunderline))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	if ((SYMBOLP (value)
 	     && !EQ (value, Qt)
 	     && !EQ (value, Qnil))
@@ -4135,7 +4158,7 @@
     }
   else if (EQ (attr, QCoverline))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	if ((SYMBOLP (value)
 	     && !EQ (value, Qt)
 	     && !EQ (value, Qnil))
@@ -4149,7 +4172,7 @@
     }
   else if (EQ (attr, QCstrike_through))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	if ((SYMBOLP (value)
 	     && !EQ (value, Qt)
 	     && !EQ (value, Qnil))
@@ -4170,7 +4193,7 @@
       if (EQ (value, Qt))
 	value = make_number (1);
 
-      if (UNSPECIFIEDP (value))
+      if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value))
 	valid_p = 1;
       else if (NILP (value))
 	valid_p = 1;
@@ -4227,7 +4250,7 @@
   else if (EQ (attr, QCinverse_video)
 	   || EQ (attr, QCreverse_video))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  CHECK_SYMBOL (value);
 	  if (!EQ (value, Qt) && !NILP (value))
@@ -4238,7 +4261,7 @@
     }
   else if (EQ (attr, QCforeground))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  /* Don't check for valid color names here because it depends
 	     on the frame (display) whether the color will be valid
@@ -4252,7 +4275,7 @@
     }
   else if (EQ (attr, QCbackground))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  /* Don't check for valid color names here because it depends
 	     on the frame (display) whether the color will be valid
@@ -4267,7 +4290,7 @@
   else if (EQ (attr, QCstipple))
     {
 #ifdef HAVE_X_WINDOWS
-      if (!UNSPECIFIEDP (value)
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
 	  && !NILP (value)
 	  && NILP (Fbitmap_spec_p (value)))
 	signal_error ("Invalid stipple attribute", value);
@@ -4277,7 +4300,7 @@
     }
   else if (EQ (attr, QCwidth))
     {
-      if (!UNSPECIFIEDP (value))
+      if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	{
 	  CHECK_SYMBOL (value);
 	  if (face_numeric_swidth (value) < 0)
@@ -4302,7 +4325,7 @@
 	  else
 	    f = check_x_frame (frame);
 
-	  if (!UNSPECIFIEDP (value))
+	  if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
 	    {
 	      CHECK_STRING (value);
 
@@ -4350,7 +4373,7 @@
     signal_error ("Invalid face attribute name", attr);
 
   if (font_related_attr_p
-      && !UNSPECIFIEDP (value))
+      && !UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
     /* If a font-related attribute other than QCfont is specified, the
        original `font' attribute nor that of default face is useless
        to determine a new font.  Thus, we set it to nil so that font
@@ -4371,7 +4394,7 @@
       ++windows_or_buffers_changed;
     }
 
-  if (!UNSPECIFIEDP (value)
+  if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
       && NILP (Fequal (old_value, value)))
     {
       Lisp_Object param;
@@ -4788,7 +4811,7 @@
      (attribute, value)
      Lisp_Object attribute, value;
 {
-  if (EQ (value, Qunspecified))
+  if (EQ (value, Qunspecified) || (EQ (value, Qignore_defface)))
     return Qt;
   else if (EQ (attribute, QCheight))
     return INTEGERP (value) ? Qnil : Qt;
@@ -4804,7 +4827,7 @@
      (attribute, value1, value2)
      Lisp_Object attribute, value1, value2;
 {
-  if (EQ (value1, Qunspecified))
+  if (EQ (value1, Qunspecified) || EQ (value1, Qignore_defface))
     return value2;
   else if (EQ (attribute, QCheight))
     return merge_face_heights (value1, value2, value1);
@@ -8035,6 +8058,8 @@
   staticpro (&Qforeground_color);
   Qunspecified = intern ("unspecified");
   staticpro (&Qunspecified);
+  Qignore_defface = intern (":ignore-defface");
+  staticpro (&Qignore_defface);
 
   Qface_alias = intern ("face-alias");
   staticpro (&Qface_alias);