summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-11-18 14:53:14 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-11-18 14:53:14 +0000
commite8c0b22fcf9bd83bb501f91dfc880ae912186220 (patch)
tree8292664169593d29eeaa6452aee86c0895e4836e
parentbffa514a8b8c947c655b463e8073e8e5ac061bc7 (diff)
parentfe45ad152a8528e795c3d852bf3c2cd18ffe6e02 (diff)
downloademacs-e8c0b22fcf9bd83bb501f91dfc880ae912186220.tar.gz
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
-rw-r--r--admin/FOR-RELEASE6
-rw-r--r--etc/NEWS13
-rw-r--r--etc/images/icons/emacs_16.pngbin0 -> 783 bytes
-rw-r--r--etc/images/icons/emacs_24.pngbin0 -> 1068 bytes
-rw-r--r--etc/images/icons/emacs_32.pngbin0 -> 2488 bytes
-rw-r--r--etc/images/icons/emacs_48.pngbin0 -> 3526 bytes
-rw-r--r--lisp/ChangeLog117
-rw-r--r--lisp/add-log.el8
-rw-r--r--lisp/comint.el2
-rw-r--r--lisp/cus-edit.el20
-rw-r--r--lisp/faces.el18
-rw-r--r--lisp/font-lock.el32
-rw-r--r--lisp/gnus/ChangeLog30
-rw-r--r--lisp/gnus/message.el175
-rw-r--r--lisp/hi-lock.el14
-rw-r--r--lisp/ibuf-ext.el2
-rw-r--r--lisp/mail/mailheader.el4
-rw-r--r--lisp/mail/sendmail.el77
-rw-r--r--lisp/progmodes/ada-mode.el1
-rw-r--r--lisp/progmodes/asm-mode.el1
-rw-r--r--lisp/progmodes/cperl-mode.el1
-rw-r--r--lisp/progmodes/cpp.el1
-rw-r--r--lisp/progmodes/dcl-mode.el1
-rw-r--r--lisp/progmodes/f90.el1
-rw-r--r--lisp/progmodes/fortran.el3
-rw-r--r--lisp/progmodes/gdb-ui.el18
-rw-r--r--lisp/progmodes/gud.el4
-rw-r--r--lisp/progmodes/icon.el1
-rw-r--r--lisp/progmodes/idlwave.el1
-rw-r--r--lisp/progmodes/m4-mode.el1
-rw-r--r--lisp/progmodes/make-mode.el1
-rw-r--r--lisp/progmodes/meta-mode.el1
-rw-r--r--lisp/progmodes/modula2.el1
-rw-r--r--lisp/progmodes/octave-mod.el1
-rw-r--r--lisp/progmodes/pascal.el1
-rw-r--r--lisp/progmodes/perl-mode.el1
-rw-r--r--lisp/progmodes/prolog.el1
-rw-r--r--lisp/progmodes/ps-mode.el1
-rw-r--r--lisp/progmodes/scheme.el1
-rw-r--r--lisp/progmodes/sh-script.el1
-rw-r--r--lisp/progmodes/simula.el1
-rw-r--r--lisp/progmodes/tcl.el1
-rw-r--r--lisp/simple.el8
-rw-r--r--lisp/textmodes/nroff-mode.el1
-rw-r--r--lisp/textmodes/reftex-vars.el1
-rw-r--r--lisp/textmodes/sgml-mode.el1
-rw-r--r--lisp/textmodes/texinfo.el1
-rw-r--r--lispref/ChangeLog4
-rw-r--r--lispref/display.texi13
-rw-r--r--man/ChangeLog6
-rw-r--r--man/display.texi18
-rw-r--r--man/emacs.texi2
-rw-r--r--src/ChangeLog15
-rw-r--r--src/image.c6
-rw-r--r--src/xfaces.c63
55 files changed, 497 insertions, 206 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 81a65e67730..26de10026db 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -25,6 +25,9 @@ face name prefixes should be in it for good results.
** 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 @@ second window to the left.
** 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
diff --git a/etc/NEWS b/etc/NEWS
index 9df53f25ae0..d19051d8002 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -4935,6 +4935,11 @@ was inconsistent with the face behavior under X.
*** `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 @@ as soft, and paragraph boundaries are determined solely from the text.
*** 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.
diff --git a/etc/images/icons/emacs_16.png b/etc/images/icons/emacs_16.png
new file mode 100644
index 00000000000..ca5122b05b2
--- /dev/null
+++ b/etc/images/icons/emacs_16.png
Binary files differ
diff --git a/etc/images/icons/emacs_24.png b/etc/images/icons/emacs_24.png
new file mode 100644
index 00000000000..95c72d3c49f
--- /dev/null
+++ b/etc/images/icons/emacs_24.png
Binary files differ
diff --git a/etc/images/icons/emacs_32.png b/etc/images/icons/emacs_32.png
new file mode 100644
index 00000000000..17b4686e182
--- /dev/null
+++ b/etc/images/icons/emacs_32.png
Binary files differ
diff --git a/etc/images/icons/emacs_48.png b/etc/images/icons/emacs_48.png
new file mode 100644
index 00000000000..56c6de6f364
--- /dev/null
+++ b/etc/images/icons/emacs_48.png
Binary files differ
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0536cef1422..79a91eb29af 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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):
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 91d7ba36bab..d7f9f9b9846 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -551,7 +551,7 @@ non-nil, otherwise in local time."
(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 @@ non-nil, otherwise in local time."
;; 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 @@ non-nil, otherwise in local time."
(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 @@ old-style time formats for entries are supported."
(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)))
diff --git a/lisp/comint.el b/lisp/comint.el
index 3d9da2b8ea2..6676e836735 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -799,7 +799,7 @@ buffer. The hook `comint-exec-hook' is run after each exec."
;; 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))
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 63a0f388f56..59a8b341cad 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -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 @@ IF REGEXP is not a string, return it unchanged."
(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)))))
diff --git a/lisp/faces.el b/lisp/faces.el
index 5c1e934f3b1..2437cd8caf0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -357,11 +357,12 @@ If the optional argument FRAME is given, report on face FACE in that frame.
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 @@ the default for new frames (this is done automatically each time an
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 @@ Value is the new attribute value."
(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)))
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index a6de42af999..1c9ccff2432 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
)
(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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(((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.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f197ea11940..10e5ba0dc88 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -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
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 019b5bd4f07..9a5f910290a 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -141,7 +141,11 @@ mailbox format."
: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 @@ few false positives here."
;;; 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 @@ few false positives here."
: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 @@ for `message-cross-post-insert-note'."
: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 @@ Done before generating the new subject of a forward."
: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 @@ see `message-narrow-to-headers-or-head'."
(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 @@ Leading \"Re: \" is not stripped by this function. Use the function
(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 @@ With prefix-argument just set Follow-Up, don't cross-post."
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 @@ been made to before the user asked for a Crosspost."
(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 @@ With prefix-argument just set Follow-Up, don't cross-post."
(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 @@ or in the synonym headers, defined by `message-header-synonyms'."
(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 @@ or in the synonym headers, defined by `message-header-synonyms'."
(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 @@ or in the synonym headers, defined by `message-header-synonyms'."
(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 @@ Prefix arg means justify as well."
(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 @@ Prefix arg means justify as well."
(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 @@ Prefix arg means justify as well."
(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 @@ and `low'."
(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 @@ Note that this should not be used in newsgroups."
(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 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line."
;; 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 @@ prefix, and don't delete any headers."
(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 @@ prefix, and don't delete any headers."
(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 @@ prefix, and don't delete any headers."
(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 @@ prefix, and don't delete any headers."
(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 @@ It should typically alter the sending method in some way or other."
;; 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 @@ It should typically alter the sending method in some way or other."
(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 @@ It should typically alter the sending method in some way or other."
(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 @@ It should typically alter the sending method in some way or other."
(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 @@ If you always want Gnus to send messages in one piece, set
(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 @@ to find out how to use this."
(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 @@ Otherwise, generate and save a value for `canlock-password' first."
(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 @@ Otherwise, generate and save a value for `canlock-password' first."
(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 @@ Headers already prepared in the buffer are not modified."
;; 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 @@ Headers already prepared in the buffer are not modified."
(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 @@ Headers already prepared in the buffer are not modified."
(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 @@ Headers already prepared in the buffer are not modified."
(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 @@ Headers already prepared in the buffer are not modified."
(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 @@ If the current line has `message-yank-prefix', insert it on the new line."
(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 @@ than 988 characters long, and if they are not, trim them until they are."
(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 @@ are not included."
(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 @@ are not included."
(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 @@ If ARG, allow editing of the cancellation message."
(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 @@ Optional DIGEST will use digest to forward."
(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 @@ Optional DIGEST will use digest to forward."
(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 @@ Optional DIGEST will use digest to forward."
(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 @@ Optional DIGEST will use digest to forward."
(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 @@ Optional DIGEST will use digest to forward."
(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 @@ Optional DIGEST will use digest to forward."
(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 @@ regexp VARSTR."
(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 @@ regexp VARSTR."
;; 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 @@ regexp VARSTR."
(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)))
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 63f7611bd52..8d565ab61a8 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -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 @@ When a file is visited and hi-lock mode is on patterns starting
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 @@ of functions `hi-lock-mode' and `hi-lock-find-patterns'."
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))
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 8ab984cd61b..4e8f8f61221 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -257,7 +257,7 @@ With numeric ARG, enable auto-update if and only if ARG is positive."
"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)
diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el
index 1e9a24da341..aeed54a5ace 100644
--- a/lisp/mail/mailheader.el
+++ b/lisp/mail/mailheader.el
@@ -146,7 +146,7 @@ skip the header altogether if there are no other elements.
(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 @@ A key of nil has as its value a list of defaulted headers to ignore."
(if (cdr rule)
(funcall (cdr rule) header value)
(funcall mail-header-format-function header value))))))
- (insert "\n")))
+ (insert hard-newline)))
(provide 'mailheader)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 8e7a71d65ab..e87aebe7cc2 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -446,7 +446,7 @@ actually occur.")
;; 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 @@ actually occur.")
(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 @@ actually occur.")
(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 @@ actually occur.")
(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 @@ the user from the mailer."
(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 @@ See also the function `select-message-coding-system'.")
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 @@ See also the function `select-message-coding-system'.")
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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
;; 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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ external program defined by `sendmail-program'."
(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 @@ Create a Mail-Reply-To field if none."
(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 @@ Create a Mail-Followup-To field if none."
(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 @@ Create a Mail-Followup-To field if none."
t)
(or soft
(progn (goto-char end)
- (insert field ": \n")
+ (insert field ": " hard-newline)
(skip-chars-backward "\n")))
nil)))
@@ -1394,7 +1396,7 @@ Prefix arg means put contents at point."
(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 @@ and don't delete any header fields."
;; 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 @@ If the current line has `mail-yank-prefix', insert it on the new line."
(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)
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 6a6d63a169a..6442463796c 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -163,6 +163,7 @@ This is a good place to add Ada environment specific bindings.")
(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
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index dc3984e089e..51d58d7c7a9 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -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 ?\;
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index f25d5c29081..dd1dcad3cc4 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -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)
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index c615082814a..11d0ba444f3 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -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-")
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index c7115eed2ae..16d1d7ba415 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -95,6 +95,7 @@ Presently this includes some syntax, .OP.erators, and \"f$\" lexicals.")
(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
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 807f938776e..3816fc3fb43 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -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
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 79853cb127b..65e7b8914ae 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -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
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index f8f80ce6f66..92265dd46da 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -337,6 +337,15 @@ With arg, use separate IO iff arg is positive."
(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 @@ With arg, use separate IO iff arg is positive."
(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]
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 31223ddc7a9..e045ae76a29 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -389,7 +389,8 @@ t means that there is no stack, and we are in display-file mode.")
(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 @@ and source-file directory for your debugger."
"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.")
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index aad5686c69e..dc2cfd01683 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -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
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index ce689847e9c..3ee01d07b0a 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1049,6 +1049,7 @@ IDL process is made."
(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
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index f131576d240..84174e2ca5d 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -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)
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 3a55129c899..fa481a233cd 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -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-")
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index f5bbb4d68db..d113f94280f 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -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.
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index 802ed26eb1f..fde526ab303 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -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)
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index b65ad9eac1a..0cda438fa6a 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -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)
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 801096b9b0f..d462557f291 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -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
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 2f814d07469..f5a857f9015 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -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)
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index d23dbad0762..9191d5f95ee 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -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)
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index b49fcafe186..299093b29bc 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -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)
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 0b11e4f6b9a..26d6e05fc2c 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -238,6 +238,7 @@ if that value is non-nil."
(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
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 2c4543a72fc..bc4ca59f96a 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -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-")
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index 395bee1b226..eba9a03b2ae 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -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)
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index e2068607048..2db11a8c000 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -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
diff --git a/lisp/simple.el b/lisp/simple.el
index 5f8c6efa660..35a42965ef7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -348,6 +348,8 @@ Other major modes are defined by comparison with this one."
;; 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 @@ and more reliable (no dependence on goal column, etc.)."
;; 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 @@ See also `read-mail-command' concerning reading mail."
(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 @@ is the substring.)")
;; 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)
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 05a740ee390..7fd2db1deb6 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -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-")
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 703f5b8dd2a..01e8a1b4ddf 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -1704,6 +1704,7 @@ The value of this variable will only have any effect when
(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
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index d331ce05ff7..79e41cecfc1 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -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
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index a10851aa765..8392e56dc00 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -46,6 +46,7 @@
(defgroup texinfo nil
"Texinfo Mode."
+ :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
:group 'docs)
;;;###autoload
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index d8014b27613..3e07a51a007 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -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.
diff --git a/lispref/display.texi b/lispref/display.texi
index 75a64924516..00d9313aa24 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1859,6 +1859,11 @@ the first face fails to specify a particular attribute, that means the
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 @@ This function sets one or more attributes of face @var{face}
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.
diff --git a/man/ChangeLog b/man/ChangeLog
index 0ebbeee7884..55492a523f7 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -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
diff --git a/man/display.texi b/man/display.texi
index 58e69ad4e60..ea8bb79d83a 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -14,8 +14,8 @@ display it.
* Faces:: How to change the display style using faces.
* Standard Faces:: Emacs' predefined faces.
* Font Lock:: Minor mode for syntactic highlighting using faces.
-* Highlight Changes:: Using colors to show where you changed the buffer.
* Highlight Interactively:: Tell Emacs what text to highlight.
+* Highlight Changes:: Using colors to show where you changed the buffer.
* 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 @@ control this background fontification, also called @dfn{Just-In-Time}
(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 @@ This command does nothing if the major mode is a member of the list
@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
diff --git a/man/emacs.texi b/man/emacs.texi
index 8da4e4ed051..23685ef0cd0 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -309,8 +309,8 @@ Controlling the Display
* Faces:: How to change the display style using faces.
* Standard Faces:: Emacs' predefined faces.
* Font Lock:: Minor mode for syntactic highlighting using faces.
-* Highlight Changes:: Using colors to show where you changed the buffer.
* Highlight Interactively:: Tell Emacs what text to highlight.
+* Highlight Changes:: Using colors to show where you changed the buffer.
* 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.
diff --git a/src/ChangeLog b/src/ChangeLog
index 900db33db3d..1a9fd720167 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/image.c b/src/image.c
index 1ba1cd197ff..c7bc71ee909 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3737,10 +3737,12 @@ x_create_bitmap_from_xpm_data (f, bits)
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;
diff --git a/src/xfaces.c b/src/xfaces.c
index 4d9ee22b43f..647cf7bb337 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -277,6 +277,10 @@ Boston, MA 02110-1301, USA. */
#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 Qultra_expanded;
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 @@ check_lface_attrs (attrs)
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 @@ lface_fully_specified_p (attrs)
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 @@ merge_face_vectors (f, from, to, named_merge_points)
{
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 @@ FRAME 0 means change the face on all frames, and change the default
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 @@ FRAME 0 means change the face on all frames, and change the default
}
else if (EQ (attr, QCheight))
{
- if (!UNSPECIFIEDP (value))
+ if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
{
Lisp_Object test;
@@ -4097,7 +4120,7 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
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 @@ FRAME 0 means change the face on all frames, and change the default
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
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 @@ FRAME 0 means change the face on all frames, and change the default
}
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 @@ FRAME 0 means change the face on all frames, and change the default
else
f = check_x_frame (frame);
- if (!UNSPECIFIEDP (value))
+ if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
{
CHECK_STRING (value);
@@ -4350,7 +4373,7 @@ FRAME 0 means change the face on all frames, and change the default
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 @@ FRAME 0 means change the face on all frames, and change the default
++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 @@ DEFUN ("face-attribute-relative-p", Fface_attribute_relative_p,
(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 @@ the result will be absolute, otherwise it will be relative. */)
(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 @@ syms_of_xfaces ()
staticpro (&Qforeground_color);
Qunspecified = intern ("unspecified");
staticpro (&Qunspecified);
+ Qignore_defface = intern (":ignore-defface");
+ staticpro (&Qignore_defface);
Qface_alias = intern ("face-alias");
staticpro (&Qface_alias);