unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23649: 24.5; `customize-mode'
@ 2016-05-29 21:40 Drew Adams
  2016-06-25  3:14 ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2016-05-29 21:40 UTC (permalink / raw)
  To: 23649

The doc string is incorrect:

1. It says, "If a prefix C-u was given..."

   Besides the fact that we write `C-u', not C-u, this is wrong because
   it suggests that the prefix arg must be a plain `C-u', that you
   cannot, for example, use `M-9', `C--', or even `C-u 3'.  It should
   just say "If a prefix arg is given..."

2. It is not true that the options you get are related to the current
   major mode, or even to any major mode.

   It would be OK to say this as a first line, if the rest of the doc
   string made clear that the options can be related to a minor mode,
   that is, MODE can name a minor, not just a major mode.

   What the doc should say is that it customizes options related to
   MODE, which can name a major or a minor mode, and that by default
   MODE is the current major mode.

   (This also takes care of specifying the argument and thus behavior
   when called from Lisp, something missing from the doc string now.)

   Example mode-string, corrected:

   "Customize options related to a major or minor mode.
By default the current major mode is used.
With a prefix argument or if the current major mode has no known group,
you are prompted for the MODE to customize."

3. The prompt is thus incorrect as well: the candidates are not
   necessarily major-mode names.  It should just say "Mode: ".

See also bugs #11299 and #11301, which have not been addressed.


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





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

* bug#23649: 24.5; `customize-mode'
  2016-05-29 21:40 bug#23649: 24.5; `customize-mode' Drew Adams
@ 2016-06-25  3:14 ` Noam Postavsky
  2016-06-25  4:25   ` bug#23649: `customize-mode' Drew Adams
  2016-06-25  8:03   ` bug#23649: 24.5; `customize-mode' Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Noam Postavsky @ 2016-06-25  3:14 UTC (permalink / raw)
  To: 23649

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

tag 23649 + patch
quit

>   Example mode-string, corrected:
>
>    "Customize options related to a major or minor mode.
> By default the current major mode is used.
> With a prefix argument or if the current major mode has no known group,
> you are prompted for the MODE to customize."
> 3. The prompt is thus incorrect as well: the candidates are not
>    necessarily major-mode names.  It should just say "Mode: ".

Looks good to me, so I propose to push the attached patch with this
docstring (and removal of "Major" from the prompts) to emacs-25. Any
objections?

