unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Incorrect interactive spec in customize-group
@ 2007-07-27 13:20 T. V. Raman
  2007-07-27 18:35 ` Stefan Monnier
  2007-07-28 14:11 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: T. V. Raman @ 2007-07-27 13:20 UTC (permalink / raw)
  To: emacs-devel

In the current CVS snapshot:

Command customize-group appears to have an  incorrect interactive
spec --- and consequently fails to prompt for the group to
customize when called interactively.

(defun customize-group (&optional group prompt-for-group other-window)
  "Customize GROUP, which must be a customization group."
  (interactive)

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Incorrect interactive spec in customize-group
  2007-07-27 13:20 Incorrect interactive spec in customize-group T. V. Raman
@ 2007-07-27 18:35 ` Stefan Monnier
  2007-07-30 13:31   ` T. V. Raman
  2007-07-28 14:11 ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2007-07-27 18:35 UTC (permalink / raw)
  To: raman; +Cc: emacs-devel

> Command customize-group appears to have an  incorrect interactive
> spec --- and consequently fails to prompt for the group to
> customize when called interactively.

Does the patch below fix it?


        Stefan


--- cus-edit.el	26 jui 2007 14:47:51 -0400	1.323
+++ cus-edit.el	27 jui 2007 14:32:06 -0400	
@@ -141,9 +141,9 @@
 
 (require 'cus-face)
 (require 'wid-edit)
-(eval-when-compile
-  (defvar custom-versions-load-alist)	; from cus-load
-  (defvar recentf-exclude))		; from recentf.el
+
+(defvar custom-versions-load-alist)	; from cus-load
+(defvar recentf-exclude)		; from recentf.el
 
 (condition-case nil
     (require 'cus-load)
@@ -1032,22 +1032,20 @@
 			  t nil nil (if group (symbol-name major-mode))))))))
   (customize-group (custom-group-of-mode mode)))
 
-
-;;;###autoload
-(defun customize-group (&optional group prompt-for-group other-window)
-  "Customize GROUP, which must be a customization group."
-  (interactive)
-  (and (null group)
-       (or prompt-for-group (called-interactively-p))
+(defun customize-read-group ()
        (let ((completion-ignore-case t))
-	 (setq group
 	       (completing-read "Customize group (default emacs): "
 				obarray
 				(lambda (symbol)
 				  (or (and (get symbol 'custom-loads)
 					   (not (get symbol 'custom-autoload)))
 				      (get symbol 'custom-group)))
-				t))))
+                     t)))
+
+;;;###autoload
+(defun customize-group (&optional group)
+  "Customize GROUP, which must be a customization group."
+  (interactive (list (customize-read-group)))
   (when (stringp group)
     (if (string-equal "" group)
 	(setq group 'emacs)
@@ -1055,15 +1053,8 @@
   (let ((name (format "*Customize Group: %s*"
 		      (custom-unlispify-tag-name group))))
     (if (get-buffer name)
-	(if other-window
-	    (let ((pop-up-windows t)
-		  (same-window-buffer-names nil)
-		  (same-window-regexps nil))
-	      (pop-to-buffer name))
-	  (pop-to-buffer name))
-      (funcall (if other-window
-		   'custom-buffer-create-other-window
-		 'custom-buffer-create)
+        (pop-to-buffer name)
+      (custom-buffer-create
 	       (list (list group 'custom-group))
 	       name
 	       (concat " for group "
@@ -1072,8 +1063,11 @@
 ;;;###autoload
 (defun customize-group-other-window (&optional group)
   "Customize GROUP, which must be a customization group, in another window."
-  (interactive)
-  (customize-group group t t))
+  (interactive (list (customize-read-group)))
+  (let ((pop-up-windows t)
+        (same-window-buffer-names nil)
+        (same-window-regexps nil))
+    (customize-group group)))
 
 ;;;###autoload
 (defalias 'customize-variable 'customize-option)
@@ -1254,30 +1248,22 @@
 	     (< minor1 minor2)))))
 
 ;;;###autoload
-(defun customize-face (&optional face prompt-for-face other-window)
+(defun customize-face (&optional face)
   "Customize FACE, which should be a face name or nil.
 If FACE is nil, customize all faces.  If FACE is actually a
 face-alias, customize the face it is aliased to.
 
 Interactively, when point is on text which has a face specified,
 suggest to customize that face, if it's customizable."
-  (interactive)
-  (and (null face)
-       (or prompt-for-face (called-interactively-p))
-       (setq face (read-face-name "Customize face" "all faces" t)))
+  (interactive (list (read-face-name "Customize face" "all faces" t)))
   (if (member face '(nil ""))
       (setq face (face-list)))
   (if (and (listp face) (null (cdr face)))
       (setq face (car face)))
-  (let ((create-buffer-fn (if other-window
-			      'custom-buffer-create-other-window
-			    'custom-buffer-create)))
     (if (listp face)
-	(funcall create-buffer-fn
+      (custom-buffer-create
 		 (custom-sort-items
-		  (mapcar (lambda (s)
-			    (list s 'custom-face))
-			  face)
+        (mapcar (lambda (s) (list s 'custom-face)) face)
 		  t nil)
 		 "*Customize Faces*")
       ;; If FACE is actually an alias, customize the face it is aliased to.
@@ -1285,10 +1271,10 @@
 	  (setq face (get face 'face-alias)))
       (unless (facep face)
 	(error "Invalid face %S" face))
-      (funcall create-buffer-fn
+    (custom-buffer-create
 	       (list (list face 'custom-face))
 	       (format "*Customize Face: %s*"
-		       (custom-unlispify-tag-name face))))))
+             (custom-unlispify-tag-name face)))))
 
 ;;;###autoload
 (defun customize-face-other-window (&optional face)
@@ -1297,8 +1283,11 @@
 
 Interactively, when point is on text which has a face specified,
 suggest to customize that face, if it's customizable."
-  (interactive)
-  (customize-face face t t))
+  (interactive (list (read-face-name "Customize face" "all faces" t)))
+  (let ((pop-up-windows t)
+        (same-window-buffer-names nil)
+        (same-window-regexps nil))
+    (customize-face face)))
 
 (defalias 'customize-customized 'customize-unsaved)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Incorrect interactive spec in customize-group
  2007-07-27 13:20 Incorrect interactive spec in customize-group T. V. Raman
  2007-07-27 18:35 ` Stefan Monnier
