From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel 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 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c336763d216704ea5ceab5 X-Trace: ger.gmane.org 1383584702 31434 80.91.229.3 (4 Nov 2013 17:05:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Nov 2013 17:05:02 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 04 18:05:07 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdNaL-0001s4-At for ged-emacs-devel@m.gmane.org; Mon, 04 Nov 2013 18:05:05 +0100 Original-Received: from localhost ([::1]:51123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNaK-0004pP-LS for ged-emacs-devel@m.gmane.org; Mon, 04 Nov 2013 12:05:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNaG-0004oC-QW for emacs-devel@gnu.org; Mon, 04 Nov 2013 12:05:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdNaB-0005J0-Fw for emacs-devel@gnu.org; Mon, 04 Nov 2013 12:05:00 -0500 Original-Received: from mail-oa0-x22d.google.com ([2607:f8b0:4003:c02::22d]:50639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNaB-0005Ia-7t for emacs-devel@gnu.org; Mon, 04 Nov 2013 12:04:55 -0500 Original-Received: by mail-oa0-f45.google.com with SMTP id i4so7441864oah.18 for ; Mon, 04 Nov 2013 09:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=o2aPLVdfWVB0cOxUObHF9M8h1jbR47r29Jgbdcra8KI=; b=u3BPOsmky9wHqKBuZiFwFN3SyZPs1eb4iYoROupD9aXMjHt6W0+GzWQkBezFB6njw2 q4Mi8OahXK/+6MpB6AgGL6hMsNsZ4MD00gPzDTPJO4ZgvqT79+1MCQohIWgLRki8N9qi u2+fFYN17eM0YKurF/9p/Qi9G9GdYWuO5a8HX8TDZErJ6R86g7J90JVLGTuhFrxGHYlC kMqk0m504CaXLjErKg4dwu1+VjOYJCLhHkHeFJVPNoBvmv9tEMsF7wYmuVeNSLyIgXQu xJ2W6PfHrDwdXMIoMoA6cDEKpbAW7hpWJcU8e2cxWaylErzLjrgchCBmCXBO3h0LDAty Tvkg== X-Received: by 10.182.230.135 with SMTP id sy7mr14847846obc.24.1383584694605; Mon, 04 Nov 2013 09:04:54 -0800 (PST) Original-Received: by 10.76.131.116 with HTTP; Mon, 4 Nov 2013 09:04:54 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: ZjOT8RynKZyM7Rq50_O1sRgZqco X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164933 Archived-At: --001a11c336763d216704ea5ceab5 Content-Type: text/plain; charset=UTF-8 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 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 > --001a11c336763d216704ea5ceab5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 s= omething like an unwritten convention, but I guess many people have simply = been copy-pasting the same code over the years. =C2=A0I'll have it remo= ved.


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 additi= on to
=C2=A0 any hooks its parent mode `prog-mode' might have run,\nthis mode= runs
=C2=A0 the hook `ruby-mode-hook', as the final step\nduring initializat= ion."
- hooks aren't "called" but are "run".
- it's not just "the value of `ruby-mode-hook'", but the = *values*, since
=C2=A0 hooks use both the buffer-local and the global value of the symbol.<= br> - the hook is run even if it is nil (or unbound): running it will simply =C2=A0 not do anything.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--001a11c336763d216704ea5ceab5--