[-- Attachment #2: 0001-Fix-docstring-and-prompt-for-customize-mode.patch --]
[-- Type: text/x-patch, Size: 1490 bytes --]

From c8ddd4f66e8cfec42c5b443511a6d7f37a1b7029 Mon Sep 17 00:00:00 2001
From: Drew Adams <drew.adams@oracle.com>
Date: Fri, 24 Jun 2016 22:50:24 -0400
Subject: [PATCH 1/2] Fix docstring and prompt for customize-mode

* lisp/cus-edit.el (customize-mode): This function works with both major
and minor modes, make docstring and prompt reflect that (Bug #23649).
---
 lisp/cus-edit.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index d7db353..7826506 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1072,9 +1072,10 @@ customize
 
 ;;;###autoload
 (defun customize-mode (mode)
-  "Customize options related to the current major mode.
-If a prefix \\[universal-argument] was given (or if the current major mode has no known group),
-then prompt for the MODE to customize."
+  "Customize options related to a major or minor mode.
+By default the current major mode is used.  With a prefix
+argument or if the current major mode has no known group, prompt
+for the MODE to customize."
   (interactive
    (list
     (let ((completion-regexp-list '("-mode\\'"))
@@ -1083,8 +1084,8 @@ customize-mode
 	  major-mode
 	(intern
 	 (completing-read (if group
-			      (format "Major mode (default %s): " major-mode)
-			    "Major mode: ")
+			      (format "Mode (default %s): " major-mode)
+			    "Mode: ")
 			  obarray
 			  'custom-group-of-mode
 			  t nil nil (if group (symbol-name major-mode))))))))
-- 
2.8.0


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

* bug#23649: `customize-mode'
  2016-06-25  3:14 ` Noam Postavsky
@ 2016-06-25  4:25   ` Drew Adams
  2016-06-25  8:03   ` bug#23649: 24.5; `customize-mode' Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: Drew Adams @ 2016-06-25  4:25 UTC (permalink / raw)
  To: Noam Postavsky, 23649

> Looks good to me, so I propose to push the attached patch with this
> docstring (and removal of "Major" from the prompts) to emacs-25. Any
> objections?

Thanks for looking at this. However, you (or something?) removed the
bug number from the Subject line, so it took me a while to find
this thread and realize that this reply was for a bug report I filed.

Please leave the Subject lines of bug posts as they are.  Thx.





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

* bug#23649: 24.5; `customize-mode'
  2016-06-25  3:14 ` Noam Postavsky
  2016-06-25  4:25   ` bug#23649: `customize-mode' Drew Adams
@ 2016-06-25  8:03   ` Eli Zaretskii
  2016-06-25 13:08     ` Noam Postavsky
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-06-25  8:03 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 23649

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Fri, 24 Jun 2016 23:14:08 -0400
> 
> >   Example mode-string, corrected:
> >
> >    "Customize options related to a major or minor mode.
> > By default the current major mode is used.
> > With a prefix argument or if the current major mode has no known group,
> > you are prompted for the MODE to customize."
> > 3. The prompt is thus incorrect as well: the candidates are not
> >    necessarily major-mode names.  It should just say "Mode: ".
> 
> Looks good to me, so I propose to push the attached patch with this
> docstring (and removal of "Major" from the prompts) to emacs-25. Any
> objections?

No, please push to master.

Thanks.





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

* bug#23649: 24.5; `customize-mode'
  2016-06-25  8:03   ` bug#23649: 24.5; `customize-mode' Eli Zaretskii
@ 2016-06-25 13:08     ` Noam Postavsky
  2016-06-25 13:09       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2016-06-25 13:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23649

On Sat, Jun 25, 2016 at 4:03 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Noam Postavsky <npostavs@users.sourceforge.net>
>> Date: Fri, 24 Jun 2016 23:14:08 -0400
>>
>> >   Example mode-string, corrected:
>> >
>> >    "Customize options related to a major or minor mode.
>> > By default the current major mode is used.
>> > With a prefix argument or if the current major mode has no known group,
>> > you are prompted for the MODE to customize."
>> > 3. The prompt is thus incorrect as well: the candidates are not
>> >    necessarily major-mode names.  It should just say "Mode: ".
>>
>> Looks good to me, so I propose to push the attached patch with this
>> docstring (and removal of "Major" from the prompts) to emacs-25. Any
>> objections?
>
> No, please push to master.

Since this only touches docstrings and prompt strings, why not push to emacs-25?





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

* bug#23649: 24.5; `customize-mode'
  2016-06-25 13:08     ` Noam Postavsky
@ 2016-06-25 13:09       ` Eli Zaretskii
  2016-06-25 17:35         ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-06-25 13:09 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 23649

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Sat, 25 Jun 2016 09:08:18 -0400
> Cc: 23649@debbugs.gnu.org
> 
> >> Looks good to me, so I propose to push the attached patch with this
> >> docstring (and removal of "Major" from the prompts) to emacs-25. Any
> >> objections?
> >
> > No, please push to master.
> 
> Since this only touches docstrings and prompt strings, why not push to emacs-25?

OK.





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

* bug#23649: 24.5; `customize-mode'
  2016-06-25 13:09       ` Eli Zaretskii
@ 2016-06-25 17:35         ` Noam Postavsky
  2016-06-25 20:44           ` Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2016-06-25 17:35 UTC (permalink / raw)
  To: 23649-done

Version: 25.1

Pushed to emacs-25 f2536958ec711b50a0cf8714defb921193ea8ae4

Drew Adams wrote:
> Thanks for looking at this. However, you (or something?) removed the
> bug number from the Subject line, so it took me a while to find this
> thread and realize that this reply was for a bug report I filed.

Ah, I manually copied from
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23649#5 which doesn't
have the bug number in subject (because the bug nubmer was allocated
yet). At some point I should setup gnus again so I can have this set
correctly automatically.





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

* bug#23649: 24.5; `customize-mode'
  2016-06-25 17:35         ` Noam Postavsky
@ 2016-06-25 20:44           ` Drew Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2016-06-25 20:44 UTC (permalink / raw)
  To: Noam Postavsky, 23649-done

> > Thanks for looking at this. However, you (or something?) removed the
> > bug number from the Subject line, so it took me a while to find this
> > thread and realize that this reply was for a bug report I filed.
> 
> Ah, I manually copied from
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23649#5 which doesn't
> have the bug number in subject (because the bug nubmer was allocated
> yet). At some point I should setup gnus again so I can have this set
> correctly automatically.

OK; sorry if it wasn't due to something on your part.  Not a big
deal, in any case.  Thx.





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

end of thread, other threads:[~2016-06-25 20:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-29 21:40 bug#23649: 24.5; `customize-mode' Drew Adams
2016-06-25  3:14 ` Noam Postavsky
2016-06-25  4:25   ` bug#23649: `customize-mode' Drew Adams
2016-06-25  8:03   ` bug#23649: 24.5; `customize-mode' Eli Zaretskii
2016-06-25 13:08     ` Noam Postavsky
2016-06-25 13:09       ` Eli Zaretskii
2016-06-25 17:35         ` Noam Postavsky
2016-06-25 20:44           ` Drew Adams

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).