emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/cus-edit.el


From: Juri Linkov
Subject: [Emacs-diffs] Changes to emacs/lisp/cus-edit.el
Date: Mon, 23 Jan 2006 01:21:24 +0000

Index: emacs/lisp/cus-edit.el
diff -u emacs/lisp/cus-edit.el:1.279 emacs/lisp/cus-edit.el:1.280
--- emacs/lisp/cus-edit.el:1.279        Thu Jan 19 23:26:04 2006
+++ emacs/lisp/cus-edit.el      Mon Jan 23 01:21:24 2006
@@ -1470,18 +1470,14 @@
                               (if custom-raised-buttons
                                   "`Raised' text indicates"
                                 "Square brackets indicate")))
-       (widget-create 'info-link
+       (widget-create 'custom-manual
                       :tag "Custom file"
-                      :button-face 'custom-link
-                      :mouse-face 'highlight
                       "(emacs)Saving Customizations")
        (widget-insert
         " for information on how to save in a different file.\n
 See ")
-       (widget-create 'info-link
+       (widget-create 'custom-manual
                       :tag "Help"
-                      :button-face 'custom-link
-                      :mouse-face 'highlight
                       :help-echo "Read the online help."
                       "(emacs)Easy Customization")
        (widget-insert " for more information.\n\n")
@@ -1497,10 +1493,8 @@
   (if (not custom-buffer-verbose-help)
       (progn
        (widget-insert " ")
-       (widget-create 'info-link
+       (widget-create 'custom-manual
                       :tag "Help"
-                      :button-face 'custom-link
-                      :mouse-face 'highlight
                       :help-echo "Read the online help."
                       "(emacs)Easy Customization")))
   (when (or custom-file user-init-file)
@@ -1648,7 +1642,7 @@
   (let ((custom-buffer-style 'tree))
     (custom-toggle-parent widget)))
 
-(define-widget 'custom-browse-group-tag 'push-button
+(define-widget 'custom-browse-group-tag 'custom-group-link
   "Show parent in other window when activated."
   :tag "Group"
   :tag-glyph "folder"
@@ -1658,7 +1652,7 @@
   (let ((parent (widget-get widget :parent)))
     (customize-group-other-window (widget-value parent))))
 
-(define-widget 'custom-browse-variable-tag 'push-button
+(define-widget 'custom-browse-variable-tag 'custom-group-link
   "Show parent in other window when activated."
   :tag "Option"
   :tag-glyph "option"
@@ -1668,7 +1662,7 @@
   (let ((parent (widget-get widget :parent)))
     (customize-variable-other-window (widget-value parent))))
 
-(define-widget 'custom-browse-face-tag 'push-button
+(define-widget 'custom-browse-face-tag 'custom-group-link
   "Show parent in other window when activated."
   :tag "Face"
   :tag-glyph "face"
@@ -2010,13 +2004,7 @@
   :group 'custom-faces)
 
 (defface custom-button-unraised
-  '((((min-colors 88)
-      (class color) (background light)) :foreground "blue1" :underline t)
-    (((class color) (background light)) :foreground "blue" :underline t)
-    (((min-colors 88)
-      (class color) (background dark)) :foreground "cyan1" :underline t)
-    (((class color) (background dark)) :foreground "cyan" :underline t)
-    (t :underline t))
+  '((t :inherit underline))
   "Face for custom buffer buttons if `custom-raised-buttons' is nil."
   :version "22.1"
   :group 'custom-faces)
@@ -2071,15 +2059,10 @@
 (put 'custom-state-face 'face-alias 'custom-state)
 
 (defface custom-link
-  '((((min-colors 88)
-      (class color) (background light)) :foreground "blue1" :underline t)
-    (((class color) (background light)) :foreground "blue" :underline t)
-    (((min-colors 88)
-      (class color) (background dark)) :foreground "cyan1" :underline t)
-    (((class color) (background dark)) :foreground "cyan" :underline t)
-    (t :underline t))
-  "Face for Info links in customization buffers."
-  :group 'info)
+  '((t :inherit link))
+  "Face for links in customization buffers."
+  :version "22.1"
+  :group 'custom-faces)
 
 (define-widget 'custom 'default
   "Customize a user option."
@@ -2246,8 +2229,6 @@
                  (insert " ")
                  (push (widget-create-child-and-convert
                         widget 'custom-group-link
-                        :button-face 'custom-link
-                        :mouse-face 'highlight
                         :tag (custom-unlispify-tag-name symbol)
                         symbol)
                        buttons)
@@ -3607,6 +3588,8 @@
 
 (define-widget 'custom-group-link 'link
   "Show parent in other window when activated."
+  :button-face 'custom-link
+  :mouse-face 'highlight
   :help-echo "Create customization buffer for this group."
   :action 'custom-group-link-action)
 
@@ -3805,8 +3788,6 @@
           (if (eq custom-buffer-style 'links)
               (push (widget-create-child-and-convert
                      widget 'custom-group-link
-                     :button-face 'custom-link
-                     :mouse-face 'highlight
                      :tag "Go to Group"
                      symbol)
                     buttons)
@@ -4400,6 +4381,15 @@
     ["Erase Customization" Custom-reset-standard t]
     ["Info" (info "(emacs)Easy Customization") t]))
 
+(defvar custom-field-keymap
+  (let ((map (copy-keymap widget-field-keymap)))
+    (define-key map "\C-c\C-c" 'Custom-set)
+    (define-key map "\C-x\C-s" 'Custom-save)
+    map)
+  "Keymap used inside editable fields in customization buffers.")
+
+(widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap)
+
 (defun Custom-goto-parent ()
   "Go to the parent group listed at the top of this buffer.
 If several parents are listed, go to the first of them."
@@ -4425,17 +4415,18 @@
 
 The following commands are available:
 
-Move to next button or editable field.     \\[widget-forward]
-Move to previous button or editable field. \\[widget-backward]
-\\<widget-field-keymap>\
+\\<widget-keymap>\
+Move to next button, link or editable field.     \\[widget-forward]
+Move to previous button, link or editable field. \\[widget-backward]
+\\<custom-field-keymap>\
 Complete content of editable text field.   \\[widget-complete]
 \\<custom-mode-map>\
-Invoke button under the mouse pointer.     \\[Custom-move-and-invoke]
-Invoke button under point.                \\[widget-button-press]
+Invoke button under the mouse pointer.     \\[widget-move-and-invoke]
+Invoke button under point.                 \\[widget-button-press]
 Set all options from current text.         \\[Custom-set]
 Make values in current text permanent.     \\[Custom-save]
-Make text match actual option values.     \\[Custom-reset-current]
-Reset options to permanent settings.      \\[Custom-reset-saved]
+Make text match actual option values.      \\[Custom-reset-current]
+Reset options to permanent settings.       \\[Custom-reset-saved]
 Erase customizations; set options
   and buffer text to the standard values.  \\[Custom-reset-standard]
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]