changeset 66957:38c5bc4332b9

(lisp, c, tex): Add :link (custom-group-link font-lock-faces) to defgroup. (custom-variable-prompt): Clarify the code.
author Juri Linkov <juri@jurta.org>
date Thu, 17 Nov 2005 07:18:07 +0000
parents 0f46b2eb27ed
children b42f333ee0f4
files lisp/cus-edit.el
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Thu Nov 17 07:16:45 2005 +0000
+++ b/lisp/cus-edit.el	Thu Nov 17 07:18:07 2005 +0000
@@ -212,11 +212,13 @@
 
 (defgroup lisp nil
   "Lisp support, including Emacs Lisp."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'languages
   :group 'development)
 
 (defgroup c nil
   "Support for the C language and related languages."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :link '(custom-manual "(ccmode)")
   :group 'languages)
 
@@ -323,6 +325,7 @@
 
 (defgroup tex nil
   "Code related to the TeX formatter."
+  :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
   :group 'wp)
 
 (defgroup faces nil
@@ -490,15 +493,14 @@
 (defun custom-variable-prompt ()
   "Prompt for a custom variable, defaulting to the variable at point.
 Return a list suitable for use in `interactive'."
-   (let ((v (variable-at-point))
-	 (enable-recursive-minibuffers t)
-	 val)
-     (setq val (if (and (symbolp v) (custom-variable-p v))
-		   (completing-read
-		    (format "Customize option (default %s): " v) obarray
-		    'custom-variable-p t nil nil (symbol-name v))
-		 (completing-read "Customize option: " obarray
-				  'custom-variable-p t)))
+   (let* ((v (variable-at-point))
+	  (default (and (symbolp v) (custom-variable-p v) (symbol-name v)))
+	  (enable-recursive-minibuffers t)
+	  val)
+     (setq val (completing-read
+		(if default (format "Customize option (default %s): " default)
+		  "Customize option: ")
+		obarray 'custom-variable-p t nil nil default))
      (list (if (equal val "")
 	       (if (symbolp v) v nil)
 	     (intern val)))))