emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108008: Remove non-option variabl


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108008: Remove non-option variable handling from customize-apropos
Date: Fri, 02 Nov 2012 02:32:31 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108008
fixes bug: http://debbugs.gnu.org/11176
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2012-04-23 20:37:55 +0800
message:
  Remove non-option variable handling from customize-apropos
  and enable use of word lists for customize-apropos-options etc.
  
  * lisp/apropos.el (apropos-read-pattern): Make prompt less cryptic.
  
  * lisp/cus-edit.el (customize-apropos, customize-apropos-options):
  Disable matching of non-option variables.
  (customize-option, customize-option-other-window)
  (customize-changed-options): Doc fix.
  (customize-apropos-options, customize-apropos-faces)
  (customize-apropos-groups): Use apropos-read-pattern.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/apropos.el
  lisp/cus-edit.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-04-22 18:04:54 +0000
+++ b/etc/NEWS  2012-04-23 12:37:55 +0000
@@ -78,6 +78,10 @@
 
 *** `custom-reset-button-menu' now defaults to t.
 
+*** Non-option variables are never matched in `customize-apropos' and
+`customize-apropos-options' (i.e. the prefix argument does nothing for
+these commands now).
+
 ** erc will look up server/channel names via auth-source and use the
 channel keys found, if any.
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-23 11:57:06 +0000
+++ b/lisp/ChangeLog    2012-04-23 12:37:55 +0000
@@ -1,3 +1,14 @@
+2012-04-23  Chong Yidong  <address@hidden>
+
+       * cus-edit.el (customize-apropos, customize-apropos-options):
+       Disable matching of non-option variables (Bug#11176).
+       (customize-option, customize-option-other-window)
+       (customize-changed-options): Doc fix.
+       (customize-apropos-options, customize-apropos-faces)
+       (customize-apropos-groups): Use apropos-read-pattern (Bug#11124).
+
+       * apropos.el (apropos-read-pattern): Make prompt less cryptic.
+
 2012-04-23  Michael Albinus  <address@hidden>
 
        * net/xesam.el (xesam-mode-map): Use let-bound map in

=== modified file 'lisp/apropos.el'
--- a/lisp/apropos.el   2012-04-09 12:36:01 +0000
+++ b/lisp/apropos.el   2012-04-23 12:37:55 +0000
@@ -333,7 +333,7 @@
 SUBJECT is a string that is included in the prompt to identify what
 kind of objects to search."
   (let ((pattern
-        (read-string (concat "Apropos " subject " (word list or regexp): "))))
+        (read-string (concat "Search for " subject " (word list or regexp): 
"))))
     (if (string-equal (regexp-quote pattern) pattern)
        ;; Split into words
        (split-string pattern "[ \t]+")

=== modified file 'lisp/cus-edit.el'
--- a/lisp/cus-edit.el  2012-04-22 17:58:14 +0000
+++ b/lisp/cus-edit.el  2012-04-23 12:37:55 +0000
@@ -1131,7 +1131,7 @@
 
 ;;;###autoload
 (defun customize-option (symbol)
-  "Customize SYMBOL, which must be a user option variable."
+  "Customize SYMBOL, which must be a user option."
   (interactive (custom-variable-prompt))
   (unless symbol
     (error "No variable specified"))
@@ -1147,7 +1147,7 @@
 
 ;;;###autoload
 (defun customize-option-other-window (symbol)
-  "Customize SYMBOL, which must be a user option variable.
+  "Customize SYMBOL, which must be a user option.
 Show the buffer in another window, but don't select it."
   (interactive (custom-variable-prompt))
   (unless symbol
@@ -1201,9 +1201,10 @@
 ;;;###autoload
 (defun customize-changed-options (&optional since-version)
   "Customize all settings whose meanings have changed in Emacs itself.
-This includes new user option variables and faces, and new
-customization groups, as well as older options and faces whose meanings
-or default values have changed since the previous major Emacs release.
+This includes new user options and faces, and new customization
+groups, as well as older options and faces whose meanings or
+default values have changed since the previous major Emacs
+release.
 
 With argument SINCE-VERSION (a string), customize all settings
 that were added or redefined since that version."
@@ -1411,7 +1412,7 @@
 
 ;;;###autoload
 (defun customize-apropos (pattern &optional type)
-  "Customize all loaded options, faces and groups matching PATTERN.
+  "Customize loaded options, faces and groups matching PATTERN.
 PATTERN can be a word, a list of words (separated by spaces),
 or a regexp (using some regexp special characters).  If it is a word,
 search for matches for that word as a substring.  If it is a list of words,
@@ -1419,62 +1420,50 @@
 
 If TYPE is `options', include only options.
 If TYPE is `faces', include only faces.
-If TYPE is `groups', include only groups.
-If TYPE is t (interactively, with prefix arg), include variables
-that are not customizable options, as well as faces and groups
-\(but we recommend using `apropos-variable' instead)."
-  (interactive (list (apropos-read-pattern "symbol") current-prefix-arg))
+If TYPE is `groups', include only groups."
+  (interactive (list (apropos-read-pattern "symbol") nil))
   (require 'apropos)
+  (unless (memq type '(nil options faces groups))
+    (error "Invalid setting type %s" (symbol-name type)))
   (apropos-parse-pattern pattern)
   (let (found)
     (mapatoms
      `(lambda (symbol)
        (when (string-match apropos-regexp (symbol-name symbol))
-         ,(if (not (memq type '(faces options)))
+         ,(if (memq type '(nil groups))
               '(if (get symbol 'custom-group)
                    (push (list symbol 'custom-group) found)))
-         ,(if (not (memq type '(options groups)))
+         ,(if (memq type '(nil faces))
               '(if (custom-facep symbol)
                    (push (list symbol 'custom-face) found)))
-         ,(if (not (memq type '(groups faces)))
+         ,(if (memq type '(nil options))
               `(if (and (boundp symbol)
                         (eq (indirect-variable symbol) symbol)
                         (or (get symbol 'saved-value)
-                            (custom-variable-p symbol)
-                            ,(if (not (memq type '(nil options)))
-                                 '(get symbol 'variable-documentation))))
+                            (custom-variable-p symbol)))
                    (push (list symbol 'custom-variable) found))))))
-    (if (not found)
-       (error "No %s matching %s"
-              (if (eq type t)
-                  "items"
-                (format "customizable %s"
-                        (if (memq type '(options faces groups))
-                            (symbol-name type)
-                          "items")))
-              pattern)
-      (custom-buffer-create
-       (custom-sort-items found t custom-buffer-order-groups)
-       "*Customize Apropos*"))))
+    (unless found
+      (error "No customizable %s matching %s" (symbol-name type) pattern))
+    (custom-buffer-create
+     (custom-sort-items found t custom-buffer-order-groups)
+     "*Customize Apropos*")))
 
 ;;;###autoload
-(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 it is better to use `apropos-variable' if you want to find those)."
-  (interactive "sCustomize options (regexp): \nP")
-  (customize-apropos regexp (or arg 'options)))
+(defun customize-apropos-options (regexp &optional ignored)
+  "Customize all loaded customizable options matching REGEXP."
+  (interactive (list (apropos-read-pattern "options")))
+  (customize-apropos regexp 'options))
 
 ;;;###autoload
 (defun customize-apropos-faces (regexp)
   "Customize all loaded faces matching REGEXP."
-  (interactive "sCustomize faces (regexp): \n")
+  (interactive (list (apropos-read-pattern "faces")))
   (customize-apropos regexp 'faces))
 
 ;;;###autoload
 (defun customize-apropos-groups (regexp)
   "Customize all loaded groups matching REGEXP."
-  (interactive "sCustomize groups (regexp): \n")
+  (interactive (list (apropos-read-pattern "groups")))
   (customize-apropos regexp 'groups))
 
 ;;; Buffer.


reply via email to

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