summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-01-02 02:20:42 +0000
committerMiles Bader <miles@gnu.org>2008-01-02 02:20:42 +0000
commitb201b9880e01120b7e64f82c98464c5bea630b0d (patch)
tree8205967f8225afc15b26f7fb630ec4e6b4ef87ea
parent42a0a13593c252378b8d6eecd97b7971ebd6808a (diff)
parent76564e7ce3b5e888e3260dd3510c3cf1a254f7da (diff)
downloademacs-b201b9880e01120b7e64f82c98464c5bea630b0d.tar.gz
Merge from emacs--rel--22, gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-975
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/commands.texi11
-rw-r--r--lisp/ChangeLog25
-rw-r--r--lisp/cus-edit.el48
-rw-r--r--lisp/facemenu.el4
-rw-r--r--lisp/faces.el6
-rw-r--r--lisp/font-lock.el12
-rw-r--r--lisp/startup.el27
-rw-r--r--lisp/textmodes/ispell.el9
9 files changed, 102 insertions, 45 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 50399b0120e..9f98547e590 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-30 Richard Stallman <rms@gnu.org>
+
+ * commands.texi (Accessing Mouse): Renamed from Accessing Events.
+ (Accessing Scroll): New node broken out of Accessing Mouse.
+
2007-12-28 Richard Stallman <rms@gnu.org>
* frames.texi (Size Parameters): Fix typo.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index cdd627f6b52..aef7e4d9a43 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -954,7 +954,8 @@ the current Emacs session. If a symbol has not yet been so used,
* Event Examples:: Examples of the lists for mouse events.
* Classifying Events:: Finding the modifier keys in an event symbol.
Event types.
-* Accessing Events:: Functions to extract info from events.
+* Accessing Mouse:: Functions to extract info from mouse events.
+* Accessing Scroll:: Functions to get info from scroll bar events.
* Strings of Events:: Special considerations for putting
keyboard character events in a string.
@end menu
@@ -1810,8 +1811,8 @@ must be the last element of the list. For example,
@end example
@end defun
-@node Accessing Events
-@subsection Accessing Events
+@node Accessing Mouse
+@subsection Accessing Mouse Events
@cindex mouse events, data in
This section describes convenient functions for accessing the data in
@@ -1957,6 +1958,10 @@ to the window text area, otherwise they are relative to
the entire window area including scroll bars, margins and fringes.
@end defun
+@node Accessing Scroll
+@subsection Accessing Scroll Bar Events
+@cindex scroll bar events, data in
+
These functions are useful for decoding scroll bar events.
@defun scroll-bar-event-ratio event
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ac027b954c2..fc4e3046931 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,28 @@
+2007-12-29 Richard Stallman <rms@gnu.org>
+
+ * font-lock.el (font-lock-prepend-text-property)
+ (font-lock-append-text-property): Canonicalize the face and
+ font-lock-face properties.
+
+ * faces.el (facep): Doc fix.
+
+ * startup.el (fancy-startup-tail, fancy-about-text)
+ (fancy-startup-text): Regularize format of face property.
+
+ * facemenu.el (list-colors-print): Use :background and :foreground
+ instead of background-color and foreground-color.
+
+2007-12-29 Drew Adams <drew.adams@oracle.com>
+
+ * cus-edit.el (custom-add-parent-links):
+ Fill the "Parent documentation" text.
+
+2007-12-29 Eli Zaretskii <eliz@gnu.org>
+
+ * textmodes/ispell.el (ispell-grep-command): Use "grep" on
+ MS-Windows and MS-DOS.
+ (ispell-grep-options): Use "-Ei" on MS-Windows and MS-DOS.
+
2008-01-02 Eric S. Raymond <esr@snark.thyrsus.com>
* vc-svn.el (vc-svn-modify-change comment): New function.
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index e2b885c6902..b46981f137b 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1395,7 +1395,7 @@ that are not customizable options, as well as faces and groups
(defun customize-apropos-options (regexp &optional arg)
"Customize all loaded customizable options matching REGEXP.
With prefix arg, include variables that are not customizable options
-\(but we recommend using `apropos-variable' instead)."
+\(but it is better to use `apropos-variable' if you want to find those)."
(interactive "sCustomize options (regexp): \nP")
(customize-apropos regexp (or arg 'options)))
@@ -2258,7 +2258,8 @@ Insert PREFIX first if non-nil."
(insert ", "))))
(widget-put widget :buttons buttons))))
-(defun custom-add-parent-links (widget &optional initial-string)
+(defun custom-add-parent-links (widget &optional initial-string
+ doc-initial-string)
"Add \"Parent groups: ...\" to WIDGET if the group has parents.
The value is non-nil if any parents were found.
If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
@@ -2267,7 +2268,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
(buttons (widget-get widget :buttons))
(start (point))
(parents nil))
- (insert (or initial-string "Parent groups:"))
+ (insert (or initial-string "Groups:"))
(mapatoms (lambda (symbol)
(when (member (list name type) (get symbol 'custom-group))
(insert " ")
@@ -2286,23 +2287,27 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
(get (car parents) 'custom-links))))
(many (> (length links) 2)))
(when links
- (insert "\nParent documentation: ")
- (while links
- (push (widget-create-child-and-convert
- widget (car links)
- :button-face 'custom-link
- :mouse-face 'highlight
- :pressed-face 'highlight)
- buttons)
- (setq links (cdr links))
- (cond ((null links)
- (insert ".\n"))
- ((null (cdr links))
- (if many
- (insert ", and ")
- (insert " and ")))
- (t
- (insert ", ")))))))
+ (let ((pt (point))
+ (left-margin (+ left-margin 2)))
+ (insert "\n" (or doc-initial-string "Group documentation:") " ")
+ (while links
+ (push (widget-create-child-and-convert
+ widget (car links)
+ :button-face 'custom-link
+ :mouse-face 'highlight
+ :pressed-face 'highlight)
+ buttons)
+ (setq links (cdr links))
+ (cond ((null links)
+ (insert ".\n"))
+ ((null (cdr links))
+ (if many
+ (insert ", and ")
+ (insert " and ")))
+ (t
+ (insert ", "))))
+ (fill-region-as-paragraph pt (point))
+ (delete-to-left-margin (1+ pt) (+ pt 2))))))
(if parents
(insert "\n")
(delete-region start (point)))
@@ -3894,7 +3899,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
;;; was made to display a group.
(when (eq level 1)
(if (custom-add-parent-links widget
- "Parent groups:")
+ "Parent groups:"
+ "Parent group documentation:")
(insert "\n"))))
;; Create level indicator.
(insert-char ?\ (* custom-buffer-indent (1- level)))
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 968a115c5d1..61a6f52f55b 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -541,14 +541,14 @@ argument BUFFER-NAME is nil, it defaults to *Colors*."
(insert (car color))
(indent-to 22))
(point)
- 'face (cons 'background-color (car color)))
+ 'face (list ':background (car color)))
(put-text-property
(prog1 (point)
(insert " " (if (cdr color)
(mapconcat 'identity (cdr color) ", ")
(car color))))
(point)
- 'face (cons 'foreground-color (car color)))
+ 'face (list ':foreground (car color)))
(indent-to (max (- (window-width) 8) 44))
(insert (apply 'format "#%02x%02x%02x"
(mapcar (lambda (c) (lsh c -8))
diff --git a/lisp/faces.el b/lisp/faces.el
index b2646b21a1a..18398b5e86f 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -206,10 +206,8 @@ The optional argument FRAME is ignored."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun facep (face)
- "Return non-nil if FACE is a face name or internal face object.
-Return nil otherwise. A face name can be a string or a symbol.
-An internal face object is a vector of the kind used internally
-to record face data."
+ "Return non-nil if FACE is a face name; nil otherwise.
+A face name can be a string or a symbol."
(internal-lisp-face-p face))
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 76f3da98bec..96306be2215 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1303,6 +1303,12 @@ Optional argument OBJECT is the string or buffer containing the text."
(while (/= start end)
(setq next (next-single-property-change start prop object end)
prev (get-text-property start prop object))
+ ;; Canonicalize old forms of face property.
+ (and (memq prop '(face font-lock-face))
+ (listp prev)
+ (or (keywordp (car prev))
+ (memq (car prev) '(foreground-color background-color)))
+ (setq prev (list prev)))
(put-text-property start next prop
(append val (if (listp prev) prev (list prev)))
object)
@@ -1317,6 +1323,12 @@ Optional argument OBJECT is the string or buffer containing the text."
(while (/= start end)
(setq next (next-single-property-change start prop object end)
prev (get-text-property start prop object))
+ ;; Canonicalize old forms of face property.
+ (and (memq prop '(face font-lock-face))
+ (listp prev)
+ (or (keywordp (car prev))
+ (memq (car prev) '(foreground-color background-color)))
+ (setq prev (list prev)))
(put-text-property start next prop
(append (if (listp prev) prev (list prev)) val)
object)
diff --git a/lisp/startup.el b/lisp/startup.el
index 1faf63efa78..24c29f52a86 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1156,7 +1156,7 @@ regardless of the value of this variable."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar fancy-startup-text
- '((:face (variable-pitch :foreground "red")
+ '((:face (variable-pitch (:foreground "red"))
"Welcome to "
:link ("GNU Emacs"
(lambda (button) (browse-url "http://www.gnu.org/software/emacs/"))
@@ -1202,7 +1202,7 @@ regardless of the value of this variable."
"\tView the Emacs manual using Info\n"
:link ("Absence of Warranty" (lambda (button) (describe-no-warranty)))
"\tGNU Emacs comes with "
- :face (variable-pitch :slant oblique)
+ :face (variable-pitch (:slant oblique))
"ABSOLUTELY NO WARRANTY\n"
:face variable-pitch
:link ("Copying Conditions" (lambda (button) (describe-copying)))
@@ -1215,7 +1215,7 @@ Each element in the list should be a list of strings or pairs
`:face FACE', like `fancy-splash-insert' accepts them.")
(defvar fancy-about-text
- '((:face (variable-pitch :foreground "red")
+ '((:face (variable-pitch (:foreground "red"))
"This is "
:link ("GNU Emacs"
(lambda (button) (browse-url "http://www.gnu.org/software/emacs/"))
@@ -1231,13 +1231,14 @@ Each element in the list should be a list of strings or pairs
"Display info on the GNU project.")))
" operating system.\n"
:face (lambda ()
- (list 'variable-pitch :foreground
- (if (eq (frame-parameter nil 'background-mode) 'dark)
- "cyan" "darkblue")))
+ (list 'variable-pitch
+ (list :foreground
+ (if (eq (frame-parameter nil 'background-mode) 'dark)
+ "cyan" "darkblue"))))
"\n"
(lambda () (emacs-version))
"\n"
- :face (variable-pitch :height 0.5)
+ :face (variable-pitch (:height 0.5))
(lambda () emacs-copyright)
"\n\n"
:face variable-pitch
@@ -1256,7 +1257,7 @@ Each element in the list should be a list of strings or pairs
"\tWhy we developed GNU Emacs, and the GNU operating system\n"
:link ("Absence of Warranty" (lambda (button) (describe-no-warranty)))
"\tGNU Emacs comes with "
- :face (variable-pitch :slant oblique)
+ :face (variable-pitch (:slant oblique))
"ABSOLUTELY NO WARRANTY\n"
:face variable-pitch
:link ("Copying Conditions" (lambda (button) (describe-copying)))
@@ -1410,11 +1411,11 @@ a face or button specification."
(lambda (button) (customize-group 'initialization))
"Change initialization settings including this screen")
"\n"))
- (fancy-splash-insert :face `(variable-pitch :foreground ,fg)
+ (fancy-splash-insert :face `(variable-pitch (:foreground ,fg))
"\nThis is "
(emacs-version)
"\n"
- :face '(variable-pitch :height 0.5)
+ :face '(variable-pitch (:height 0.5))
emacs-copyright
"\n")
(and auto-save-list-file-prefix
@@ -1430,12 +1431,12 @@ a face or button specification."
(regexp-quote (file-name-nondirectory
auto-save-list-file-prefix)))
t)
- (fancy-splash-insert :face '(variable-pitch :foreground "red")
+ (fancy-splash-insert :face '(variable-pitch (:foreground "red"))
"\nIf an Emacs session crashed recently, "
"type "
:face '(fixed-pitch :foreground "red")
"Meta-x recover-session RET"
- :face '(variable-pitch :foreground "red")
+ :face '(variable-pitch (:foreground "red"))
"\nto recover"
" the files you were editing."))
@@ -1470,7 +1471,7 @@ a face or button specification."
(overlay-put button 'checked t)
(overlay-put button 'display (overlay-get button :on-glyph))
(setq startup-screen-inhibit-startup-screen t)))))
- (fancy-splash-insert :face '(variable-pitch :height 0.9)
+ (fancy-splash-insert :face '(variable-pitch (:height 0.9))
" Never show it again.")))))
(defun exit-splash-screen ()
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 82d11c47e8e..104e79acb4b 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -336,12 +336,17 @@ Always stores Fcc copy of message when nil."
:group 'ispell)
-(defcustom ispell-grep-command "egrep"
+(defcustom ispell-grep-command
+ ;; MS-Windows/MS-DOS have `egrep' as a Unix shell script, so they
+ ;; cannot invoke it. Use "grep -E" instead (see ispell-grep-options
+ ;; below).
+ (if (memq system-type '(windows-nt ms-dos)) "grep" "egrep")
"Name of the grep command for search processes."
:type 'string
:group 'ispell)
-(defcustom ispell-grep-options "-i"
+(defcustom ispell-grep-options
+ (if (memq system-type '(windows-nt ms-dos)) "-Ei" "-i")
"String of options to use when running the program in `ispell-grep-command'.
Should probably be \"-i\" or \"-e\".
Some machines (like the NeXT) don't support \"-i\""