unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
       [not found] <E1VdL1r-0000Yy-3H@vcs.savannah.gnu.org>
@ 2013-11-04 16:43 ` Stefan Monnier
  2013-11-04 17:04   ` Bozhidar Batsov
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-11-04 16:43 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: emacs-devel

> +Entry to this mode calls the value of `ruby-mode-hook'
> +if that value is non-nil."

That's problematic:
- it's redundant since define-derived-mode already adds "In addition to
  any hooks its parent mode `prog-mode' might have run,\nthis mode runs
  the hook `ruby-mode-hook', as the final step\nduring initialization."
- hooks aren't "called" but are "run".
- it's not just "the value of `ruby-mode-hook'", but the *values*, since
  hooks use both the buffer-local and the global value of the symbol.
- the hook is run even if it is nil (or unbound): running it will simply
  not do anything.


        Stefan



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

* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
  2013-11-04 16:43 ` [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring Stefan Monnier
@ 2013-11-04 17:04   ` Bozhidar Batsov
  2013-11-04 17:05     ` Bozhidar Batsov
  0 siblings, 1 reply; 7+ messages in thread
From: Bozhidar Batsov @ 2013-11-04 17:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

I didn't like this as well, but I added it since that exact text appears in
the docstrings of many major modes. I though it was something like an
unwritten convention, but I guess many people have simply been copy-pasting
the same code over the years.  I'll have it removed.


On 4 November 2013 18:43, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > +Entry to this mode calls the value of `ruby-mode-hook'
> > +if that value is non-nil."
>
> That's problematic:
> - it's redundant since define-derived-mode already adds "In addition to
>   any hooks its parent mode `prog-mode' might have run,\nthis mode runs
>   the hook `ruby-mode-hook', as the final step\nduring initialization."
> - hooks aren't "called" but are "run".
> - it's not just "the value of `ruby-mode-hook'", but the *values*, since
>   hooks use both the buffer-local and the global value of the symbol.
> - the hook is run even if it is nil (or unbound): running it will simply
>   not do anything.
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 1507 bytes --]

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

* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
  2013-11-04 17:04   ` Bozhidar Batsov
@ 2013-11-04 17:05     ` Bozhidar Batsov
  2013-11-04 18:50       ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Bozhidar Batsov @ 2013-11-04 17:05 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

This text should probably be removed from the description of other major
modes as well, right?


On 4 November 2013 19:04, Bozhidar Batsov <bozhidar@batsov.com> wrote:

> I didn't like this as well, but I added it since that exact text appears
> in the docstrings of many major modes. I though it was something like an
> unwritten convention, but I guess many people have simply been copy-pasting
> the same code over the years.  I'll have it removed.
>
>
> On 4 November 2013 18:43, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>> > +Entry to this mode calls the value of `ruby-mode-hook'
>> > +if that value is non-nil."
>>
>> That's problematic:
>> - it's redundant since define-derived-mode already adds "In addition to
>>   any hooks its parent mode `prog-mode' might have run,\nthis mode runs
>>   the hook `ruby-mode-hook', as the final step\nduring initialization."
>> - hooks aren't "called" but are "run".
>> - it's not just "the value of `ruby-mode-hook'", but the *values*, since
>>   hooks use both the buffer-local and the global value of the symbol.
>> - the hook is run even if it is nil (or unbound): running it will simply
>>   not do anything.
>>
>>
>>         Stefan
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2012 bytes --]

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

* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
  2013-11-04 17:05     ` Bozhidar Batsov
@ 2013-11-04 18:50       ` Stefan Monnier
  2013-11-05 10:22         ` Bozhidar Batsov
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-11-04 18:50 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: emacs-devel

> This text should probably be removed from the description of other major
> modes as well, right?

Sure (if they use define-derived-mode).


        Stefan



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

* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
  2013-11-04 18:50       ` Stefan Monnier
@ 2013-11-05 10:22         ` Bozhidar Batsov
  2013-11-05 17:01           ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Bozhidar Batsov @ 2013-11-05 10:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

OK. I've removed the text from the most prominent mode docstrings. The
chance of someone running across it now will be significantly smaller.


On 4 November 2013 20:50, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > This text should probably be removed from the description of other major
> > modes as well, right?
>
> Sure (if they use define-derived-mode).
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 811 bytes --]

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

* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
  2013-11-05 10:22         ` Bozhidar Batsov
@ 2013-11-05 17:01           ` Stefan Monnier
  2013-11-05 17:14             ` Bozhidar Batsov
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-11-05 17:01 UTC (permalink / raw)
  To: Bozhidar Batsov; +Cc: emacs-devel

> OK. I've removed the text from the most prominent mode docstrings.  The
> chance of someone running across it now will be significantly smaller.

Thanks.  I fixed your ChangeLog so it fits within 80 columns.
Take a look also at how I compressed it ;-)


        Stefan



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

* Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
  2013-11-05 17:01           ` Stefan Monnier
@ 2013-11-05 17:14             ` Bozhidar Batsov
  0 siblings, 0 replies; 7+ messages in thread
From: Bozhidar Batsov @ 2013-11-05 17:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

Will do! I definitely wasn't sure what was the expected way to write that
particular entry. Thanks for cleaning it up!


On 5 November 2013 19:01, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > OK. I've removed the text from the most prominent mode docstrings.  The
> > chance of someone running across it now will be significantly smaller.
>
> Thanks.  I fixed your ChangeLog so it fits within 80 columns.
> Take a look also at how I compressed it ;-)
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 911 bytes --]

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

end of thread, other threads:[~2013-11-05 17:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1VdL1r-0000Yy-3H@vcs.savannah.gnu.org>
2013-11-04 16:43 ` [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring Stefan Monnier
2013-11-04 17:04   ` Bozhidar Batsov
2013-11-04 17:05     ` Bozhidar Batsov
2013-11-04 18:50       ` Stefan Monnier
2013-11-05 10:22         ` Bozhidar Batsov
2013-11-05 17:01           ` Stefan Monnier
2013-11-05 17:14             ` Bozhidar Batsov

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