Html helper mode is an Emacs Lisp major mode for editing HTML files witten by Nelson Minar and now mantained by me . It now includes support for JSP(it seems it works and uses JDE), PHP and ASP server scripting languages (For a full support of ASP you should have visual-basic-mode in your load-path, too).
Nelson's greatest job was the inclusion of templates supports via tempo.el that speed up a lot writing new documents.
html-helper-mode A major mode for editing HTML sourcecode with Emacs. Added some support for PHP, JSP (it seems it works ) and ASP server scripting, that is script fontification with font-lock-mode and narrowing with mode switch:
while editing the whole HTML document the [PJA][HS]P script is painted in a different color and, upon request, the mode narrows the editing to the script block around the point changing fontification accordingly to the expected script language. You can choose explicitly the appropriate scripting mode or just press F4 and let Emacs try to guess the kind of script the cursor is on (many thanks to Stan Lanning).
This mode was borne under Windows when I first faced ASP. More information about Emacs running on Micro$oft angbands in the NTEmacs site (NTEmacs is the port of Emacs to Micro$oft angbands). Here are two HTML documents from Nelson Minar, the original author (thanks!) with some documentation and hints about configuring this mode.
The original website at http://www.gest.unipd.it/~saint/hth.html has gone 404. Therefore this is the only website for this project.
You can visit the project page here and the download area where you can find the released files.Beta test!
A beta version with:
Bug fix: html-helper-buffers doesn't bloat anymore.
In Emacs 21 fontification is broken and could even hang Emacs!NEW IN VERSION 3.0.4india
Bug fix (XEmacs specific): hopefully Graham Gough found the way to fix face problems with XEmacs. Requires psgml-html.el!
Changed html-helper-insert-or-wipe so that it insert empty tag attributes if html-helper-mode-insert-attributes-always is non nil
string-bytes re-entered the game due a file loss and restore :(
Fixed indentation engine (handles <link> tags correctly)NEW IN VERSION 3.0.4hotel
Warning: the package released on Thursday, February 22nd, 2001 is broken (a capitalized symbol slipped in the code and the *Messages* overrunning prop was still there). My apologies.
Bug fix: comment-region now works (comment-end must contain a simple string)
Bug fix: fontifying messages don't overrun *Messages* anymore (the spinning prop is gone, replaced by a pulsating strip of dots)NEW IN VERSION 3.0.4golf
Bug fix: string-bytes doesn't exist in XEmacs (Bug reported by Rashid Butte)NEW IN VERSION 3.0.4fox-trot
Jack Vinson supplies this code to handle the case when browse-url-browser-function is a list and not a function (it can be a list, says its documentation)
Fixed version number (it was still to 3.0.4delta)NEW IN VERSION 3.0.4echo
Karel Sprenger fixed the indentation engine : Just downloaded v3.0.4delta and discovered that it still doesn't indent table stuff as expected despite your fixes. Looking at the code I discovered that the relevant code appears twice (hidden by misplaced folding-mode tags).NEW IN VERSION 3.0.4delta
html-helper-release-setup did use C-f12 instead of f4, now I set it to html-script-toggle-key. Corrected modes docstring. Now if you don't like f4 as special key for jumping back and forth, just define html-script-toggle-key in your .emacsNEW IN VERSION 3.0.4charlie
Reworked indenting engine. Now indentation is uniform (2 character default). It recognizes indentation sensible tags with attributes and needs that they tags stay on separate lines (C mode needs curly braces on separate lines too, so this is acceptable :) )NEW IN VERSION 3.0.4bravo
Changed the way html-helper-mode-uses-JDE is set in the mode source, so that it automatically detects JDE.
Added (require 'psgml-html) for XEmacs users (kind suggestion by XEmacs developer firstname.lastname@example.org)
Changed ASP and comment blocks fontifying message
Created a changelog file (source is big enought by itself )
Reworked syntax higlighting. Cut some regexp and now all tags, except anchors, are higlighted the same way:
<tag attribute="value" attribute=value>
where the colors are my choices for:
Progress message during highlighting are a bit lighter, no more growing strips of dots, now it uses a small "spinning prop"NEW IN VERSION 3.0.4
The mode switch uses a brand new code working with alists. Each buffer is associated with the flavour of html-helper-mode used when it was loaded. That solves problems introduced with JSP support.
JDE support now works. Many thanks to Paul Kinnucan for his kind (kind is not enought) help in finding the right hook to use. No more File mode specification error: (void-variable jde-entering-java-buffer-hooks).NEW IN VERSION 22.214.171.124:
charlie subrelease: Managed a difference in Emacs 20.x, Emacs 19.x and Xemacs about the font-lock-builtin-face. Now Emacs 19.x uses a scratch built font-lock-builtin-face (orchid) wile Xemacs uses font-lock-preprocessor-face. Thanks to Peter Neergaard for the solution
bravo subrelease: Corrected some regexps where there was a \\s instead of a \\w (Xemacs barfs on the previous one). Thanks to Peter Neergaard for the bug report and help in the solution
Changed default value for html-helper-mode-uses-visual-basic: the default distribution does not offer visual-basic-mode. WARNING!!.THIS CHANGES PREVIOUS DEFAULT!!
Changed comment matching. Used a function instead of a regexp. Comments are used to hide script code from browsers that can't handle them, and long comments can overflow the regexp stack. Geeeeeeeeeeeee, now it works even better than sgml/html mode
Added a small file (that you can load-file from your .emacs) that enables the customization even before loading the mode
Added JDE support. I used the
jde-entering-java-buffer-hooksJDE hook for the mode switching, it could be broken so consider it experimental. It seems that this made the whole stuff a little flaky. As reported in NTEmacs mailing list I experienced a ABORT-RETRY-IGNORE dialogs using this new mode (but I had it once with a °shell° buffer active trying to kill a find with C-c). Finally I had report of slowness when using JDE for JSP blocks, but I didn't experience it - I load JDE on startup -
The mode is now distributed as a tar.gz file (WinZip handles, so no problems for those marooned on Win32...).NEW IN VERSION 3:
Made in Free Software