@ 2007-07-28 14:11 ` Richard Stallman
  2007-07-28 20:06   ` Stefan Monnier
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2007-07-28 14:11 UTC (permalink / raw)
  To: emacs-devel; +Cc: raman

Would someone please DTRT and ack?

MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 27 Jul 2007 06:20:03 -0700
To: emacs-devel@gnu.org
From: "T. V. Raman" <raman@users.sf.net>
Subject: Incorrect interactive spec in customize-group
Reply-To: raman@users.sf.net

In the current CVS snapshot:

Command customize-group appears to have an  incorrect interactive
spec --- and consequently fails to prompt for the group to
customize when called interactively.

(defun customize-group (&optional group prompt-for-group other-window)
  "Customize GROUP, which must be a customization group."
  (interactive)

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Incorrect interactive spec in customize-group
  2007-07-28 14:11 ` Richard Stallman
@ 2007-07-28 20:06   ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2007-07-28 20:06 UTC (permalink / raw)
  To: rms; +Cc: raman, emacs-devel

> Would someone please DTRT and ack?

I believe I fixed it,


        Stefan


> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Date: Fri, 27 Jul 2007 06:20:03 -0700
> To: emacs-devel@gnu.org
> From: "T. V. Raman" <raman@users.sf.net>
> Subject: Incorrect interactive spec in customize-group
> Reply-To: raman@users.sf.net

> In the current CVS snapshot:

> Command customize-group appears to have an  incorrect interactive
> spec --- and consequently fails to prompt for the group to
> customize when called interactively.

> (defun customize-group (&optional group prompt-for-group other-window)
>   "Customize GROUP, which must be a customization group."
>   (interactive)

> -- 
> Best Regards,
> --raman

      
> Email:  raman@users.sf.net
> WWW:    http://emacspeak.sf.net/raman/
> AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
> PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
> Google: tv+raman 
> IRC:    irc://irc.freenode.net/#emacs


> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel



> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Incorrect interactive spec in customize-group
  2007-07-27 18:35 ` Stefan Monnier
@ 2007-07-30 13:31   ` T. V. Raman
  0 siblings, 0 replies; 5+ messages in thread
From: T. V. Raman @ 2007-07-30 13:31 UTC (permalink / raw)
  To: monnier; +Cc: raman, emacs-devel

fixed now -- thanks!

>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
    >> Command customize-group appears to have an incorrect
    >> interactive spec --- and consequently fails to prompt for
    >> the group to customize when called interactively.
    Stefan> 
    Stefan> Does the patch below fix it?
    Stefan> 
    Stefan> 
    Stefan>         Stefan
    Stefan> 
    Stefan> 
    Stefan> --- cus-edit.el 26 jui 2007 14:47:51 -0400 1.323 +++
    Stefan> cus-edit.el 27 jui 2007 14:32:06 -0400 @@ -141,9
    Stefan> +141,9 @@
    Stefan>  
    Stefan>  (require 'cus-face) (require 'wid-edit)
    Stefan> -(eval-when-compile - (defvar
    Stefan> custom-versions-load-alist) ; from cus-load - (defvar
    Stefan> recentf-exclude)) ; from recentf.el + +(defvar
    Stefan> custom-versions-load-alist) ; from cus-load +(defvar
    Stefan> recentf-exclude) ; from recentf.el
    Stefan>  
    Stefan>  (condition-case nil (require 'cus-load) @@ -1032,22
    Stefan> +1032,20 @@ t nil nil (if group (symbol-name
    Stefan> major-mode)))))))) (customize-group
    Stefan> (custom-group-of-mode mode)))
    Stefan>  
    Stefan> - -;;;###autoload -(defun customize-group (&optional
    Stefan> group prompt-for-group other-window) - "Customize
    Stefan> GROUP, which must be a customization group."  -
    Stefan> (interactive) - (and (null group) - (or
    Stefan> prompt-for-group (called-interactively-p)) +(defun
    Stefan> customize-read-group () (let ((completion-ignore-case
    Stefan> t)) - (setq group (completing-read "Customize group
    Stefan> (default emacs): " obarray (lambda (symbol) (or (and
    Stefan> (get symbol 'custom-loads) (not (get symbol
    Stefan> 'custom-autoload))) (get symbol 'custom-group))) -
    Stefan> t)))) + t))) + +;;;###autoload +(defun
    Stefan> customize-group (&optional group) + "Customize GROUP,
    Stefan> which must be a customization group."  + (interactive
    Stefan> (list (customize-read-group))) (when (stringp group)
    Stefan> (if (string-equal "" group) (setq group 'emacs) @@
    Stefan> -1055,15 +1053,8 @@ (let ((name (format "*Customize
    Stefan> Group: %s*" (custom-unlispify-tag-name group)))) (if
    Stefan> (get-buffer name) - (if other-window - (let
    Stefan> ((pop-up-windows t) - (same-window-buffer-names nil)
    Stefan> - (same-window-regexps nil)) - (pop-to-buffer name))
    Stefan> - (pop-to-buffer name)) - (funcall (if other-window -
    Stefan> 'custom-buffer-create-other-window -
    Stefan> 'custom-buffer-create) + (pop-to-buffer name) +
    Stefan> (custom-buffer-create (list (list group
    Stefan> 'custom-group)) name (concat " for group " @@ -1072,8
    Stefan> +1063,11 @@ ;;;###autoload (defun
    Stefan> customize-group-other-window (&optional group)
    Stefan> "Customize GROUP, which must be a customization
    Stefan> group, in another window."  - (interactive) -
    Stefan> (customize-group group t t)) + (interactive (list
    Stefan> (customize-read-group))) + (let ((pop-up-windows t) +
    Stefan> (same-window-buffer-names nil) + (same-window-regexps
    Stefan> nil)) + (customize-group group)))
    Stefan>  
    Stefan>  ;;;###autoload (defalias 'customize-variable
    Stefan> 'customize-option) @@ -1254,30 +1248,22 @@ (< minor1
    Stefan> minor2)))))
    Stefan>  
    Stefan>  ;;;###autoload -(defun customize-face (&optional
    Stefan> face prompt-for-face other-window) +(defun
    Stefan> customize-face (&optional face) "Customize FACE,
    Stefan> which should be a face name or nil.  If FACE is nil,
    Stefan> customize all faces.  If FACE is actually a
    Stefan> face-alias, customize the face it is aliased to.
    Stefan>  
    Stefan>  Interactively, when point is on text which has a
    Stefan> face specified, suggest to customize that face, if
    Stefan> it's customizable."  - (interactive) - (and (null
    Stefan> face) - (or prompt-for-face (called-interactively-p))
    Stefan> - (setq face (read-face-name "Customize face" "all
    Stefan> faces" t))) + (interactive (list (read-face-name
    Stefan> "Customize face" "all faces" t))) (if (member face
    Stefan> '(nil "")) (setq face (face-list))) (if (and (listp
    Stefan> face) (null (cdr face))) (setq face (car face))) -
    Stefan> (let ((create-buffer-fn (if other-window -
    Stefan> 'custom-buffer-create-other-window -
    Stefan> 'custom-buffer-create))) (if (listp face) - (funcall
    Stefan> create-buffer-fn + (custom-buffer-create
    Stefan> (custom-sort-items - (mapcar (lambda (s) - (list s
    Stefan> 'custom-face)) - face) + (mapcar (lambda (s) (list s
    Stefan> 'custom-face)) face) t nil) "*Customize Faces*") ;;
    Stefan> If FACE is actually an alias, customize the face it
    Stefan> is aliased to.  @@ -1285,10 +1271,10 @@ (setq face
    Stefan> (get face 'face-alias))) (unless (facep face) (error
    Stefan> "Invalid face %S" face)) - (funcall create-buffer-fn
    Stefan> + (custom-buffer-create (list (list face
    Stefan> 'custom-face)) (format "*Customize Face: %s*" -
    Stefan> (custom-unlispify-tag-name face)))))) +
    Stefan> (custom-unlispify-tag-name face)))))
    Stefan>  
    Stefan>  ;;;###autoload (defun customize-face-other-window
    Stefan> (&optional face) @@ -1297,8 +1283,11 @@
    Stefan>  
    Stefan>  Interactively, when point is on text which has a
    Stefan> face specified, suggest to customize that face, if
    Stefan> it's customizable."  - (interactive) -
    Stefan> (customize-face face t t)) + (interactive (list
    Stefan> (read-face-name "Customize face" "all faces" t))) +
    Stefan> (let ((pop-up-windows t) + (same-window-buffer-names
    Stefan> nil) + (same-window-regexps nil)) + (customize-face
    Stefan> face)))
    Stefan>  
    Stefan>  (defalias 'customize-customized 'customize-unsaved)
    Stefan>  

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-30 13:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 13:20 Incorrect interactive spec in customize-group T. V. Raman
2007-07-27 18:35 ` Stefan Monnier
2007-07-30 13:31   ` T. V. Raman
2007-07-28 14:11 ` Richard Stallman
2007-07-28 20:06   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).