[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28863: 26.0.90; [PATCH] Don't clobber docstrings of explicitly-defin
From: |
Phil Sainty |
Subject: |
bug#28863: 26.0.90; [PATCH] Don't clobber docstrings of explicitly-defined mode hook variables |
Date: |
Sun, 22 Oct 2017 15:51:29 +1300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 22/10/17 12:03, Noam Postavsky wrote:
> Giving a default value to a hook variable is problematic, because if
> the user has (add-hook 'foo-mode-hook 'some-other-fun) then they lose
> the default-value if foo-mode.el wasn't loaded yet.
Yes indeed; but there are certainly examples of this pattern in use.
I'll follow up separately about this, but I don't it has any direct
bearing on this patch.
> Seems fine to me.
> My only nitpick is that you seem to be adding tab-indented lines.
Yes, that seemed consistent with the existing sources (or at least there
was a mixture of tabs vs spaces, as I recall).
...and I now see that repository's .dir-locals.el sets indent-tabs-mode
to nil for emacs-lisp-mode. I didn't realise that had happened.
(Has a read of bug #20323.)
I'll remember this in future.
If no one objects to this being committed, then let's just untabify the
changes and amend the commit before pushing.
-Phil