summaryrefslogtreecommitdiff
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-04-09 02:16:29 +0000
committerMiles Bader <miles@gnu.org>2005-04-09 02:16:29 +0000
commit768d4533ce51d61ce065b28f63aae43c7be0d1cc (patch)
treefb2d103d5c9354b3a15550b160bba0ff2e22c418 /lisp/wid-edit.el
parent918bcc18650840562677f841aa0bcaa34a069be5 (diff)
parent2a9e192d3815d2c34fdd41d52590027805bc9055 (diff)
downloademacs-768d4533ce51d61ce065b28f63aae43c7be0d1cc.tar.gz
emacs-768d4533ce51d61ce065b28f63aae43c7be0d1cc.tar.bz2
emacs-768d4533ce51d61ce065b28f63aae43c7be0d1cc.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-35
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 228-240) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 53-58) - Merge from emacs--cvs-trunk--0 - Update from CVS - Collapse feature addition/removal within single ChangeLog entry
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el20
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 58236e4225f..56c2e1c31e9 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1,6 +1,6 @@
;;; wid-edit.el --- Functions for creating and using widgets -*-byte-compile-dynamic: t;-*-
;;
-;; Copyright (C) 1996,97,1999,2000,01,02,2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1996,97,1999,2000,01,02,2003, 2004, 2005 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: FSF
@@ -883,7 +883,9 @@ Recommended as a parent keymap for modes using widgets.")
(lookup-key widget-global-map (this-command-keys))))))
(defface widget-button-pressed-face
- '((((class color))
+ '((((min-colors 88) (class color))
+ (:foreground "red1"))
+ (((class color))
(:foreground "red"))
(t
(:weight bold :underline t)))
@@ -1185,9 +1187,17 @@ When not inside a field, move to the previous button or field."
;; or if a special `boundary' field has been added after the widget
;; field.
(if (overlayp overlay)
- (if (and (not (eq (get-char-property (overlay-end overlay)
- 'field
- (widget-field-buffer widget))
+ (if (and (not (eq (with-current-buffer
+ (widget-field-buffer widget)
+ (save-restriction
+ ;; `widget-narrow-to-field' can be
+ ;; active when this function is called
+ ;; from an change-functions hook. So
+ ;; temporarily remove field narrowing
+ ;; before to call `get-char-property'.
+ (widen)
+ (get-char-property (overlay-end overlay)
+ 'field)))
'boundary))
(or widget-field-add-space
(null (widget-get widget :size))))