Replace "Maintainer: FSF" with the emacs-devel mailing address
[bpt/emacs.git] / lisp / cus-edit.el
index b50c1a5..212e290 100644 (file)
@@ -1,9 +1,9 @@
-;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
+;;; cus-edit.el --- tools for customizing Emacs and Lisp packages -*- lexical-binding:t -*-
 ;;
-;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 1999-2014 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: help, faces
 ;; Package: emacs
 
@@ -699,7 +699,7 @@ If `last', order groups after non-groups."
 
 (defun custom-sort-items (items sort-alphabetically order-groups)
   "Return a sorted copy of ITEMS.
-ITEMS should be a `custom-group' property.
+ITEMS should be a list of `custom-group' properties.
 If SORT-ALPHABETICALLY non-nil, sort alphabetically.
 If ORDER-GROUPS is `first' order groups before non-groups, if `last' order
 groups after non-groups, if nil do not order groups at all."
@@ -1057,8 +1057,8 @@ the resulting list value now.  Otherwise, add an entry to
       (let ((coding-system-for-read nil))
        (customize-save-variable list-var (eval list-var)))
     (add-hook 'after-init-hook
-             `(lambda ()
-                (customize-push-and-save ',list-var ',elts)))))
+             (lambda ()
+                (customize-push-and-save list-var elts)))))
 
 ;;;###autoload
 (defun customize ()
@@ -1415,6 +1415,7 @@ suggest to customize that face, if it's customizable."
                            "*Customize Saved*"))))
 
 (declare-function apropos-parse-pattern "apropos" (pattern))
+(defvar apropos-regexp)
 
 ;;;###autoload
 (defun customize-apropos (pattern &optional type)
@@ -1431,25 +1432,28 @@ If TYPE is `groups', include only groups."
   (require 'apropos)
   (unless (memq type '(nil options faces groups))
     (error "Invalid setting type %s" (symbol-name type)))
-  (apropos-parse-pattern pattern)
+  (apropos-parse-pattern pattern)    ;Sets apropos-regexp by side-effect: Yuck!
   (let (found)
     (mapatoms
-     `(lambda (symbol)
-       (when (string-match-p apropos-regexp (symbol-name symbol))
-         ,(if (memq type '(nil groups))
-              '(if (get symbol 'custom-group)
-                   (push (list symbol 'custom-group) found)))
-         ,(if (memq type '(nil faces))
-              '(if (custom-facep symbol)
-                   (push (list symbol 'custom-face) found)))
-         ,(if (memq type '(nil options))
-              `(if (and (boundp symbol)
-                        (eq (indirect-variable symbol) symbol)
-                        (or (get symbol 'saved-value)
-                            (custom-variable-p symbol)))
-                   (push (list symbol 'custom-variable) found))))))
+     (lambda (symbol)
+       (when (string-match-p apropos-regexp (symbol-name symbol))
+         (if (memq type '(nil groups))
+             (if (get symbol 'custom-group)
+                 (push (list symbol 'custom-group) found)))
+         (if (memq type '(nil faces))
+             (if (custom-facep symbol)
+                 (push (list symbol 'custom-face) found)))
+         (if (memq type '(nil options))
+             (if (and (boundp symbol)
+                      (eq (indirect-variable symbol) symbol)
+                      (or (get symbol 'saved-value)
+                          (custom-variable-p symbol)))
+                 (push (list symbol 'custom-variable) found))))))
     (unless found
-      (error "No customizable %s matching %s" (symbol-name type) pattern))
+      (error "No customizable %s matching %s" (if (not type)
+                                                 "group, face, or option"
+                                               (symbol-name type))
+            pattern))
     (custom-buffer-create
      (custom-sort-items found t custom-buffer-order-groups)
      "*Customize Apropos*")))
@@ -1526,7 +1530,8 @@ not for everybody."
 Optional NAME is the name of the buffer.
 OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
 SYMBOL is a customization option, and WIDGET is a widget for editing
-that option."
+that option.
+DESCRIPTION is unused."
   (pop-to-buffer-same-window (custom-get-fresh-buffer (or name "*Customization*")))
   (custom-buffer-create-internal options description))
 
@@ -1621,8 +1626,8 @@ or a regular expression.")
              (widget-create
               'editable-field
               :size 40 :help-echo echo
-              :action `(lambda (widget &optional event)
-                         (customize-apropos (split-string (widget-value widget)))))))
+              :action (lambda (widget &optional _event)
+                         (customize-apropos (split-string (widget-value widget)))))))
        (widget-insert " ")
        (widget-create-child-and-convert
         search-widget 'push-button
@@ -1930,7 +1935,7 @@ SAVED and set." "\
 something in this group has been set and saved.")
     (themed "o" custom-themed "\
 THEMED." "\
-visible group members are all at standard values.")
+visible group members are set by enabled themes.")
     (rogue "@" custom-rogue "\
 NO CUSTOMIZATION DATA; not intended to be customized." "\
 something in this group is not prepared for customization.")
@@ -1960,6 +1965,8 @@ STATE is one of the following symbols:
    This item is marked for saving.
 `rogue'
    This item has no customization information.
+`themed'
+   This item was set by an enabled Custom theme.
 `standard'
    This item is unchanged from the standard setting.