html-helper-mode overwrites 'css-mode-hook'

Bug #1389048 reported by Ryou Ohsawa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
html-helper-mode (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package: html-helper-mode
Distribution: 14.04 Trusty

I'm using emacs24 and edit html and css files using 'html-helper-mode' and 'css-mode', respectively.

I customize 'css-mode' by adding some codes to 'css-mode-hook'. This works well when I open a css file solely in emacs, but the customized options for 'css-mode' are wiped out when I open a html file first and then a css file.

I find that 'css-mode-hook' is overwrited when 'html-helper-mode' is launched. The 2425th--2430th lines of 'html-helper-mode.el' set up 'css-mode-hook'. I think these lines should be modified as below:

(condition-case nil
  (cond
- ((or (boundp css-mode-hook) css-mode-hook)
+ ((or (boundp 'css-mode-hook) css-mode-hook)
    (add-hook 'css-mode-hook 'html-script-release-setup))
    (t (setq css-mode-hook 'html-script-release-setup)))
    (error (setq css-mode-hook 'html-script-release-setup)))

After the modification above, 'css-mode-hook' works well so far.

Tags: patch
Revision history for this message
Ryou Ohsawa (xr0038) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "html-helper-mode-overwrite-css-mode-hook.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.