GNU bug report logs -
#21188
Preview installed from the package manager changes LaTeX-mode-hook
Previous Next
Reported by: Joseph Mingrone <jrm <at> ftfl.ca>
Date: Tue, 4 Aug 2015 18:26:02 UTC
Severity: normal
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Joseph Mingrone <jrm <at> ftfl.ca> writes:
Hi Joseph,
>> This "wiping" is strange. `LaTeX-preview-setup' removes itself from
>> `LaTeX-mode-hook' and adds `preview-mode-setup' instead. However,
>> this should not affect other functions which also happen to be added
>> to `LaTeX-mode-hook'.
>
> If LaTeX-mode-hook is customized so that the customizations aren't
> applied immediately, then the value of LaTeX-mode-hook is not set
> before the line (add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) in
> auctex-autoloads.el and after that call, regardless of the contents of
> LaTeX-preview-setup, the customizations are not applied.
Exactly that's the case.
> However, if I comment out the line (add-hook 'LaTeX-mode-hook
> #'LaTeX-preview-setup) inside auctex-autoloads.el then the value
> customizations are applied.
Yup. I don't think that issue is actually related to all AUCTeX but it
works the way for all hooks with customization. The only thing that
triggers the problem in AUCTeX is that AUCTeX itself adds a function to
the hook (and not as initial value).
I couldn't find any documentation that would define the interplay of
customize and hooks so I've asked for clarification on emacs-devel.
https://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00172.html
Until now, there are no answers but we'll see what the experts say.
IMHO, the current behavior is wrong. Maybe a better approach was if
defcustoms of type hook wouldn't use `set-default' as :set function but
`add-hook'. Then, hook customizations would have purely additive
semantics which sounds sensible to me.
>> I just tried with emacs 24.5 and ELPA AUCTeX 11.88.6.
>
> I should have mentioned that I'm running 24.5.1 with the same AUCTeX.
It's the same with emacs 25 from the Git master's HEAD.
Bye,
Tassilo
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 9 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.