emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mod


From: Bozhidar Batsov
Subject: Re: [Emacs-diffs] trunk r114939: * lisp/progmodes/ruby-mode.el (ruby-mode): Clean up docstring.
Date: Mon, 4 Nov 2013 19:04:54 +0200

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 <address@hidden> 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


reply via email to

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